summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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 'svx')
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFontWork.cxx2
-rw-r--r--svx/source/svdraw/svdattr.cxx12
-rw-r--r--svx/source/unodraw/unomod.cxx2
3 files changed, 8 insertions, 8 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 3b0238e8705d..a3c09c83038d 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -118,7 +118,7 @@ static bool InitializeFontWorkData( const SdrObject* pCustomShape, const sal_uIn
aParagraphData.aString = rTextObj.GetText( j );
const SfxItemSet& rParaSet = rTextObj.GetParaAttribs( j ); // retrieving some paragraph attributes
- aParagraphData.nFrameDirection = static_cast<const SvxFrameDirectionItem&>(rParaSet.Get( EE_PARA_WRITINGDIR )).GetValue();
+ aParagraphData.nFrameDirection = rParaSet.Get( EE_PARA_WRITINGDIR ).GetValue();
aTextArea.vParagraphs.push_back( aParagraphData );
}
rFWData.vTextAreas.push_back( aTextArea );
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 1bde1afca7f0..4d6bddb01fbc 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -565,12 +565,12 @@ void SdrItemPool::TakeItemName(sal_uInt16 nWhich, OUString& rItemName)
case SDRATTR_GRAFMODE : pResId = SIP_SA_GRAFMODE;break;
case SDRATTR_GRAFCROP : pResId = SIP_SA_GRAFCROP;break;
- case EE_PARA_HYPHENATE : pResId = SIP_EE_PARA_HYPHENATE;break;
- case EE_PARA_BULLETSTATE: pResId = SIP_EE_PARA_BULLETSTATE;break;
- case EE_PARA_OUTLLRSPACE: pResId = SIP_EE_PARA_OUTLLRSPACE;break;
- case EE_PARA_OUTLLEVEL : pResId = SIP_EE_PARA_OUTLLEVEL;break;
- case EE_PARA_BULLET : pResId = SIP_EE_PARA_BULLET;break;
- case EE_PARA_LRSPACE : pResId = SIP_EE_PARA_LRSPACE;break;
+ case EE_PARA_HYPHENATE.Which() : pResId = SIP_EE_PARA_HYPHENATE;break;
+ case EE_PARA_BULLETSTATE.Which(): pResId = SIP_EE_PARA_BULLETSTATE;break;
+ case EE_PARA_OUTLLRSPACE.Which(): pResId = SIP_EE_PARA_OUTLLRSPACE;break;
+ case EE_PARA_OUTLLEVEL.Which() : pResId = SIP_EE_PARA_OUTLLEVEL;break;
+ case EE_PARA_BULLET.Which() : pResId = SIP_EE_PARA_BULLET;break;
+ case EE_PARA_LRSPACE.Which() : pResId = SIP_EE_PARA_LRSPACE;break;
case EE_PARA_ULSPACE : pResId = SIP_EE_PARA_ULSPACE;break;
case EE_PARA_SBL : pResId = SIP_EE_PARA_SBL;break;
case EE_PARA_JUST : pResId = SIP_EE_PARA_JUST;break;
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index 8aeb91bf8dcb..93f86755bdda 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -692,7 +692,7 @@ css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule( SdrModel*
const SvxNumRule* pDefaultRule = nullptr;
if( pModel )
{
- const SvxNumBulletItem* pItem = static_cast<const SvxNumBulletItem*>( pModel->GetItemPool().GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET) );
+ const SvxNumBulletItem* pItem = pModel->GetItemPool().GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET);
if( pItem )
{
pDefaultRule = pItem->GetNumRule();