diff options
Diffstat (limited to 'chart2/source')
12 files changed, 26 insertions, 25 deletions
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index c8dee6c1b750..7934e90871dc 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -305,7 +305,7 @@ void DataLabelResources::FillItemSet( SfxItemSet* rOutAttrs ) const if( m_xDC_Dial->IsVisible() ) { - sal_Int32 nDegrees = m_xDC_Dial->GetRotation(); + Degree100 nDegrees = m_xDC_Dial->GetRotation(); rOutAttrs->Put(SdrAngleItem( SCHATTR_TEXT_DEGREES, nDegrees ) ); } } @@ -355,11 +355,11 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs) if( rInAttrs.GetItemState( SCHATTR_TEXT_DEGREES, true, &pPoolItem ) == SfxItemState::SET ) { - sal_Int32 nDegrees = static_cast< const SdrAngleItem * >( pPoolItem )->GetValue(); + Degree100 nDegrees = static_cast< const SdrAngleItem * >( pPoolItem )->GetValue(); m_xDC_Dial->SetRotation( nDegrees ); } else - m_xDC_Dial->SetRotation( 0 ); + m_xDC_Dial->SetRotation( 0_deg100 ); EnableControls(); } diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx index afe98676545d..de028152e386 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx @@ -93,7 +93,7 @@ bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs ) if( m_xCtrlDial->HasRotation() ) { - sal_Int32 nDegrees = bStacked ? 0 : m_xCtrlDial->GetRotation(); + Degree100 nDegrees = bStacked ? 0_deg100 : m_xCtrlDial->GetRotation(); if( !m_bHasInitialDegrees || (nDegrees != m_nInitialDegrees) ) rOutAttrs->Put( SdrAngleItem( SCHATTR_TEXT_DEGREES, nDegrees ) ); } @@ -155,7 +155,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) // Rotation as orient item or in degrees ---------- // check new degree item - m_nInitialDegrees = 0; + m_nInitialDegrees = 0_deg100; aState = rInAttrs->GetItemState( SCHATTR_TEXT_DEGREES, false, &pPoolItem ); if( aState == SfxItemState::SET ) m_nInitialDegrees = static_cast< const SdrAngleItem * >( pPoolItem )->GetValue(); diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.hxx b/chart2/source/controller/dialogs/tp_AxisLabel.hxx index 370eda70d6b0..0923c91118d5 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.hxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.hxx @@ -20,6 +20,7 @@ #include <sfx2/tabdlg.hxx> #include <svx/dialcontrol.hxx> +#include <tools/degree.hxx> namespace chart { class TextDirectionListBox; } namespace weld { @@ -39,7 +40,7 @@ class SchAxisLabelTabPage : public SfxTabPage private: bool m_bShowStaggeringControls; - sal_Int32 m_nInitialDegrees; + Degree100 m_nInitialDegrees; bool m_bHasInitialDegrees; /// false = DialControl in tristate bool m_bInitialStacking; bool m_bHasInitialStacking; /// false = checkbox in tristate diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx index 865736b3b66d..59422b3a613e 100644 --- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx +++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx @@ -74,7 +74,7 @@ void PolarOptionsTabPage::Reset(const SfxItemSet* rInAttrs) if (rInAttrs->GetItemState(SCHATTR_STARTING_ANGLE, true, &pPoolItem) == SfxItemState::SET) { - sal_Int32 nTmp = static_cast<const SdrAngleItem*>(pPoolItem)->GetValue(); + Degree100 nTmp = static_cast<const SdrAngleItem*>(pPoolItem)->GetValue(); m_xAngleDial->SetRotation( nTmp ); } else diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx index d2e1e02ab679..ede27edbac9d 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx @@ -94,7 +94,7 @@ bool SchAlignmentTabPage::FillItemSet(SfxItemSet* rOutAttrs) bool bStacked = m_xCbStacked->get_active(); rOutAttrs->Put( SfxBoolItem( SCHATTR_TEXT_STACKED, bStacked ) ); - sal_Int32 nDegrees = bStacked ? 0 : m_xCtrlDial->GetRotation(); + Degree100 nDegrees = bStacked ? 0_deg100 : m_xCtrlDial->GetRotation(); rOutAttrs->Put( SdrAngleItem( SCHATTR_TEXT_DEGREES, nDegrees ) ); SvxFrameDirection aDirection( m_xLbTextDirection->get_active_id() ); @@ -107,7 +107,7 @@ void SchAlignmentTabPage::Reset(const SfxItemSet* rInAttrs) { const SfxPoolItem* pItem = GetItem( *rInAttrs, SCHATTR_TEXT_DEGREES ); - sal_Int32 nDegrees = pItem ? static_cast<const SdrAngleItem*>(pItem)->GetValue() : 0; + Degree100 nDegrees = pItem ? static_cast<const SdrAngleItem*>(pItem)->GetValue() : 0_deg100; m_xCtrlDial->SetRotation( nDegrees ); pItem = GetItem( *rInAttrs, SCHATTR_TEXT_STACKED ); 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; diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx index 53ed1cfc7a32..ef0bdfd5af5b 100644 --- a/chart2/source/controller/main/DrawCommandDispatch.cxx +++ b/chart2/source/controller/main/DrawCommandDispatch.cxx @@ -142,7 +142,7 @@ void DrawCommandDispatch::setAttributes( SdrObject* pObj ) EE_ITEMS_START, EE_ITEMS_END>{}); aDest.Set( rSource ); pObj->SetMergedItemSet( aDest ); - sal_Int32 nAngle = pSourceObj->GetRotateAngle(); + Degree100 nAngle = pSourceObj->GetRotateAngle(); if ( nAngle ) pObj->NbcRotate( pObj->GetSnapRect().Center(), nAngle ); bAttributesAppliedFromGallery = true; diff --git a/chart2/source/view/main/ChartItemPool.cxx b/chart2/source/view/main/ChartItemPool.cxx index 4df7e269a56d..6af1c34c6ef6 100644 --- a/chart2/source/view/main/ChartItemPool.cxx +++ b/chart2/source/view/main/ChartItemPool.cxx @@ -63,7 +63,7 @@ ChartItemPool::ChartItemPool(): rPoolDefaults[SCHATTR_LEGEND_NO_OVERLAY - SCHATTR_START] = new SfxBoolItem(SCHATTR_LEGEND_NO_OVERLAY, true); //text - rPoolDefaults[SCHATTR_TEXT_DEGREES - SCHATTR_START] = new SdrAngleItem(SCHATTR_TEXT_DEGREES, 0); + rPoolDefaults[SCHATTR_TEXT_DEGREES - SCHATTR_START] = new SdrAngleItem(SCHATTR_TEXT_DEGREES, 0_deg100); rPoolDefaults[SCHATTR_TEXT_STACKED - SCHATTR_START] = new SfxBoolItem(SCHATTR_TEXT_STACKED,false); //statistic @@ -142,7 +142,7 @@ ChartItemPool::ChartItemPool(): rPoolDefaults[SCHATTR_SPLINE_ORDER - SCHATTR_START] = new SfxInt32Item( SCHATTR_SPLINE_ORDER, 3 ); rPoolDefaults[SCHATTR_SPLINE_RESOLUTION - SCHATTR_START] = new SfxInt32Item( SCHATTR_SPLINE_RESOLUTION, 20 ); rPoolDefaults[SCHATTR_GROUP_BARS_PER_AXIS - SCHATTR_START] = new SfxBoolItem(SCHATTR_GROUP_BARS_PER_AXIS, false); - rPoolDefaults[SCHATTR_STARTING_ANGLE - SCHATTR_START] = new SdrAngleItem( SCHATTR_STARTING_ANGLE, 9000 ); + rPoolDefaults[SCHATTR_STARTING_ANGLE - SCHATTR_START] = new SdrAngleItem( SCHATTR_STARTING_ANGLE, 9000_deg100 ); rPoolDefaults[SCHATTR_CLOCKWISE - SCHATTR_START] = new SfxBoolItem( SCHATTR_CLOCKWISE, false ); rPoolDefaults[SCHATTR_MISSING_VALUE_TREATMENT - SCHATTR_START] = new SfxInt32Item(SCHATTR_MISSING_VALUE_TREATMENT, 0); |