summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/sdxmlimp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/draw/sdxmlimp.cxx')
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx21
1 files changed, 15 insertions, 6 deletions
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index 578b3eefc719..7b69609fafe9 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -30,15 +30,11 @@
#include <tools/string.hxx>
-#ifndef _XMLOFF_XMLMETAI_HXX
#include <xmloff/xmlscripti.hxx>
-#endif
#include "sdxmlimp_impl.hxx"
#include "ximpbody.hxx"
-#ifndef _SFX_XMLMETAI_HXX
#include <xmloff/xmlmetai.hxx>
-#endif
#include "ximpstyl.hxx"
#include "xmloff/xmlnmspe.hxx"
#include <xmloff/xmltoken.hxx>
@@ -447,6 +443,17 @@ void SAL_CALL SdXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen
if( xInfoSetInfo->hasPropertyByName( msPreview ) )
xInfoSet->getPropertyValue( msPreview ) >>= mbPreview;
+
+ ::rtl::OUString const sOrganizerMode(
+ RTL_CONSTASCII_USTRINGPARAM("OrganizerMode"));
+ if (xInfoSetInfo->hasPropertyByName(sOrganizerMode))
+ {
+ sal_Bool bStyleOnly(sal_False);
+ if (xInfoSet->getPropertyValue(sOrganizerMode) >>= bStyleOnly)
+ {
+ mbLoadDoc = !bStyleOnly;
+ }
+ }
}
}
@@ -765,7 +772,7 @@ SvXMLImportContext *SdXMLImport::CreateMetaContext(const OUString& rLocalName,
{
SvXMLImportContext* pContext = 0L;
- if (!IsStylesOnlyMode() && (getImportFlags() & IMPORT_META))
+ if (getImportFlags() & IMPORT_META)
{
uno::Reference<xml::sax::XDocumentHandler> xDocBuilder(
mxServiceFactory->createInstance(::rtl::OUString::createFromAscii(
@@ -773,9 +780,11 @@ SvXMLImportContext *SdXMLImport::CreateMetaContext(const OUString& rLocalName,
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)