summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editeng/source/xml/xmltxtimp.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx
index fdfc588c2679..6497ac2e9ae8 100644
--- a/editeng/source/xml/xmltxtimp.cxx
+++ b/editeng/source/xml/xmltxtimp.cxx
@@ -79,6 +79,11 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SvxXMLTextImportContex
{
pContext = new SvxXMLTextImportContext( GetImport(), mxText );
}
+ else if( nElement == XML_ELEMENT(OFFICE, XML_AUTOMATIC_STYLES ) )
+ {
+ pContext = new SvXMLStylesContext( GetImport() );
+ GetImport().GetTextImport()->SetAutoStyles( static_cast<SvXMLStylesContext*>(pContext) );
+ }
return pContext;
}
@@ -91,8 +96,7 @@ SvXMLImportContextRef SvxXMLTextImportContext::CreateChildContext( sal_uInt16 nP
}
else if( XML_NAMESPACE_OFFICE == nPrefix && IsXMLToken( rLocalName, XML_AUTOMATIC_STYLES ) )
{
- pContext = new SvXMLStylesContext( GetImport(), nPrefix, rLocalName, xAttrList );
- GetImport().GetTextImport()->SetAutoStyles( static_cast<SvXMLStylesContext*>(pContext) );
+ // dealt with in createFastChildContext
}
else
{