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:
parent
f091259ad2
commit
afa675469c
@ -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)
|
||||
{}
|
||||
};
|
||||
|
@ -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)))
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;}
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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" )
|
||||
{
|
||||
|
@ -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 );
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 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 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);
|
||||
};
|
||||
|
@ -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; }
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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 );
|
||||
|
@ -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)
|
||||
|
@ -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 ) );
|
||||
}
|
||||
|
@ -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());
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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()
|
||||
|
@ -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() ));
|
||||
|
@ -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
|
||||
|
@ -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 ) )
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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 );
|
||||
|
@ -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 );
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw)
|
||||
}
|
||||
|
||||
// format
|
||||
sal_uInt16 nSelFormat = rInf.GetNumType().GetNumberingType();
|
||||
SvxExtNumType nSelFormat = rInf.GetNumType().GetNumberingType();
|
||||
|
||||
m_pFormatLB->SelectNumberingType(nSelFormat);
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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 );
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user