diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-15 14:19:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-16 07:54:24 +0100 |
commit | 13b89618c49adfd77d184f22e23420a7b6d4678b (patch) | |
tree | 089702c613bd099b478fbeb28ba04a09eef6b8b1 /chart2 | |
parent | e1dd5d0ca425058174feeff28859672827946bac (diff) |
use implict conversion operator in TypedWhichId
instead of spreading calls to Which() everywhere.
Change-Id: Ie32d106e44f5cb583908eeebe254ab8b8168ae61
Reviewed-on: https://gerrit.libreoffice.org/44760
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
8 files changed, 11 insertions, 11 deletions
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index abfffe1b6355..73d8598a6dd2 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -306,7 +306,7 @@ bool DataLabelResources::FillItemSet( SfxItemSet* rOutAttrs ) const } if( m_pLB_TextDirection->GetSelectedEntryCount() > 0 ) - rOutAttrs->Put( SvxFrameDirectionItem( m_pLB_TextDirection->GetSelectEntryValue(), EE_PARA_WRITINGDIR.Which() ) ); + rOutAttrs->Put( SvxFrameDirectionItem( m_pLB_TextDirection->GetSelectEntryValue(), EE_PARA_WRITINGDIR ) ); if( m_pDC_Dial->IsVisible() ) { diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx index 7fdeb8ffea7d..3df8869364be 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx @@ -149,7 +149,7 @@ bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs ) rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_SHOWDESCR, m_pCbShowDescription->IsChecked() ) ); if( m_pLbTextDirection->GetSelectedEntryCount() > 0 ) - rOutAttrs->Put( SvxFrameDirectionItem( m_pLbTextDirection->GetSelectEntryValue(), EE_PARA_WRITINGDIR.Which() ) ); + rOutAttrs->Put( SvxFrameDirectionItem( m_pLbTextDirection->GetSelectEntryValue(), EE_PARA_WRITINGDIR ) ); return true; } diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx index 8c0e7310081d..554235d17343 100644 --- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx @@ -63,7 +63,7 @@ bool SchLegendPosTabPage::FillItemSet(SfxItemSet* rOutAttrs) m_aLegendPositionResources.writeToItemSet(*rOutAttrs); if( m_pLbTextDirection->GetSelectedEntryCount() > 0 ) - rOutAttrs->Put( SvxFrameDirectionItem( m_pLbTextDirection->GetSelectEntryValue(), EE_PARA_WRITINGDIR.Which() ) ); + rOutAttrs->Put( SvxFrameDirectionItem( m_pLbTextDirection->GetSelectEntryValue(), EE_PARA_WRITINGDIR ) ); return true; } diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx index 05537d931c8a..ae304b22d24e 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx @@ -96,7 +96,7 @@ bool SchAlignmentTabPage::FillItemSet(SfxItemSet* rOutAttrs) rOutAttrs->Put( SfxInt32Item( SCHATTR_TEXT_DEGREES, nDegrees ) ); SvxFrameDirection aDirection( m_pLbTextDirection->GetSelectEntryValue() ); - rOutAttrs->Put( SvxFrameDirectionItem( aDirection, EE_PARA_WRITINGDIR.Which() ) ); + rOutAttrs->Put( SvxFrameDirectionItem( aDirection, EE_PARA_WRITINGDIR ) ); return true; } diff --git a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx index 7810f28e4b3c..062b4b173b3e 100644 --- a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx @@ -56,9 +56,9 @@ ItemPropertyMapType & lcl_GetCharacterPropertyPropertyMap() {EE_CHAR_OUTLINE, {"CharContoured", 0}}, {EE_CHAR_EMPHASISMARK, {"CharEmphasis", 0}}, - {EE_PARA_WRITINGDIR.Which(), {"WritingMode", 0}}, + {EE_PARA_WRITINGDIR, {"WritingMode", 0}}, - {EE_PARA_ASIANCJKSPACING.Which(), {"ParaIsCharacterDistance", 0}}}; + {EE_PARA_ASIANCJKSPACING, {"ParaIsCharacterDistance", 0}}}; return aCharacterPropertyMap; } @@ -296,8 +296,8 @@ void CharacterPropertyItemConverter::FillSpecialItem( } break; - case EE_PARA_FORBIDDENRULES.Which(): - case EE_PARA_HANGINGPUNCTUATION.Which(): + case EE_PARA_FORBIDDENRULES: + case EE_PARA_HANGINGPUNCTUATION: rOutItemSet.DisableItem( nWhichId ); break; } diff --git a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx index 3c3d4fd2a1a1..b8c85f61c046 100644 --- a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx +++ b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx @@ -82,7 +82,7 @@ const sal_uInt16 nDataLabelWhichPairs[] = SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO, /* 10585 - 10585 svx/svxids.hrc */ SID_ATTR_NUMBERFORMAT_SOURCE, SID_ATTR_NUMBERFORMAT_SOURCE, /* 11432 svx/svxids.hrc */ SCHATTR_TEXT_DEGREES,SCHATTR_TEXT_DEGREES, - EE_PARA_WRITINGDIR.Which(),EE_PARA_WRITINGDIR.Which(), + EE_PARA_WRITINGDIR,EE_PARA_WRITINGDIR, 0 }; diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 7dc5a3d8e99a..49f1670e9f37 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1538,7 +1538,7 @@ void lcl_setDefaultWritingMode( const std::shared_ptr< DrawModelWrapper >& pDraw if( nWritingMode != -1 && nWritingMode != text::WritingMode2::PAGE ) { if( pDrawModelWrapper.get() ) - pDrawModelWrapper->GetItemPool().SetPoolDefaultItem(SvxFrameDirectionItem(static_cast<SvxFrameDirection>(nWritingMode), EE_PARA_WRITINGDIR.Which()) ); + pDrawModelWrapper->GetItemPool().SetPoolDefaultItem(SvxFrameDirectionItem(static_cast<SvxFrameDirection>(nWritingMode), EE_PARA_WRITINGDIR) ); } } catch( const uno::Exception& ex ) diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx index 100517b08de1..ab87a0769172 100644 --- a/chart2/source/view/main/DrawModelWrapper.cxx +++ b/chart2/source/view/main/DrawModelWrapper.cxx @@ -63,7 +63,7 @@ DrawModelWrapper::DrawModelWrapper() SfxItemPool* pMasterPool = &GetItemPool(); pMasterPool->SetDefaultMetric(MapUnit::Map100thMM); - pMasterPool->SetPoolDefaultItem(SfxBoolItem(EE_PARA_HYPHENATE.Which(), true) ); + pMasterPool->SetPoolDefaultItem(SfxBoolItem(EE_PARA_HYPHENATE, true) ); pMasterPool->SetPoolDefaultItem(makeSvx3DPercentDiagonalItem (5)); SfxItemPool* pPool = pMasterPool; |