summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/XMLShapeStyleContext.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/draw/XMLShapeStyleContext.cxx')
-rw-r--r--xmloff/source/draw/XMLShapeStyleContext.cxx26
1 files changed, 11 insertions, 15 deletions
diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx
index b10ef865ec2d..1096c0aae417 100644
--- a/xmloff/source/draw/XMLShapeStyleContext.cxx
+++ b/xmloff/source/draw/XMLShapeStyleContext.cxx
@@ -89,40 +89,36 @@ void XMLShapeStyleContext::SetAttribute( sal_uInt16 nPrefixKey, const OUString&
}
}
-SvXMLImportContextRef XMLShapeStyleContext::CreateChildContext(
- sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const Reference< xml::sax::XAttributeList > & xAttrList )
+css::uno::Reference< css::xml::sax::XFastContextHandler > XMLShapeStyleContext::createFastChildContext(
+ sal_Int32 nElement,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
{
SvXMLImportContextRef xContext;
- if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix )
+ if( IsTokenInNamespace(nElement, XML_NAMESPACE_STYLE) ||
+ IsTokenInNamespace(nElement, XML_NAMESPACE_LO_EXT) )
{
+ sal_Int32 nLocalName = nElement & TOKEN_MASK;
sal_uInt32 nFamily = 0;
- if( IsXMLToken( rLocalName, XML_TEXT_PROPERTIES ) )
+ if( nLocalName == XML_TEXT_PROPERTIES )
nFamily = XML_TYPE_PROP_TEXT;
- else if( IsXMLToken( rLocalName, XML_PARAGRAPH_PROPERTIES ) )
+ else if( nLocalName == XML_PARAGRAPH_PROPERTIES )
nFamily = XML_TYPE_PROP_PARAGRAPH;
- else if( IsXMLToken( rLocalName, XML_GRAPHIC_PROPERTIES ) )
+ else if( nLocalName == XML_GRAPHIC_PROPERTIES )
nFamily = XML_TYPE_PROP_GRAPHIC;
if( nFamily )
{
rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap =
GetStyles()->GetImportPropertyMapper( GetFamily() );
if( xImpPrMap.is() )
- xContext = new XMLShapePropertySetContext( GetImport(), nPrefix,
- rLocalName, xAttrList,
+ return new XMLShapePropertySetContext( GetImport(), nElement, xAttrList,
nFamily,
GetProperties(),
xImpPrMap );
}
}
- if (!xContext)
- xContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName,
- xAttrList );
-
- return xContext;
+ return XMLPropStyleContext::createFastChildContext( nElement, xAttrList );
}
void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet > & rPropSet )