Issue 2364 - Star Office 5.2 PAI:OLE objects on SunOS 5.8.
Summary: Star Office 5.2 PAI:OLE objects on SunOS 5.8.
Status: CLOSED WONT_FIX
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: Sun Solaris
: P1 (highest) Trivial
Target Milestone: ---
Assignee: ooo
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-30 19:08 UTC by Unknown
Modified: 2013-02-24 21:08 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
This is an example star office text document that contains one OLE object. (54.00 KB, application/octet-stream)
2001-11-30 19:18 UTC, Unknown
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2001-11-30 19:08:25 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
Comment 1 Unknown 2001-11-30 19:18:43 UTC
Created attachment 742 [details]
This is an example star office text document that contains one OLE object.
Comment 2 peter.junge 2001-12-03 09:00:27 UTC
Hi,
version 605 is much to old. Please try current 641.
Regards, Peter
Comment 3 peter.junge 2001-12-03 09:00:57 UTC
EOL
Comment 4 Unknown 2001-12-03 16:56:19 UTC
I can use star office 5.2 only.
Comment 5 peter.junge 2001-12-04 12:19:06 UTC
Hi Michael,
looks like this one should be for you.
Regards, Peter
Comment 6 ooo 2001-12-06 09:56:54 UTC
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.
Comment 7 Unknown 2001-12-06 19:42:34 UTC
changing qa contact
Comment 8 ooo 2003-01-10 10:20:32 UTC
closing