summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-25 14:42:40 +0200
committerNoel Grandin <noel@peralex.com>2015-03-26 09:41:34 +0200
commit44101b295071484f4797a9d3140e5ea1a42bc431 (patch)
tree0cb68ab8840fdeb581fd5cba8b25640088fff731
parent0fb66458c08b9c0ce59bca85e77d26fad8b59e4b (diff)
convert NUM_ constants to enum clas
Change-Id: Id41ea91aaf618c7f3f323698c09caa7c8df2290a
-rw-r--r--cui/source/tabpages/numpages.cxx32
-rw-r--r--editeng/source/editeng/eerdll.cxx2
-rw-r--r--editeng/source/items/numitem.cxx12
-rw-r--r--editeng/source/uno/unonrule.cxx4
-rw-r--r--filter/source/msfilter/svdfppt.cxx4
-rw-r--r--include/editeng/numitem.hxx43
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx2
-rw-r--r--sd/source/core/drawdoc4.cxx2
-rw-r--r--sd/source/core/stlpool.cxx5
-rw-r--r--sd/source/ui/dlg/dlgolbul.cxx4
-rw-r--r--sd/source/ui/func/fuolbull.cxx2
-rw-r--r--sd/source/ui/view/viewshel.cxx2
-rw-r--r--svx/source/sidebar/nbdtmg.cxx8
-rw-r--r--svx/source/unodraw/unomod.cxx2
-rw-r--r--sw/source/core/doc/number.cxx11
-rw-r--r--sw/source/uibase/shells/txtnum.cxx4
16 files changed, 75 insertions, 64 deletions
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index d472852270cb..4a39f89ea353 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1278,7 +1278,7 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet* rSet )
m_pSameLevelCB->Check(pActNum->IsContinuousNumbering());
// fill ColorListBox as needed
- if ( pActNum->IsFeatureSupported( NUM_BULLET_COLOR ) )
+ if ( pActNum->IsFeatureSupported( SvxNumRuleFlags::BULLET_COLOR ) )
{
SfxObjectShell* pDocSh = SfxObjectShell::Current();
DBG_ASSERT( pDocSh, "DocShell not found!" );
@@ -1311,11 +1311,11 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet* rSet )
bHTMLMode = 0 != (nHtmlMode&HTMLMODE_ON);
}
- bool bCharFmt = pActNum->IsFeatureSupported(NUM_CHAR_STYLE);
+ bool bCharFmt = pActNum->IsFeatureSupported(SvxNumRuleFlags::CHAR_STYLE);
m_pCharFmtFT->Show(bCharFmt);
m_pCharFmtLB->Show(bCharFmt);
- bool bContinuous = pActNum->IsFeatureSupported(NUM_CONTINUOUS);
+ bool bContinuous = pActNum->IsFeatureSupported(SvxNumRuleFlags::CONTINUOUS);
bool bAllLevel = bContinuous && !bHTMLMode;
m_pAllLevelFT->Show(bAllLevel);
@@ -1338,21 +1338,21 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet* rSet )
}
}
//one must be enabled
- if(!pActNum->IsFeatureSupported(NUM_ENABLE_LINKED_BMP))
+ if(!pActNum->IsFeatureSupported(SvxNumRuleFlags::ENABLE_LINKED_BMP))
{
sal_IntPtr nData = SVX_NUM_BITMAP|LINK_TOKEN;
sal_Int32 nPos = m_pFmtLB->GetEntryPos(reinterpret_cast<void*>(nData));
if(LISTBOX_ENTRY_NOTFOUND != nPos)
m_pFmtLB->RemoveEntry(nPos);
}
- else if(!pActNum->IsFeatureSupported(NUM_ENABLE_EMBEDDED_BMP))
+ else if(!pActNum->IsFeatureSupported(SvxNumRuleFlags::ENABLE_EMBEDDED_BMP))
{
sal_IntPtr nData = SVX_NUM_BITMAP;
sal_Int32 nPos = m_pFmtLB->GetEntryPos(reinterpret_cast<void*>(nData));
if(LISTBOX_ENTRY_NOTFOUND != nPos)
m_pFmtLB->RemoveEntry(nPos);
}
- if(pActNum->IsFeatureSupported(NUM_SYMBOL_ALIGNMENT))
+ if(pActNum->IsFeatureSupported(SvxNumRuleFlags::SYMBOL_ALIGNMENT))
{
m_pAlignFT->Show();
m_pAlignLB->Show();
@@ -1366,7 +1366,7 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet* rSet )
// MegaHack: because of a not-fixable 'design mistake/error' in Impress
// delete all kinds of numeric enumerations
- if(pActNum->IsFeatureSupported(NUM_NO_NUMBERS))
+ if(pActNum->IsFeatureSupported(SvxNumRuleFlags::NO_NUMBERS))
{
sal_Int32 nFmtCount = m_pFmtLB->GetEntryCount();
for(sal_Int32 i = nFmtCount; i; i--)
@@ -1407,8 +1407,8 @@ void SvxNumOptionsTabPage::InitControls()
sal_uInt16 nHighestLevel = 0;
OUString aEmptyStr;
- bool bBullColor = pActNum->IsFeatureSupported(NUM_BULLET_COLOR);
- bool bBullRelSize = pActNum->IsFeatureSupported(NUM_BULLET_REL_SIZE);
+ bool bBullColor = pActNum->IsFeatureSupported(SvxNumRuleFlags::BULLET_COLOR);
+ bool bBullRelSize = pActNum->IsFeatureSupported(SvxNumRuleFlags::BULLET_REL_SIZE);
for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
@@ -1588,13 +1588,13 @@ void SvxNumOptionsTabPage::SwitchNumberType( sal_uInt8 nType, bool )
m_pSuffixFT->Show(bNumeric);
m_pSuffixED->Show(bNumeric);
- bool bCharFmt = pActNum->IsFeatureSupported(NUM_CHAR_STYLE);
+ bool bCharFmt = pActNum->IsFeatureSupported(SvxNumRuleFlags::CHAR_STYLE);
m_pCharFmtFT->Show(!bBitmap && bCharFmt);
m_pCharFmtLB->Show(!bBitmap && bCharFmt);
// this is rather misusage, as there is no own flag
// for complete numeration
- bool bAllLevelFeature = pActNum->IsFeatureSupported(NUM_CONTINUOUS);
+ bool bAllLevelFeature = pActNum->IsFeatureSupported(SvxNumRuleFlags::CONTINUOUS);
bool bAllLevel = bNumeric && bAllLevelFeature && !bHTMLMode;
m_pAllLevelFT->Show(bAllLevel);
m_pAllLevelNF->Show(bAllLevel);
@@ -1604,10 +1604,10 @@ void SvxNumOptionsTabPage::SwitchNumberType( sal_uInt8 nType, bool )
m_pBulletFT->Show(bBullet);
m_pBulletPB->Show(bBullet);
- bool bBullColor = pActNum->IsFeatureSupported(NUM_BULLET_COLOR);
+ bool bBullColor = pActNum->IsFeatureSupported(SvxNumRuleFlags::BULLET_COLOR);
m_pBulColorFT->Show(!bBitmap && bBullColor);
m_pBulColLB->Show(!bBitmap && bBullColor);
- bool bBullResSize = pActNum->IsFeatureSupported(NUM_BULLET_REL_SIZE);
+ bool bBullResSize = pActNum->IsFeatureSupported(SvxNumRuleFlags::BULLET_REL_SIZE);
m_pBulRelSizeFT->Show(!bBitmap && bBullResSize);
m_pBulRelSizeMF->Show(!bBitmap && bBullResSize);
@@ -1762,7 +1762,7 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox *, pBox )
}
nMask <<= 1;
}
- bool bAllLevelFeature = pActNum->IsFeatureSupported(NUM_CONTINUOUS);
+ bool bAllLevelFeature = pActNum->IsFeatureSupported(SvxNumRuleFlags::CONTINUOUS);
if(bShowOrient && bAllLevelFeature)
{
m_pOrientFT->Show();
@@ -3090,9 +3090,9 @@ void SvxNumPositionTabPage::ShowControlsDependingOnPosAndSpaceMode()
m_pIndentFT->Show( !bLabelAlignmentPosAndSpaceModeActive );
m_pIndentMF->Show( !bLabelAlignmentPosAndSpaceModeActive );
m_pDistNumFT->Show( !bLabelAlignmentPosAndSpaceModeActive &&
- pActNum->IsFeatureSupported(NUM_CONTINUOUS) );
+ pActNum->IsFeatureSupported(SvxNumRuleFlags::CONTINUOUS) );
m_pDistNumMF->Show( !bLabelAlignmentPosAndSpaceModeActive &&
- pActNum->IsFeatureSupported(NUM_CONTINUOUS));
+ pActNum->IsFeatureSupported(SvxNumRuleFlags::CONTINUOUS));
m_pAlignFT->Show( !bLabelAlignmentPosAndSpaceModeActive );
m_pAlignLB->Show( !bLabelAlignmentPosAndSpaceModeActive );
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index 2a6b40017c06..9250e230b9d8 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -101,7 +101,7 @@ SfxPoolItem** GlobalEditData::GetDefItems()
ppDefItems = new SfxPoolItem*[EDITITEMCOUNT];
// Paragraph attributes:
- SvxNumRule aDefaultNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE,
+ SvxNumRule aDefaultNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::BULLET_COLOR | SvxNumRuleFlags::CHAR_TEXT_DISTANCE,
SVX_MAX_NUM, false );
ppDefItems[0] = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR );
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 4b71f2a3f5a5..6d4fd8aa7d98 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -573,7 +573,7 @@ OUString SvxNumberFormat::GetCharFmtName()const
sal_Int32 SvxNumRule::nRefCount = 0;
static SvxNumberFormat* pStdNumFmt = 0;
static SvxNumberFormat* pStdOutlineNumFmt = 0;
-SvxNumRule::SvxNumRule( sal_uLong nFeatures,
+SvxNumRule::SvxNumRule( SvxNumRuleFlags nFeatures,
sal_uInt16 nLevels,
bool bCont,
SvxNumRuleType eType,
@@ -591,7 +591,7 @@ SvxNumRule::SvxNumRule( sal_uLong nFeatures,
{
aFmts[i] = new SvxNumberFormat(SVX_NUM_CHARS_UPPER_LETTER);
// It is a distinction between writer and draw
- if(nFeatures & NUM_CONTINUOUS)
+ if(nFeatures & SvxNumRuleFlags::CONTINUOUS)
{
if ( eDefaultNumberFormatPositionAndSpaceMode ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
@@ -653,7 +653,7 @@ SvxNumRule::SvxNumRule( SvStream &rStream )
rStream.ReadUInt16( nLevelCount );
// first nFeatureFlags of old Versions
- rStream.ReadUInt16( nTmp16 ); nFeatureFlags = nTmp16;
+ rStream.ReadUInt16( nTmp16 ); nFeatureFlags = static_cast<SvxNumRuleFlags>(nTmp16);
rStream.ReadUInt16( nTmp16 ); bContinuousNumbering = nTmp16;
rStream.ReadUInt16( nTmp16 ); eNumberingType = ( SvxNumRuleType )nTmp16;
@@ -672,7 +672,7 @@ SvxNumRule::SvxNumRule( SvStream &rStream )
}
}
//second nFeatureFlags for new versions
- rStream.ReadUInt16( nTmp16 ); nFeatureFlags = nTmp16;
+ rStream.ReadUInt16( nTmp16 ); nFeatureFlags = static_cast<SvxNumRuleFlags>(nTmp16);
}
SvStream& SvxNumRule::Store( SvStream &rStream )
@@ -680,7 +680,7 @@ SvStream& SvxNumRule::Store( SvStream &rStream )
rStream.WriteUInt16( NUMITEM_VERSION_03 );
rStream.WriteUInt16( nLevelCount );
//first save of nFeatureFlags for old versions
- rStream.WriteUInt16( nFeatureFlags );
+ rStream.WriteUInt16( static_cast<sal_uInt16>(nFeatureFlags) );
rStream.WriteUInt16( sal_uInt16(bContinuousNumbering) );
rStream.WriteUInt16( eNumberingType );
@@ -705,7 +705,7 @@ SvStream& SvxNumRule::Store( SvStream &rStream )
rStream.WriteUInt16( 0 | nSetFlag );
}
//second save of nFeatureFlags for new versions
- rStream.WriteUInt16( nFeatureFlags );
+ rStream.WriteUInt16( static_cast<sal_uInt16>(nFeatureFlags) );
if(pConverter)
DestroyFontToSubsFontConverter(pConverter);
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index 5959a72f4277..34e47d5c6645 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -487,7 +487,7 @@ com::sun::star::uno::Reference< com::sun::star::container::XIndexReplace > SvxCr
}
else
{
- SvxNumRule aDefaultRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM, false);
+ SvxNumRule aDefaultRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::BULLET_COLOR | SvxNumRuleFlags::CHAR_TEXT_DISTANCE, SVX_MAX_NUM, false);
return new SvxUnoNumberingRules( aDefaultRule );
}
}
@@ -546,7 +546,7 @@ Reference< XAnyCompare > SvxCreateNumRuleCompare() throw()
::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > SvxCreateNumRule() throw()
{
- SvxNumRule aTempRule( 0, 10, false );
+ SvxNumRule aTempRule( SvxNumRuleFlags::NONE, 10, false );
return SvxCreateNumRule( &aTempRule );
}
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 9947068fc43d..2c5243773f6e 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -4291,8 +4291,8 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
eNumRuleType = SVX_RULETYPE_NUMBERING;
break;
}
- SvxNumRule aRule( NUM_BULLET_REL_SIZE | NUM_BULLET_COLOR |
- NUM_CHAR_TEXT_DISTANCE | NUM_SYMBOL_ALIGNMENT,
+ SvxNumRule aRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::BULLET_COLOR |
+ SvxNumRuleFlags::CHAR_TEXT_DISTANCE | SvxNumRuleFlags::SYMBOL_ALIGNMENT,
nLevels, false, eNumRuleType );
for ( sal_uInt16 nCount = 0; nDepth < nLevels; nCount++ )
{
diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx
index 664f4601878d..c749650235fe 100644
--- a/include/editeng/numitem.hxx
+++ b/include/editeng/numitem.hxx
@@ -32,6 +32,7 @@
#include <com/sun/star/style/NumberingType.hpp>
#include <unotools/fontcvt.hxx>
#include <editeng/editengdllapi.h>
+#include <o3tl/typed_flags_set.hxx>
class SvxBrushItem;
namespace vcl { class Font; }
@@ -44,17 +45,6 @@ namespace com{namespace sun{ namespace star{
}}}
-//Feature-Flags (only sal_uInt16!)
-#define NUM_CONTINUOUS 0x0001 // consecutive numbers possible?
-#define NUM_CHAR_TEXT_DISTANCE 0x0002 // Distance Symbol<->Text?
-#define NUM_CHAR_STYLE 0x0004 // Character styles?
-#define NUM_BULLET_REL_SIZE 0x0008 // relative bullet size?
-#define NUM_BULLET_COLOR 0x0010 // Bullet color
-#define NUM_SYMBOL_ALIGNMENT 0x0040 // alignment to be shown in the options
-#define NUM_NO_NUMBERS 0x0080 // Numbering are not allowed
-#define NUM_ENABLE_LINKED_BMP 0x0100 // linked bitmaps are available
-#define NUM_ENABLE_EMBEDDED_BMP 0x0200 // embedded bitmaps are available
-
#define SVX_NO_NUM 200 // Marker for no numbering
#define SVX_NO_NUMLEVEL 0x20
@@ -221,6 +211,25 @@ public:
static OUString CreateRomanString( sal_uLong nNo, bool bUpper );
};
+//Feature-Flags (only sal_uInt16!)
+enum class SvxNumRuleFlags
+{
+ NONE = 0x0000,
+ CONTINUOUS = 0x0001, // consecutive numbers possible?
+ CHAR_TEXT_DISTANCE = 0x0002, // Distance Symbol<->Text?
+ CHAR_STYLE = 0x0004, // Character styles?
+ BULLET_REL_SIZE = 0x0008, // relative bullet size?
+ BULLET_COLOR = 0x0010, // Bullet color
+ SYMBOL_ALIGNMENT = 0x0040, // alignment to be shown in the options
+ NO_NUMBERS = 0x0080, // Numbering are not allowed
+ ENABLE_LINKED_BMP = 0x0100, // linked bitmaps are available
+ ENABLE_EMBEDDED_BMP = 0x0200 // embedded bitmaps are available
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SvxNumRuleFlags> : is_typed_flags<SvxNumRuleFlags, 0x03df> {};
+}
+
enum SvxNumRuleType
{
SVX_RULETYPE_NUMBERING,
@@ -232,7 +241,7 @@ enum SvxNumRuleType
class EDITENG_DLLPUBLIC SvxNumRule
{
sal_uInt16 nLevelCount; // Number of supported levels
- sal_uInt32 nFeatureFlags; // What is supported?
+ SvxNumRuleFlags nFeatureFlags; // What is supported?
SvxNumRuleType eNumberingType; // Type of numbering
bool bContinuousNumbering; // sequential numbering
@@ -242,7 +251,7 @@ class EDITENG_DLLPUBLIC SvxNumRule
static sal_Int32 nRefCount;
com::sun::star::lang::Locale aLocale;
public:
- SvxNumRule( sal_uLong nFeatures,
+ SvxNumRule( SvxNumRuleFlags nFeatures,
sal_uInt16 nLevels,
bool bCont,
SvxNumRuleType eType = SVX_RULETYPE_NUMBERING,
@@ -270,10 +279,10 @@ public:
{bContinuousNumbering = bSet;}
sal_uInt16 GetLevelCount() const {return nLevelCount;}
- bool IsFeatureSupported(sal_uInt32 nFeature) const
- {return 0 != (nFeatureFlags & nFeature);}
- sal_uInt32 GetFeatureFlags() const {return nFeatureFlags;}
- void SetFeatureFlag( sal_uInt32 nFlag, bool bSet = true ) { if(bSet) nFeatureFlags |= nFlag; else nFeatureFlags &= ~nFlag; }
+ bool IsFeatureSupported(SvxNumRuleFlags nFeature) const
+ { return bool(nFeatureFlags & nFeature); }
+ SvxNumRuleFlags GetFeatureFlags() const {return nFeatureFlags;}
+ void SetFeatureFlag( SvxNumRuleFlags nFlag, bool bSet = true ) { if(bSet) nFeatureFlags |= nFlag; else nFeatureFlags &= ~nFlag; }
OUString MakeNumString( const SvxNodeNum&, bool bInclStrings = true ) const;
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index eeec6c1c513e..1936a69a1d73 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -1169,7 +1169,7 @@ void SAL_CALL ScStyleObj::setName( const OUString& aNewName )
uno::Reference<container::XIndexReplace> ScStyleObj::CreateEmptyNumberingRules()
{
- SvxNumRule aRule( 0, 0, true ); // nothing supported
+ SvxNumRule aRule( SvxNumRuleFlags::NONE, 0, true ); // nothing supported
return SvxCreateNumRule( &aRule );
}
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 1c2b66cd069a..881ccc05b527 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -1221,7 +1221,7 @@ void SdDrawDocument::SetTextDefaults() const
aNumberFormat.SetStart(1);
aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
- SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM, false);
+ SvxNumRule aNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::BULLET_COLOR | SvxNumRuleFlags::CHAR_TEXT_DISTANCE, SVX_MAX_NUM, false);
//aNumberFormat.SetAbsLSpace( 0 );
//aNumberFormat.SetFirstLineOffset( 0 );
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 564d7d323de5..d427b831f446 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -1107,7 +1107,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumberFormat.SetStart(1);
aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
- SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM, false);
+ SvxNumRule aNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::BULLET_COLOR | SvxNumRuleFlags::CHAR_TEXT_DISTANCE, SVX_MAX_NUM, false);
for( sal_uInt16 i = 0; i < aNumRule.GetLevelCount(); i++ )
{
@@ -1161,7 +1161,8 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumberFormat.SetStart(1);
aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
- SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE|NUM_SYMBOL_ALIGNMENT,
+ SvxNumRule aNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::BULLET_COLOR |
+ SvxNumRuleFlags::CHAR_TEXT_DISTANCE | SvxNumRuleFlags::SYMBOL_ALIGNMENT,
SVX_MAX_NUM, false );
for( sal_uInt16 i = 0; i < aNumRule.GetLevelCount(); i++ )
{
diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx
index 4dd28b99a41b..c3a77103b247 100644
--- a/sd/source/ui/dlg/dlgolbul.cxx
+++ b/sd/source/ui/dlg/dlgolbul.cxx
@@ -116,7 +116,7 @@ OutlineBulletDlg::OutlineBulletDlg(
if(pRule)
{
SvxNumRule aNewRule( *pRule );
- aNewRule.SetFeatureFlag( NUM_NO_NUMBERS, true );
+ aNewRule.SetFeatureFlag( SvxNumRuleFlags::NO_NUMBERS, true );
SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET );
aInputSet.Put(aNewItem);
@@ -183,7 +183,7 @@ const SfxItemSet* OutlineBulletDlg::GetOutputItemSet() const
const SvxNumBulletItem* pBulletItem = static_cast<const SvxNumBulletItem*>(pOutputSet->GetItem(EE_PARA_NUMBULLET,true));
SvxNumRule* pRule = pBulletItem->GetNumRule();
if(pRule)
- pRule->SetFeatureFlag( NUM_NO_NUMBERS, false );
+ pRule->SetFeatureFlag( SvxNumRuleFlags::NO_NUMBERS, false );
}
return pOutputSet;
diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index 55acf20100a1..2ee2ddb3d459 100644
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -366,7 +366,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u
if(pLclRule)
{
SvxNumRule aNewRule( *pLclRule );
- aNewRule.SetFeatureFlag( NUM_NO_NUMBERS, true );
+ aNewRule.SetFeatureFlag( SvxNumRuleFlags::NO_NUMBERS, true );
SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET );
aNewAttr.Put(aNewItem);
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index ce01af2ac0f5..feb3b11973c8 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -815,7 +815,7 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16&
if(pRule)
{
SvxNumRule aNewRule( *pRule );
- aNewRule.SetFeatureFlag( NUM_NO_NUMBERS, true );
+ aNewRule.SetFeatureFlag( SvxNumRuleFlags::NO_NUMBERS, true );
SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET );
aNewAttr.Put(aNewItem);
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index de02aa9a5e6e..8fff01f67a09 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -206,7 +206,9 @@ void NBOTypeMgrBase::ImplStore(const OUString& filename)
xOStm->WriteUInt32( nVersion );
for(sal_Int32 nItem = 0; nItem < DEFAULT_NUM_VALUSET_COUNT; nItem++ ) {
if (IsCustomized(nItem)) {
- SvxNumRule aDefNumRule( NUM_BULLET_REL_SIZE|NUM_CONTINUOUS|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE|NUM_SYMBOL_ALIGNMENT,10, false,
+ SvxNumRule aDefNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::CONTINUOUS | SvxNumRuleFlags::BULLET_COLOR |
+ SvxNumRuleFlags::CHAR_TEXT_DISTANCE | SvxNumRuleFlags::SYMBOL_ALIGNMENT,
+ 10, false,
SVX_RULETYPE_NUMBERING,SvxNumberFormat::LABEL_ALIGNMENT);
sal_uInt16 mLevel = 0x1;
xOStm->WriteInt32( nItem );
@@ -1509,7 +1511,9 @@ void OutlineTypeMgr::Init()
{
aOutlineAccess = xDefNum->getDefaultOutlineNumberings( aLocale );
- SvxNumRule aDefNumRule( NUM_BULLET_REL_SIZE|NUM_CONTINUOUS|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE|NUM_SYMBOL_ALIGNMENT, 10, false,
+ SvxNumRule aDefNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::CONTINUOUS | SvxNumRuleFlags::BULLET_COLOR |
+ SvxNumRuleFlags::CHAR_TEXT_DISTANCE | SvxNumRuleFlags::SYMBOL_ALIGNMENT,
+ 10, false,
SVX_RULETYPE_NUMBERING,SvxNumberFormat::LABEL_ALIGNMENT);
for(sal_Int32 nItem = 0;
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index b982b8b4ec4b..68c0fe66faf5 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -734,7 +734,7 @@ com::sun::star::uno::Reference< com::sun::star::container::XIndexReplace > SvxCr
}
else
{
- SvxNumRule aTempRule( 0, 10, false );
+ SvxNumRule aTempRule( SvxNumRuleFlags::NONE, 10, false );
return SvxCreateNumRule( &aTempRule );
}
}
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index 9108f0953c52..53a8d9dee472 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -857,13 +857,10 @@ void SwNumRule::SetSvxRule(const SvxNumRule& rNumRule, SwDoc* pDoc)
SvxNumRule SwNumRule::MakeSvxNumRule() const
{
- SvxNumRule aRule(NUM_CONTINUOUS|NUM_CHAR_TEXT_DISTANCE|NUM_CHAR_STYLE|
- NUM_ENABLE_LINKED_BMP|NUM_ENABLE_EMBEDDED_BMP,
- MAXLEVEL, mbContinusNum,
- meRuleType ==
- NUM_RULE ?
- SVX_RULETYPE_NUMBERING :
- SVX_RULETYPE_OUTLINE_NUMBERING );
+ SvxNumRule aRule(SvxNumRuleFlags::CONTINUOUS | SvxNumRuleFlags::CHAR_TEXT_DISTANCE | SvxNumRuleFlags::CHAR_STYLE |
+ SvxNumRuleFlags::ENABLE_LINKED_BMP | SvxNumRuleFlags::ENABLE_EMBEDDED_BMP,
+ MAXLEVEL, mbContinusNum,
+ meRuleType == NUM_RULE ? SVX_RULETYPE_NUMBERING : SVX_RULETYPE_OUTLINE_NUMBERING );
for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
SwNumFmt aNumFmt = Get(n);
diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx
index 14c975bfe40c..9886a8a048df 100644
--- a/sw/source/uibase/shells/txtnum.cxx
+++ b/sw/source/uibase/shells/txtnum.cxx
@@ -133,7 +133,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
}
}
if(bHtml)
- aRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, false);
+ aRule.SetFeatureFlag(SvxNumRuleFlags::ENABLE_EMBEDDED_BMP, false);
aSet.Put(SvxNumBulletItem(aRule));
OSL_ENSURE( GetShell().GetNumLevel() < MAXLEVEL,
@@ -171,7 +171,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
}
aSvxRule.SetLevel( n, aFmt, false );
}
- aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, false);
+ aSvxRule.SetFeatureFlag(SvxNumRuleFlags::ENABLE_EMBEDDED_BMP, false);
}
aSet.Put( SvxNumBulletItem( aSvxRule ) );
}