summaryrefslogtreecommitdiff
path: root/sd/source/ui/view
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-15 14:19:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-16 07:54:24 +0100
commit13b89618c49adfd77d184f22e23420a7b6d4678b (patch)
tree089702c613bd099b478fbeb28ba04a09eef6b8b1 /sd/source/ui/view
parente1dd5d0ca425058174feeff28859672827946bac (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 'sd/source/ui/view')
-rw-r--r--sd/source/ui/view/drtxtob1.cxx12
-rw-r--r--sd/source/ui/view/drviews2.cxx8
-rw-r--r--sd/source/ui/view/drviews3.cxx12
-rw-r--r--sd/source/ui/view/outlview.cxx2
-rw-r--r--sd/source/ui/view/viewshel.cxx2
5 files changed, 18 insertions, 18 deletions
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 6e539965659e..945b5b856660 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -266,7 +266,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
SvxLRSpaceItem aLRSpace = static_cast<const SvxLRSpaceItem&>(pArgs->Get(
GetPool().GetWhich(SID_ATTR_PARA_LRSPACE)));
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_LRSPACE.Which(), EE_PARA_LRSPACE.Which()>{} );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
aLRSpace.SetWhich( EE_PARA_LRSPACE );
aEditAttr.Put( aLRSpace );
@@ -278,11 +278,11 @@ void TextObjectBar::Execute( SfxRequest &rReq )
case SID_HANGING_INDENT:
{
- SfxItemSet aLRSpaceSet( GetPool(), svl::Items<EE_PARA_LRSPACE.Which(), EE_PARA_LRSPACE.Which()>{} );
+ SfxItemSet aLRSpaceSet( GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
mpView->GetAttributes( aLRSpaceSet );
SvxLRSpaceItem aParaMargin( aLRSpaceSet.Get( EE_PARA_LRSPACE ) );
- SvxLRSpaceItem aNewMargin( EE_PARA_LRSPACE.Which() );
+ SvxLRSpaceItem aNewMargin( EE_PARA_LRSPACE );
aNewMargin.SetTextLeft( aParaMargin.GetTextLeft() + aParaMargin.GetTextFirstLineOfst() );
aNewMargin.SetRight( aParaMargin.GetRight() );
aNewMargin.SetTextFirstLineOfst( ( aParaMargin.GetTextFirstLineOfst() ) * (-1) );
@@ -394,7 +394,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
aNewRule.SetLevel(nLevel, aFmt);
}
- pFirstStyleSheet->GetItemSet().Put(SvxNumBulletItem(aNewRule, EE_PARA_NUMBULLET.Which()));
+ pFirstStyleSheet->GetItemSet().Put(SvxNumBulletItem(aNewRule, EE_PARA_NUMBULLET));
SdStyleSheet::BroadcastSdStyleSheetChange(pFirstStyleSheet, PO_OUTLINE_1, pSSPool);
}
@@ -601,13 +601,13 @@ void TextObjectBar::Execute( SfxRequest &rReq )
if( bLeftToRight )
{
- aNewAttr.Put( SvxFrameDirectionItem( SvxFrameDirection::Horizontal_LR_TB, EE_PARA_WRITINGDIR.Which() ) );
+ aNewAttr.Put( SvxFrameDirectionItem( SvxFrameDirection::Horizontal_LR_TB, EE_PARA_WRITINGDIR ) );
if( nAdjust == SvxAdjust::Right )
aNewAttr.Put( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
}
else
{
- aNewAttr.Put( SvxFrameDirectionItem( SvxFrameDirection::Horizontal_RL_TB, EE_PARA_WRITINGDIR.Which() ) );
+ aNewAttr.Put( SvxFrameDirectionItem( SvxFrameDirection::Horizontal_RL_TB, EE_PARA_WRITINGDIR ) );
if( nAdjust == SvxAdjust::Left )
aNewAttr.Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
}
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index b98e4acddda6..6e327c690ae1 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -669,16 +669,16 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( pItem )
{
- SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE.Which(), EE_PARA_HYPHENATE.Which()>{} );
+ SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE>{} );
bool bValue = pItem->GetValue();
- aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE.Which(), bValue ) );
+ aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) );
mpDrawView->SetAttributes( aSet );
}
else // only for testing purpose
{
OSL_FAIL(" no value for hyphenation!");
- SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE.Which(), EE_PARA_HYPHENATE.Which()>{} );
- aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE.Which(), true ) );
+ SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE>{} );
+ aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, true ) );
mpDrawView->SetAttributes( aSet );
}
rReq.Done();
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index b2e9d1c2330d..109a83061684 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -742,7 +742,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
SvxLRSpaceItem aLRSpace = static_cast<const SvxLRSpaceItem&>(pArgs->Get(
GetPool().GetWhich(SID_ATTR_PARA_LRSPACE)));
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_LRSPACE.Which(), EE_PARA_LRSPACE.Which()>{} );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
aLRSpace.SetWhich( EE_PARA_LRSPACE );
aEditAttr.Put( aLRSpace );
@@ -760,9 +760,9 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
static const sal_uInt16 aWhichTable[]=
{
- EE_PARA_OUTLLEVEL.Which(), EE_PARA_OUTLLEVEL.Which(),
- EE_PARA_LRSPACE.Which(), EE_PARA_LRSPACE.Which(),
- EE_PARA_NUMBULLET.Which(), EE_PARA_NUMBULLET.Which(),
+ EE_PARA_OUTLLEVEL, EE_PARA_OUTLLEVEL,
+ EE_PARA_LRSPACE, EE_PARA_LRSPACE,
+ EE_PARA_NUMBULLET, EE_PARA_NUMBULLET,
0, 0
};
@@ -770,7 +770,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
aWhichTable );
mpDrawView->GetAttributes( aEditAttr );
- nId = EE_PARA_LRSPACE.Which();
+ nId = EE_PARA_LRSPACE;
SvxLRSpaceItem aLRSpaceItem( rItem.GetLeft(),
rItem.GetRight(), rItem.GetTextLeft(),
rItem.GetTextFirstLineOfst(), nId );
@@ -832,7 +832,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
// only put lrSpace item
SfxItemSet aEditAttrReduced( GetDoc()->GetPool(),
- svl::Items<EE_PARA_LRSPACE.Which(), EE_PARA_LRSPACE.Which()>{} );
+ svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
aEditAttrReduced.Put( aLRSpaceItem );
mpDrawView->SetAttributes( aEditAttrReduced );
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 97c74ad2a011..67d509d913c7 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -86,7 +86,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie
, mbFirstPaint(true)
, mpProgress(nullptr)
, maDocColor( COL_WHITE )
-, maLRSpaceItem( 0, 0, 2000, 0, EE_PARA_OUTLLRSPACE.Which() )
+, maLRSpaceItem( 0, 0, 2000, 0, EE_PARA_OUTLLRSPACE )
{
bool bInitOutliner = false;
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index e46103b4c40a..82a6e67db3cc 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -951,7 +951,7 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16&
SvxNumRule aNewRule( *pRule );
aNewRule.SetFeatureFlag( SvxNumRuleFlags::NO_NUMBERS );
- SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET.Which() );
+ SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET );
aNewAttr.Put(aNewItem);
}
}