summaryrefslogtreecommitdiff
path: root/chart2/source/controller/itemsetwrapper
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2020-12-22 15:42:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-02 15:26:38 +0100
commit11e52fe2979b0947814a49b9c17ec373795cbf8e (patch)
tree48268579f052b7fdfcc2c334fffe8c91d29cb234 /chart2/source/controller/itemsetwrapper
parent610ceb05025c9c7a9a34dddcb0dac506b8eab441 (diff)
introduce Degree100 strong_int type
Change-Id: I78f837a1340be0ca5c49097f543a481b7b43a632 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108367 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller/itemsetwrapper')
-rw-r--r--chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx6
-rw-r--r--chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx6
-rw-r--r--chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx6
5 files changed, 13 insertions, 13 deletions
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index 7c31c9693ab7..297b3de704ee 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
@@ -392,8 +392,8 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
if( GetPropertySet()->getPropertyValue( "TextRotation" ) >>= fVal )
{
- rOutItemSet.Put( SdrAngleItem( nWhichId, static_cast< sal_Int32 >(
- ::rtl::math::round( fVal * 100.0 ) ) ));
+ rOutItemSet.Put( SdrAngleItem( nWhichId, Degree100(static_cast< sal_Int32 >(
+ ::rtl::math::round( fVal * 100.0 )) ) ));
}
}
break;
@@ -881,7 +881,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
// convert int to double (divided by 100)
double fVal = static_cast< double >(
static_cast< const SdrAngleItem & >(
- rItemSet.Get( nWhichId )).GetValue()) / 100.0;
+ rItemSet.Get( nWhichId )).GetValue().get()) / 100.0;
double fOldVal = 0.0;
bool bPropExisted =
( GetPropertySet()->getPropertyValue( "TextRotation" ) >>= fOldVal );
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 97f66d4c8431..7693c6ccfa37 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -550,7 +550,7 @@ bool DataPointItemConverter::ApplySpecialItem(
{
double fValue = static_cast< double >(
static_cast< const SdrAngleItem & >(
- rItemSet.Get( nWhichId )).GetValue()) / 100.0;
+ rItemSet.Get( nWhichId )).GetValue().get()) / 100.0;
double fOldValue = 0.0;
bool bPropExisted =
( GetPropertySet()->getPropertyValue( "TextRotation" ) >>= fOldValue );
@@ -800,8 +800,8 @@ void DataPointItemConverter::FillSpecialItem(
if( GetPropertySet()->getPropertyValue( "TextRotation" ) >>= fValue )
{
- rOutItemSet.Put( SdrAngleItem( nWhichId, static_cast< sal_Int32 >(
- ::rtl::math::round( fValue * 100.0 ) ) ));
+ rOutItemSet.Put( SdrAngleItem( nWhichId, Degree100(static_cast< sal_Int32 >(
+ ::rtl::math::round( fValue * 100.0 ) ) )));
}
}
break;
diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index 3c8fbcca9990..fc25407d1a58 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -277,7 +277,7 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf
{
if( m_bSupportingStartingAngle )
{
- m_nStartingAngle = static_cast< const SdrAngleItem & >( rItemSet.Get( nWhichId )).GetValue() / 100;
+ m_nStartingAngle = static_cast< const SdrAngleItem & >( rItemSet.Get( nWhichId )).GetValue().get() / 100;
uno::Reference< beans::XPropertySet > xDiagramProperties( ChartModelHelper::findDiagram(m_xChartModel), uno::UNO_QUERY );
if( xDiagramProperties.is() )
{
@@ -399,7 +399,7 @@ void SeriesOptionsItemConverter::FillSpecialItem(
case SCHATTR_STARTING_ANGLE:
{
if( m_bSupportingStartingAngle )
- rOutItemSet.Put( SdrAngleItem(nWhichId,m_nStartingAngle*100));
+ rOutItemSet.Put( SdrAngleItem(nWhichId, Degree100(m_nStartingAngle*100)) );
break;
}
case SCHATTR_CLOCKWISE:
diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
index dad6ba3b30ef..adc0b849414b 100644
--- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
@@ -489,7 +489,7 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte
{
double fValue = static_cast<double>(
static_cast<const SdrAngleItem&>(
- rItemSet.Get(nWhichId)).GetValue()) / 100.0;
+ rItemSet.Get(nWhichId)).GetValue().get()) / 100.0;
double fOldValue = 0.0;
bool bPropExisted =
(GetPropertySet()->getPropertyValue("TextRotation") >>= fOldValue);
@@ -705,7 +705,7 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r
if (GetPropertySet()->getPropertyValue("TextRotation") >>= fValue)
{
rOutItemSet.Put(
- SdrAngleItem(nWhichId, static_cast<sal_Int32>(rtl::math::round(fValue * 100.0))));
+ SdrAngleItem(nWhichId, Degree100(static_cast<sal_Int32>(rtl::math::round(fValue * 100.0)))));
}
}
break;
diff --git a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
index 6ca38785fb56..9109bc3ea3a1 100644
--- a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
@@ -169,7 +169,7 @@ bool TitleItemConverter::ApplySpecialItem(
// convert int to double (divided by 100)
double fVal = static_cast< double >(
static_cast< const SdrAngleItem & >(
- rItemSet.Get( nWhichId )).GetValue()) / 100.0;
+ rItemSet.Get( nWhichId )).GetValue().get()) / 100.0;
double fOldVal = 0.0;
bool bPropExisted =
( GetPropertySet()->getPropertyValue( "TextRotation" ) >>= fOldVal );
@@ -198,8 +198,8 @@ void TitleItemConverter::FillSpecialItem(
if( GetPropertySet()->getPropertyValue( "TextRotation" ) >>= fVal )
{
- rOutItemSet.Put( SdrAngleItem( nWhichId, static_cast< sal_Int32 >(
- ::rtl::math::round( fVal * 100.0 ) ) ));
+ rOutItemSet.Put( SdrAngleItem( nWhichId, Degree100(static_cast< sal_Int32 >(
+ ::rtl::math::round( fVal * 100.0 ) ) )));
}
}
break;