summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/viewshel.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 /sd/source/ui/view/viewshel.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 'sd/source/ui/view/viewshel.cxx')
-rw-r--r--sd/source/ui/view/viewshel.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index b89d56ba7de7..e46103b4c40a 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -937,21 +937,21 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16&
}
if( pItem == nullptr )
- pItem = static_cast<const SvxNumBulletItem*>( aNewAttr.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET) );
+ pItem = aNewAttr.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET);
std::unique_ptr<SfxPoolItem> pNewItem(pItem->CloneSetWhich(EE_PARA_NUMBULLET));
aNewAttr.Put(*pNewItem);
if(bTitle && aNewAttr.GetItemState(EE_PARA_NUMBULLET) == SfxItemState::SET )
{
- const SvxNumBulletItem* pBulletItem = static_cast<const SvxNumBulletItem*>(aNewAttr.GetItem(EE_PARA_NUMBULLET));
+ const SvxNumBulletItem* pBulletItem = aNewAttr.GetItem(EE_PARA_NUMBULLET);
SvxNumRule* pRule = pBulletItem->GetNumRule();
if(pRule)
{
SvxNumRule aNewRule( *pRule );
aNewRule.SetFeatureFlag( SvxNumRuleFlags::NO_NUMBERS );
- SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET );
+ SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET.Which() );
aNewAttr.Put(aNewItem);
}
}