summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-11-08 13:16:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-11-09 20:10:50 +0100
commitf6370725d8a68645e82f16d61518fd2d400f148d (patch)
tree16b9b8e8062866924e738e73d23576eccff44fb4 /sc
parent3afdf59d7a13101de6b943efb3395e6fc406ab94 (diff)
loplugin:fieldcast in XMLTableStyleContext
Change-Id: I92b6bc3e765b19c9f250da43463aad253ba9347a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159196 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/xmlstyli.cxx4
-rw-r--r--sc/source/filter/xml/xmlstyli.hxx6
2 files changed, 6 insertions, 4 deletions
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index 3d7d86488425..a607b013e9c7 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -426,7 +426,7 @@ void XMLTableStyleContext::SetAttribute( sal_Int32 nElement,
XMLTableStyleContext::XMLTableStyleContext( ScXMLImport& rImport,
- SvXMLStylesContext& rStyles, XmlStyleFamily nFamily, bool bDefaultStyle ) :
+ XMLTableStylesContext& rStyles, XmlStyleFamily nFamily, bool bDefaultStyle ) :
XMLPropStyleContext( rImport, rStyles, nFamily, bDefaultStyle ),
pStyles(&rStyles),
nNumberFormat(-1),
@@ -563,7 +563,7 @@ void XMLTableStyleContext::AddProperty(const sal_Int16 nContextID, const uno::An
XMLPropertyState* property = FindProperty(nContextID);
if (property)
property->mnIndex = -1; // #i46996# remove old property, so it isn't double
- sal_Int32 nIndex(static_cast<XMLTableStylesContext *>(pStyles)->GetIndex(nContextID));
+ sal_Int32 nIndex(pStyles->GetIndex(nContextID));
OSL_ENSURE(nIndex != -1, "Property not found in Map");
XMLPropertyState aPropState(nIndex, rValue);
GetProperties().push_back(aPropState); // has to be inserted in a sort order later
diff --git a/sc/source/filter/xml/xmlstyli.hxx b/sc/source/filter/xml/xmlstyli.hxx
index 8101a72b1f7c..e977b84e0ec6 100644
--- a/sc/source/filter/xml/xmlstyli.hxx
+++ b/sc/source/filter/xml/xmlstyli.hxx
@@ -63,11 +63,13 @@ public:
::std::vector< XMLPropertyState >& rProperties, sal_Int32 nStartIndex, sal_Int32 nEndIndex ) const override;
};
+class XMLTableStylesContext;
+
class XMLTableStyleContext : public XMLPropStyleContext
{
OUString sDataStyleName;
OUString sPageStyle;
- SvXMLStylesContext* pStyles;
+ XMLTableStylesContext* pStyles;
sal_Int32 nNumberFormat;
SCTAB nLastSheet;
bool bParentSet;
@@ -85,7 +87,7 @@ protected:
public:
XMLTableStyleContext( ScXMLImport& rImport,
- SvXMLStylesContext& rStyles, XmlStyleFamily nFamily, bool bDefaultStyle = false );
+ XMLTableStylesContext& rStyles, XmlStyleFamily nFamily, bool bDefaultStyle = false );
virtual ~XMLTableStyleContext() override;
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(