[Libreoffice-commits] core.git: editeng/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jan 8 15:14:08 UTC 2020
editeng/source/xml/xmltxtimp.cxx | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
New commits:
commit 4506e77ff9791ef9ca42d5395300acd50f429528
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Wed Jan 8 13:19:46 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Jan 8 16:13:34 2020 +0100
return fast context in SvxXMLTextImportContext
Change-Id: I1a0bf073bb053cc0c63b5d1b98f1c5f9d32b2a63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86419
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx
index 6ebe9f235e3f..acd86b77cfee 100644
--- a/editeng/source/xml/xmltxtimp.cxx
+++ b/editeng/source/xml/xmltxtimp.cxx
@@ -50,9 +50,11 @@ namespace {
class SvxXMLTextImportContext : public SvXMLImportContext
{
public:
- SvxXMLTextImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< XText >& xText );
+ SvxXMLTextImportContext( SvXMLImport& rImport, const uno::Reference< XText >& xText );
virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ) override;
+ virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {}
private:
const uno::Reference< XText > mxText;
@@ -60,8 +62,8 @@ private:
}
-SvxXMLTextImportContext::SvxXMLTextImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< XText >& xText )
-: SvXMLImportContext( rImport, nPrfx, rLName ), mxText( xText )
+SvxXMLTextImportContext::SvxXMLTextImportContext( SvXMLImport& rImport, const uno::Reference< XText >& xText )
+: SvXMLImportContext( rImport ), mxText( xText )
{
}
@@ -70,7 +72,7 @@ SvXMLImportContextRef SvxXMLTextImportContext::CreateChildContext( sal_uInt16 nP
SvXMLImportContext* pContext = nullptr;
if(XML_NAMESPACE_OFFICE == nPrefix && IsXMLToken( rLocalName, XML_BODY ) )
{
- pContext = new SvxXMLTextImportContext( GetImport(), nPrefix, rLocalName, mxText );
+ pContext = new SvxXMLTextImportContext( GetImport(), mxText );
}
else if( XML_NAMESPACE_OFFICE == nPrefix && IsXMLToken( rLocalName, XML_AUTOMATIC_STYLES ) )
{
@@ -95,8 +97,8 @@ public:
const css::uno::Reference< css::uno::XComponentContext >& rContext,
const uno::Reference< XText > & rText );
- virtual SvXMLImportContext *CreateDocumentContext( sal_uInt16 nPrefix,
- const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) override;
+ virtual SvXMLImportContext* CreateFastContext(sal_Int32 nElement,
+ const ::css::uno::Reference< ::css::xml::sax::XFastAttributeList >& xAttrList ) override;
private:
const uno::Reference< XText > mxText;
@@ -104,15 +106,15 @@ private:
}
-SvXMLImportContext *SvxXMLXTextImportComponent::CreateDocumentContext(
- sal_uInt16 const nPrefix, const OUString& rLocalName,
- const uno::Reference< xml::sax::XAttributeList >& /*xAttrList*/)
+SvXMLImportContext *SvxXMLXTextImportComponent::CreateFastContext(
+ sal_Int32 nElement,
+ const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/)
{
SvXMLImportContext* pContext = nullptr;
- if(XML_NAMESPACE_OFFICE == nPrefix && IsXMLToken( rLocalName, XML_DOCUMENT_CONTENT ) )
+ if(nElement == XML_ELEMENT(OFFICE, XML_DOCUMENT_CONTENT ) )
{
- pContext = new SvxXMLTextImportContext( *this, nPrefix, rLocalName, mxText );
+ pContext = new SvxXMLTextImportContext( *this, mxText );
}
return pContext;
More information about the Libreoffice-commits
mailing list