summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview/viewdraw.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-10 12:48:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-15 08:24:29 +0100
commit3588a48a82d37f940595570758bc1d1179d18b84 (patch)
treedaa314ae437771157a53f8a5d5043a685f399ac3 /sw/source/uibase/uiview/viewdraw.cxx
parenta8f31d5120c2ae9109d316db73b5adf9cb26c892 (diff)
TypedWhichId
use a strong-typedef template to give which IDs a type, which we can carry around to do a (a) little bit more convenience when Get()'ing them and (b) a little bit of enforcement of which PoolItem subclass each ID uses Fix a bug in casting EE_PARA_BULLETSTATE to the wrong subclass in AccessibleEditableTextPara::_correctValues Change-Id: I015ce8b3b0f6d21308af182afa3caf122c877a5b Reviewed-on: https://gerrit.libreoffice.org/44587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/uiview/viewdraw.cxx')
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 04cc5e8d57f2..b06dc59965bf 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -752,11 +752,10 @@ bool SwView::IsDrawTextHyphenate()
bool bHyphenate = false;
SfxItemSet aNewAttr( pSdrView->GetModel()->GetItemPool(),
- svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE>{} );
+ svl::Items<EE_PARA_HYPHENATE.Which(), EE_PARA_HYPHENATE.Which()>{} );
if( pSdrView->GetAttributes( aNewAttr ) &&
aNewAttr.GetItemState( EE_PARA_HYPHENATE ) >= SfxItemState::DEFAULT )
- bHyphenate = static_cast<const SfxBoolItem&>(aNewAttr.Get( EE_PARA_HYPHENATE )).
- GetValue();
+ bHyphenate = aNewAttr.Get( EE_PARA_HYPHENATE ).GetValue();
return bHyphenate;
}
@@ -766,8 +765,8 @@ void SwView::HyphenateDrawText()
SdrView *pSdrView = m_pWrtShell->GetDrawView();
bool bHyphenate = IsDrawTextHyphenate();
- SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE>{} );
- aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, !bHyphenate ) );
+ SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE.Which(), EE_PARA_HYPHENATE.Which()>{} );
+ aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE.Which(), !bHyphenate ) );
pSdrView->SetAttributes( aSet );
GetViewFrame()->GetBindings().Invalidate(FN_HYPHENATE_OPT_DLG);
}