diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-30 15:02:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-30 18:37:36 +0100 |
commit | 9a932af7acd57d8ff5815808f8c6cab401782d7e (patch) | |
tree | 7f2883b2b3ce5b4ef3e50ab340251744a25d95f7 /xmloff | |
parent | 07028e4026ec96aea76a921f95e6217b9b328634 (diff) |
fastparser in XMLEnhancedCustomShapeContext
Change-Id: Ib83a8b5a7fcbcdaf62b59b3552256c045cc67dde
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106866
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/ximpcustomshape.cxx | 16 | ||||
-rw-r--r-- | xmloff/source/draw/ximpcustomshape.hxx | 4 |
2 files changed, 9 insertions, 11 deletions
diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx index b1cf0740ab6c..e85143e0b1d4 100644 --- a/xmloff/source/draw/ximpcustomshape.cxx +++ b/xmloff/source/draw/ximpcustomshape.cxx @@ -860,20 +860,16 @@ static void GetAdjustmentValues( std::vector< css::beans::PropertyValue >& rDest } } -void XMLEnhancedCustomShapeContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList ) +void XMLEnhancedCustomShapeContext::startFastElement( + sal_Int32 /*nElement*/, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) { - sal_Int16 nLength = xAttrList->getLength(); - if ( !nLength ) - return; - sal_Int32 nAttrNumber; - for( sal_Int16 nAttr = 0; nAttr < nLength; nAttr++ ) + for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) ) { - OUString aLocalName; - const OUString& rValue = xAttrList->getValueByIndex( nAttr ); - /* sven fixme, this must be checked! sal_uInt16 nPrefix = */ GetImport().GetNamespaceMap().GetKeyByAttrName( xAttrList->getNameByIndex( nAttr ), &aLocalName ); + OUString rValue = aIter.toString(); - switch( EASGet( aLocalName ) ) + switch( EASGet( aIter.getToken() ) ) { case EAS_type : GetString( mrCustomShapeGeometry, rValue, EAS_Type ); diff --git a/xmloff/source/draw/ximpcustomshape.hxx b/xmloff/source/draw/ximpcustomshape.hxx index d4a9f839d54d..4700388bf110 100644 --- a/xmloff/source/draw/ximpcustomshape.hxx +++ b/xmloff/source/draw/ximpcustomshape.hxx @@ -54,7 +54,9 @@ public: XMLEnhancedCustomShapeContext( SvXMLImport& rImport, css::uno::Reference< css::drawing::XShape > &, sal_uInt16 nPrefix, const OUString& rLocalName, std::vector< css::beans::PropertyValue >& rCustomShapeGeometry ); - virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; + virtual void SAL_CALL startFastElement( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( |