summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-02 14:24:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-03 06:45:05 +0000
commitafa675469cd9894f41a6b9eeb2e7acc8245d256c (patch)
treece8bcab207aef1534298b2369accc4ada5597b08
parentconvert SfxEnumItem to type-safe template class (diff)
downloadcore-afa675469cd9894f41a6b9eeb2e7acc8245d256c.tar.gz
core-afa675469cd9894f41a6b9eeb2e7acc8245d256c.zip
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>
-rw-r--r--cui/source/inc/numpages.hxx5
-rw-r--r--cui/source/tabpages/numpages.cxx14
-rw-r--r--editeng/source/items/numitem.cxx10
-rw-r--r--editeng/source/uno/unonrule.cxx4
-rw-r--r--filter/source/msfilter/svdfppt.cxx2
-rw-r--r--include/editeng/numitem.hxx32
-rw-r--r--include/editeng/svxenum.hxx6
-rw-r--r--include/svx/nbdtmg.hxx10
-rw-r--r--oox/source/export/drawingml.cxx8
-rw-r--r--sd/source/filter/eppt/epptso.cxx2
-rw-r--r--sd/source/filter/eppt/pptx-text.cxx8
-rw-r--r--sd/source/filter/eppt/text.hxx2
-rw-r--r--svx/source/sidebar/nbdtmg.cxx12
-rw-r--r--sw/inc/docufld.hxx12
-rw-r--r--sw/inc/fldbas.hxx133
-rw-r--r--sw/inc/fmtftntx.hxx4
-rw-r--r--sw/source/core/access/accframe.cxx2
-rw-r--r--sw/source/core/edit/autofmt.cxx4
-rw-r--r--sw/source/core/fields/dbfld.cxx2
-rw-r--r--sw/source/core/fields/docufld.cxx32
-rw-r--r--sw/source/core/fields/expfld.cxx2
-rw-r--r--sw/source/core/fields/fldbas.cxx4
-rw-r--r--sw/source/core/layout/atrfrm.cxx4
-rw-r--r--sw/source/core/text/txtfld.cxx4
-rw-r--r--sw/source/core/unocore/unosett.cxx14
-rw-r--r--sw/source/filter/html/htmlfld.cxx18
-rw-r--r--sw/source/filter/html/htmlftn.cxx2
-rw-r--r--sw/source/filter/html/htmlnumreader.cxx2
-rw-r--r--sw/source/filter/html/svxcss1.cxx4
-rw-r--r--sw/source/filter/html/svxcss1.hxx2
-rw-r--r--sw/source/filter/html/swhtml.hxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx38
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx56
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx2
-rw-r--r--sw/source/ui/misc/linenum.cxx2
-rw-r--r--sw/source/ui/misc/outline.cxx2
-rw-r--r--sw/source/uibase/inc/numberingtypelistbox.hxx7
-rw-r--r--sw/source/uibase/misc/numberingtypelistbox.cxx8
-rw-r--r--sw/source/uibase/utlui/uitool.cxx2
40 files changed, 257 insertions, 226 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)))
{
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 0045d9994f39..d17a146959e7 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -78,7 +78,7 @@ static void lcl_getFormatter(css::uno::Reference<css::text::XNumberingFormatter>
}
}
-SvxNumberType::SvxNumberType(sal_Int16 nType) :
+SvxNumberType::SvxNumberType(SvxExtNumType nType) :
nNumType(nType),
bShowSymbol(true)
{
@@ -129,7 +129,7 @@ OUString SvxNumberType::GetNumStr( sal_uLong nNo, const css::lang::Locale& rLoca
Sequence< PropertyValue > aProperties(2);
PropertyValue* pValues = aProperties.getArray();
pValues[0].Name = "NumberingType";
- pValues[0].Value <<= nNumType;
+ pValues[0].Value <<= (sal_uInt16)nNumType;
pValues[1].Name = "Value";
pValues[1].Value <<= (sal_Int32)nNo;
@@ -147,7 +147,7 @@ OUString SvxNumberType::GetNumStr( sal_uLong nNo, const css::lang::Locale& rLoca
return OUString();
}
-SvxNumberFormat::SvxNumberFormat( sal_Int16 eType,
+SvxNumberFormat::SvxNumberFormat( SvxExtNumType eType,
SvxNumPositionAndSpaceMode ePositionAndSpaceMode )
: SvxNumberType(eType),
eNumAdjust(SVX_ADJUST_LEFT),
@@ -190,7 +190,7 @@ SvxNumberFormat::SvxNumberFormat( SvStream &rStream )
sal_Int32 nTmp32(0);
rStream.ReadUInt16( nTmp16 ); // Version number
- rStream.ReadUInt16( nTmp16 ); SetNumberingType( nTmp16 );
+ rStream.ReadUInt16( nTmp16 ); SetNumberingType( (SvxExtNumType)nTmp16 );
rStream.ReadUInt16( nTmp16 ); eNumAdjust = ( SvxAdjust )nTmp16;
rStream.ReadUInt16( nTmp16 ); nInclUpperLevels = nTmp16;
rStream.ReadUInt16( nStart );
@@ -891,7 +891,7 @@ void SvxNumRule::UnLinkGraphics()
aFmt.SetGraphicBrush( &aTempItem, &aFmt.GetGraphicSize(), &eOrient );
}
}
- else if((SVX_NUM_BITMAP|LINK_TOKEN) == aFmt.GetNumberingType())
+ else if((SVX_NUM_BITMAP|LINK_TOKEN) == (int)aFmt.GetNumberingType())
aFmt.SetNumberingType(SVX_NUM_BITMAP);
SetLevel(i, aFmt);
}
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index 785c26860cd0..4573b9001259 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -178,7 +178,7 @@ Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex(sal
Any aVal;
{
- aVal <<= rFmt.GetNumberingType();
+ aVal <<= (sal_uInt16)rFmt.GetNumberingType();
beans::PropertyValue aAlignProp( UNO_NAME_NRULE_NUMBERINGTYPE, -1, aVal, beans::PropertyState_DIRECT_VALUE);
pArray[nIdx++] = aAlignProp;
}
@@ -282,7 +282,7 @@ void SvxUnoNumberingRules::setNumberingRuleByIndex(const Sequence<beans::Propert
// There is no reason to limit numbering types.
if ( nSet>=0 )
{
- aFmt.SetNumberingType(nSet);
+ aFmt.SetNumberingType((SvxExtNumType)nSet);
continue;
}
}
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 9d32fc19cf36..9b941379fff3 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -3663,6 +3663,7 @@ void PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx
}
}
break;
+ default: break;
}
}
@@ -3723,6 +3724,7 @@ bool PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx
}
}
break;
+ default: break;
}
}
return nHardCount != 0;
diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx
index 040acd7b3f86..16fd8df5d8b0 100644
--- a/include/editeng/numitem.hxx
+++ b/include/editeng/numitem.hxx
@@ -55,19 +55,19 @@ class EDITENG_DLLPUBLIC SvxNumberType
static sal_Int32 nRefCount;
static css::uno::Reference<css::text::XNumberingFormatter> xFormatter;
- sal_Int16 nNumType;
+ SvxExtNumType nNumType;
bool bShowSymbol; // Also show Symbol ?
public:
- explicit SvxNumberType(sal_Int16 nType = css::style::NumberingType::ARABIC);
+ explicit SvxNumberType(SvxExtNumType nType = SVX_NUM_ARABIC);
SvxNumberType(const SvxNumberType& rType);
~SvxNumberType();
OUString GetNumStr( sal_uLong nNo ) const;
OUString GetNumStr( sal_uLong nNo, const css::lang::Locale& rLocale ) const;
- void SetNumberingType(sal_Int16 nSet) {nNumType = nSet;}
- sal_Int16 GetNumberingType() const {return nNumType;}
+ void SetNumberingType(SvxExtNumType nSet) {nNumType = nSet;}
+ SvxExtNumType GetNumberingType() const {return nNumType;}
void SetShowSymbol(bool bSet) {bShowSymbol = bSet;}
bool IsShowSymbol()const{return bShowSymbol;}
@@ -96,8 +96,8 @@ public:
};
private:
- OUString sPrefix;
- OUString sSuffix;
+ OUString sPrefix;
+ OUString sSuffix;
SvxAdjust eNumAdjust;
@@ -125,13 +125,13 @@ private:
// specifies what follows the list label before the text of the first line
// of the list item starts
- LabelFollowedBy meLabelFollowedBy;
+ LabelFollowedBy meLabelFollowedBy;
// specifies an additional list tab stop position for meLabelFollowedBy = LISTTAB
- long mnListtabPos;
+ long mnListtabPos;
// specifies the first line indent
- long mnFirstLineIndent;
+ long mnFirstLineIndent;
// specifies the indent before the text, e.g. in L2R-layout the left margin
- long mnIndentAt;
+ long mnIndentAt;
SvxBrushItem* pGraphicBrush;
sal_Int16 eVertOrient; // vertical alignment of a bitmap
@@ -142,7 +142,7 @@ private:
OUString sCharStyleName; // Character Style
public:
- explicit SvxNumberFormat( sal_Int16 nNumberingType,
+ explicit SvxNumberFormat( SvxExtNumType nNumberingType,
SvxNumPositionAndSpaceMode ePositionAndSpaceMode = LABEL_WIDTH_AND_POSITION );
SvxNumberFormat(const SvxNumberFormat& rFormat);
SvxNumberFormat( SvStream & rStream );
@@ -158,9 +158,9 @@ public:
void SetNumAdjust(SvxAdjust eSet) {eNumAdjust = eSet;}
SvxAdjust GetNumAdjust() const {return eNumAdjust;}
void SetPrefix(const OUString& rSet) { sPrefix = rSet;}
- const OUString& GetPrefix() const { return sPrefix;}
+ const OUString& GetPrefix() const { return sPrefix;}
void SetSuffix(const OUString& rSet) { sSuffix = rSet;}
- const OUString& GetSuffix() const { return sSuffix;}
+ const OUString& GetSuffix() const { return sSuffix;}
void SetCharFormatName(const OUString& rSet){ sCharStyleName = rSet; }
virtual OUString GetCharFormatName()const;
@@ -170,14 +170,14 @@ public:
void SetBulletChar(sal_Unicode cSet){cBullet = cSet;}
sal_Unicode GetBulletChar()const {return cBullet;}
void SetBulletRelSize(sal_uInt16 nSet) {nBulletRelSize = nSet;}
- sal_uInt16 GetBulletRelSize() const { return nBulletRelSize;}
+ sal_uInt16 GetBulletRelSize() const { return nBulletRelSize;}
void SetBulletColor(Color nSet){nBulletColor = nSet;}
const Color& GetBulletColor()const {return nBulletColor;}
void SetIncludeUpperLevels( sal_uInt8 nSet ) { nInclUpperLevels = nSet;}
- sal_uInt8 GetIncludeUpperLevels()const { return nInclUpperLevels;}
+ sal_uInt8 GetIncludeUpperLevels()const { return nInclUpperLevels;}
void SetStart(sal_uInt16 nSet) {nStart = nSet;}
- sal_uInt16 GetStart() const {return nStart;}
+ sal_uInt16 GetStart() const {return nStart;}
virtual void SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize = nullptr, const sal_Int16* pOrient = nullptr);
const SvxBrushItem* GetBrush() const {return pGraphicBrush;}
diff --git a/include/editeng/svxenum.hxx b/include/editeng/svxenum.hxx
index 63b11937290a..de4268025317 100644
--- a/include/editeng/svxenum.hxx
+++ b/include/editeng/svxenum.hxx
@@ -175,7 +175,11 @@ enum SvxExtNumType
SVX_NUM_AIU_FULLWIDTH_JA = css::style::NumberingType::AIU_FULLWIDTH_JA,
SVX_NUM_AIU_HALFWIDTH_JA = css::style::NumberingType::AIU_HALFWIDTH_JA,
SVX_NUM_IROHA_FULLWIDTH_JA = css::style::NumberingType::IROHA_FULLWIDTH_JA,
- SVX_NUM_IROHA_HALFWIDTH_JA = css::style::NumberingType::IROHA_HALFWIDTH_JA
+ SVX_NUM_IROHA_HALFWIDTH_JA = css::style::NumberingType::IROHA_HALFWIDTH_JA,
+ SVX_NUM_HANGUL_SYLLABLE_KO = css::style::NumberingType::HANGUL_SYLLABLE_KO,
+ SVX_NUM_HANGUL_JAMO_KO = css::style::NumberingType::HANGUL_JAMO_KO,
+ SVX_NUM_NUMBER_HANGUL_KO = css::style::NumberingType::NUMBER_HANGUL_KO,
+ SVX_NUM_NUMBER_UPPER_KO = css::style::NumberingType::NUMBER_UPPER_KO,
};
#endif
diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx
index e7816680950a..f1cd4de00c9d 100644
--- a/include/svx/nbdtmg.hxx
+++ b/include/svx/nbdtmg.hxx
@@ -43,11 +43,11 @@ enum class NBType
class SVX_DLLPUBLIC NumSettings_Impl
{
public:
- short nNumberType;
- short nParentNumbering;
+ SvxExtNumType nNumberType;
+ short nParentNumbering;
SvxNumberFormat::LabelFollowedBy eLabelFollowedBy;
- long nTabValue;
- SvxAdjust eNumAlign;
+ long nTabValue;
+ SvxAdjust eNumAlign;
long nNumAlignAt;
long nNumIndentAt;
rtl::OUString sPrefix;
@@ -59,7 +59,7 @@ class SVX_DLLPUBLIC NumSettings_Impl
public:
NumSettings_Impl()
- : nNumberType(0)
+ : nNumberType(SVX_NUM_CHARS_UPPER_LETTER)
, nParentNumbering(0)
, eLabelFollowedBy(SvxNumberFormat::NOTHING)
, nTabValue (0)
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 0c887c7b79d0..9b2b8bb38541 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1656,7 +1656,7 @@ void DrawingML::WriteRun( const Reference< XTextRange >& rRun )
mpFS->endElementNS( XML_a, XML_r );
}
-OUString GetAutoNumType(sal_Int16 nNumberingType, bool bSDot, bool bPBehind, bool bPBoth)
+OUString GetAutoNumType(SvxExtNumType nNumberingType, bool bSDot, bool bPBehind, bool bPBoth)
{
OUString sPrefixSuffix;
@@ -1667,7 +1667,7 @@ OUString GetAutoNumType(sal_Int16 nNumberingType, bool bSDot, bool bPBehind, boo
else if (bSDot)
sPrefixSuffix = "Period";
- switch( (SvxExtNumType)nNumberingType )
+ switch( nNumberingType )
{
case SVX_NUM_CHARS_UPPER_LETTER_N :
case SVX_NUM_CHARS_UPPER_LETTER :
@@ -1719,7 +1719,7 @@ void DrawingML::WriteParagraphNumbering( const Reference< XPropertySet >& rXProp
const PropertyValue* pPropValue = aPropertySequence.getArray();
- sal_Int16 nNumberingType = SVX_NUM_NUMBER_NONE;
+ SvxExtNumType nNumberingType = SVX_NUM_NUMBER_NONE;
bool bSDot = false;
bool bPBehind = false;
bool bPBoth = false;
@@ -1738,7 +1738,7 @@ void DrawingML::WriteParagraphNumbering( const Reference< XPropertySet >& rXProp
SAL_INFO("oox.shape", "pro name: " << aPropName);
if ( aPropName == "NumberingType" )
{
- nNumberingType = *o3tl::doAccess<sal_Int16>(pPropValue[i].Value);
+ nNumberingType = (SvxExtNumType)*o3tl::doAccess<sal_Int16>(pPropValue[i].Value);
}
else if ( aPropName == "Prefix" )
{
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 8be0b03d9e8e..0dc89037dde2 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -1363,7 +1363,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
case SVX_NUM_BITMAP :
nNumberingType = 0;
break;
-
+ default: break;
}
rExtBuStr.WriteUInt32( nNumberingType );
}
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index ad68f06dd98a..b2f92b420ded 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -765,7 +765,7 @@ void ParagraphObj::ImplClear()
void ParagraphObj::CalculateGraphicBulletSize( sal_uInt16 nFontHeight )
{
- if ( ( (SvxExtNumType)nNumberingType == SVX_NUM_BITMAP ) && ( nBulletId != 0xffff ) )
+ if ( ( nNumberingType == SVX_NUM_BITMAP ) && ( nBulletId != 0xffff ) )
{
// calculate the bulletrealsize for this grafik
if ( aBuGraSize.Width() && aBuGraSize.Height() )
@@ -821,7 +821,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int1
{
OUString aPropName( pPropValue[ i ].Name );
if ( aPropName == "NumberingType" )
- nNumberingType = *o3tl::doAccess<sal_Int16>(pPropValue[i].Value);
+ nNumberingType = (SvxExtNumType)*o3tl::doAccess<sal_Int16>(pPropValue[i].Value);
else if ( aPropName == "Adjust" )
nHorzAdjust = *o3tl::doAccess<sal_Int16>(pPropValue[i].Value);
else if ( aPropName == "BulletChar" )
@@ -959,7 +959,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int1
else
cBulletId = 0x2022;
- switch( (SvxExtNumType)nNumberingType )
+ switch( nNumberingType )
{
case SVX_NUM_CHARS_UPPER_LETTER :
case SVX_NUM_CHARS_UPPER_LETTER_N :
@@ -1075,6 +1075,8 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int1
default:
break;
}
+ break;
+ default: break;
}
nParaFlags |= 0x2f;
nBulletFlags |= 6;
diff --git a/sd/source/filter/eppt/text.hxx b/sd/source/filter/eppt/text.hxx
index 35c6f4475ad2..efa8d4fa3a70 100644
--- a/sd/source/filter/eppt/text.hxx
+++ b/sd/source/filter/eppt/text.hxx
@@ -46,7 +46,7 @@ struct SOParagraph
OUString sSuffix;
OUString sGraphicUrl; // String to a graphic
Size aBuGraSize;
- sal_uInt32 nNumberingType; // this is actually a SvxEnum
+ SvxExtNumType nNumberingType;
sal_uInt32 nHorzAdjust;
sal_uInt32 nBulletColor;
sal_Int32 nBulletOfs;
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index ac95d7b86381..04f9dc1e5f4c 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -98,7 +98,11 @@ NumSettings_Impl* lcl_CreateNumberingSettingsPtr(const Sequence<PropertyValue>&
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")
@@ -543,7 +547,7 @@ void NumberingTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_
return;
SvxNumberFormat aFmt(aNum.GetLevel(nActLv));
- sal_Int16 eNumType = aFmt.GetNumberingType();
+ SvxExtNumType eNumType = aFmt.GetNumberingType();
sal_uInt16 nCount = pNumberSettingsArr->size();
if ( nIndex >= nCount )
@@ -579,7 +583,7 @@ void NumberingTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uIn
NumberSettingsArr_Impl* pCurrentNumberSettingsArr=pNumberSettingsArr;
if (isDefault) pCurrentNumberSettingsArr=pDefaultNumberSettingsArr;
NumberSettings_Impl* _pSet = (*pCurrentNumberSettingsArr)[nIndex].get();
- sal_Int16 eNewType = _pSet->pNumSetting->nNumberType;
+ SvxExtNumType eNewType = _pSet->pNumSetting->nNumberType;
sal_uInt16 nMask = 1;
OUString sNumCharFmtName = GetBulCharFmtName();
@@ -781,7 +785,7 @@ void OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI
for (sal_uInt16 iLevel=0;iLevel < nCount;iLevel++)
{
SvxNumberFormat aFmt(aNum.GetLevel(iLevel));
- sal_Int16 eNumType = aFmt.GetNumberingType();
+ SvxExtNumType eNumType = aFmt.GetNumberingType();
NumSettings_Impl* _pSet = (*pItemArr->pNumSettingsArr)[iLevel].get();
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index a8855bb570ed..1d451f2d00df 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -125,16 +125,16 @@ enum SwJumpEditFormat
class SwPageNumberFieldType : public SwFieldType
{
- sal_Int16 nNumberingType;
+ SvxExtNumType nNumberingType;
bool bVirtuell;
public:
SwPageNumberFieldType();
- OUString Expand( sal_uInt32 nFormat, short nOff, sal_uInt16 const nPageNumber,
+ OUString Expand( SvxExtNumType nFormat, short nOff, sal_uInt16 const nPageNumber,
sal_uInt16 const nMaxPage, const OUString& ) const;
void ChangeExpansion( SwDoc* pDoc,
- bool bVirtPageNum, const sal_Int16* pNumFormat );
+ bool bVirtPageNum, const SvxExtNumType* pNumFormat );
virtual SwFieldType* Copy() const override;
};
@@ -247,14 +247,14 @@ public:
class SwDocStatFieldType : public SwFieldType
{
SwDoc* pDoc;
- sal_Int16 nNumberingType; ///< css::style::NumberingType
+ SvxExtNumType nNumberingType;
public:
SwDocStatFieldType(SwDoc*);
- OUString Expand(sal_uInt16 nSubType, sal_uInt32 nFormat) const;
+ OUString Expand(sal_uInt16 nSubType, SvxExtNumType nFormat) const;
virtual SwFieldType* Copy() const override;
- inline void SetNumFormat( sal_Int16 eFormat ) { nNumberingType = eFormat; }
+ inline void SetNumFormat( SvxExtNumType eFormat ) { nNumberingType = eFormat; }
};
class SW_DLLPUBLIC SwDocStatField : public SwField
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 094c5fad7a8e..5fbbbd3ea82a 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -25,14 +25,15 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <cppuhelper/weakref.hxx>
+#include <editeng/svxenum.hxx>
#include <vector>
#include <toxe.hxx>
+
class SwDoc;
class SvNumberFormatter;
-enum RES_FIELDS
-{
- /// For old documents the Field-Which IDs must be preserved !!!
+enum RES_FIELDS {
+/// For old documents the Field-Which IDs must be preserved !!!
RES_FIELDS_BEGIN,
RES_DBFLD = RES_FIELDS_BEGIN,
RES_USERFLD,
@@ -77,9 +78,8 @@ enum RES_FIELDS
RES_FIELDS_END
};
- /// List of FieldTypes at UI.
-enum SwFieldTypesEnum
-{
+/// List of FieldTypes at UI.
+enum SwFieldTypesEnum {
TYP_BEGIN,
TYP_DATEFLD = TYP_BEGIN, // 0
TYP_TIMEFLD,
@@ -126,8 +126,7 @@ enum SwFieldTypesEnum
TYP_DROPDOWN,
TYP_END
};
-enum SwAttrFieldTYpe
-{
+enum SwAttrFieldTYpe {
ATTR_NONE,
ATTR_DATEFLD,
ATTR_TIMEFLD,
@@ -136,8 +135,7 @@ enum SwAttrFieldTYpe
ATTR_BOOKMARKFLD,
ATTR_SETREFATTRFLD
};
-enum SwFileNameFormat
-{
+enum SwFileNameFormat {
FF_BEGIN,
FF_NAME = FF_BEGIN,
FF_PATHNAME,
@@ -149,8 +147,7 @@ enum SwFileNameFormat
FF_FIXED = 0x8000
};
-enum SwVarFormat
-{
+enum SwVarFormat {
VVF_CMD = 0x0010, ///< Show command.
VVF_INVISIBLE = 0x0040, ///< Invisible.
VVF_XXP = 0x0400, ///< 1234%
@@ -188,43 +185,40 @@ enum SwVarFormat
typedef sal_uInt16 SwGetSetExpType;
namespace nsSwGetSetExpType
{
- const SwGetSetExpType GSE_STRING = 0x0001; ///< String
- const SwGetSetExpType GSE_EXPR = 0x0002; ///< Expression
- const SwGetSetExpType GSE_INP = 0x0004; ///< InputField
- const SwGetSetExpType GSE_SEQ = 0x0008; ///< Sequence
- const SwGetSetExpType GSE_FORMULA = 0x0010; ///< Formula
+const SwGetSetExpType GSE_STRING = 0x0001; ///< String
+const SwGetSetExpType GSE_EXPR = 0x0002; ///< Expression
+const SwGetSetExpType GSE_INP = 0x0004; ///< InputField
+const SwGetSetExpType GSE_SEQ = 0x0008; ///< Sequence
+const SwGetSetExpType GSE_FORMULA = 0x0010; ///< Formula
}
typedef sal_uInt16 SwExtendedSubType;
namespace nsSwExtendedSubType
{
- const SwExtendedSubType SUB_CMD = 0x0100; ///< Show command.
- const SwExtendedSubType SUB_INVISIBLE = 0x0200; ///< Invisible.
- const SwExtendedSubType SUB_OWN_FMT = 0x0400; ///< SwDBField: Don't accept formatting from database.
+const SwExtendedSubType SUB_CMD = 0x0100; ///< Show command.
+const SwExtendedSubType SUB_INVISIBLE = 0x0200; ///< Invisible.
+const SwExtendedSubType SUB_OWN_FMT = 0x0400; ///< SwDBField: Don't accept formatting from database.
}
-enum SwInputFieldSubType
-{
+enum SwInputFieldSubType {
INP_TXT = 0x01,
INP_USR = 0x02,
INP_VAR = 0x03
};
-enum SwUserType
-{
+enum SwUserType {
UF_STRING = 0x01,
UF_EXPR = 0x02
};
-enum SwDateTimeSubType
-{
+enum SwDateTimeSubType {
FIXEDFLD = 1,
DATEFLD = 2,
TIMEFLD = 4
};
/// General tools.
-OUString FormatNumber(sal_uInt32 nNum, sal_uInt32 nFormat);
+OUString FormatNumber(sal_uInt32 nNum, SvxExtNumType nFormat);
/** Instances of SwFields and those derived from it occur 0 to n times.
For each class there is one instance of the associated type class.
@@ -247,10 +241,12 @@ protected:
public:
- SAL_DLLPRIVATE css::uno::WeakReference<css::beans::XPropertySet> const& GetXObject() const
- { return m_wXFieldMaster; }
- SAL_DLLPRIVATE void SetXObject(css::uno::Reference<css::beans::XPropertySet> const& xFieldMaster)
- { m_wXFieldMaster = xFieldMaster; }
+ SAL_DLLPRIVATE css::uno::WeakReference<css::beans::XPropertySet> const& GetXObject() const {
+ return m_wXFieldMaster;
+ }
+ SAL_DLLPRIVATE void SetXObject(css::uno::Reference<css::beans::XPropertySet> const& xFieldMaster) {
+ m_wXFieldMaster = xFieldMaster;
+ }
static OUString GetTypeStr( sal_uInt16 nTypeId );
@@ -260,7 +256,9 @@ public:
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich );
- sal_uInt16 Which() const { return m_nWhich; }
+ sal_uInt16 Which() const {
+ return m_nWhich;
+ }
inline void UpdateFields() const;
};
@@ -276,20 +274,20 @@ inline void SwFieldType::UpdateFields() const
class SW_DLLPUBLIC SwField
{
private:
- mutable OUString m_Cache; ///< Cached expansion (for clipboard).
- bool m_bUseFieldValueCache; /// control the usage of the cached field value
-
- sal_uInt16 m_nLang; ///< Always change via SetLanguage!
+ mutable OUString m_Cache; ///< Cached expansion (for clipboard).
+ bool m_bUseFieldValueCache; /// control the usage of the cached field value
+ sal_uInt16 m_nLang; ///< Always change via SetLanguage!
bool m_bIsAutomaticLanguage;
- sal_uInt32 m_nFormat;
-
+ sal_uInt32 m_nFormat; /// this can be either SvxExtNumType or SwChapterFormat depending on the subtype
SwFieldType* m_pType;
virtual OUString Expand() const = 0;
virtual SwField* Copy() const = 0;
protected:
- void SetFormat(sal_uInt32 const nSet) { m_nFormat = nSet; }
+ void SetFormat(sal_uInt32 const nSet) {
+ m_nFormat = nSet;
+ }
SwField( SwFieldType* pTyp,
sal_uInt32 nFormat = 0,
@@ -322,13 +320,15 @@ public:
/// ResId
sal_uInt16 Which() const
#ifdef DBG_UTIL
- ; // implemented in fldbas.cxx
+ ; // implemented in fldbas.cxx
#else
- { return m_pType->Which(); }
+ {
+ return m_pType->Which();
+ }
#endif
// TYP_ID
- sal_uInt16 GetTypeId() const;
+ sal_uInt16 GetTypeId() const;
virtual sal_uInt16 GetSubType() const;
virtual void SetSubType(sal_uInt16);
@@ -354,8 +354,12 @@ public:
bool HasClickHdl() const;
bool IsFixed() const;
- bool IsAutomaticLanguage() const { return m_bIsAutomaticLanguage;}
- void SetAutomaticLanguage(bool const bSet) {m_bIsAutomaticLanguage = bSet;}
+ bool IsAutomaticLanguage() const {
+ return m_bIsAutomaticLanguage;
+ }
+ void SetAutomaticLanguage(bool const bSet) {
+ m_bIsAutomaticLanguage = bSet;
+ }
virtual OUString GetDescription() const;
/// Is this field clickable?
@@ -364,15 +368,21 @@ public:
};
inline SwFieldType* SwField::GetTyp() const
- { return m_pType; }
+{
+ return m_pType;
+}
inline sal_uInt32 SwField::GetFormat() const
- { return m_nFormat; }
+{
+ return m_nFormat;
+}
inline sal_uInt16 SwField::GetLanguage() const
- { return m_nLang; }
+{
+ return m_nLang;
+}
- /// Fields containing values that have to be formatted via number formatter.
+/// Fields containing values that have to be formatted via number formatter.
class SwValueFieldType : public SwFieldType
{
private:
@@ -384,11 +394,19 @@ protected:
SwValueFieldType( const SwValueFieldType& rTyp );
public:
- inline SwDoc* GetDoc() const { return m_pDoc; }
- inline void SetDoc(SwDoc* pNewDoc) { m_pDoc = pNewDoc; }
-
- inline bool UseFormat() const { return m_bUseFormat; }
- inline void EnableFormat(bool bFormat = true) { m_bUseFormat = bFormat; }
+ inline SwDoc* GetDoc() const {
+ return m_pDoc;
+ }
+ inline void SetDoc(SwDoc* pNewDoc) {
+ m_pDoc = pNewDoc;
+ }
+
+ inline bool UseFormat() const {
+ return m_bUseFormat;
+ }
+ inline void EnableFormat(bool bFormat = true) {
+ m_bUseFormat = bFormat;
+ }
OUString ExpandValue(const double& rVal, sal_uInt32 nFormat, sal_uInt16 nLng) const;
OUString DoubleToString(const double &rVal, LanguageType eLng) const;
@@ -410,13 +428,16 @@ public:
virtual SwFieldType* ChgTyp( SwFieldType* ) override;
virtual void SetLanguage(sal_uInt16 nLng) override;
- inline SwDoc* GetDoc() const { return static_cast<const SwValueFieldType*>(GetTyp())->GetDoc(); }
+ inline SwDoc* GetDoc() const {
+ return static_cast<const SwValueFieldType*>(GetTyp())->GetDoc();
+ }
virtual double GetValue() const;
virtual void SetValue( const double& rVal );
- inline OUString ExpandValue(const double& rVal, sal_uInt32 nFormat, sal_uInt16 nLng) const
- { return static_cast<SwValueFieldType*>(GetTyp())->ExpandValue(rVal, nFormat, nLng); }
+ inline OUString ExpandValue(const double& rVal, sal_uInt32 nFormat, sal_uInt16 nLng) const {
+ return static_cast<SwValueFieldType*>(GetTyp())->ExpandValue(rVal, nFormat, nLng);
+ }
static sal_uInt32 GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt32 nFormat);
};
diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx
index c46441a297fd..30b9ff7640ca 100644
--- a/sw/inc/fmtftntx.hxx
+++ b/sw/inc/fmtftntx.hxx
@@ -69,8 +69,8 @@ public:
SwFormatFootnoteEndAtTextEnd & operator=( const SwFormatFootnoteEndAtTextEnd & rAttr );
- sal_Int16 GetNumType() const { return aFormat.GetNumberingType(); }
- void SetNumType( sal_Int16 eType ) { aFormat.SetNumberingType(eType); }
+ SvxExtNumType GetNumType() const { return aFormat.GetNumberingType(); }
+ void SetNumType( SvxExtNumType eType ) { aFormat.SetNumberingType(eType); }
const SvxNumberType& GetSwNumType() const { return aFormat; }
diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx
index cd231bbce9e8..1fd9bbfb6b9b 100644
--- a/sw/source/core/access/accframe.cxx
+++ b/sw/source/core/access/accframe.cxx
@@ -433,7 +433,7 @@ const SwFrame* SwAccessibleFrame::GetParent( const SwAccessibleChild& rFrameOrOb
OUString SwAccessibleFrame::GetFormattedPageNumber() const
{
sal_uInt16 nPageNum = GetFrame()->GetVirtPageNum();
- sal_uInt32 nFormat = GetFrame()->FindPageFrame()->GetPageDesc()
+ SvxExtNumType nFormat = GetFrame()->FindPageFrame()->GetPageDesc()
->GetNumType().GetNumberingType();
if( SVX_NUM_NUMBER_NONE == nFormat )
nFormat = SVX_NUM_ARABIC;
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 6216ae6f1bc0..53db60fd0313 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -1532,7 +1532,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
aFormat.SetCharFormat( pCFormat );
if( !aNumTypes.isEmpty() )
- aFormat.SetNumberingType(aNumTypes[ 0 ] - '0');
+ aFormat.SetNumberingType((SvxExtNumType)(aNumTypes[ 0 ] - '0'));
if( bRTL )
aFormat.SetNumAdjust( SVX_ADJUST_RIGHT );
@@ -1553,7 +1553,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
aFormat.SetSuffix( aPostfix.getToken( n, (sal_Unicode)1 ));
aFormat.SetIncludeUpperLevels( MAXLEVEL );
if( n < aNumTypes.getLength() )
- aFormat.SetNumberingType((aNumTypes[ n ] - '0'));
+ aFormat.SetNumberingType((SvxExtNumType)(aNumTypes[ n ] - '0'));
aFormat.SetAbsLSpace( sal_uInt16( nSpaceSteps * n )
+ lNumIndent );
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index 8628be1eaeb2..3c648882aabf 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -817,7 +817,7 @@ OUString SwDBSetNumberField::Expand() const
{
if(0 !=(GetSubType() & nsSwExtendedSubType::SUB_INVISIBLE) || nNumber == 0)
return OUString();
- return FormatNumber(nNumber, GetFormat());
+ return FormatNumber(nNumber, (SvxExtNumType)GetFormat());
}
void SwDBSetNumberField::Evaluate(SwDoc* pDoc)
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 214cb57bb576..4b17a5fe4a61 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -103,11 +103,11 @@ SwPageNumberFieldType::SwPageNumberFieldType()
{
}
-OUString SwPageNumberFieldType::Expand( sal_uInt32 nFormat, short nOff,
+OUString SwPageNumberFieldType::Expand( SvxExtNumType nFormat, short nOff,
sal_uInt16 const nPageNumber, sal_uInt16 const nMaxPage,
const OUString& rUserStr ) const
{
- sal_uInt32 nTmpFormat = (SVX_NUM_PAGEDESC == nFormat) ? (sal_uInt32)nNumberingType : nFormat;
+ SvxExtNumType nTmpFormat = (SVX_NUM_PAGEDESC == nFormat) ? nNumberingType : nFormat;
int const nTmp = nPageNumber + nOff;
if (0 > nTmp || SVX_NUM_NUMBER_NONE == nTmpFormat || (!bVirtuell && nTmp > nMaxPage))
@@ -131,7 +131,7 @@ SwFieldType* SwPageNumberFieldType::Copy() const
void SwPageNumberFieldType::ChangeExpansion( SwDoc* pDoc,
bool bVirt,
- const sal_Int16* pNumFormat )
+ const SvxExtNumType* pNumFormat )
{
if( pNumFormat )
nNumberingType = *pNumFormat;
@@ -188,22 +188,22 @@ OUString SwPageNumberField::Expand() const
if( PG_NEXT == nSubType && 1 != nOffset )
{
- sRet = pFieldType->Expand(GetFormat(), 1, m_nPageNumber, m_nMaxPage, sUserStr);
+ sRet = pFieldType->Expand((SvxExtNumType)GetFormat(), 1, m_nPageNumber, m_nMaxPage, sUserStr);
if (!sRet.isEmpty())
{
- sRet = pFieldType->Expand(GetFormat(), nOffset, m_nPageNumber, m_nMaxPage, sUserStr);
+ sRet = pFieldType->Expand((SvxExtNumType)GetFormat(), nOffset, m_nPageNumber, m_nMaxPage, sUserStr);
}
}
else if( PG_PREV == nSubType && -1 != nOffset )
{
- sRet = pFieldType->Expand(GetFormat(), -1, m_nPageNumber, m_nMaxPage, sUserStr);
+ sRet = pFieldType->Expand((SvxExtNumType)GetFormat(), -1, m_nPageNumber, m_nMaxPage, sUserStr);
if (!sRet.isEmpty())
{
- sRet = pFieldType->Expand(GetFormat(), nOffset, m_nPageNumber, m_nMaxPage, sUserStr);
+ sRet = pFieldType->Expand((SvxExtNumType)GetFormat(), nOffset, m_nPageNumber, m_nMaxPage, sUserStr);
}
}
else
- sRet = pFieldType->Expand(GetFormat(), nOffset, m_nPageNumber, m_nMaxPage, sUserStr);
+ sRet = pFieldType->Expand((SvxExtNumType)GetFormat(), nOffset, m_nPageNumber, m_nMaxPage, sUserStr);
return sRet;
}
@@ -720,7 +720,7 @@ SwDocStatFieldType::SwDocStatFieldType(SwDoc* pDocument)
pDoc = pDocument;
}
-OUString SwDocStatFieldType::Expand(sal_uInt16 nSubType, sal_uInt32 nFormat) const
+OUString SwDocStatFieldType::Expand(sal_uInt16 nSubType, SvxExtNumType nFormat) const
{
sal_uInt32 nVal = 0;
const SwDocStat& rDStat = pDoc->getIDocumentStatistics().GetDocStat();
@@ -737,7 +737,7 @@ OUString SwDocStatFieldType::Expand(sal_uInt16 nSubType, sal_uInt32 nFormat) con
((SwDocStat &)rDStat).nPage = pDoc->getIDocumentLayoutAccess().GetCurrentLayout()->GetPageNum();
nVal = rDStat.nPage;
if( SVX_NUM_PAGEDESC == nFormat )
- nFormat = (sal_uInt32)nNumberingType;
+ nFormat = nNumberingType;
break;
default:
OSL_FAIL( "SwDocStatFieldType::Expand: unknown SubType" );
@@ -767,7 +767,7 @@ SwDocStatField::SwDocStatField(SwDocStatFieldType* pTyp, sal_uInt16 nSub, sal_uI
OUString SwDocStatField::Expand() const
{
- return static_cast<SwDocStatFieldType*>(GetTyp())->Expand(nSubType, GetFormat());
+ return static_cast<SwDocStatFieldType*>(GetTyp())->Expand(nSubType, (SvxExtNumType)GetFormat());
}
SwField* SwDocStatField::Copy() const
@@ -2165,11 +2165,11 @@ void SwRefPageGetFieldType::UpdateField( SwTextField* pTextField,
pRefFrame->FindPageFrame()->GetPhyPageNum() + 1
: 1;
- sal_uInt32 nTmpFormat = SVX_NUM_PAGEDESC == pGetField->GetFormat()
+ SvxExtNumType nTmpFormat = SVX_NUM_PAGEDESC == (SvxExtNumType)pGetField->GetFormat()
? ( !pPgFrame
- ? (sal_uInt32)SVX_NUM_ARABIC
+ ? SVX_NUM_ARABIC
: pPgFrame->GetPageDesc()->GetNumType().GetNumberingType() )
- : pGetField->GetFormat();
+ : (SvxExtNumType)pGetField->GetFormat();
const short nPageNum = std::max<short>(0, pSetField->GetOffset() + nDiff);
pGetField->SetText( FormatNumber( nPageNum, nTmpFormat ) );
}
@@ -2249,9 +2249,9 @@ void SwRefPageGetField::ChangeExpansion( const SwFrame* pFrame,
pRefFrame->FindPageFrame()->GetPhyPageNum() + 1;
SwRefPageGetField* pGetField = const_cast<SwRefPageGetField*>(static_cast<const SwRefPageGetField*>(pField->GetFormatField().GetField()));
- sal_uInt32 nTmpFormat = SVX_NUM_PAGEDESC == pGetField->GetFormat()
+ SvxExtNumType nTmpFormat = SVX_NUM_PAGEDESC == pGetField->GetFormat()
? pPgFrame->GetPageDesc()->GetNumType().GetNumberingType()
- : pGetField->GetFormat();
+ : (SvxExtNumType)pGetField->GetFormat();
const short nPageNum = std::max<short>(0, pSetField->GetOffset() + nDiff);
pGetField->SetText( FormatNumber( nPageNum, nTmpFormat ) );
}
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 3f78a1db9b39..5c1c8e5c4dba 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -865,7 +865,7 @@ void SwSetExpField::SetValue( const double& rAny )
SwValueField::SetValue(rAny);
if( IsSequenceField() )
- sExpand = FormatNumber( GetValue(), GetFormat() );
+ sExpand = FormatNumber( GetValue(), (SvxExtNumType)GetFormat() );
else
sExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue( rAny,
GetFormat(), GetLanguage());
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index 1de006cf0f5a..3c7b2e6fd67f 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -431,7 +431,7 @@ SwField * SwField::CopyField() const
}
/// expand numbering
-OUString FormatNumber(sal_uInt32 nNum, sal_uInt32 nFormat)
+OUString FormatNumber(sal_uInt32 nNum, SvxExtNumType nFormat)
{
if(SVX_NUM_PAGEDESC == nFormat)
return OUString::number( nNum );
@@ -439,7 +439,7 @@ OUString FormatNumber(sal_uInt32 nNum, sal_uInt32 nFormat)
OSL_ENSURE(nFormat != SVX_NUM_NUMBER_NONE, "wrong number format" );
- aNumber.SetNumberingType((sal_Int16)nFormat);
+ aNumber.SetNumberingType(nFormat);
return aNumber.GetNumStr(nNum);
}
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 5f14ed911dd9..d2dc25939307 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1925,7 +1925,7 @@ bool SwFormatFootnoteEndAtTextEnd::QueryValue( uno::Any& rVal, sal_uInt8 nMember
case MID_OWN_NUM :
rVal <<= GetValue() >= FTNEND_ATTXTEND_OWNNUMANDFMT;
break;
- case MID_NUM_TYPE : rVal <<= aFormat.GetNumberingType(); break;
+ case MID_NUM_TYPE : rVal <<= (sal_Int16)aFormat.GetNumberingType(); break;
case MID_PREFIX : rVal <<= OUString(sPrefix); break;
case MID_SUFFIX : rVal <<= OUString(sSuffix); break;
default: return false;
@@ -1984,7 +1984,7 @@ bool SwFormatFootnoteEndAtTextEnd::PutValue( const uno::Any& rVal, sal_uInt8 nMe
(nVal <= SVX_NUM_ARABIC ||
SVX_NUM_CHARS_UPPER_LETTER_N == nVal ||
SVX_NUM_CHARS_LOWER_LETTER_N == nVal ))
- aFormat.SetNumberingType(nVal);
+ aFormat.SetNumberingType((SvxExtNumType)nVal);
else
bRet = false;
}
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 239e2a3d8081..a1424058d11c 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -159,13 +159,13 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf,
sal_uInt16 nVirtNum = pFrame->GetVirtPageNum();
sal_uInt16 nNumPages = pTmpRootFrame->GetPageNum();
- sal_Int16 nNumFormat = -1;
+ SvxExtNumType nNumFormat = (SvxExtNumType)-1;
if(SVX_NUM_PAGEDESC == pField->GetFormat())
nNumFormat = pFrame->FindPageFrame()->GetPageDesc()->GetNumType().GetNumberingType();
static_cast<SwPageNumberField*>(pField)
->ChangeExpansion(nVirtNum, nNumPages);
pPageNr->ChangeExpansion(pDoc,
- bVirt, nNumFormat > -1 ? &nNumFormat : nullptr);
+ bVirt, nNumFormat != (SvxExtNumType)-1 ? &nNumFormat : nullptr);
}
{
OUString const aStr( (bName)
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index f7dbdf573da3..b2405b461a3f 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -326,7 +326,7 @@ void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, cons
if(nTmp >= 0 &&
(nTmp <= SVX_NUM_ARABIC ||
nTmp > SVX_NUM_BITMAP))
- aFootnoteInfo.aFormat.SetNumberingType(nTmp);
+ aFootnoteInfo.aFormat.SetNumberingType((SvxExtNumType)nTmp);
else
throw lang::IllegalArgumentException();
}
@@ -437,7 +437,7 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName)
break;
case WID_NUMBERING_TYPE :
{
- aRet <<= rFootnoteInfo.aFormat.GetNumberingType();
+ aRet <<= (sal_Int16)rFootnoteInfo.aFormat.GetNumberingType();
}
break;
case WID_START_AT:
@@ -617,7 +617,7 @@ void SwXEndnoteProperties::setPropertyValue(const OUString& rPropertyName, const
{
sal_Int16 nTmp = 0;
aValue >>= nTmp;
- aEndInfo.aFormat.SetNumberingType(nTmp);
+ aEndInfo.aFormat.SetNumberingType((SvxExtNumType)nTmp);
}
break;
case WID_START_AT:
@@ -681,7 +681,7 @@ uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName)
aRet <<= rEndInfo.GetSuffix();
break;
case WID_NUMBERING_TYPE :
- aRet <<= rEndInfo.aFormat.GetNumberingType();
+ aRet <<= (sal_Int16)rEndInfo.aFormat.GetNumberingType();
break;
case WID_START_AT:
aRet <<= (sal_Int16)rEndInfo.nFootnoteOffset;
@@ -836,7 +836,7 @@ void SwXLineNumberingProperties::setPropertyValue(
SvxNumberType aNumType(aFontMetric.GetNumType());
sal_Int16 nTmp = 0;
aValue >>= nTmp;
- aNumType.SetNumberingType(nTmp);
+ aNumType.SetNumberingType((SvxExtNumType)nTmp);
aFontMetric.SetNumType(aNumType);
}
break;
@@ -954,7 +954,7 @@ Any SwXLineNumberingProperties::getPropertyValue(const OUString& rPropertyName)
}
break;
case WID_NUMBERING_TYPE :
- aRet <<= rInfo.GetNumType().GetNumberingType();
+ aRet <<= (sal_Int16)rInfo.GetNumType().GetNumberingType();
break;
case WID_NUMBER_POSITION :
{
@@ -1848,7 +1848,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
sal_Int16 nSet = 0;
pProp->Value >>= nSet;
if(nSet >= 0)
- aFormat.SetNumberingType(nSet);
+ aFormat.SetNumberingType((SvxExtNumType)nSet);
else
bWrongArg = true;
}
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index 089a307663df..03574fb32451 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -190,20 +190,16 @@ static HTMLOptionEnum aHTMLFileNameFieldFormatTable[] =
{ nullptr, 0 }
};
-sal_uInt16 SwHTMLParser::GetNumType( const OUString& rStr, sal_uInt16 nDfltType )
+SvxExtNumType SwHTMLParser::GetNumType( const OUString& rStr, SvxExtNumType nDfltType )
{
- sal_uInt16 nType = nDfltType;
const HTMLOptionEnum *pOptEnums = aHTMLPageNumFieldFormatTable;
while( pOptEnums->pName )
- if( !rStr.equalsIgnoreAsciiCaseAscii( pOptEnums->pName ) )
- pOptEnums++;
- else
- break;
-
- if( pOptEnums->pName )
- nType = pOptEnums->nValue;
-
- return nType;
+ {
+ if( rStr.equalsIgnoreAsciiCaseAscii( pOptEnums->pName ) )
+ return (SvxExtNumType)pOptEnums->nValue;
+ pOptEnums++;
+ }
+ return nDfltType;
}
void SwHTMLParser::NewField()
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index ce51c08dfb3a..a3b66b8518d8 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -98,7 +98,7 @@ sal_Int32 lcl_html_getEndNoteInfo( SwEndNoteInfo& rInfo,
switch( nPart )
{
case 0:
- rInfo.aFormat.SetNumberingType( static_cast< sal_Int16 >(bEndNote ? SVX_NUM_ROMAN_LOWER : SVX_NUM_ARABIC));
+ rInfo.aFormat.SetNumberingType( bEndNote ? SVX_NUM_ROMAN_LOWER : SVX_NUM_ARABIC );
if( !aPart.isEmpty() )
rInfo.aFormat.SetNumberingType(SwHTMLParser::GetNumType( aPart,
rInfo.aFormat.GetNumberingType() ));
diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx
index 06266347259b..1f088a6e4fc2 100644
--- a/sw/source/filter/html/htmlnumreader.cxx
+++ b/sw/source/filter/html/htmlnumreader.cxx
@@ -377,7 +377,7 @@ void SwHTMLParser::EndNumBulList( int nToken )
{
SwNumFormat aNumFormat( rInfo.GetNumRule()->Get(i) );
aNumFormat.SetNumberingType(pRefNumFormat->GetNumberingType() != SVX_NUM_BITMAP
- ? pRefNumFormat->GetNumberingType() : style::NumberingType::CHAR_SPECIAL);
+ ? pRefNumFormat->GetNumberingType() : SVX_NUM_CHAR_SPECIAL);
if( SVX_NUM_CHAR_SPECIAL == aNumFormat.GetNumberingType() )
{
// #i63395# - Only apply user defined default bullet font
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index b60e5fa67927..976aefa809dc 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -433,7 +433,7 @@ void SvxCSS1PropertyInfo::Clear()
m_nTopBorderDistance = m_nBottomBorderDistance =
m_nLeftBorderDistance = m_nRightBorderDistance = USHRT_MAX;
- m_nNumberingType = 0;
+ m_nNumberingType = SVX_NUM_CHARS_UPPER_LETTER;
m_cBulletChar = ' ';
m_nColumnCount = 0;
@@ -1718,7 +1718,7 @@ static void ParseCSS1_list_style_type( const CSS1Expression *pExpr,
if( SvxCSS1Parser::GetEnum( aNumberStyleTable, rValue, nEnum ) )
{
rPropInfo.m_bNumbering = true;
- rPropInfo.m_nNumberingType = nEnum;
+ rPropInfo.m_nNumberingType = (SvxExtNumType)nEnum;
}
if( SvxCSS1Parser::GetEnum( aBulletStyleTable, rValue, nEnum ) )
{
diff --git a/sw/source/filter/html/svxcss1.hxx b/sw/source/filter/html/svxcss1.hxx
index 0dc1434d7cce..6d37d3e7f38e 100644
--- a/sw/source/filter/html/svxcss1.hxx
+++ b/sw/source/filter/html/svxcss1.hxx
@@ -121,7 +121,7 @@ public:
sal_uInt16 m_nLeftBorderDistance;
sal_uInt16 m_nRightBorderDistance;
- sal_uInt16 m_nNumberingType;
+ SvxExtNumType m_nNumberingType;
sal_Unicode m_cBulletChar;
sal_uInt16 m_nColumnCount;
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 6492f283bf69..c2a5ef372e03 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -647,7 +647,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
// <SDFIELD>
public:
- static sal_uInt16 GetNumType( const OUString& rStr, sal_uInt16 eDfltType );
+ static SvxExtNumType GetNumType( const OUString& rStr, SvxExtNumType eDfltType );
private:
void NewField();
void EndField();
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index eacdc132b1c8..7fe7194171c0 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5072,7 +5072,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
aInfo.ePos = FTNPOS_PAGE;
aInfo.eNum = eNumA[m_pWDop->rncFootnote];
sal_uInt16 nfcFootnoteRef = m_pWDop->nfcFootnoteRef & 0xF;
- aInfo.aFormat.SetNumberingType( static_cast< sal_uInt16 >(eNumTA[nfcFootnoteRef]) );
+ aInfo.aFormat.SetNumberingType( eNumTA[nfcFootnoteRef] );
if( m_pWDop->nFootnote )
aInfo.nFootnoteOffset = m_pWDop->nFootnote - 1;
m_rDoc.SetFootnoteInfo( aInfo );
@@ -5082,7 +5082,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
SwEndNoteInfo aInfo;
aInfo = m_rDoc.GetEndNoteInfo(); // Same as for Footnote
sal_uInt16 nfcEdnRef = m_pWDop->nfcEdnRef & 0xF;
- aInfo.aFormat.SetNumberingType( static_cast< sal_uInt16 >(eNumTA[nfcEdnRef]) );
+ aInfo.aFormat.SetNumberingType( eNumTA[nfcEdnRef] );
if( m_pWDop->nEdn )
aInfo.nFootnoteOffset = m_pWDop->nEdn - 1;
m_rDoc.SetEndNoteInfo( aInfo );
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 1362d69c53a7..111684286fa6 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -595,36 +595,34 @@ static void SetBaseAnlv(SwNumFormat &rNum, WW8_ANLV const &rAV, sal_uInt8 nSwLev
static const SvxAdjust eAdjA[4] = { SVX_ADJUST_LEFT,
SVX_ADJUST_RIGHT, SVX_ADJUST_LEFT, SVX_ADJUST_LEFT };
if (rAV.nfc < 8) {
- rNum.SetNumberingType( static_cast< sal_Int16 >(eNumA[ rAV.nfc ] ));
+ rNum.SetNumberingType( eNumA[ rAV.nfc ] );
} else {
- sal_Int16 nType= style::NumberingType::ARABIC;
+ SvxExtNumType nType = SVX_NUM_ARABIC;
switch( rAV.nfc ) {
case 14:
- case 19:nType = style::NumberingType::FULLWIDTH_ARABIC; break;
- case 30:nType = style::NumberingType::TIAN_GAN_ZH; break;
- case 31:nType = style::NumberingType::DI_ZI_ZH; break;
+ case 19:nType = SVX_NUM_FULL_WIDTH_ARABIC; break;
+ case 30:nType = SVX_NUM_TIAN_GAN_ZH; break;
+ case 31:nType = SVX_NUM_DI_ZI_ZH; break;
case 35:
case 36:
case 37:
- case 39:
- nType = style::NumberingType::NUMBER_LOWER_ZH; break;
- case 34:nType = style::NumberingType::NUMBER_UPPER_ZH_TW;break;
- case 38:nType = style::NumberingType::NUMBER_UPPER_ZH; break;
+ case 39:nType = SVX_NUM_NUMBER_LOWER_ZH; break;
+ case 34:nType = SVX_NUM_NUMBER_UPPER_ZH_TW; break;
+ case 38:nType = SVX_NUM_NUMBER_UPPER_ZH; break;
case 10:
- case 11:
- nType = style::NumberingType::NUMBER_TRADITIONAL_JA;break;
- case 20:nType = style::NumberingType::AIU_FULLWIDTH_JA;break;
- case 12:nType = style::NumberingType::AIU_HALFWIDTH_JA;break;
- case 21:nType = style::NumberingType::IROHA_FULLWIDTH_JA;break;
- case 13:nType = style::NumberingType::IROHA_HALFWIDTH_JA;break;
- case 24:nType = style::NumberingType::HANGUL_SYLLABLE_KO;break;
- case 25:nType = style::NumberingType::HANGUL_JAMO_KO;break;
- case 41:nType = style::NumberingType::NUMBER_HANGUL_KO;break;
+ case 11:nType = SVX_NUM_NUMBER_TRADITIONAL_JA; break;
+ case 20:nType = SVX_NUM_AIU_FULLWIDTH_JA; break;
+ case 12:nType = SVX_NUM_AIU_HALFWIDTH_JA; break;
+ case 21:nType = SVX_NUM_IROHA_FULLWIDTH_JA; break;
+ case 13:nType = SVX_NUM_IROHA_HALFWIDTH_JA; break;
+ case 24:nType = SVX_NUM_HANGUL_SYLLABLE_KO; break;
+ case 25:nType = SVX_NUM_HANGUL_JAMO_KO; break;
+ case 41:nType = SVX_NUM_NUMBER_HANGUL_KO; break;
//case 42:
//case 43:
- case 44:nType = style::NumberingType::NUMBER_UPPER_KO; break;
+ case 44:nType = SVX_NUM_NUMBER_UPPER_KO; break;
default:
- nType= style::NumberingType::ARABIC;break;
+ nType= SVX_NUM_ARABIC;break;
}
rNum.SetNumberingType( nType );
}
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 1a434c6a607e..8bee24dfef05 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -510,7 +510,7 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, SfxItemSet*& rpItemSet,
{
sal_uInt8 aBits1(0);
sal_uInt16 nStartNo(0); // Start-Nr. fuer den Writer
- sal_uInt16 nType(style::NumberingType::ARABIC); // NumberintType
+ SvxExtNumType nType(SVX_NUM_ARABIC);
SvxAdjust eAdj; // Ausrichtung (Links/rechts/zent.)
sal_Unicode cBullet(0x2190); // default safe bullet
@@ -723,66 +723,64 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, SfxItemSet*& rpItemSet,
switch( aLVL.nNFC )
{
case 0:
- nType = style::NumberingType::ARABIC;
+ nType = SVX_NUM_ARABIC;
break;
case 1:
- nType = style::NumberingType::ROMAN_UPPER;
+ nType = SVX_NUM_ROMAN_UPPER;
break;
case 2:
- nType = style::NumberingType::ROMAN_LOWER;
+ nType = SVX_NUM_ROMAN_LOWER;
break;
case 3:
- nType = style::NumberingType::CHARS_UPPER_LETTER_N;
+ nType = SVX_NUM_CHARS_UPPER_LETTER_N;
break;
case 4:
- nType = style::NumberingType::CHARS_LOWER_LETTER_N;
+ nType = SVX_NUM_CHARS_LOWER_LETTER_N;
break;
case 5:
// eigentlich: ORDINAL
- nType = style::NumberingType::ARABIC;
+ nType = SVX_NUM_ARABIC;
break;
case 23:
- nType = style::NumberingType::CHAR_SPECIAL;
+ nType = SVX_NUM_CHAR_SPECIAL;
//For i120928,type info
if (bIsPicBullet)
{
- nType = style::NumberingType::BITMAP;
+ nType = SVX_NUM_BITMAP;
}
break;
case 255:
- nType = style::NumberingType::NUMBER_NONE;
+ nType = SVX_NUM_NUMBER_NONE;
break;
case 14:
- case 19:nType = style::NumberingType::FULLWIDTH_ARABIC; break;
- case 30:nType = style::NumberingType::TIAN_GAN_ZH; break;
- case 31:nType = style::NumberingType::DI_ZI_ZH; break;
+ case 19:nType = SVX_NUM_FULL_WIDTH_ARABIC; break;
+ case 30:nType = SVX_NUM_TIAN_GAN_ZH; break;
+ case 31:nType = SVX_NUM_DI_ZI_ZH; break;
case 35:
case 36:
case 37:
- case 39:
- nType = style::NumberingType::NUMBER_LOWER_ZH; break;
- case 34:nType = style::NumberingType::NUMBER_UPPER_ZH_TW;break;
- case 38:nType = style::NumberingType::NUMBER_UPPER_ZH; break;
+ case 39:nType = SVX_NUM_NUMBER_LOWER_ZH; break;
+ case 34:nType = SVX_NUM_NUMBER_UPPER_ZH_TW; break;
+ case 38:nType = SVX_NUM_NUMBER_UPPER_ZH; break;
case 10:
- case 11:
- nType = style::NumberingType::NUMBER_TRADITIONAL_JA;break;
- case 20:nType = style::NumberingType::AIU_FULLWIDTH_JA;break;
- case 12:nType = style::NumberingType::AIU_HALFWIDTH_JA;break;
- case 21:nType = style::NumberingType::IROHA_FULLWIDTH_JA;break;
- case 13:nType = style::NumberingType::IROHA_HALFWIDTH_JA;break;
- case 24:nType = style::NumberingType::HANGUL_SYLLABLE_KO;break;
- case 25:nType = style::NumberingType::HANGUL_JAMO_KO;break;
- case 41:nType = style::NumberingType::NUMBER_HANGUL_KO;break;
+ case 11:nType = SVX_NUM_NUMBER_TRADITIONAL_JA; break;
+ case 20:nType = SVX_NUM_AIU_FULLWIDTH_JA; break;
+ case 12:nType = SVX_NUM_AIU_HALFWIDTH_JA; break;
+ case 21:nType = SVX_NUM_IROHA_FULLWIDTH_JA; break;
+ case 13:nType = SVX_NUM_IROHA_HALFWIDTH_JA; break;
+ case 24:nType = SVX_NUM_HANGUL_SYLLABLE_KO; break;
+ case 25:nType = SVX_NUM_HANGUL_JAMO_KO; break;
+ case 41:nType = SVX_NUM_NUMBER_HANGUL_KO; break;
//case 42:
//case 43:
- case 44:nType = style::NumberingType::NUMBER_UPPER_KO; break;
+ case 44:nType = SVX_NUM_NUMBER_UPPER_KO; break;
default:
- nType= style::NumberingType::ARABIC;break;
+ nType= SVX_NUM_ARABIC; break;
}
//If a number level is not going to be used, then record this fact
- if (style::NumberingType::NUMBER_NONE == nType)
+ if (SVX_NUM_NUMBER_NONE == nType)
rNotReallyThere[nLevel] = true;
/*
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 72df1b5e25b0..a472db9fef93 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -778,7 +778,7 @@ void wwSectionManager::SetNumberingType(const wwSection &rNewSection,
};
SvxNumberType aType;
- aType.SetNumberingType( static_cast< sal_Int16 >(aNumTyp[rNewSection.maSep.nfcPgn]) );
+ aType.SetNumberingType( aNumTyp[rNewSection.maSep.nfcPgn] );
rPageDesc.SetNumType(aType);
}
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index c96b5d5c5747..3e28ed8f419c 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -116,7 +116,7 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw)
}
// format
- sal_uInt16 nSelFormat = rInf.GetNumType().GetNumberingType();
+ SvxExtNumType nSelFormat = rInf.GetNumType().GetNumberingType();
m_pFormatLB->SelectNumberingType(nSelFormat);
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 62cd020da61f..9aef2b95b1ea 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -650,7 +650,7 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CollSelectGetFocus, Control&, void)
IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, ListBox&, rBox, void )
{
sal_uInt16 nMask = 1;
- sal_Int16 nNumberType = static_cast<SwNumberingTypeListBox&>(rBox).GetSelectedNumberingType();
+ SvxExtNumType nNumberType = static_cast<SwNumberingTypeListBox&>(rBox).GetSelectedNumberingType();
for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActLevel & nMask)
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