Apache OpenOffice (AOO) Bugzilla – Issue 35189
Loading of a document in 5.0 format with embedded object does not work.
Last modified: 2004-11-03 15:11:33 UTC
The problem is reproducible at least with calc embedded in writer and writer embedded in calc. Just create such a document using SO5.2 and try to load it from SO8. The embedded document contents are lost. It seems to be an import problem of binary filters. I have spent some time investigating the problem and have reconized that in the method 'SwXMLTextParagraphExport::_exportTextEmbedded()' the statement 'Reference < XComponent > xComp = xEOS->getEmbeddedObject();' returns the component with walid contents of embedded object. So the contents seems to be lost on further export.
AW: After teh ressource problem in binfilter was fixed, i now get different problems. Need to investigate further.
AW: Ineresting: At load time, i get a lot of assertions. After that, the embedded OLE is there as object, but with no content. AW: Saving SW with embedded calc in 5.2 format and loading in SO5.2 is Okay. AW: Seems that with OLE changes the FlatXML OLE transfer is broken. Investigating further...
AW: saving and loading SW with embedded SC in current version FileFormat gives a lot of assertions at load time, too, but at least can re-load the embedded object with content.
AW->MAV: After loading such documents, the OLE is created (and correctly positioned), but empty. Own XML format works. The difference is that binfilter is using FlatXML with embedded OLEs. In that case, in xmloff/source/draw/ximpshap.cxx SdXMLObjectShapeContext::CreateChildContext a XMLEmbeddedObjectImportContext is used. There, formally in XMLEmbeddedObjectImportContext::EndElement, the imported OLE model was saved. To make that stuff work, SdXMLObjectShapeContext::CreateChildContext makes the created context import to the local model and thus to the local storage. This should mean that the saving code in XMLEmbeddedObjectImportContext::EndElement is indeed not needed. It looks like someone else (sfx2?) later thinks the OLE is not loaded and loads it from the empty storage. Discussed that with CL. We think it's too dangerous for us to continue looking for this or trying to fix it in code we do not know. For further questions, please ask me (AW) or CL.
The loading of 5.0 document did not work starting from m49 version. There were no crash during the loading, but the contents of the loaded embedded object were empty. That means that this functionality does not work for long time. So for now I do not think that this problem was introduced by mav09 integration. MAV->AW: sending to you as discussed.
AW: Debugged with NN, seems to be a problem with importing the FlatXML embedded calc (as an example). The calc stream is filled, but not interpreted correctly. AW: Discussed with MIB, found that it was an oasis FileFormat error which is fixed in CWS oasisbf1 (#i32677#). Setting to double. *** This issue has been marked as a duplicate of 32677 ***
AW: closing due to double. Crash is fixed (in #i31902), so this one is prio3, too.