summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-11-08 13:35:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-11-09 19:04:18 +0100
commitfcfb7f65bfc507a6bffebea98a9e9bd281ad9dbb (patch)
tree30cf0648f629bb629da97b02407743c75bd94c20 /reportdesign
parent7a73eedf00541b5ba56b81e7d78faef4247f046f (diff)
loplugin:fieldcast in rptxml::OControlStyleContext
Change-Id: I2609090c26a2d405aedcca57a67ec9c5c329e122 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159212 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/filter/xml/xmlStyleImport.cxx4
-rw-r--r--reportdesign/source/filter/xml/xmlStyleImport.hxx5
2 files changed, 5 insertions, 4 deletions
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index 595bd5506dca..4ccc672f97ca 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -67,7 +67,7 @@ public:
}
OControlStyleContext::OControlStyleContext( ORptFilter& rImport,
- SvXMLStylesContext& rStyles, XmlStyleFamily nFamily ) :
+ OReportStylesContext& rStyles, XmlStyleFamily nFamily ) :
XMLPropStyleContext( rImport, rStyles, nFamily, false/*bDefaultStyle*/ ),
pStyles(&rStyles),
m_nNumberFormat(-1),
@@ -121,7 +121,7 @@ void OControlStyleContext::SetDefaults()
void OControlStyleContext::AddProperty(const sal_Int16 nContextID, const uno::Any& rValue)
{
- sal_Int32 nIndex(static_cast<OReportStylesContext *>(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/reportdesign/source/filter/xml/xmlStyleImport.hxx b/reportdesign/source/filter/xml/xmlStyleImport.hxx
index b51108fd5244..691b6d384160 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.hxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.hxx
@@ -27,11 +27,12 @@
namespace rptxml
{
class ORptFilter;
+ class OReportStylesContext;
class OControlStyleContext : public XMLPropStyleContext
{
OUString m_sDataStyleName;
- SvXMLStylesContext* pStyles;
+ OReportStylesContext* pStyles;
// std::vector<ScXMLMapContent> aMaps;
sal_Int32 m_nNumberFormat;
ORptFilter& m_rImport;
@@ -46,7 +47,7 @@ namespace rptxml
public:
OControlStyleContext( ORptFilter& rImport,
- SvXMLStylesContext& rStyles, XmlStyleFamily nFamily );
+ OReportStylesContext& rStyles, XmlStyleFamily nFamily );
virtual ~OControlStyleContext() override;