Apache OpenOffice (AOO) Bugzilla – Issue 85272
XML import crashes when using a template for import
Last modified: 2009-09-11 10:54:12 UTC
When using a template for importing XML as Impress presentation (.odp), Impress crashes. Even if the xslt is proofen to be okay. When using the same filter, same imput-file, but no template, Impress imports the file. Reproduce: A) crash - install the attached xml-filter-bug.jar as a XML import filter This will give you an "Freemind 0.7 as Presentation" importer - test this filter using the attached mindmap-mini.mm -> ooo crashes B) no crash - Remove the "Template for import" from "Freemind 0.7 as Presentation" - test this filter using the attached mindmap-mini.mm -> no crash, file get imported So same input-file, same filter. Using with template crashes, using wothiut template works (but does not have the template ;-[
Created attachment 50886 [details] XML importfilter "Freemind 0.7 as Presentation"
Created attachment 50887 [details] sample input file
confirming the crash in DEV300m17 also on Solaris SPARC; It is not regression because it crashes also in the SRC680 build.
sus->mba: Could you please test this scenario in your m20 CWS as discussed? Thanks in advance, Svante
The crash happens because the Impress document does not support the XStyleLoader interface. Christian, is this a bug or intended behavior? Without a support for this Impress xslt filters can't use templates. Here's the code in xmlfilteradaptor: Reference< XNameAccess >xName; if(xstylefamiliessupplier.is()) xName=xstylefamiliessupplier->getStyleFamilies(); Reference< XStyleLoader > xstyleLoader (xstylefamiliessupplier->getStyleFamilies(), UNO_QUERY); if(xstyleLoader.is()) xName=xstylefamiliessupplier->getStyleFamilies(); xStyleLoader is NULL. Svante, whatever Christian's answer will be: the filter code shouldn't crash in that case. While xStyleLoader is checked for being NULL in the code above it is used uncoditional below that: Sequence < OUString > elementNames = xName->getElementNames(); Sequence<com::sun::star::beans::PropertyValue> pValue=xstyleLoader->getStyleLoaderOptions(); and in xstyleLoader->loadStylesFromURL(msTemplateName,pValue); So this needs to be fixed in the filter anyway.
SUS->MBA: Thanks for your help, I will take care of this!
Here is the docu for the interface: http://api.openoffice.org/docs/common/ref/com/sun/star/style/XStyleLoader.html As discussed with CL, I will fix the crash and write CL a follow up enhancement/issue/task.. Svante
Fixed the crash in XSLTFILTER12
As my daughter was born three days earlier than expected, I have to postpone this CWS to the next OOo release. I will be in a parental absence till mid of March. Sorry for the delay. Svante
Closed as integrated in DEV300m55