From 1e990eaa9e12cfba0114cd6cea5510985d3b51f3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 7 Nov 2023 13:12:29 +0200 Subject: [PATCH] loplugin:fieldcast in xmloff Change-Id: Ic975c6344edb03e8bb8283a627fb70e05ca76239 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159075 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmloff/inc/XMLShapePropertySetContext.hxx | 3 ++- xmloff/source/draw/XMLShapePropertySetContext.cxx | 3 +-- xmloff/source/text/txtparaimphint.hxx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xmloff/inc/XMLShapePropertySetContext.hxx b/xmloff/inc/XMLShapePropertySetContext.hxx index a277c4aa28a0..4f63935ed8b2 100644 --- a/xmloff/inc/XMLShapePropertySetContext.hxx +++ b/xmloff/inc/XMLShapePropertySetContext.hxx @@ -20,10 +20,11 @@ #include +class SvxXMLListStyleContext; class XMLShapePropertySetContext : public SvXMLPropertySetContext { - SvXMLImportContextRef mxBulletStyle; + rtl::Reference mxBulletStyle; sal_Int32 mnBulletIndex; public: diff --git a/xmloff/source/draw/XMLShapePropertySetContext.cxx b/xmloff/source/draw/XMLShapePropertySetContext.cxx index 40287e6516e0..79b56b37c0d5 100644 --- a/xmloff/source/draw/XMLShapePropertySetContext.cxx +++ b/xmloff/source/draw/XMLShapePropertySetContext.cxx @@ -54,10 +54,9 @@ void XMLShapePropertySetContext::endFastElement(sal_Int32 ) Reference< container::XIndexReplace > xNumRule; if( mxBulletStyle.is() ) { - SvxXMLListStyleContext* pBulletStyle = static_cast(mxBulletStyle.get()); xNumRule = SvxXMLListStyleContext::CreateNumRule( GetImport().GetModel() ); if( xNumRule.is() ) - pBulletStyle->FillUnoNumRule(xNumRule); + mxBulletStyle->FillUnoNumRule(xNumRule); } XMLPropertyState aPropState( mnBulletIndex, Any(xNumRule) ); diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx index 5b348807243b..f244eb571918 100644 --- a/xmloff/source/text/txtparaimphint.hxx +++ b/xmloff/source/text/txtparaimphint.hxx @@ -220,7 +220,7 @@ public: // Core impl. of the unification of drawing objects and Writer fly frames (#i26791#) class XMLDrawHint_Impl : public XMLHint_Impl { - SvXMLImportContextRef xContext; + rtl::Reference xContext; public: @@ -234,7 +234,7 @@ public: // Frame "to character": anchor moves from first to last char after saving (#i33242#) css::uno::Reference < css::drawing::XShape > const & GetShape() const { - return static_cast(xContext.get())->getShape(); + return xContext->getShape(); } };