[Libreoffice-commits] core.git: compilerplugins/clang sw/source xmloff/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Fri Dec 4 19:20:18 UTC 2020
compilerplugins/clang/xmlimport.cxx | 3 +++
sw/source/filter/xml/xmlfmt.cxx | 2 +-
xmloff/source/draw/XMLNumberStyles.cxx | 10 +++++-----
xmloff/source/table/XMLTableImport.cxx | 2 +-
4 files changed, 10 insertions(+), 7 deletions(-)
New commits:
commit ef80ef57f50cf41afa461fc8c188e40436194f1a
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Fri Dec 4 19:42:56 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Dec 4 20:19:32 2020 +0100
call createFastChildContextFallback in more places
to make my fastparser work easier to manage
Change-Id: If98592f016cd35ca13b48d9df363e32fb1095b55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107233
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/compilerplugins/clang/xmlimport.cxx b/compilerplugins/clang/xmlimport.cxx
index b18554dfc768..a15c3c63f057 100644
--- a/compilerplugins/clang/xmlimport.cxx
+++ b/compilerplugins/clang/xmlimport.cxx
@@ -58,6 +58,9 @@ public:
if (loplugin::isSamePathname(fn, SRCDIR
"/xmloff/source/text/XMLIndexBibliographySourceContext.cxx"))
return false;
+ // calling mxSlaveContext
+ if (loplugin::isSamePathname(fn, SRCDIR "/xmloff/source/draw/XMLNumberStyles.cxx"))
+ return false;
return true;
}
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index fa0b31a5e78d..50a6aead1671 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -608,7 +608,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SwXMLItemSetStyleConte
pTextStyle->startFastElement( nElement, xTmpAttrList.get() );
rStyles.AddStyle( *pTextStyle );
}
- return pTextStyle->createFastChildContext( nElement, xAttrList );
+ return pTextStyle->createFastChildContextFallback( nElement, xAttrList );
}
default:
XMLOFF_WARN_UNKNOWN_ELEMENT("sw", nElement);
diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx
index 1696fc038ac8..44c85b8e2bfd 100644
--- a/xmloff/source/draw/XMLNumberStyles.cxx
+++ b/xmloff/source/draw/XMLNumberStyles.cxx
@@ -492,7 +492,7 @@ private:
bool mbTextual;
bool mbDecimal02;
OUString maText;
- css::uno::Reference< css::xml::sax::XFastContextHandler > mxSlaveContext;
+ SvXMLImportContextRef mxSlaveContext;
public:
@@ -500,7 +500,7 @@ public:
sal_Int32 nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
SdXMLNumberFormatImportContext* pParent,
- const css::uno::Reference< css::xml::sax::XFastContextHandler >& rSlaveContext );
+ const SvXMLImportContextRef& rSlaveContext );
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
@@ -519,7 +519,7 @@ SdXMLNumberFormatMemberImportContext::SdXMLNumberFormatMemberImportContext(
sal_Int32 nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
SdXMLNumberFormatImportContext* pParent,
- const css::uno::Reference< css::xml::sax::XFastContextHandler >& rSlaveContext )
+ const SvXMLImportContextRef& rSlaveContext )
: SvXMLImportContext(rImport),
mpParent( pParent ),
maNumberStyle( SvXMLImport::getNameFromToken(nElement) ),
@@ -555,7 +555,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLNumberFormatMembe
sal_Int32 nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
{
- return mxSlaveContext->createFastChildContext( nElement, xAttrList );
+ return mxSlaveContext->createFastChildContextFallback( nElement, xAttrList );
}
void SdXMLNumberFormatMemberImportContext::startFastElement(
@@ -707,7 +707,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLNumberFormatImpor
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
{
return new SdXMLNumberFormatMemberImportContext( GetImport(), nElement, xAttrList,
- this, SvXMLNumFormatContext::createFastChildContext( nElement, xAttrList ) );
+ this, &dynamic_cast<SvXMLImportContext&>(*SvXMLNumFormatContext::createFastChildContext( nElement, xAttrList )) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index af931822cbe6..7a54c1478acc 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -199,7 +199,7 @@ SvXMLImportContextRef XMLProxyContext::CreateChildContext( sal_uInt16 nPrefix, c
css::uno::Reference< css::xml::sax::XFastContextHandler > XMLProxyContext::createFastChildContext( sal_Int32 nElement, const Reference< XFastAttributeList >& xAttrList )
{
if( mxParent.is() )
- return mxParent->createFastChildContext( nElement, xAttrList );
+ return mxParent->createFastChildContextFallback( nElement, xAttrList );
return nullptr;
}
More information about the Libreoffice-commits
mailing list