summaryrefslogtreecommitdiff
path: root/xmloff/source/draw
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx21
1 files changed, 18 insertions, 3 deletions
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index 6ffc7140531e..6e556ac84a31 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -333,6 +333,9 @@ void SAL_CALL SdXMLImport::setTargetDocument( const uno::Reference< lang::XCompo
if(xFamSup.is())
mxDocStyleFamilies = xFamSup->getStyleFamilies();
+ if (!mbLoadDoc)
+ return;
+
// prepare access to master pages
uno::Reference < drawing::XMasterPagesSupplier > xMasterPagesSupplier(GetModel(), uno::UNO_QUERY);
if(xMasterPagesSupplier.is())
@@ -372,6 +375,16 @@ void SAL_CALL SdXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen
{
SvXMLImport::initialize( aArguments );
+ OUString const sOrganizerMode("OrganizerMode");
+ bool bStyleOnly(false);
+
+ css::beans::PropertyValue aPropValue;
+ if (aArguments.hasElements() && (aArguments[0] >>= aPropValue) && aPropValue.Name == sOrganizerMode)
+ {
+ aPropValue.Value >>= bStyleOnly;
+ mbLoadDoc = !bStyleOnly;
+ }
+
uno::Reference< beans::XPropertySet > xInfoSet( getImportInfo() );
if( !xInfoSet.is() )
return;
@@ -384,11 +397,8 @@ void SAL_CALL SdXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen
if( xInfoSetInfo->hasPropertyByName( gsPreview ) )
xInfoSet->getPropertyValue( gsPreview ) >>= mbPreview;
- OUString const sOrganizerMode(
- "OrganizerMode");
if (xInfoSetInfo->hasPropertyByName(sOrganizerMode))
{
- bool bStyleOnly(false);
if (xInfoSet->getPropertyValue(sOrganizerMode) >>= bStyleOnly)
{
mbLoadDoc = !bStyleOnly;
@@ -419,6 +429,11 @@ SvXMLImportContext *SdXMLImport::CreateFastContext( sal_Int32 nElement,
pContext = new SdXMLFlatDocContext_Impl( *this, xDPS->getDocumentProperties());
}
break;
+ case XML_ELEMENT( OFFICE, XML_STYLES ):
+ // internal xml file for built in styles
+ if (!mbLoadDoc)
+ pContext = CreateStylesContext();
+ break;
}
return pContext;
}