summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-02-15 19:20:26 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-02-15 20:50:31 +0100
commit6987f1d3982c369fef401d2fbe3714f68f4398ab (patch)
treeffb9af75114a8052fcd6aed0a5e4b38caea44346 /chart2
parent490269200e40ead201cc48b450b5e4b1d8147e24 (diff)
These items are of type SfxUInt32Item
...see include/svx/svxids.hrc for SID_ATTR_NUMBERFORMAT_VALUE and chart2/source/inc/chartview/ChartSfxItemIds.hxx for SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT, and as reported by -fsanitize=vptr in sc/qa/uitest/chart/tdf122398.py recently added to UITest_chart (<https://ci.libreoffice.org/job/lo_ubsan/1188/>). Change-Id: Ic1e2f3390bd54b722730e6dd7962d613587774b1 Reviewed-on: https://gerrit.libreoffice.org/67884 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/tp_AxisPositions.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_Scale.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
index 3fdc197f6583..15a6bda7e859 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
@@ -243,7 +243,7 @@ void AxisPositionsTabPage::SetNumFormatter( SvNumberFormatter* pFormatter )
const SfxPoolItem *pPoolItem = nullptr;
if( GetItemSet().GetItemState( SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT, true, &pPoolItem ) == SfxItemState::SET )
{
- sal_uLong nFmt = static_cast<sal_uLong>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue());
+ sal_uLong nFmt = static_cast<const SfxUInt32Item*>(pPoolItem)->GetValue();
m_xED_CrossesAt->set_format_key( nFmt );
}
}
diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx
index ddd305762e24..fc0375d9c60c 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -500,7 +500,7 @@ void ScaleTabPage::SetNumFormat()
if( GetItemSet().GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, true, &pPoolItem ) == SfxItemState::SET )
{
- sal_uLong nFmt = static_cast<sal_uLong>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue());
+ sal_uLong nFmt = static_cast<const SfxUInt32Item*>(pPoolItem)->GetValue();
m_xFmtFldMax->set_format_key(nFmt);
m_xFmtFldMin->set_format_key(nFmt);