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>
This commit is contained in:
Noel Grandin 2017-03-02 14:24:47 +02:00
parent f091259ad2
commit afa675469c
40 changed files with 256 additions and 225 deletions

View File

@ -31,6 +31,7 @@
#include <vcl/edit.hxx> #include <vcl/edit.hxx>
#include <vcl/field.hxx> #include <vcl/field.hxx>
#include <editeng/numdef.hxx> #include <editeng/numdef.hxx>
#include <editeng/svxenum.hxx>
#include <svtools/ctrlbox.hxx> #include <svtools/ctrlbox.hxx>
#include <vcl/dialog.hxx> #include <vcl/dialog.hxx>
@ -65,14 +66,14 @@ class SvxNumberingPreview : public vcl::Window
struct SvxNumSettings_Impl struct SvxNumSettings_Impl
{ {
short nNumberType; SvxExtNumType nNumberType;
short nParentNumbering; short nParentNumbering;
OUString sPrefix; OUString sPrefix;
OUString sSuffix; OUString sSuffix;
OUString sBulletChar; OUString sBulletChar;
OUString sBulletFont; OUString sBulletFont;
SvxNumSettings_Impl() : SvxNumSettings_Impl() :
nNumberType(0), nNumberType(SVX_NUM_CHARS_UPPER_LETTER),
nParentNumbering(0) nParentNumbering(0)
{} {}
}; };

View File

@ -111,7 +111,11 @@ static SvxNumSettings_Impl* lcl_CreateNumSettingsPtr(const Sequence<PropertyValu
for(sal_Int32 j = 0; j < rLevelProps.getLength(); j++) for(sal_Int32 j = 0; j < rLevelProps.getLength(); j++)
{ {
if ( pValues[j].Name == "NumberingType" ) 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" ) else if ( pValues[j].Name == "Prefix" )
pValues[j].Value >>= pNew->sPrefix; pValues[j].Value >>= pNew->sPrefix;
else if ( pValues[j].Name == "Suffix" ) else if ( pValues[j].Name == "Suffix" )
@ -326,7 +330,7 @@ IMPL_LINK_NOARG(SvxSingleNumPickTabPage, NumSelectHdl_Impl, ValueSet*, void)
if(aNumSettingsArr.size() <= nIdx) if(aNumSettingsArr.size() <= nIdx)
return; return;
SvxNumSettings_Impl* _pSet = aNumSettingsArr[nIdx].get(); 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 cLocalPrefix = !_pSet->sPrefix.isEmpty() ? _pSet->sPrefix[0] : 0;
const sal_Unicode cLocalSuffix = !_pSet->sSuffix.isEmpty() ? _pSet->sSuffix[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 nIdx = m_pExamplesVS->GetSelectItemId() - 1;
sal_uInt16 nMask = 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++) for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{ {
if(nActNumLvl & nMask) if(nActNumLvl & nMask)
@ -1780,8 +1784,8 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox&, rBox, void
{ {
SvxNumberFormat aNumFmt(pActNum->GetLevel(i)); SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
// PAGEDESC does not exist // PAGEDESC does not exist
sal_uInt16 nNumType = (sal_uInt16)reinterpret_cast<sal_uLong>(rBox.GetSelectEntryData()); SvxExtNumType nNumType = (SvxExtNumType)reinterpret_cast<sal_uLong>(rBox.GetSelectEntryData());
aNumFmt.SetNumberingType((sal_Int16)nNumType); aNumFmt.SetNumberingType(nNumType);
sal_uInt16 nNumberingType = aNumFmt.GetNumberingType(); sal_uInt16 nNumberingType = aNumFmt.GetNumberingType();
if(SVX_NUM_BITMAP == (nNumberingType&(~LINK_TOKEN))) if(SVX_NUM_BITMAP == (nNumberingType&(~LINK_TOKEN)))
{ {

View File

@ -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), nNumType(nType),
bShowSymbol(true) bShowSymbol(true)
{ {
@ -129,7 +129,7 @@ OUString SvxNumberType::GetNumStr( sal_uLong nNo, const css::lang::Locale& rLoca
Sequence< PropertyValue > aProperties(2); Sequence< PropertyValue > aProperties(2);
PropertyValue* pValues = aProperties.getArray(); PropertyValue* pValues = aProperties.getArray();
pValues[0].Name = "NumberingType"; pValues[0].Name = "NumberingType";
pValues[0].Value <<= nNumType; pValues[0].Value <<= (sal_uInt16)nNumType;
pValues[1].Name = "Value"; pValues[1].Name = "Value";
pValues[1].Value <<= (sal_Int32)nNo; pValues[1].Value <<= (sal_Int32)nNo;
@ -147,7 +147,7 @@ OUString SvxNumberType::GetNumStr( sal_uLong nNo, const css::lang::Locale& rLoca
return OUString(); return OUString();
} }
SvxNumberFormat::SvxNumberFormat( sal_Int16 eType, SvxNumberFormat::SvxNumberFormat( SvxExtNumType eType,
SvxNumPositionAndSpaceMode ePositionAndSpaceMode ) SvxNumPositionAndSpaceMode ePositionAndSpaceMode )
: SvxNumberType(eType), : SvxNumberType(eType),
eNumAdjust(SVX_ADJUST_LEFT), eNumAdjust(SVX_ADJUST_LEFT),
@ -190,7 +190,7 @@ SvxNumberFormat::SvxNumberFormat( SvStream &rStream )
sal_Int32 nTmp32(0); sal_Int32 nTmp32(0);
rStream.ReadUInt16( nTmp16 ); // Version number 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 ); eNumAdjust = ( SvxAdjust )nTmp16;
rStream.ReadUInt16( nTmp16 ); nInclUpperLevels = nTmp16; rStream.ReadUInt16( nTmp16 ); nInclUpperLevels = nTmp16;
rStream.ReadUInt16( nStart ); rStream.ReadUInt16( nStart );
@ -891,7 +891,7 @@ void SvxNumRule::UnLinkGraphics()
aFmt.SetGraphicBrush( &aTempItem, &aFmt.GetGraphicSize(), &eOrient ); 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); aFmt.SetNumberingType(SVX_NUM_BITMAP);
SetLevel(i, aFmt); SetLevel(i, aFmt);
} }

View File

@ -178,7 +178,7 @@ Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex(sal
Any aVal; Any aVal;
{ {
aVal <<= rFmt.GetNumberingType(); aVal <<= (sal_uInt16)rFmt.GetNumberingType();
beans::PropertyValue aAlignProp( UNO_NAME_NRULE_NUMBERINGTYPE, -1, aVal, beans::PropertyState_DIRECT_VALUE); beans::PropertyValue aAlignProp( UNO_NAME_NRULE_NUMBERINGTYPE, -1, aVal, beans::PropertyState_DIRECT_VALUE);
pArray[nIdx++] = aAlignProp; pArray[nIdx++] = aAlignProp;
} }
@ -282,7 +282,7 @@ void SvxUnoNumberingRules::setNumberingRuleByIndex(const Sequence<beans::Propert
// There is no reason to limit numbering types. // There is no reason to limit numbering types.
if ( nSet>=0 ) if ( nSet>=0 )
{ {
aFmt.SetNumberingType(nSet); aFmt.SetNumberingType((SvxExtNumType)nSet);
continue; continue;
} }
} }

View File

@ -3663,6 +3663,7 @@ void PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx
} }
} }
break; break;
default: break;
} }
} }
@ -3723,6 +3724,7 @@ bool PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx
} }
} }
break; break;
default: break;
} }
} }
return nHardCount != 0; return nHardCount != 0;

View File

@ -55,19 +55,19 @@ class EDITENG_DLLPUBLIC SvxNumberType
static sal_Int32 nRefCount; static sal_Int32 nRefCount;
static css::uno::Reference<css::text::XNumberingFormatter> xFormatter; static css::uno::Reference<css::text::XNumberingFormatter> xFormatter;
sal_Int16 nNumType; SvxExtNumType nNumType;
bool bShowSymbol; // Also show Symbol ? bool bShowSymbol; // Also show Symbol ?
public: public:
explicit SvxNumberType(sal_Int16 nType = css::style::NumberingType::ARABIC); explicit SvxNumberType(SvxExtNumType nType = SVX_NUM_ARABIC);
SvxNumberType(const SvxNumberType& rType); SvxNumberType(const SvxNumberType& rType);
~SvxNumberType(); ~SvxNumberType();
OUString GetNumStr( sal_uLong nNo ) const; OUString GetNumStr( sal_uLong nNo ) const;
OUString GetNumStr( sal_uLong nNo, const css::lang::Locale& rLocale ) const; OUString GetNumStr( sal_uLong nNo, const css::lang::Locale& rLocale ) const;
void SetNumberingType(sal_Int16 nSet) {nNumType = nSet;} void SetNumberingType(SvxExtNumType nSet) {nNumType = nSet;}
sal_Int16 GetNumberingType() const {return nNumType;} SvxExtNumType GetNumberingType() const {return nNumType;}
void SetShowSymbol(bool bSet) {bShowSymbol = bSet;} void SetShowSymbol(bool bSet) {bShowSymbol = bSet;}
bool IsShowSymbol()const{return bShowSymbol;} bool IsShowSymbol()const{return bShowSymbol;}
@ -142,7 +142,7 @@ private:
OUString sCharStyleName; // Character Style OUString sCharStyleName; // Character Style
public: public:
explicit SvxNumberFormat( sal_Int16 nNumberingType, explicit SvxNumberFormat( SvxExtNumType nNumberingType,
SvxNumPositionAndSpaceMode ePositionAndSpaceMode = LABEL_WIDTH_AND_POSITION ); SvxNumPositionAndSpaceMode ePositionAndSpaceMode = LABEL_WIDTH_AND_POSITION );
SvxNumberFormat(const SvxNumberFormat& rFormat); SvxNumberFormat(const SvxNumberFormat& rFormat);
SvxNumberFormat( SvStream & rStream ); SvxNumberFormat( SvStream & rStream );

View File

@ -175,7 +175,11 @@ enum SvxExtNumType
SVX_NUM_AIU_FULLWIDTH_JA = css::style::NumberingType::AIU_FULLWIDTH_JA, SVX_NUM_AIU_FULLWIDTH_JA = css::style::NumberingType::AIU_FULLWIDTH_JA,
SVX_NUM_AIU_HALFWIDTH_JA = css::style::NumberingType::AIU_HALFWIDTH_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_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 #endif

View File

@ -43,7 +43,7 @@ enum class NBType
class SVX_DLLPUBLIC NumSettings_Impl class SVX_DLLPUBLIC NumSettings_Impl
{ {
public: public:
short nNumberType; SvxExtNumType nNumberType;
short nParentNumbering; short nParentNumbering;
SvxNumberFormat::LabelFollowedBy eLabelFollowedBy; SvxNumberFormat::LabelFollowedBy eLabelFollowedBy;
long nTabValue; long nTabValue;
@ -59,7 +59,7 @@ class SVX_DLLPUBLIC NumSettings_Impl
public: public:
NumSettings_Impl() NumSettings_Impl()
: nNumberType(0) : nNumberType(SVX_NUM_CHARS_UPPER_LETTER)
, nParentNumbering(0) , nParentNumbering(0)
, eLabelFollowedBy(SvxNumberFormat::NOTHING) , eLabelFollowedBy(SvxNumberFormat::NOTHING)
, nTabValue (0) , nTabValue (0)

View File

@ -1656,7 +1656,7 @@ void DrawingML::WriteRun( const Reference< XTextRange >& rRun )
mpFS->endElementNS( XML_a, XML_r ); 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; OUString sPrefixSuffix;
@ -1667,7 +1667,7 @@ OUString GetAutoNumType(sal_Int16 nNumberingType, bool bSDot, bool bPBehind, boo
else if (bSDot) else if (bSDot)
sPrefixSuffix = "Period"; sPrefixSuffix = "Period";
switch( (SvxExtNumType)nNumberingType ) switch( nNumberingType )
{ {
case SVX_NUM_CHARS_UPPER_LETTER_N : case SVX_NUM_CHARS_UPPER_LETTER_N :
case SVX_NUM_CHARS_UPPER_LETTER : case SVX_NUM_CHARS_UPPER_LETTER :
@ -1719,7 +1719,7 @@ void DrawingML::WriteParagraphNumbering( const Reference< XPropertySet >& rXProp
const PropertyValue* pPropValue = aPropertySequence.getArray(); const PropertyValue* pPropValue = aPropertySequence.getArray();
sal_Int16 nNumberingType = SVX_NUM_NUMBER_NONE; SvxExtNumType nNumberingType = SVX_NUM_NUMBER_NONE;
bool bSDot = false; bool bSDot = false;
bool bPBehind = false; bool bPBehind = false;
bool bPBoth = false; bool bPBoth = false;
@ -1738,7 +1738,7 @@ void DrawingML::WriteParagraphNumbering( const Reference< XPropertySet >& rXProp
SAL_INFO("oox.shape", "pro name: " << aPropName); SAL_INFO("oox.shape", "pro name: " << aPropName);
if ( aPropName == "NumberingType" ) if ( aPropName == "NumberingType" )
{ {
nNumberingType = *o3tl::doAccess<sal_Int16>(pPropValue[i].Value); nNumberingType = (SvxExtNumType)*o3tl::doAccess<sal_Int16>(pPropValue[i].Value);
} }
else if ( aPropName == "Prefix" ) else if ( aPropName == "Prefix" )
{ {

View File

@ -1363,7 +1363,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
case SVX_NUM_BITMAP : case SVX_NUM_BITMAP :
nNumberingType = 0; nNumberingType = 0;
break; break;
default: break;
} }
rExtBuStr.WriteUInt32( nNumberingType ); rExtBuStr.WriteUInt32( nNumberingType );
} }

View File

@ -765,7 +765,7 @@ void ParagraphObj::ImplClear()
void ParagraphObj::CalculateGraphicBulletSize( sal_uInt16 nFontHeight ) 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 // calculate the bulletrealsize for this grafik
if ( aBuGraSize.Width() && aBuGraSize.Height() ) if ( aBuGraSize.Width() && aBuGraSize.Height() )
@ -821,7 +821,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int1
{ {
OUString aPropName( pPropValue[ i ].Name ); OUString aPropName( pPropValue[ i ].Name );
if ( aPropName == "NumberingType" ) if ( aPropName == "NumberingType" )
nNumberingType = *o3tl::doAccess<sal_Int16>(pPropValue[i].Value); nNumberingType = (SvxExtNumType)*o3tl::doAccess<sal_Int16>(pPropValue[i].Value);
else if ( aPropName == "Adjust" ) else if ( aPropName == "Adjust" )
nHorzAdjust = *o3tl::doAccess<sal_Int16>(pPropValue[i].Value); nHorzAdjust = *o3tl::doAccess<sal_Int16>(pPropValue[i].Value);
else if ( aPropName == "BulletChar" ) else if ( aPropName == "BulletChar" )
@ -959,7 +959,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int1
else else
cBulletId = 0x2022; cBulletId = 0x2022;
switch( (SvxExtNumType)nNumberingType ) switch( nNumberingType )
{ {
case SVX_NUM_CHARS_UPPER_LETTER : case SVX_NUM_CHARS_UPPER_LETTER :
case SVX_NUM_CHARS_UPPER_LETTER_N : case SVX_NUM_CHARS_UPPER_LETTER_N :
@ -1075,6 +1075,8 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int1
default: default:
break; break;
} }
break;
default: break;
} }
nParaFlags |= 0x2f; nParaFlags |= 0x2f;
nBulletFlags |= 6; nBulletFlags |= 6;

View File

@ -46,7 +46,7 @@ struct SOParagraph
OUString sSuffix; OUString sSuffix;
OUString sGraphicUrl; // String to a graphic OUString sGraphicUrl; // String to a graphic
Size aBuGraSize; Size aBuGraSize;
sal_uInt32 nNumberingType; // this is actually a SvxEnum SvxExtNumType nNumberingType;
sal_uInt32 nHorzAdjust; sal_uInt32 nHorzAdjust;
sal_uInt32 nBulletColor; sal_uInt32 nBulletColor;
sal_Int32 nBulletOfs; sal_Int32 nBulletOfs;

View File

@ -98,7 +98,11 @@ NumSettings_Impl* lcl_CreateNumberingSettingsPtr(const Sequence<PropertyValue>&
for(sal_Int32 j = 0; j < rLevelProps.getLength(); j++) for(sal_Int32 j = 0; j < rLevelProps.getLength(); j++)
{ {
if(pValues[j].Name == "NumberingType") 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") else if(pValues[j].Name == "Prefix")
pValues[j].Value >>= pNew->sPrefix; pValues[j].Value >>= pNew->sPrefix;
else if(pValues[j].Name == "Suffix") else if(pValues[j].Name == "Suffix")
@ -543,7 +547,7 @@ void NumberingTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_
return; return;
SvxNumberFormat aFmt(aNum.GetLevel(nActLv)); SvxNumberFormat aFmt(aNum.GetLevel(nActLv));
sal_Int16 eNumType = aFmt.GetNumberingType(); SvxExtNumType eNumType = aFmt.GetNumberingType();
sal_uInt16 nCount = pNumberSettingsArr->size(); sal_uInt16 nCount = pNumberSettingsArr->size();
if ( nIndex >= nCount ) if ( nIndex >= nCount )
@ -579,7 +583,7 @@ void NumberingTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uIn
NumberSettingsArr_Impl* pCurrentNumberSettingsArr=pNumberSettingsArr; NumberSettingsArr_Impl* pCurrentNumberSettingsArr=pNumberSettingsArr;
if (isDefault) pCurrentNumberSettingsArr=pDefaultNumberSettingsArr; if (isDefault) pCurrentNumberSettingsArr=pDefaultNumberSettingsArr;
NumberSettings_Impl* _pSet = (*pCurrentNumberSettingsArr)[nIndex].get(); NumberSettings_Impl* _pSet = (*pCurrentNumberSettingsArr)[nIndex].get();
sal_Int16 eNewType = _pSet->pNumSetting->nNumberType; SvxExtNumType eNewType = _pSet->pNumSetting->nNumberType;
sal_uInt16 nMask = 1; sal_uInt16 nMask = 1;
OUString sNumCharFmtName = GetBulCharFmtName(); 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++) for (sal_uInt16 iLevel=0;iLevel < nCount;iLevel++)
{ {
SvxNumberFormat aFmt(aNum.GetLevel(iLevel)); SvxNumberFormat aFmt(aNum.GetLevel(iLevel));
sal_Int16 eNumType = aFmt.GetNumberingType(); SvxExtNumType eNumType = aFmt.GetNumberingType();
NumSettings_Impl* _pSet = (*pItemArr->pNumSettingsArr)[iLevel].get(); NumSettings_Impl* _pSet = (*pItemArr->pNumSettingsArr)[iLevel].get();

View File

@ -125,16 +125,16 @@ enum SwJumpEditFormat
class SwPageNumberFieldType : public SwFieldType class SwPageNumberFieldType : public SwFieldType
{ {
sal_Int16 nNumberingType; SvxExtNumType nNumberingType;
bool bVirtuell; bool bVirtuell;
public: public:
SwPageNumberFieldType(); 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; sal_uInt16 const nMaxPage, const OUString& ) const;
void ChangeExpansion( SwDoc* pDoc, void ChangeExpansion( SwDoc* pDoc,
bool bVirtPageNum, const sal_Int16* pNumFormat ); bool bVirtPageNum, const SvxExtNumType* pNumFormat );
virtual SwFieldType* Copy() const override; virtual SwFieldType* Copy() const override;
}; };
@ -247,14 +247,14 @@ public:
class SwDocStatFieldType : public SwFieldType class SwDocStatFieldType : public SwFieldType
{ {
SwDoc* pDoc; SwDoc* pDoc;
sal_Int16 nNumberingType; ///< css::style::NumberingType SvxExtNumType nNumberingType;
public: public:
SwDocStatFieldType(SwDoc*); SwDocStatFieldType(SwDoc*);
OUString Expand(sal_uInt16 nSubType, sal_uInt32 nFormat) const; OUString Expand(sal_uInt16 nSubType, SvxExtNumType nFormat) const;
virtual SwFieldType* Copy() const override; 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 class SW_DLLPUBLIC SwDocStatField : public SwField

View File

@ -25,14 +25,15 @@
#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Any.hxx>
#include <cppuhelper/weakref.hxx> #include <cppuhelper/weakref.hxx>
#include <editeng/svxenum.hxx>
#include <vector> #include <vector>
#include <toxe.hxx> #include <toxe.hxx>
class SwDoc; class SwDoc;
class SvNumberFormatter; class SvNumberFormatter;
enum RES_FIELDS enum RES_FIELDS {
{ /// For old documents the Field-Which IDs must be preserved !!!
/// For old documents the Field-Which IDs must be preserved !!!
RES_FIELDS_BEGIN, RES_FIELDS_BEGIN,
RES_DBFLD = RES_FIELDS_BEGIN, RES_DBFLD = RES_FIELDS_BEGIN,
RES_USERFLD, RES_USERFLD,
@ -77,9 +78,8 @@ enum RES_FIELDS
RES_FIELDS_END RES_FIELDS_END
}; };
/// List of FieldTypes at UI. /// List of FieldTypes at UI.
enum SwFieldTypesEnum enum SwFieldTypesEnum {
{
TYP_BEGIN, TYP_BEGIN,
TYP_DATEFLD = TYP_BEGIN, // 0 TYP_DATEFLD = TYP_BEGIN, // 0
TYP_TIMEFLD, TYP_TIMEFLD,
@ -126,8 +126,7 @@ enum SwFieldTypesEnum
TYP_DROPDOWN, TYP_DROPDOWN,
TYP_END TYP_END
}; };
enum SwAttrFieldTYpe enum SwAttrFieldTYpe {
{
ATTR_NONE, ATTR_NONE,
ATTR_DATEFLD, ATTR_DATEFLD,
ATTR_TIMEFLD, ATTR_TIMEFLD,
@ -136,8 +135,7 @@ enum SwAttrFieldTYpe
ATTR_BOOKMARKFLD, ATTR_BOOKMARKFLD,
ATTR_SETREFATTRFLD ATTR_SETREFATTRFLD
}; };
enum SwFileNameFormat enum SwFileNameFormat {
{
FF_BEGIN, FF_BEGIN,
FF_NAME = FF_BEGIN, FF_NAME = FF_BEGIN,
FF_PATHNAME, FF_PATHNAME,
@ -149,8 +147,7 @@ enum SwFileNameFormat
FF_FIXED = 0x8000 FF_FIXED = 0x8000
}; };
enum SwVarFormat enum SwVarFormat {
{
VVF_CMD = 0x0010, ///< Show command. VVF_CMD = 0x0010, ///< Show command.
VVF_INVISIBLE = 0x0040, ///< Invisible. VVF_INVISIBLE = 0x0040, ///< Invisible.
VVF_XXP = 0x0400, ///< 1234% VVF_XXP = 0x0400, ///< 1234%
@ -188,43 +185,40 @@ enum SwVarFormat
typedef sal_uInt16 SwGetSetExpType; typedef sal_uInt16 SwGetSetExpType;
namespace nsSwGetSetExpType namespace nsSwGetSetExpType
{ {
const SwGetSetExpType GSE_STRING = 0x0001; ///< String const SwGetSetExpType GSE_STRING = 0x0001; ///< String
const SwGetSetExpType GSE_EXPR = 0x0002; ///< Expression const SwGetSetExpType GSE_EXPR = 0x0002; ///< Expression
const SwGetSetExpType GSE_INP = 0x0004; ///< InputField const SwGetSetExpType GSE_INP = 0x0004; ///< InputField
const SwGetSetExpType GSE_SEQ = 0x0008; ///< Sequence const SwGetSetExpType GSE_SEQ = 0x0008; ///< Sequence
const SwGetSetExpType GSE_FORMULA = 0x0010; ///< Formula const SwGetSetExpType GSE_FORMULA = 0x0010; ///< Formula
} }
typedef sal_uInt16 SwExtendedSubType; typedef sal_uInt16 SwExtendedSubType;
namespace nsSwExtendedSubType namespace nsSwExtendedSubType
{ {
const SwExtendedSubType SUB_CMD = 0x0100; ///< Show command. const SwExtendedSubType SUB_CMD = 0x0100; ///< Show command.
const SwExtendedSubType SUB_INVISIBLE = 0x0200; ///< Invisible. const SwExtendedSubType SUB_INVISIBLE = 0x0200; ///< Invisible.
const SwExtendedSubType SUB_OWN_FMT = 0x0400; ///< SwDBField: Don't accept formatting from database. const SwExtendedSubType SUB_OWN_FMT = 0x0400; ///< SwDBField: Don't accept formatting from database.
} }
enum SwInputFieldSubType enum SwInputFieldSubType {
{
INP_TXT = 0x01, INP_TXT = 0x01,
INP_USR = 0x02, INP_USR = 0x02,
INP_VAR = 0x03 INP_VAR = 0x03
}; };
enum SwUserType enum SwUserType {
{
UF_STRING = 0x01, UF_STRING = 0x01,
UF_EXPR = 0x02 UF_EXPR = 0x02
}; };
enum SwDateTimeSubType enum SwDateTimeSubType {
{
FIXEDFLD = 1, FIXEDFLD = 1,
DATEFLD = 2, DATEFLD = 2,
TIMEFLD = 4 TIMEFLD = 4
}; };
/// General tools. /// 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. /** 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. For each class there is one instance of the associated type class.
@ -247,10 +241,12 @@ protected:
public: public:
SAL_DLLPRIVATE css::uno::WeakReference<css::beans::XPropertySet> const& GetXObject() const SAL_DLLPRIVATE css::uno::WeakReference<css::beans::XPropertySet> const& GetXObject() const {
{ return m_wXFieldMaster; } return m_wXFieldMaster;
SAL_DLLPRIVATE void SetXObject(css::uno::Reference<css::beans::XPropertySet> const& xFieldMaster) }
{ m_wXFieldMaster = xFieldMaster; } SAL_DLLPRIVATE void SetXObject(css::uno::Reference<css::beans::XPropertySet> const& xFieldMaster) {
m_wXFieldMaster = xFieldMaster;
}
static OUString GetTypeStr( sal_uInt16 nTypeId ); static OUString GetTypeStr( sal_uInt16 nTypeId );
@ -260,7 +256,9 @@ public:
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const; virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ); 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; inline void UpdateFields() const;
}; };
@ -278,18 +276,18 @@ class SW_DLLPUBLIC SwField
private: private:
mutable OUString m_Cache; ///< Cached expansion (for clipboard). mutable OUString m_Cache; ///< Cached expansion (for clipboard).
bool m_bUseFieldValueCache; /// control the usage of the cached field value bool m_bUseFieldValueCache; /// control the usage of the cached field value
sal_uInt16 m_nLang; ///< Always change via SetLanguage! sal_uInt16 m_nLang; ///< Always change via SetLanguage!
bool m_bIsAutomaticLanguage; 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; SwFieldType* m_pType;
virtual OUString Expand() const = 0; virtual OUString Expand() const = 0;
virtual SwField* Copy() const = 0; virtual SwField* Copy() const = 0;
protected: protected:
void SetFormat(sal_uInt32 const nSet) { m_nFormat = nSet; } void SetFormat(sal_uInt32 const nSet) {
m_nFormat = nSet;
}
SwField( SwFieldType* pTyp, SwField( SwFieldType* pTyp,
sal_uInt32 nFormat = 0, sal_uInt32 nFormat = 0,
@ -324,7 +322,9 @@ public:
#ifdef DBG_UTIL #ifdef DBG_UTIL
; // implemented in fldbas.cxx ; // implemented in fldbas.cxx
#else #else
{ return m_pType->Which(); } {
return m_pType->Which();
}
#endif #endif
// TYP_ID // TYP_ID
@ -354,8 +354,12 @@ public:
bool HasClickHdl() const; bool HasClickHdl() const;
bool IsFixed() const; bool IsFixed() const;
bool IsAutomaticLanguage() const { return m_bIsAutomaticLanguage;} bool IsAutomaticLanguage() const {
void SetAutomaticLanguage(bool const bSet) {m_bIsAutomaticLanguage = bSet;} return m_bIsAutomaticLanguage;
}
void SetAutomaticLanguage(bool const bSet) {
m_bIsAutomaticLanguage = bSet;
}
virtual OUString GetDescription() const; virtual OUString GetDescription() const;
/// Is this field clickable? /// Is this field clickable?
@ -364,15 +368,21 @@ public:
}; };
inline SwFieldType* SwField::GetTyp() const inline SwFieldType* SwField::GetTyp() const
{ return m_pType; } {
return m_pType;
}
inline sal_uInt32 SwField::GetFormat() const inline sal_uInt32 SwField::GetFormat() const
{ return m_nFormat; } {
return m_nFormat;
}
inline sal_uInt16 SwField::GetLanguage() const 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 class SwValueFieldType : public SwFieldType
{ {
private: private:
@ -384,11 +394,19 @@ protected:
SwValueFieldType( const SwValueFieldType& rTyp ); SwValueFieldType( const SwValueFieldType& rTyp );
public: public:
inline SwDoc* GetDoc() const { return m_pDoc; } inline SwDoc* GetDoc() const {
inline void SetDoc(SwDoc* pNewDoc) { m_pDoc = pNewDoc; } return m_pDoc;
}
inline void SetDoc(SwDoc* pNewDoc) {
m_pDoc = pNewDoc;
}
inline bool UseFormat() const { return m_bUseFormat; } inline bool UseFormat() const {
inline void EnableFormat(bool bFormat = true) { m_bUseFormat = bFormat; } 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 ExpandValue(const double& rVal, sal_uInt32 nFormat, sal_uInt16 nLng) const;
OUString DoubleToString(const double &rVal, LanguageType eLng) const; OUString DoubleToString(const double &rVal, LanguageType eLng) const;
@ -410,13 +428,16 @@ public:
virtual SwFieldType* ChgTyp( SwFieldType* ) override; virtual SwFieldType* ChgTyp( SwFieldType* ) override;
virtual void SetLanguage(sal_uInt16 nLng) 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 double GetValue() const;
virtual void SetValue( const double& rVal ); virtual void SetValue( const double& rVal );
inline OUString ExpandValue(const double& rVal, sal_uInt32 nFormat, sal_uInt16 nLng) const inline OUString ExpandValue(const double& rVal, sal_uInt32 nFormat, sal_uInt16 nLng) const {
{ return static_cast<SwValueFieldType*>(GetTyp())->ExpandValue(rVal, nFormat, nLng); } return static_cast<SwValueFieldType*>(GetTyp())->ExpandValue(rVal, nFormat, nLng);
}
static sal_uInt32 GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt32 nFormat); static sal_uInt32 GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt32 nFormat);
}; };

View File

@ -69,8 +69,8 @@ public:
SwFormatFootnoteEndAtTextEnd & operator=( const SwFormatFootnoteEndAtTextEnd & rAttr ); SwFormatFootnoteEndAtTextEnd & operator=( const SwFormatFootnoteEndAtTextEnd & rAttr );
sal_Int16 GetNumType() const { return aFormat.GetNumberingType(); } SvxExtNumType GetNumType() const { return aFormat.GetNumberingType(); }
void SetNumType( sal_Int16 eType ) { aFormat.SetNumberingType(eType); } void SetNumType( SvxExtNumType eType ) { aFormat.SetNumberingType(eType); }
const SvxNumberType& GetSwNumType() const { return aFormat; } const SvxNumberType& GetSwNumType() const { return aFormat; }

View File

@ -433,7 +433,7 @@ const SwFrame* SwAccessibleFrame::GetParent( const SwAccessibleChild& rFrameOrOb
OUString SwAccessibleFrame::GetFormattedPageNumber() const OUString SwAccessibleFrame::GetFormattedPageNumber() const
{ {
sal_uInt16 nPageNum = GetFrame()->GetVirtPageNum(); sal_uInt16 nPageNum = GetFrame()->GetVirtPageNum();
sal_uInt32 nFormat = GetFrame()->FindPageFrame()->GetPageDesc() SvxExtNumType nFormat = GetFrame()->FindPageFrame()->GetPageDesc()
->GetNumType().GetNumberingType(); ->GetNumType().GetNumberingType();
if( SVX_NUM_NUMBER_NONE == nFormat ) if( SVX_NUM_NUMBER_NONE == nFormat )
nFormat = SVX_NUM_ARABIC; nFormat = SVX_NUM_ARABIC;

View File

@ -1532,7 +1532,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
aFormat.SetCharFormat( pCFormat ); aFormat.SetCharFormat( pCFormat );
if( !aNumTypes.isEmpty() ) if( !aNumTypes.isEmpty() )
aFormat.SetNumberingType(aNumTypes[ 0 ] - '0'); aFormat.SetNumberingType((SvxExtNumType)(aNumTypes[ 0 ] - '0'));
if( bRTL ) if( bRTL )
aFormat.SetNumAdjust( SVX_ADJUST_RIGHT ); 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.SetSuffix( aPostfix.getToken( n, (sal_Unicode)1 ));
aFormat.SetIncludeUpperLevels( MAXLEVEL ); aFormat.SetIncludeUpperLevels( MAXLEVEL );
if( n < aNumTypes.getLength() ) if( n < aNumTypes.getLength() )
aFormat.SetNumberingType((aNumTypes[ n ] - '0')); aFormat.SetNumberingType((SvxExtNumType)(aNumTypes[ n ] - '0'));
aFormat.SetAbsLSpace( sal_uInt16( nSpaceSteps * n ) aFormat.SetAbsLSpace( sal_uInt16( nSpaceSteps * n )
+ lNumIndent ); + lNumIndent );

View File

@ -817,7 +817,7 @@ OUString SwDBSetNumberField::Expand() const
{ {
if(0 !=(GetSubType() & nsSwExtendedSubType::SUB_INVISIBLE) || nNumber == 0) if(0 !=(GetSubType() & nsSwExtendedSubType::SUB_INVISIBLE) || nNumber == 0)
return OUString(); return OUString();
return FormatNumber(nNumber, GetFormat()); return FormatNumber(nNumber, (SvxExtNumType)GetFormat());
} }
void SwDBSetNumberField::Evaluate(SwDoc* pDoc) void SwDBSetNumberField::Evaluate(SwDoc* pDoc)

View File

@ -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, sal_uInt16 const nPageNumber, sal_uInt16 const nMaxPage,
const OUString& rUserStr ) const 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; int const nTmp = nPageNumber + nOff;
if (0 > nTmp || SVX_NUM_NUMBER_NONE == nTmpFormat || (!bVirtuell && nTmp > nMaxPage)) if (0 > nTmp || SVX_NUM_NUMBER_NONE == nTmpFormat || (!bVirtuell && nTmp > nMaxPage))
@ -131,7 +131,7 @@ SwFieldType* SwPageNumberFieldType::Copy() const
void SwPageNumberFieldType::ChangeExpansion( SwDoc* pDoc, void SwPageNumberFieldType::ChangeExpansion( SwDoc* pDoc,
bool bVirt, bool bVirt,
const sal_Int16* pNumFormat ) const SvxExtNumType* pNumFormat )
{ {
if( pNumFormat ) if( pNumFormat )
nNumberingType = *pNumFormat; nNumberingType = *pNumFormat;
@ -188,22 +188,22 @@ OUString SwPageNumberField::Expand() const
if( PG_NEXT == nSubType && 1 != nOffset ) 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()) 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 ) 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()) 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 else
sRet = pFieldType->Expand(GetFormat(), nOffset, m_nPageNumber, m_nMaxPage, sUserStr); sRet = pFieldType->Expand((SvxExtNumType)GetFormat(), nOffset, m_nPageNumber, m_nMaxPage, sUserStr);
return sRet; return sRet;
} }
@ -720,7 +720,7 @@ SwDocStatFieldType::SwDocStatFieldType(SwDoc* pDocument)
pDoc = 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; sal_uInt32 nVal = 0;
const SwDocStat& rDStat = pDoc->getIDocumentStatistics().GetDocStat(); 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(); ((SwDocStat &)rDStat).nPage = pDoc->getIDocumentLayoutAccess().GetCurrentLayout()->GetPageNum();
nVal = rDStat.nPage; nVal = rDStat.nPage;
if( SVX_NUM_PAGEDESC == nFormat ) if( SVX_NUM_PAGEDESC == nFormat )
nFormat = (sal_uInt32)nNumberingType; nFormat = nNumberingType;
break; break;
default: default:
OSL_FAIL( "SwDocStatFieldType::Expand: unknown SubType" ); OSL_FAIL( "SwDocStatFieldType::Expand: unknown SubType" );
@ -767,7 +767,7 @@ SwDocStatField::SwDocStatField(SwDocStatFieldType* pTyp, sal_uInt16 nSub, sal_uI
OUString SwDocStatField::Expand() const 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 SwField* SwDocStatField::Copy() const
@ -2165,11 +2165,11 @@ void SwRefPageGetFieldType::UpdateField( SwTextField* pTextField,
pRefFrame->FindPageFrame()->GetPhyPageNum() + 1 pRefFrame->FindPageFrame()->GetPhyPageNum() + 1
: 1; : 1;
sal_uInt32 nTmpFormat = SVX_NUM_PAGEDESC == pGetField->GetFormat() SvxExtNumType nTmpFormat = SVX_NUM_PAGEDESC == (SvxExtNumType)pGetField->GetFormat()
? ( !pPgFrame ? ( !pPgFrame
? (sal_uInt32)SVX_NUM_ARABIC ? SVX_NUM_ARABIC
: pPgFrame->GetPageDesc()->GetNumType().GetNumberingType() ) : pPgFrame->GetPageDesc()->GetNumType().GetNumberingType() )
: pGetField->GetFormat(); : (SvxExtNumType)pGetField->GetFormat();
const short nPageNum = std::max<short>(0, pSetField->GetOffset() + nDiff); const short nPageNum = std::max<short>(0, pSetField->GetOffset() + nDiff);
pGetField->SetText( FormatNumber( nPageNum, nTmpFormat ) ); pGetField->SetText( FormatNumber( nPageNum, nTmpFormat ) );
} }
@ -2249,9 +2249,9 @@ void SwRefPageGetField::ChangeExpansion( const SwFrame* pFrame,
pRefFrame->FindPageFrame()->GetPhyPageNum() + 1; pRefFrame->FindPageFrame()->GetPhyPageNum() + 1;
SwRefPageGetField* pGetField = const_cast<SwRefPageGetField*>(static_cast<const SwRefPageGetField*>(pField->GetFormatField().GetField())); 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() ? pPgFrame->GetPageDesc()->GetNumType().GetNumberingType()
: pGetField->GetFormat(); : (SvxExtNumType)pGetField->GetFormat();
const short nPageNum = std::max<short>(0, pSetField->GetOffset() + nDiff); const short nPageNum = std::max<short>(0, pSetField->GetOffset() + nDiff);
pGetField->SetText( FormatNumber( nPageNum, nTmpFormat ) ); pGetField->SetText( FormatNumber( nPageNum, nTmpFormat ) );
} }

View File

@ -865,7 +865,7 @@ void SwSetExpField::SetValue( const double& rAny )
SwValueField::SetValue(rAny); SwValueField::SetValue(rAny);
if( IsSequenceField() ) if( IsSequenceField() )
sExpand = FormatNumber( GetValue(), GetFormat() ); sExpand = FormatNumber( GetValue(), (SvxExtNumType)GetFormat() );
else else
sExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue( rAny, sExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue( rAny,
GetFormat(), GetLanguage()); GetFormat(), GetLanguage());

View File

@ -431,7 +431,7 @@ SwField * SwField::CopyField() const
} }
/// expand numbering /// expand numbering
OUString FormatNumber(sal_uInt32 nNum, sal_uInt32 nFormat) OUString FormatNumber(sal_uInt32 nNum, SvxExtNumType nFormat)
{ {
if(SVX_NUM_PAGEDESC == nFormat) if(SVX_NUM_PAGEDESC == nFormat)
return OUString::number( nNum ); 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" ); OSL_ENSURE(nFormat != SVX_NUM_NUMBER_NONE, "wrong number format" );
aNumber.SetNumberingType((sal_Int16)nFormat); aNumber.SetNumberingType(nFormat);
return aNumber.GetNumStr(nNum); return aNumber.GetNumStr(nNum);
} }

View File

@ -1925,7 +1925,7 @@ bool SwFormatFootnoteEndAtTextEnd::QueryValue( uno::Any& rVal, sal_uInt8 nMember
case MID_OWN_NUM : case MID_OWN_NUM :
rVal <<= GetValue() >= FTNEND_ATTXTEND_OWNNUMANDFMT; rVal <<= GetValue() >= FTNEND_ATTXTEND_OWNNUMANDFMT;
break; 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_PREFIX : rVal <<= OUString(sPrefix); break;
case MID_SUFFIX : rVal <<= OUString(sSuffix); break; case MID_SUFFIX : rVal <<= OUString(sSuffix); break;
default: return false; default: return false;
@ -1984,7 +1984,7 @@ bool SwFormatFootnoteEndAtTextEnd::PutValue( const uno::Any& rVal, sal_uInt8 nMe
(nVal <= SVX_NUM_ARABIC || (nVal <= SVX_NUM_ARABIC ||
SVX_NUM_CHARS_UPPER_LETTER_N == nVal || SVX_NUM_CHARS_UPPER_LETTER_N == nVal ||
SVX_NUM_CHARS_LOWER_LETTER_N == nVal )) SVX_NUM_CHARS_LOWER_LETTER_N == nVal ))
aFormat.SetNumberingType(nVal); aFormat.SetNumberingType((SvxExtNumType)nVal);
else else
bRet = false; bRet = false;
} }

View File

@ -159,13 +159,13 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf,
sal_uInt16 nVirtNum = pFrame->GetVirtPageNum(); sal_uInt16 nVirtNum = pFrame->GetVirtPageNum();
sal_uInt16 nNumPages = pTmpRootFrame->GetPageNum(); sal_uInt16 nNumPages = pTmpRootFrame->GetPageNum();
sal_Int16 nNumFormat = -1; SvxExtNumType nNumFormat = (SvxExtNumType)-1;
if(SVX_NUM_PAGEDESC == pField->GetFormat()) if(SVX_NUM_PAGEDESC == pField->GetFormat())
nNumFormat = pFrame->FindPageFrame()->GetPageDesc()->GetNumType().GetNumberingType(); nNumFormat = pFrame->FindPageFrame()->GetPageDesc()->GetNumType().GetNumberingType();
static_cast<SwPageNumberField*>(pField) static_cast<SwPageNumberField*>(pField)
->ChangeExpansion(nVirtNum, nNumPages); ->ChangeExpansion(nVirtNum, nNumPages);
pPageNr->ChangeExpansion(pDoc, pPageNr->ChangeExpansion(pDoc,
bVirt, nNumFormat > -1 ? &nNumFormat : nullptr); bVirt, nNumFormat != (SvxExtNumType)-1 ? &nNumFormat : nullptr);
} }
{ {
OUString const aStr( (bName) OUString const aStr( (bName)

View File

@ -326,7 +326,7 @@ void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, cons
if(nTmp >= 0 && if(nTmp >= 0 &&
(nTmp <= SVX_NUM_ARABIC || (nTmp <= SVX_NUM_ARABIC ||
nTmp > SVX_NUM_BITMAP)) nTmp > SVX_NUM_BITMAP))
aFootnoteInfo.aFormat.SetNumberingType(nTmp); aFootnoteInfo.aFormat.SetNumberingType((SvxExtNumType)nTmp);
else else
throw lang::IllegalArgumentException(); throw lang::IllegalArgumentException();
} }
@ -437,7 +437,7 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName)
break; break;
case WID_NUMBERING_TYPE : case WID_NUMBERING_TYPE :
{ {
aRet <<= rFootnoteInfo.aFormat.GetNumberingType(); aRet <<= (sal_Int16)rFootnoteInfo.aFormat.GetNumberingType();
} }
break; break;
case WID_START_AT: case WID_START_AT:
@ -617,7 +617,7 @@ void SwXEndnoteProperties::setPropertyValue(const OUString& rPropertyName, const
{ {
sal_Int16 nTmp = 0; sal_Int16 nTmp = 0;
aValue >>= nTmp; aValue >>= nTmp;
aEndInfo.aFormat.SetNumberingType(nTmp); aEndInfo.aFormat.SetNumberingType((SvxExtNumType)nTmp);
} }
break; break;
case WID_START_AT: case WID_START_AT:
@ -681,7 +681,7 @@ uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName)
aRet <<= rEndInfo.GetSuffix(); aRet <<= rEndInfo.GetSuffix();
break; break;
case WID_NUMBERING_TYPE : case WID_NUMBERING_TYPE :
aRet <<= rEndInfo.aFormat.GetNumberingType(); aRet <<= (sal_Int16)rEndInfo.aFormat.GetNumberingType();
break; break;
case WID_START_AT: case WID_START_AT:
aRet <<= (sal_Int16)rEndInfo.nFootnoteOffset; aRet <<= (sal_Int16)rEndInfo.nFootnoteOffset;
@ -836,7 +836,7 @@ void SwXLineNumberingProperties::setPropertyValue(
SvxNumberType aNumType(aFontMetric.GetNumType()); SvxNumberType aNumType(aFontMetric.GetNumType());
sal_Int16 nTmp = 0; sal_Int16 nTmp = 0;
aValue >>= nTmp; aValue >>= nTmp;
aNumType.SetNumberingType(nTmp); aNumType.SetNumberingType((SvxExtNumType)nTmp);
aFontMetric.SetNumType(aNumType); aFontMetric.SetNumType(aNumType);
} }
break; break;
@ -954,7 +954,7 @@ Any SwXLineNumberingProperties::getPropertyValue(const OUString& rPropertyName)
} }
break; break;
case WID_NUMBERING_TYPE : case WID_NUMBERING_TYPE :
aRet <<= rInfo.GetNumType().GetNumberingType(); aRet <<= (sal_Int16)rInfo.GetNumType().GetNumberingType();
break; break;
case WID_NUMBER_POSITION : case WID_NUMBER_POSITION :
{ {
@ -1848,7 +1848,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
sal_Int16 nSet = 0; sal_Int16 nSet = 0;
pProp->Value >>= nSet; pProp->Value >>= nSet;
if(nSet >= 0) if(nSet >= 0)
aFormat.SetNumberingType(nSet); aFormat.SetNumberingType((SvxExtNumType)nSet);
else else
bWrongArg = true; bWrongArg = true;
} }

View File

@ -190,20 +190,16 @@ static HTMLOptionEnum aHTMLFileNameFieldFormatTable[] =
{ nullptr, 0 } { 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; const HTMLOptionEnum *pOptEnums = aHTMLPageNumFieldFormatTable;
while( pOptEnums->pName ) while( pOptEnums->pName )
if( !rStr.equalsIgnoreAsciiCaseAscii( pOptEnums->pName ) ) {
if( rStr.equalsIgnoreAsciiCaseAscii( pOptEnums->pName ) )
return (SvxExtNumType)pOptEnums->nValue;
pOptEnums++; pOptEnums++;
else }
break; return nDfltType;
if( pOptEnums->pName )
nType = pOptEnums->nValue;
return nType;
} }
void SwHTMLParser::NewField() void SwHTMLParser::NewField()

View File

@ -98,7 +98,7 @@ sal_Int32 lcl_html_getEndNoteInfo( SwEndNoteInfo& rInfo,
switch( nPart ) switch( nPart )
{ {
case 0: 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() ) if( !aPart.isEmpty() )
rInfo.aFormat.SetNumberingType(SwHTMLParser::GetNumType( aPart, rInfo.aFormat.SetNumberingType(SwHTMLParser::GetNumType( aPart,
rInfo.aFormat.GetNumberingType() )); rInfo.aFormat.GetNumberingType() ));

View File

@ -377,7 +377,7 @@ void SwHTMLParser::EndNumBulList( int nToken )
{ {
SwNumFormat aNumFormat( rInfo.GetNumRule()->Get(i) ); SwNumFormat aNumFormat( rInfo.GetNumRule()->Get(i) );
aNumFormat.SetNumberingType(pRefNumFormat->GetNumberingType() != SVX_NUM_BITMAP 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() ) if( SVX_NUM_CHAR_SPECIAL == aNumFormat.GetNumberingType() )
{ {
// #i63395# - Only apply user defined default bullet font // #i63395# - Only apply user defined default bullet font

View File

@ -433,7 +433,7 @@ void SvxCSS1PropertyInfo::Clear()
m_nTopBorderDistance = m_nBottomBorderDistance = m_nTopBorderDistance = m_nBottomBorderDistance =
m_nLeftBorderDistance = m_nRightBorderDistance = USHRT_MAX; m_nLeftBorderDistance = m_nRightBorderDistance = USHRT_MAX;
m_nNumberingType = 0; m_nNumberingType = SVX_NUM_CHARS_UPPER_LETTER;
m_cBulletChar = ' '; m_cBulletChar = ' ';
m_nColumnCount = 0; m_nColumnCount = 0;
@ -1718,7 +1718,7 @@ static void ParseCSS1_list_style_type( const CSS1Expression *pExpr,
if( SvxCSS1Parser::GetEnum( aNumberStyleTable, rValue, nEnum ) ) if( SvxCSS1Parser::GetEnum( aNumberStyleTable, rValue, nEnum ) )
{ {
rPropInfo.m_bNumbering = true; rPropInfo.m_bNumbering = true;
rPropInfo.m_nNumberingType = nEnum; rPropInfo.m_nNumberingType = (SvxExtNumType)nEnum;
} }
if( SvxCSS1Parser::GetEnum( aBulletStyleTable, rValue, nEnum ) ) if( SvxCSS1Parser::GetEnum( aBulletStyleTable, rValue, nEnum ) )
{ {

View File

@ -121,7 +121,7 @@ public:
sal_uInt16 m_nLeftBorderDistance; sal_uInt16 m_nLeftBorderDistance;
sal_uInt16 m_nRightBorderDistance; sal_uInt16 m_nRightBorderDistance;
sal_uInt16 m_nNumberingType; SvxExtNumType m_nNumberingType;
sal_Unicode m_cBulletChar; sal_Unicode m_cBulletChar;
sal_uInt16 m_nColumnCount; sal_uInt16 m_nColumnCount;

View File

@ -647,7 +647,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
// <SDFIELD> // <SDFIELD>
public: public:
static sal_uInt16 GetNumType( const OUString& rStr, sal_uInt16 eDfltType ); static SvxExtNumType GetNumType( const OUString& rStr, SvxExtNumType eDfltType );
private: private:
void NewField(); void NewField();
void EndField(); void EndField();

View File

@ -5072,7 +5072,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
aInfo.ePos = FTNPOS_PAGE; aInfo.ePos = FTNPOS_PAGE;
aInfo.eNum = eNumA[m_pWDop->rncFootnote]; aInfo.eNum = eNumA[m_pWDop->rncFootnote];
sal_uInt16 nfcFootnoteRef = m_pWDop->nfcFootnoteRef & 0xF; 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 ) if( m_pWDop->nFootnote )
aInfo.nFootnoteOffset = m_pWDop->nFootnote - 1; aInfo.nFootnoteOffset = m_pWDop->nFootnote - 1;
m_rDoc.SetFootnoteInfo( aInfo ); m_rDoc.SetFootnoteInfo( aInfo );
@ -5082,7 +5082,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
SwEndNoteInfo aInfo; SwEndNoteInfo aInfo;
aInfo = m_rDoc.GetEndNoteInfo(); // Same as for Footnote aInfo = m_rDoc.GetEndNoteInfo(); // Same as for Footnote
sal_uInt16 nfcEdnRef = m_pWDop->nfcEdnRef & 0xF; 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 ) if( m_pWDop->nEdn )
aInfo.nFootnoteOffset = m_pWDop->nEdn - 1; aInfo.nFootnoteOffset = m_pWDop->nEdn - 1;
m_rDoc.SetEndNoteInfo( aInfo ); m_rDoc.SetEndNoteInfo( aInfo );

View File

@ -595,36 +595,34 @@ static void SetBaseAnlv(SwNumFormat &rNum, WW8_ANLV const &rAV, sal_uInt8 nSwLev
static const SvxAdjust eAdjA[4] = { SVX_ADJUST_LEFT, static const SvxAdjust eAdjA[4] = { SVX_ADJUST_LEFT,
SVX_ADJUST_RIGHT, SVX_ADJUST_LEFT, SVX_ADJUST_LEFT }; SVX_ADJUST_RIGHT, SVX_ADJUST_LEFT, SVX_ADJUST_LEFT };
if (rAV.nfc < 8) { if (rAV.nfc < 8) {
rNum.SetNumberingType( static_cast< sal_Int16 >(eNumA[ rAV.nfc ] )); rNum.SetNumberingType( eNumA[ rAV.nfc ] );
} else { } else {
sal_Int16 nType= style::NumberingType::ARABIC; SvxExtNumType nType = SVX_NUM_ARABIC;
switch( rAV.nfc ) { switch( rAV.nfc ) {
case 14: case 14:
case 19:nType = style::NumberingType::FULLWIDTH_ARABIC; break; case 19:nType = SVX_NUM_FULL_WIDTH_ARABIC; break;
case 30:nType = style::NumberingType::TIAN_GAN_ZH; break; case 30:nType = SVX_NUM_TIAN_GAN_ZH; break;
case 31:nType = style::NumberingType::DI_ZI_ZH; break; case 31:nType = SVX_NUM_DI_ZI_ZH; break;
case 35: case 35:
case 36: case 36:
case 37: case 37:
case 39: case 39:nType = SVX_NUM_NUMBER_LOWER_ZH; break;
nType = style::NumberingType::NUMBER_LOWER_ZH; break; case 34:nType = SVX_NUM_NUMBER_UPPER_ZH_TW; break;
case 34:nType = style::NumberingType::NUMBER_UPPER_ZH_TW;break; case 38:nType = SVX_NUM_NUMBER_UPPER_ZH; break;
case 38:nType = style::NumberingType::NUMBER_UPPER_ZH; break;
case 10: case 10:
case 11: case 11:nType = SVX_NUM_NUMBER_TRADITIONAL_JA; break;
nType = style::NumberingType::NUMBER_TRADITIONAL_JA;break; case 20:nType = SVX_NUM_AIU_FULLWIDTH_JA; break;
case 20:nType = style::NumberingType::AIU_FULLWIDTH_JA;break; case 12:nType = SVX_NUM_AIU_HALFWIDTH_JA; break;
case 12:nType = style::NumberingType::AIU_HALFWIDTH_JA;break; case 21:nType = SVX_NUM_IROHA_FULLWIDTH_JA; break;
case 21:nType = style::NumberingType::IROHA_FULLWIDTH_JA;break; case 13:nType = SVX_NUM_IROHA_HALFWIDTH_JA; break;
case 13:nType = style::NumberingType::IROHA_HALFWIDTH_JA;break; case 24:nType = SVX_NUM_HANGUL_SYLLABLE_KO; break;
case 24:nType = style::NumberingType::HANGUL_SYLLABLE_KO;break; case 25:nType = SVX_NUM_HANGUL_JAMO_KO; break;
case 25:nType = style::NumberingType::HANGUL_JAMO_KO;break; case 41:nType = SVX_NUM_NUMBER_HANGUL_KO; break;
case 41:nType = style::NumberingType::NUMBER_HANGUL_KO;break;
//case 42: //case 42:
//case 43: //case 43:
case 44:nType = style::NumberingType::NUMBER_UPPER_KO; break; case 44:nType = SVX_NUM_NUMBER_UPPER_KO; break;
default: default:
nType= style::NumberingType::ARABIC;break; nType= SVX_NUM_ARABIC;break;
} }
rNum.SetNumberingType( nType ); rNum.SetNumberingType( nType );
} }

View File

@ -510,7 +510,7 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, SfxItemSet*& rpItemSet,
{ {
sal_uInt8 aBits1(0); sal_uInt8 aBits1(0);
sal_uInt16 nStartNo(0); // Start-Nr. fuer den Writer 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.) SvxAdjust eAdj; // Ausrichtung (Links/rechts/zent.)
sal_Unicode cBullet(0x2190); // default safe bullet sal_Unicode cBullet(0x2190); // default safe bullet
@ -723,66 +723,64 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, SfxItemSet*& rpItemSet,
switch( aLVL.nNFC ) switch( aLVL.nNFC )
{ {
case 0: case 0:
nType = style::NumberingType::ARABIC; nType = SVX_NUM_ARABIC;
break; break;
case 1: case 1:
nType = style::NumberingType::ROMAN_UPPER; nType = SVX_NUM_ROMAN_UPPER;
break; break;
case 2: case 2:
nType = style::NumberingType::ROMAN_LOWER; nType = SVX_NUM_ROMAN_LOWER;
break; break;
case 3: case 3:
nType = style::NumberingType::CHARS_UPPER_LETTER_N; nType = SVX_NUM_CHARS_UPPER_LETTER_N;
break; break;
case 4: case 4:
nType = style::NumberingType::CHARS_LOWER_LETTER_N; nType = SVX_NUM_CHARS_LOWER_LETTER_N;
break; break;
case 5: case 5:
// eigentlich: ORDINAL // eigentlich: ORDINAL
nType = style::NumberingType::ARABIC; nType = SVX_NUM_ARABIC;
break; break;
case 23: case 23:
nType = style::NumberingType::CHAR_SPECIAL; nType = SVX_NUM_CHAR_SPECIAL;
//For i120928,type info //For i120928,type info
if (bIsPicBullet) if (bIsPicBullet)
{ {
nType = style::NumberingType::BITMAP; nType = SVX_NUM_BITMAP;
} }
break; break;
case 255: case 255:
nType = style::NumberingType::NUMBER_NONE; nType = SVX_NUM_NUMBER_NONE;
break; break;
case 14: case 14:
case 19:nType = style::NumberingType::FULLWIDTH_ARABIC; break; case 19:nType = SVX_NUM_FULL_WIDTH_ARABIC; break;
case 30:nType = style::NumberingType::TIAN_GAN_ZH; break; case 30:nType = SVX_NUM_TIAN_GAN_ZH; break;
case 31:nType = style::NumberingType::DI_ZI_ZH; break; case 31:nType = SVX_NUM_DI_ZI_ZH; break;
case 35: case 35:
case 36: case 36:
case 37: case 37:
case 39: case 39:nType = SVX_NUM_NUMBER_LOWER_ZH; break;
nType = style::NumberingType::NUMBER_LOWER_ZH; break; case 34:nType = SVX_NUM_NUMBER_UPPER_ZH_TW; break;
case 34:nType = style::NumberingType::NUMBER_UPPER_ZH_TW;break; case 38:nType = SVX_NUM_NUMBER_UPPER_ZH; break;
case 38:nType = style::NumberingType::NUMBER_UPPER_ZH; break;
case 10: case 10:
case 11: case 11:nType = SVX_NUM_NUMBER_TRADITIONAL_JA; break;
nType = style::NumberingType::NUMBER_TRADITIONAL_JA;break; case 20:nType = SVX_NUM_AIU_FULLWIDTH_JA; break;
case 20:nType = style::NumberingType::AIU_FULLWIDTH_JA;break; case 12:nType = SVX_NUM_AIU_HALFWIDTH_JA; break;
case 12:nType = style::NumberingType::AIU_HALFWIDTH_JA;break; case 21:nType = SVX_NUM_IROHA_FULLWIDTH_JA; break;
case 21:nType = style::NumberingType::IROHA_FULLWIDTH_JA;break; case 13:nType = SVX_NUM_IROHA_HALFWIDTH_JA; break;
case 13:nType = style::NumberingType::IROHA_HALFWIDTH_JA;break; case 24:nType = SVX_NUM_HANGUL_SYLLABLE_KO; break;
case 24:nType = style::NumberingType::HANGUL_SYLLABLE_KO;break; case 25:nType = SVX_NUM_HANGUL_JAMO_KO; break;
case 25:nType = style::NumberingType::HANGUL_JAMO_KO;break; case 41:nType = SVX_NUM_NUMBER_HANGUL_KO; break;
case 41:nType = style::NumberingType::NUMBER_HANGUL_KO;break;
//case 42: //case 42:
//case 43: //case 43:
case 44:nType = style::NumberingType::NUMBER_UPPER_KO; break; case 44:nType = SVX_NUM_NUMBER_UPPER_KO; break;
default: 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 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; rNotReallyThere[nLevel] = true;
/* /*

View File

@ -778,7 +778,7 @@ void wwSectionManager::SetNumberingType(const wwSection &rNewSection,
}; };
SvxNumberType aType; SvxNumberType aType;
aType.SetNumberingType( static_cast< sal_Int16 >(aNumTyp[rNewSection.maSep.nfcPgn]) ); aType.SetNumberingType( aNumTyp[rNewSection.maSep.nfcPgn] );
rPageDesc.SetNumType(aType); rPageDesc.SetNumType(aType);
} }

View File

@ -116,7 +116,7 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw)
} }
// format // format
sal_uInt16 nSelFormat = rInf.GetNumType().GetNumberingType(); SvxExtNumType nSelFormat = rInf.GetNumType().GetNumberingType();
m_pFormatLB->SelectNumberingType(nSelFormat); m_pFormatLB->SelectNumberingType(nSelFormat);

View File

@ -650,7 +650,7 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CollSelectGetFocus, Control&, void)
IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, ListBox&, rBox, void ) IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, ListBox&, rBox, void )
{ {
sal_uInt16 nMask = 1; 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++) for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{ {
if(nActLevel & nMask) if(nActLevel & nMask)

View File

@ -22,6 +22,7 @@
#include <vcl/lstbox.hxx> #include <vcl/lstbox.hxx>
#include "swdllapi.h" #include "swdllapi.h"
#include <o3tl/typed_flags_set.hxx> #include <o3tl/typed_flags_set.hxx>
#include <editeng/svxenum.hxx>
enum class SwInsertNumTypes enum class SwInsertNumTypes
{ {
@ -51,8 +52,8 @@ public:
void Reload(SwInsertNumTypes nTypeFlags); void Reload(SwInsertNumTypes nTypeFlags);
sal_Int16 GetSelectedNumberingType(); SvxExtNumType GetSelectedNumberingType();
bool SelectNumberingType(sal_Int16 nType); bool SelectNumberingType(SvxExtNumType nType);
}; };
#endif #endif

View File

@ -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(); sal_Int32 nSelPos = GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND != nSelPos) 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 #if OSL_DEBUG_LEVEL > 0
else else
OSL_FAIL("SwNumberingTypeListBox not selected"); OSL_FAIL("SwNumberingTypeListBox not selected");
@ -178,7 +178,7 @@ sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType()
return nRet; return nRet;
} }
bool SwNumberingTypeListBox::SelectNumberingType(sal_Int16 nType) bool SwNumberingTypeListBox::SelectNumberingType(SvxExtNumType nType)
{ {
sal_Int32 nPos = GetEntryPos(reinterpret_cast<void*>((sal_uLong)nType)); sal_Int32 nPos = GetEntryPos(reinterpret_cast<void*>((sal_uLong)nType));
SelectEntryPos( nPos ); SelectEntryPos( nPos );

View File

@ -281,7 +281,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
rPageDesc.SetUseOn( lcl_convertUseFromSvx(nUse) ); rPageDesc.SetUseOn( lcl_convertUseFromSvx(nUse) );
rPageDesc.SetLandscape(rPageItem.IsLandscape()); rPageDesc.SetLandscape(rPageItem.IsLandscape());
SvxNumberType aNumType; SvxNumberType aNumType;
aNumType.SetNumberingType( static_cast< sal_Int16 >(rPageItem.GetNumType()) ); aNumType.SetNumberingType( (SvxExtNumType)rPageItem.GetNumType() );
rPageDesc.SetNumType(aNumType); rPageDesc.SetNumType(aNumType);
} }
// Size // Size