diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-08 18:30:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-10 17:02:24 +0100 |
commit | c4216ba557577e8fef4dfc1dc5aa35ea1e1ef082 (patch) | |
tree | 46aac2de75258e7d64ef6de5103567ab2c50b5ad /dbaccess | |
parent | bb79936ec808712f53bc48663a485875571ba643 (diff) |
loplugin:fieldcast in OTableStyleContext
Change-Id: I8c5c1d569d022ac679e4939d97fdd293000c23ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159300
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/filter/xml/xmlStyleImport.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlStyleImport.hxx | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/dbaccess/source/filter/xml/xmlStyleImport.cxx b/dbaccess/source/filter/xml/xmlStyleImport.cxx index ddadc5e3b91f..4196860031a0 100644 --- a/dbaccess/source/filter/xml/xmlStyleImport.cxx +++ b/dbaccess/source/filter/xml/xmlStyleImport.cxx @@ -41,7 +41,7 @@ using namespace xmloff::token; OTableStyleContext::OTableStyleContext( ODBFilter& rImport, - SvXMLStylesContext& rStyles, XmlStyleFamily nFamily ) + OTableStylesContext& rStyles, XmlStyleFamily nFamily ) :XMLPropStyleContext( rImport, rStyles, nFamily, false ) ,pStyles(&rStyles) ,m_nNumberFormat(-1) @@ -101,7 +101,7 @@ void OTableStyleContext::SetDefaults() void OTableStyleContext::AddProperty(const sal_Int16 nContextID, const uno::Any& rValue) { - sal_Int32 nIndex(static_cast<OTableStylesContext *>(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/dbaccess/source/filter/xml/xmlStyleImport.hxx b/dbaccess/source/filter/xml/xmlStyleImport.hxx index d3fc001b03d5..7f6c9932dac7 100644 --- a/dbaccess/source/filter/xml/xmlStyleImport.hxx +++ b/dbaccess/source/filter/xml/xmlStyleImport.hxx @@ -27,12 +27,13 @@ namespace dbaxml { class ODBFilter; + class OTableStylesContext; class OTableStyleContext : public XMLPropStyleContext { OUString m_sDataStyleName; OUString sPageStyle; - SvXMLStylesContext* pStyles; + OTableStylesContext* pStyles; sal_Int32 m_nNumberFormat; ODBFilter& GetOwnImport(); @@ -46,7 +47,7 @@ namespace dbaxml OTableStyleContext( ODBFilter& rImport, - SvXMLStylesContext& rStyles, XmlStyleFamily nFamily ); + OTableStylesContext& rStyles, XmlStyleFamily nFamily ); virtual ~OTableStyleContext() override; |