summaryrefslogtreecommitdiff
path: root/sd/source/ui
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
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')
-rw-r--r--sd/source/ui/dlg/dlgolbul.cxx2
-rw-r--r--sd/source/ui/func/fuolbull.cxx2
-rw-r--r--sd/source/ui/func/fupage.cxx4
-rw-r--r--sd/source/ui/func/futempl.cxx2
-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
9 files changed, 23 insertions, 23 deletions
diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx
index 0f1fe5824910..a691b0667970 100644
--- a/sd/source/ui/dlg/dlgolbul.cxx
+++ b/sd/source/ui/dlg/dlgolbul.cxx
@@ -120,7 +120,7 @@ OutlineBulletDlg::OutlineBulletDlg(
SvxNumRule aNewRule( *pRule );
aNewRule.SetFeatureFlag( SvxNumRuleFlags::NO_NUMBERS );
- SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET.Which() );
+ SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET );
aInputSet.Put(aNewItem);
}
}
diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index 4565e0b5e81f..5ef3fb1800fc 100644
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -351,7 +351,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u
SvxNumRule aNewRule( *pLclRule );
aNewRule.SetFeatureFlag( SvxNumRuleFlags::NO_NUMBERS );
- SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET.Which() );
+ SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET );
aNewAttr.Put(aNewItem);
}
}
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 059ff5e61102..fa14378f2da0 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -218,7 +218,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
{SID_ATTR_BORDER_SHADOW, SID_ATTR_BORDER_SHADOW},
{XATTR_FILL_FIRST, XATTR_FILL_LAST},
{SID_ATTR_PAGE_COLOR,SID_ATTR_PAGE_FILLSTYLE},
- {EE_PARA_WRITINGDIR.Which(), EE_PARA_WRITINGDIR.Which()}});
+ {EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR}});
// Retrieve additional data for dialog
@@ -229,7 +229,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
aNewAttr.Put( SvxFrameDirectionItem(
mpDoc->GetDefaultWritingMode() == css::text::WritingMode_RL_TB ? SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB,
- EE_PARA_WRITINGDIR.Which() ) );
+ EE_PARA_WRITINGDIR ) );
// Retrieve page-data for dialog
diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx
index 191cd65c362f..ff7eaa096ea8 100644
--- a/sd/source/ui/func/futempl.cxx
+++ b/sd/source/ui/func/futempl.cxx
@@ -420,7 +420,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
if(pFirstStyleSheet)
{
- pFirstStyleSheet->GetItemSet().Put( SvxNumBulletItem( aRule, EE_PARA_NUMBULLET.Which() ));
+ pFirstStyleSheet->GetItemSet().Put( SvxNumBulletItem( aRule, EE_PARA_NUMBULLET ));
SdStyleSheet* pRealSheet = static_cast<SdStyleSheet*>(pFirstStyleSheet)->GetRealStyleSheet();
pRealSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
}
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);
}
}