[Libreoffice-commits] core.git: xmloff/source
Noel (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 30 17:38:24 UTC 2020
xmloff/source/draw/ximpcustomshape.cxx | 16 ++++++----------
xmloff/source/draw/ximpcustomshape.hxx | 4 +++-
2 files changed, 9 insertions(+), 11 deletions(-)
New commits:
commit 9a932af7acd57d8ff5815808f8c6cab401782d7e
Author: Noel <noelgrandin at gmail.com>
AuthorDate: Mon Nov 30 15:02:08 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Nov 30 18:37:36 2020 +0100
fastparser in XMLEnhancedCustomShapeContext
Change-Id: Ib83a8b5a7fcbcdaf62b59b3552256c045cc67dde
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106866
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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(
More information about the Libreoffice-commits
mailing list