diff options
Diffstat (limited to 'sc/source/filter/xml/xmlimprt.cxx')
-rw-r--r-- | sc/source/filter/xml/xmlimprt.cxx | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index ba24832ccb12..d4133686d2c8 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -1912,7 +1912,7 @@ SvXMLImportContext *ScXMLImport::CreateMetaContext( { SvXMLImportContext *pContext(0); - if( !IsStylesOnlyMode() && (getImportFlags() & IMPORT_META)) + if (getImportFlags() & IMPORT_META) { uno::Reference<xml::sax::XDocumentHandler> xDocBuilder( mxServiceFactory->createInstance(::rtl::OUString::createFromAscii( @@ -1920,9 +1920,11 @@ SvXMLImportContext *ScXMLImport::CreateMetaContext( uno::UNO_QUERY_THROW); uno::Reference<document::XDocumentPropertiesSupplier> xDPS( GetModel(), uno::UNO_QUERY_THROW); + uno::Reference<document::XDocumentProperties> const xDocProps( + (IsStylesOnlyMode()) ? 0 : xDPS->getDocumentProperties()); pContext = new SvXMLMetaDocumentContext(*this, XML_NAMESPACE_OFFICE, rLocalName, - xDPS->getDocumentProperties(), xDocBuilder); + xDocProps, xDocBuilder); } if( !pContext ) @@ -2636,6 +2638,23 @@ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeE } } + uno::Reference< beans::XPropertySet > const xImportInfo( getImportInfo() ); + uno::Reference< beans::XPropertySetInfo > const xPropertySetInfo( + xImportInfo.is() ? xImportInfo->getPropertySetInfo() : 0); + if (xPropertySetInfo.is()) + { + ::rtl::OUString const sOrganizerMode( + RTL_CONSTASCII_USTRINGPARAM("OrganizerMode")); + if (xPropertySetInfo->hasPropertyByName(sOrganizerMode)) + { + sal_Bool bStyleOnly(sal_False); + if (xImportInfo->getPropertyValue(sOrganizerMode) >>= bStyleOnly) + { + bLoadDoc = !bStyleOnly; + } + } + } + UnlockSolarMutex(); } |