diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-02 14:24:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-03 06:45:05 +0000 |
commit | afa675469cd9894f41a6b9eeb2e7acc8245d256c (patch) | |
tree | ce8bcab207aef1534298b2369accc4ada5597b08 /sw/source/uibase | |
parent | f091259ad2ec1590714645839668580cd7b8c7c4 (diff) |
use SvxExtNumType in SvxNumberType
and follow the rabbit trail, fixing various other types in the process
Change-Id: I8fc7df3b585df21578ffb28fdd7e5e427b3bfd9d
Reviewed-on: https://gerrit.libreoffice.org/34814
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/inc/numberingtypelistbox.hxx | 7 | ||||
-rw-r--r-- | sw/source/uibase/misc/numberingtypelistbox.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/utlui/uitool.cxx | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/sw/source/uibase/inc/numberingtypelistbox.hxx b/sw/source/uibase/inc/numberingtypelistbox.hxx index de786c905909..ae78b20f0e5b 100644 --- a/sw/source/uibase/inc/numberingtypelistbox.hxx +++ b/sw/source/uibase/inc/numberingtypelistbox.hxx @@ -22,6 +22,7 @@ #include <vcl/lstbox.hxx> #include "swdllapi.h" #include <o3tl/typed_flags_set.hxx> +#include <editeng/svxenum.hxx> enum class SwInsertNumTypes { @@ -49,10 +50,10 @@ public: virtual bool set_property(const OString &rKey, const OString &rValue) override; - void Reload(SwInsertNumTypes nTypeFlags); + void Reload(SwInsertNumTypes nTypeFlags); - sal_Int16 GetSelectedNumberingType(); - bool SelectNumberingType(sal_Int16 nType); + SvxExtNumType GetSelectedNumberingType(); + bool SelectNumberingType(SvxExtNumType nType); }; #endif diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx b/sw/source/uibase/misc/numberingtypelistbox.cxx index eff649edf43c..7d9362aebcef 100644 --- a/sw/source/uibase/misc/numberingtypelistbox.cxx +++ b/sw/source/uibase/misc/numberingtypelistbox.cxx @@ -165,12 +165,12 @@ void SwNumberingTypeListBox::Reload(SwInsertNumTypes nTypeFlags) } } -sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType() +SvxExtNumType SwNumberingTypeListBox::GetSelectedNumberingType() { - sal_Int16 nRet = 0; + SvxExtNumType nRet = SVX_NUM_CHARS_UPPER_LETTER; sal_Int32 nSelPos = GetSelectEntryPos(); if(LISTBOX_ENTRY_NOTFOUND != nSelPos) - nRet = (sal_Int16)reinterpret_cast<sal_uLong>(GetEntryData(nSelPos)); + nRet = (SvxExtNumType)reinterpret_cast<sal_uLong>(GetEntryData(nSelPos)); #if OSL_DEBUG_LEVEL > 0 else OSL_FAIL("SwNumberingTypeListBox not selected"); @@ -178,7 +178,7 @@ sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType() return nRet; } -bool SwNumberingTypeListBox::SelectNumberingType(sal_Int16 nType) +bool SwNumberingTypeListBox::SelectNumberingType(SvxExtNumType nType) { sal_Int32 nPos = GetEntryPos(reinterpret_cast<void*>((sal_uLong)nType)); SelectEntryPos( nPos ); diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index 3098777deb13..7907b88d5341 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -281,7 +281,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) rPageDesc.SetUseOn( lcl_convertUseFromSvx(nUse) ); rPageDesc.SetLandscape(rPageItem.IsLandscape()); SvxNumberType aNumType; - aNumType.SetNumberingType( static_cast< sal_Int16 >(rPageItem.GetNumType()) ); + aNumType.SetNumberingType( (SvxExtNumType)rPageItem.GetNumType() ); rPageDesc.SetNumType(aNumType); } // Size |