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 /cui | |
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 'cui')
-rw-r--r-- | cui/source/inc/numpages.hxx | 5 | ||||
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index afaaf1e61ba1..4894293ede51 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -31,6 +31,7 @@ #include <vcl/edit.hxx> #include <vcl/field.hxx> #include <editeng/numdef.hxx> +#include <editeng/svxenum.hxx> #include <svtools/ctrlbox.hxx> #include <vcl/dialog.hxx> @@ -65,14 +66,14 @@ class SvxNumberingPreview : public vcl::Window struct SvxNumSettings_Impl { - short nNumberType; + SvxExtNumType nNumberType; short nParentNumbering; OUString sPrefix; OUString sSuffix; OUString sBulletChar; OUString sBulletFont; SvxNumSettings_Impl() : - nNumberType(0), + nNumberType(SVX_NUM_CHARS_UPPER_LETTER), nParentNumbering(0) {} }; diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index df6aad67f5ae..679a5ff77f03 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -111,7 +111,11 @@ static SvxNumSettings_Impl* lcl_CreateNumSettingsPtr(const Sequence<PropertyValu for(sal_Int32 j = 0; j < rLevelProps.getLength(); j++) { if ( pValues[j].Name == "NumberingType" ) - pValues[j].Value >>= pNew->nNumberType; + { + sal_Int16 nTmp; + if (pValues[j].Value >>= nTmp) + pNew->nNumberType = (SvxExtNumType)nTmp; + } else if ( pValues[j].Name == "Prefix" ) pValues[j].Value >>= pNew->sPrefix; else if ( pValues[j].Name == "Suffix" ) @@ -326,7 +330,7 @@ IMPL_LINK_NOARG(SvxSingleNumPickTabPage, NumSelectHdl_Impl, ValueSet*, void) if(aNumSettingsArr.size() <= nIdx) return; SvxNumSettings_Impl* _pSet = aNumSettingsArr[nIdx].get(); - sal_Int16 eNewType = _pSet->nNumberType; + SvxExtNumType eNewType = _pSet->nNumberType; const sal_Unicode cLocalPrefix = !_pSet->sPrefix.isEmpty() ? _pSet->sPrefix[0] : 0; const sal_Unicode cLocalSuffix = !_pSet->sSuffix.isEmpty() ? _pSet->sSuffix[0] : 0; @@ -945,7 +949,7 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, NumSelectHdl_Impl, ValueSet*, void) sal_uInt16 nIdx = m_pExamplesVS->GetSelectItemId() - 1; sal_uInt16 nMask = 1; - sal_uInt16 nSetNumberingType = SVX_NUM_BITMAP; + SvxExtNumType nSetNumberingType = SVX_NUM_BITMAP; for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) @@ -1780,8 +1784,8 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox&, rBox, void { SvxNumberFormat aNumFmt(pActNum->GetLevel(i)); // PAGEDESC does not exist - sal_uInt16 nNumType = (sal_uInt16)reinterpret_cast<sal_uLong>(rBox.GetSelectEntryData()); - aNumFmt.SetNumberingType((sal_Int16)nNumType); + SvxExtNumType nNumType = (SvxExtNumType)reinterpret_cast<sal_uLong>(rBox.GetSelectEntryData()); + aNumFmt.SetNumberingType(nNumType); sal_uInt16 nNumberingType = aNumFmt.GetNumberingType(); if(SVX_NUM_BITMAP == (nNumberingType&(~LINK_TOKEN))) { |