diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-07 15:43:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-08 17:12:32 +0100 |
commit | 08640728b2c3793816ec4366924e60ac291cfd8c (patch) | |
tree | 0f7d209f8a4a1afa459e3480804d9ea0d790074d /sw | |
parent | b1afd3413dabf33d500796d037e85fdb38c4ec5b (diff) |
loplugin:fieldcast in SwXMLItemSetContext
Change-Id: I9a3789d1ea28ddb0e21de73f1dafcaa9dcf68d09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159127
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/xml/xmlitem.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlitem.hxx | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/filter/xml/xmlitem.cxx b/sw/source/filter/xml/xmlitem.cxx index 32c45bb5392e..ff98d2ff691b 100644 --- a/sw/source/filter/xml/xmlitem.cxx +++ b/sw/source/filter/xml/xmlitem.cxx @@ -45,8 +45,7 @@ SwXMLItemSetContext::~SwXMLItemSetContext() { if( m_xBackground.is() ) { - const SvxBrushItem& rItem = - static_cast<SwXMLBrushItemImportContext*>(m_xBackground.get())->GetItem(); + const SvxBrushItem& rItem = m_xBackground->GetItem(); m_rItemSet.Put( rItem ); } } @@ -75,7 +74,7 @@ SvXMLImportContextRef SwXMLItemSetContext::createFastChildContext( sal_Int32 nEl const uno::Reference< xml::sax::XFastAttributeList >& xAttrList, const SvXMLItemMapEntry& rEntry ) { - SvXMLImportContextRef xContext; + rtl::Reference<SwXMLBrushItemImportContext> xContext; switch( rEntry.nWhichId ) { diff --git a/sw/source/filter/xml/xmlitem.hxx b/sw/source/filter/xml/xmlitem.hxx index 4cff6aaafb79..cd6f9c8db62e 100644 --- a/sw/source/filter/xml/xmlitem.hxx +++ b/sw/source/filter/xml/xmlitem.hxx @@ -28,13 +28,14 @@ class SfxItemSet; class SvXMLImportItemMapper; class SvXMLUnitConverter; struct SvXMLItemMapEntry; +class SwXMLBrushItemImportContext; class SwXMLItemSetContext final : public SvXMLImportContext { SfxItemSet &m_rItemSet; const SvXMLImportItemMapper &m_rIMapper; const SvXMLUnitConverter &m_rUnitConv; - SvXMLImportContextRef m_xBackground; + rtl::Reference<SwXMLBrushItemImportContext> m_xBackground; public: |