summaryrefslogtreecommitdiff
path: root/sd/source/core/stlpool.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/core/stlpool.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/core/stlpool.cxx')
-rw-r--r--sd/source/core/stlpool.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 9e40da77990e..df43cb8c0535 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -210,7 +210,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
OUString aName(STR_LAYOUT_OUTLINE);
OUString aHelpFile;
- SvxLRSpaceItem aSvxLRSpaceItem( EE_PARA_LRSPACE );
+ SvxLRSpaceItem aSvxLRSpaceItem( EE_PARA_LRSPACE.Which() );
SvxULSpaceItem aSvxULSpaceItem( EE_PARA_ULSPACE );
for( sal_Int32 nLevel = 1; nLevel < 10; nLevel++)
@@ -459,7 +459,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
rNotesSet.Put( SvxCharReliefItem(FontRelief::NONE, EE_CHAR_RELIEF) );
rNotesSet.Put( SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ) );
rNotesSet.Put( SvxBackgroundColorItem( Color(COL_AUTO), EE_CHAR_BKGCOLOR ) );
- rNotesSet.Put( SvxLRSpaceItem( 0, 0, 600, -600, EE_PARA_LRSPACE ) );
+ rNotesSet.Put( SvxLRSpaceItem( 0, 0, 600, -600, EE_PARA_LRSPACE.Which() ) );
// #i16874# enable kerning by default but only for new documents
rNotesSet.Put( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) );
@@ -1106,7 +1106,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumRule.SetLevel( i, aNumberFormat );
}
- rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET ) );
+ rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET.Which() ) );
static_cast<SfxStyleSheet*>(pSheet)->Broadcast(SfxHint( SfxHintId::DataChanged ) );
}
break;
@@ -1117,8 +1117,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
{
// Subtitle template
SvxNumBulletItem const*const pItem(
- static_cast<const SvxNumBulletItem*>(
- rSet.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET)));
+ rSet.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET));
SvxNumRule *const pDefaultRule = (pItem) ? pItem->GetNumRule() : nullptr;
DBG_ASSERT( pDefaultRule, "Where is my default template? [CL]" );
@@ -1139,7 +1138,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumRule.SetLevel(i, aFrmt);
}
- rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET ) );
+ rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET.Which() ) );
static_cast<SfxStyleSheet*>(pSheet)->Broadcast(SfxHint( SfxHintId::DataChanged ) );
}
}
@@ -1164,7 +1163,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumRule.SetLevel( i, aNumberFormat );
}
- rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET ) );
+ rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET.Which() ) );
static_cast<SfxStyleSheet*>(pSheet)->Broadcast(SfxHint( SfxHintId::DataChanged ) );
}
break;