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>
This commit is contained in:
Noel Grandin
2023-11-10 17:02:24 +01:00
parent bb79936ec8
commit c4216ba557
2 changed files with 5 additions and 4 deletions
@@ -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
@@ -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;