Apache OpenOffice (AOO) Bugzilla – Issue 2364
Star Office 5.2 PAI:OLE objects on SunOS 5.8.
Last modified: 2013-02-24 21:08:51 UTC
The project now I am working on is the internal project at ACE group of Sun Microsystems Inc. Canada, and it needs to use Star Office 5.2 API which I got from the "star office development kit v1.0(sdk 1.0)", to communicate with the Star Office documents. I am currently experiencing some problems with the soffice 5.2 API. Mr. Michael Honnig refers me to report bugs here. I am writing a java program that need to use star office v5.2 API to search and replace texts in the text document. In the text document, it contains 20 OLE objects, and each OLE object is Spreadsheet document. I also need to search and replace texts in the OLE objects (Spreadsheets). The keys and values for replacement are more than one thousand pairs. PROBLEMS: 1. The java program searchs and replaces all texts in the text document first, and then starts searching and replacing texts in the OLE objects. After the program searchs and replaces 4th or 5th OLE objects, the star office always crashes. Data is lost. There is no any error message and the java program is still running. It is always nomal, when the text document contains less than 4 OLE objects. 2. In order to avoid the above problem, I do the task in two programs. At first, I run one program for replacing all texts in the text document, then close the first program. Then, I run the second program for replacing all texts in OLE objects in the text document. This ways seems OK, when the document contains less than 4 OLE objects. When it has more than 4 OLE objects, there is some problems. I will always get the error message, " An unrecoverable error has occurred. All modified files have been saved and can probably be recovered at program restart.", whenever I dispose the doc frame in my java programs or I close the doc manually. I attach the way I grab the OLE objects and replace texts in those objects. TextEmbeddedObjectsSupplier = (XTextEmbeddedObjectsSupplier) UnoRuntime.queryInterfac( XTextEmbeddedObjectsSupplier.class, xTextDocument ); xNameAccess = xTextEmbeddedObjectsSupplier.getEmbeddedObjects String OLENames[] = xNameAccess.getElementNames(); XTextEmbeddedObject xOLE = (XTextEmbeddedObject)xNameAccess.getByName(OLENames[index]); XEmbeddedObjectSupplier oEOS = (XEmbeddedObjectSupplier) UnoRuntime.queryInterface(XEmbeddedObjectSupplier.class, xOLE); XInterface oInt = oEOS.getEmbeddedObject(); XSpreadsheetDocument SDoc = (XSpreadsheetDocument)UnoRuntime.queryInterface(XSpreadsheetDocument.class,oInt); XSpreadsheets oSheets = SDoc.getSheets() ; XIndexAccess oIndexSheets = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, oSheets); int totalSheets = oIndexSheets.getCount(); for(int j = 0; j < totalSheets; j++){ oSheet = (XSpreadsheet) oIndexSheets.getByIndex(j); xReplaceable = ( XReplaceable ) UnoRuntime.queryInterface( XReplaceable.class, oSheet); xReplaceDescriptor = ( XReplaceDescriptor) xReplaceable.createReplaceDescriptor(); Iterator iter = tagMap.keySet().iterator(); while(iter.hasNext()) { String tagStr = (String)iter.next(); xReplaceDescriptor.setSearchString(tagStr); xReplaceDescriptor.setReplaceString((String)tagMap.get(tagStr)); xReplaceable.replaceAll(xReplaceDescriptor); }//end while }//end inner for Also, I would like to attach the example text document for you. But, there is no way to attach the file. Thanks Candy Chen
Created attachment 742 [details] This is an example star office text document that contains one OLE object.
Hi, version 605 is much to old. Please try current 641. Regards, Peter
EOL
I can use star office 5.2 only.
Hi Michael, looks like this one should be for you. Regards, Peter
We cannot accept StarOffice 5.2 bug reports here. That's why I asked you to report the 5.2 case on bugtraq. I presume, you did that too? If not, you can coyp your text simply to bugtraq.
changing qa contact
closing