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>
This commit is contained in:
Noel Grandin
2023-11-08 13:35:20 +02:00
parent 7a73eedf00
commit fcfb7f65bf
2 changed files with 5 additions and 4 deletions

View File

@@ -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

View File

@@ -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;