openjdk team mailing list archive
-
openjdk team
-
Mailing list archive
-
Message #01392
[Bug 306501] Re: OOo crashed with unexpectet JAVA Runtime error
copied the following from a bug marked as a duplicate of this one (bug
307173 ) :
The crash happens in the SUB setFax, when the writer document with the
fax-data, which is opend in this routine, is closed by the user and the
program execution rteturns to the main macro and any other action
(button) is activated. In the older version the same program worked
perfectly until i did the update last week. As far as i remember it was
a update of the base module.
In the meantime i found the reason for that problem!!
When then word document is closed manually, OOo closes also the Database without saving the changes! For some reason i did not activate the Quickstarter of OOo. Now i changed that and the crash does happen any more.
But that ist definitly a Bug in the OpenOffice! Closing a Writer
document must not close the Database System!
SUB setFax
DIM sFaxDatei as string
closeFax
sText1 = oFaxe.getControl("Lieferant").getText &".odt"
sFaxDatei = ConvertToUrl(sVerzeichnis & "Faxe/" & sText1)
IF Dir(sFaxDatei)<>"" THEN
oFax = StarDesktop.LoadComponentfromURL(sFaxDatei, "_blank", 0, Args())
ELSE
MsgBox "Die Fax Datei " & sFaxDatei & " ist nicht vorhanden!",16,"Faxe laden"
END IF
END SUB
--
OOo crashed with unexpectet JAVA Runtime error
https://bugs.launchpad.net/bugs/306501
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-6 in ubuntu.
Status in “openjdk-6” source package in Ubuntu: New
Bug description:
The OOo crashes every time when the following BASIC macro "FaxAuftraege" is closed after using the function. The Crash apears since the last update of the Ubuntu 8.10 System (i think it was yesterday or the day before yesterday).
SUB FaxAuftraege
oAuftrag.getControl("BRahmen").setEnable(False)
oFaxe = CreateUnoDialog(DialogLibraries.ArtFrameManager.Faxe)
oFaxe.Model.PositionX = iXpos
oFaxe.Model.PositionY = iYpos
zeile = 1
GalerieSet = Anweisung.executeQuery("SELECT * FROM ""Galerie""") ' Abfrage durchführen
IF NOT IsNull(GalerieSet) THEN ' When ResultSet nicht leer
GalerieSet.NEXT
GalerieSet.NEXT
zeile = 1
FOR i = 2 TO 17
sText = GalerieSet.getString(i) ' Lieferanten aus DB laden
IF sText <>"" THEN ' bis 1. leeres Feld gefunden wird
oFaxe.getControl("Lieferant").addItem(sText,zeile)
zeile=zeile+1
ELSE
EXIT FOR
END IF
NEXT
GalerieSet.NEXT
FOR i = 2 TO 17
sText = GalerieSet.getString(i) ' Lieferanten aus DB laden
IF sText <>"" THEN ' bis 1. leeres Feld gefunden wird
oFaxe.getControl("Lieferant").addItem(sText,zeile)
zeile=zeile+1
ELSE
EXIT FOR
END IF
NEXT
END IF
oFaxe.Execute()
oAuftrag.getControl("BRahmen").setEnable(True)
oFaxe.endExecute()
closeFax
END SUB
SUB closeFax
DIM oDesktop As Object, oDocs As Object
DIM oDoc As Object, oComponents As Object
GlobalScope.BasicLibraries.LoadLibrary("Tools")
oComponents = StarDesktop.getComponents()
oDocs = oComponents.createEnumeration()
Do WHILE oDocs.hasMoreElements()
oDoc = oDocs.nextElement()
On Error Goto Weiter
IF FileNameoutofPath(odoc.geturl()) = sText1 THEN
IF (oFax.isModified()) THEN
oFax.store()
END IF
oFax.close(True)
sText1 = ""
EXIT Do
END IF
weiter:
Loop
END SUB
FUNCTION isopenFax As Boolean
GlobalScope.BasicLibraries.LoadLibrary("Tools")
DIM oDesktop As Object, oDocs As Object
DIM oDoc As Object, oComponents As Object
oComponents = StarDesktop.getComponents()
oDocs = oComponents.createEnumeration()
Do WHILE oDocs.hasMoreElements()
oDoc = oDocs.nextElement()
On Error Goto Weiter
IF FileNameoutofPath(odoc.geturl()) = sText1 THEN
isopenFax = True
EXIT FUNCTION
END IF
weiter:
Loop
isopenFax = False
END FUNCTION
SUB druckeFax
setFax
PrintProperties(0).Name = "CopyCount"
PrintProperties(0).Value = 1 ' Anzahl der Kopien
MsgBox "Bitte DIN A 4 Blatt einlege"
oFax.print(PrintProperties())
Wait(8500)
END SUB
SUB killFax
DIM j AS INTEGER
setFax
oTables = createunoService("com.sun.star.text.TextTables")
oTables = oFax.getTextTables
oTable = createunoService("com.sun.star.text.TextTable")
oTable = oTables.getByName("Bestellung")
FOR i = 1 to 15
FOR j = 0 to 5
oTable.getCellByPosition(j,i).String = ""
NEXT
NEXT
closeFax
END SUB
SUB setFax
DIM sFaxDatei as string
closeFax
sText1 = oFaxe.getControl("Lieferant").getText &".odt"
sFaxDatei = ConvertToUrl(sVerzeichnis & "Faxe/" & sText1)
IF Dir(sFaxDatei)<>"" THEN
oFax = StarDesktop.LoadComponentfromURL(sFaxDatei, "_blank", 0, Args())
ELSE
MsgBox "Die Fax Datei " & sFaxDatei & " ist nicht vorhanden!",16,"Faxe laden"
END IF
END SUB
References