summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-16 15:51:26 +0200
committerNoel Grandin <noel@peralex.com>2016-08-17 08:45:15 +0200
commit48cb92cb1671bfdef3fcf43978455f19b26ca7bd (patch)
treec50dec2c019daff055e253d1b8230d8d00b8b369 /svx
parent430b93f7f3c9f5aeb89db634447cb554acd125aa (diff)
convert XPropertyListType to scoped enum
Change-Id: I071c0d17c7c5982af47bccd92580bbac62bdf7b3
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdmodel.cxx7
-rw-r--r--svx/source/tbxctrls/Palette.cxx2
-rw-r--r--svx/source/tbxctrls/PaletteManager.cxx2
-rw-r--r--svx/source/tbxctrls/fillctrl.cxx2
-rw-r--r--svx/source/unodraw/unoctabl.cxx2
-rw-r--r--svx/source/xoutdev/xattr.cxx6
-rw-r--r--svx/source/xoutdev/xattrbmp.cxx4
-rw-r--r--svx/source/xoutdev/xtabcolr.cxx2
-rw-r--r--svx/source/xoutdev/xtabdash.cxx2
-rw-r--r--svx/source/xoutdev/xtabgrdt.cxx2
-rw-r--r--svx/source/xoutdev/xtabhtch.cxx2
-rw-r--r--svx/source/xoutdev/xtable.cxx28
-rw-r--r--svx/source/xoutdev/xtablend.cxx2
13 files changed, 32 insertions, 31 deletions
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 27952e494806..81ee1612e75b 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -94,6 +94,7 @@
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <comphelper/lok.hxx>
#include <sfx2/viewsh.hxx>
+#include <o3tl/enumrange.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -650,11 +651,11 @@ bool SdrModel::IsUndoEnabled() const
void SdrModel::ImpCreateTables()
{
- for( int i = 0; i < XPROPERTY_LIST_COUNT; i++ )
+ for( auto i : o3tl::enumrange<XPropertyListType>() )
{
- if( !bExtColorTable || i != XCOLOR_LIST )
+ if( !bExtColorTable || i != XPropertyListType::Color )
maProperties[i] = XPropertyList::CreatePropertyList (
- (XPropertyListType) i, aTablePath, ""/*TODO?*/ );
+ i, aTablePath, ""/*TODO?*/ );
}
}
diff --git a/svx/source/tbxctrls/Palette.cxx b/svx/source/tbxctrls/Palette.cxx
index 82789e99e193..aecaf565e86e 100644
--- a/svx/source/tbxctrls/Palette.cxx
+++ b/svx/source/tbxctrls/Palette.cxx
@@ -347,7 +347,7 @@ void PaletteSOC::LoadColorSet( SvxColorValueSet& rColorSet )
if( !mbLoadedPalette )
{
mbLoadedPalette = true;
- mpColorList = XPropertyList::AsColorList(XPropertyList::CreatePropertyListFromURL(XCOLOR_LIST, maFPath));
+ mpColorList = XPropertyList::AsColorList(XPropertyList::CreatePropertyListFromURL(XPropertyListType::Color, maFPath));
(void)mpColorList->Load();
}
rColorSet.Clear();
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx
index e2dbe421c885..cccf1672bc24 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -189,7 +189,7 @@ void PaletteManager::SetPalette( sal_Int32 nPos )
{
pColorList = XPropertyList::AsColorList(
XPropertyList::CreatePropertyListFromURL(
- XCOLOR_LIST, GetSelectedPalettePath()));
+ XPropertyListType::Color, GetSelectedPalettePath()));
pColorList->SetName(GetPaletteName());
if(pColorList->Load())
{
diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx
index 96f160254285..9251ff39eb89 100644
--- a/svx/source/tbxctrls/fillctrl.cxx
+++ b/svx/source/tbxctrls/fillctrl.cxx
@@ -499,7 +499,7 @@ void SvxFillToolBoxControl::Update()
XBitmapListRef xBitmapList =
XPropertyList::AsBitmapList(
XPropertyList::CreatePropertyList(
- XBITMAP_LIST, "TmpList", ""/*TODO?*/));
+ XPropertyListType::Bitmap, "TmpList", ""/*TODO?*/));
xBitmapList->Insert(o3tl::make_unique<XBitmapEntry>(mpBitmapItem->GetGraphicObject(), aTmpStr));
xBitmapList->SetDirty( false );
mpLbFillAttr->Fill( xBitmapList );
diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx
index 55f01081a6fe..11bb724ef4b3 100644
--- a/svx/source/unodraw/unoctabl.cxx
+++ b/svx/source/unodraw/unoctabl.cxx
@@ -67,7 +67,7 @@ SvxUnoColorTable::SvxUnoColorTable()
{
pList = XPropertyList::AsColorList(
XPropertyList::CreatePropertyList(
- XCOLOR_LIST, SvtPathOptions().GetPalettePath(), ""));
+ XPropertyListType::Color, SvtPathOptions().GetPalettePath(), ""));
}
sal_Bool SAL_CALL SvxUnoColorTable::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException, std::exception)
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index c0884bd9c6b2..8d1472d02845 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -1001,7 +1001,7 @@ XLineDashItem* XLineDashItem::checkForUniqueItem( SdrModel* pModel ) const
this, XATTR_LINEDASH, &pModel->GetItemPool(),
pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : nullptr,
XLineDashItem::CompareValueFunc, RID_SVXSTR_DASH11,
- pModel->GetPropertyList( XDASH_LIST ) );
+ pModel->GetPropertyList( XPropertyListType::Dash ) );
// if the given name is not valid, replace it!
if( aUniqueName != GetName() )
@@ -2741,7 +2741,7 @@ XFillGradientItem* XFillGradientItem::checkForUniqueItem( SdrModel* pModel ) con
this, Which(), &pModel->GetItemPool(),
pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : nullptr,
XFillGradientItem::CompareValueFunc, RID_SVXSTR_GRADIENT,
- pModel->GetPropertyList( XGRADIENT_LIST ) );
+ pModel->GetPropertyList( XPropertyListType::Gradient ) );
// if the given name is not valid, replace it!
if( aUniqueName != GetName() )
@@ -3148,7 +3148,7 @@ XFillHatchItem* XFillHatchItem::checkForUniqueItem( SdrModel* pModel ) const
this, XATTR_FILLHATCH, &pModel->GetItemPool(),
pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : nullptr,
XFillHatchItem::CompareValueFunc, RID_SVXSTR_HATCH10,
- pModel->GetPropertyList( XHATCH_LIST ) );
+ pModel->GetPropertyList( XPropertyListType::Hatch ) );
// if the given name is not valid, replace it!
if( aUniqueName != GetName() )
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index 31129f4d748c..86bcf178d8e7 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -523,9 +523,9 @@ XFillBitmapItem* XFillBitmapItem::checkForUniqueItem( SdrModel* pModel ) const
{
if( pModel )
{
- XPropertyListType aListType = XBITMAP_LIST;
+ XPropertyListType aListType = XPropertyListType::Bitmap;
if(isPattern())
- aListType = XPATTERN_LIST;
+ aListType = XPropertyListType::Pattern;
const OUString aUniqueName = NameOrIndex::CheckNamedItem(
this, XATTR_FILLBITMAP, &pModel->GetItemPool(),
pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : nullptr,
diff --git a/svx/source/xoutdev/xtabcolr.cxx b/svx/source/xoutdev/xtabcolr.cxx
index 3d16c4d26440..374f6fc9a6cb 100644
--- a/svx/source/xoutdev/xtabcolr.cxx
+++ b/svx/source/xoutdev/xtabcolr.cxx
@@ -33,7 +33,7 @@ XColorListRef XColorList::CreateStdColorList()
{
return XPropertyList::AsColorList(
XPropertyList::CreatePropertyList(
- XCOLOR_LIST, SvtPathOptions().GetPalettePath(), ""));
+ XPropertyListType::Color, SvtPathOptions().GetPalettePath(), ""));
}
XColorListRef XColorList::GetStdColorList()
diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx
index 817f115563a8..962ff658fb05 100644
--- a/svx/source/xoutdev/xtabdash.cxx
+++ b/svx/source/xoutdev/xtabdash.cxx
@@ -37,7 +37,7 @@
using namespace com::sun::star;
XDashList::XDashList(const OUString& rPath, const OUString& rReferer)
- : XPropertyList(XDASH_LIST, rPath, rReferer)
+ : XPropertyList(XPropertyListType::Dash, rPath, rReferer)
, maBitmapSolidLine()
, maStringSolidLine()
, maStringNoLine()
diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx
index 78c358558e27..4a21b58903e9 100644
--- a/svx/source/xoutdev/xtabgrdt.cxx
+++ b/svx/source/xoutdev/xtabgrdt.cxx
@@ -38,7 +38,7 @@
using namespace com::sun::star;
XGradientList::XGradientList( const OUString& rPath, const OUString& rReferer )
-: XPropertyList( XGRADIENT_LIST, rPath, rReferer )
+: XPropertyList( XPropertyListType::Gradient, rPath, rReferer )
{
}
diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx
index a5227ba7b2b2..51b71def653d 100644
--- a/svx/source/xoutdev/xtabhtch.cxx
+++ b/svx/source/xoutdev/xtabhtch.cxx
@@ -37,7 +37,7 @@
using namespace ::com::sun::star;
XHatchList::XHatchList(const OUString& rPath, const OUString& rReferer)
- : XPropertyList( XHATCH_LIST, rPath, rReferer )
+ : XPropertyList( XPropertyListType::Hatch, rPath, rReferer )
{
}
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index e8c9d825848a..c088d342c1fa 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -334,25 +334,25 @@ XPropertyListRef XPropertyList::CreatePropertyList( XPropertyListType aType,
XPropertyListRef pRet;
switch (aType) {
- case XCOLOR_LIST:
+ case XPropertyListType::Color:
pRet = XPropertyListRef(new XColorList(rPath, rReferer));
break;
- case XLINE_END_LIST:
+ case XPropertyListType::LineEnd:
pRet = XPropertyListRef(new XLineEndList(rPath, rReferer));
break;
- case XDASH_LIST:
+ case XPropertyListType::Dash:
pRet = XPropertyListRef(new XDashList(rPath, rReferer));
break;
- case XHATCH_LIST:
+ case XPropertyListType::Hatch:
pRet = XPropertyListRef(new XHatchList(rPath, rReferer));
break;
- case XGRADIENT_LIST:
+ case XPropertyListType::Gradient:
pRet = XPropertyListRef(new XGradientList(rPath, rReferer));
break;
- case XBITMAP_LIST:
+ case XPropertyListType::Bitmap:
pRet = XPropertyListRef(new XBitmapList(rPath, rReferer));
break;
- case XPATTERN_LIST:
+ case XPropertyListType::Pattern:
pRet = XPropertyListRef(new XPatternList(rPath, rReferer));
break;
default:
@@ -397,13 +397,13 @@ static struct {
XPropertyListType t;
const char *pExt;
} pExtnMap[] = {
- { XCOLOR_LIST, "soc" },
- { XLINE_END_LIST, "soe" },
- { XDASH_LIST, "sod" },
- { XHATCH_LIST, "soh" },
- { XGRADIENT_LIST, "sog" },
- { XBITMAP_LIST, "sob" },
- { XPATTERN_LIST, "sop"}
+ { XPropertyListType::Color, "soc" },
+ { XPropertyListType::LineEnd, "soe" },
+ { XPropertyListType::Dash, "sod" },
+ { XPropertyListType::Hatch, "soh" },
+ { XPropertyListType::Gradient, "sog" },
+ { XPropertyListType::Bitmap, "sob" },
+ { XPropertyListType::Pattern, "sop"}
};
OUString XPropertyList::GetDefaultExt( XPropertyListType t )
diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx
index 988bcb8edfa1..ec94f1730bd1 100644
--- a/svx/source/xoutdev/xtablend.cxx
+++ b/svx/source/xoutdev/xtablend.cxx
@@ -37,7 +37,7 @@
using namespace com::sun::star;
XLineEndList::XLineEndList( const OUString& rPath, const OUString& rReferer )
- : XPropertyList( XLINE_END_LIST, rPath, rReferer )
+ : XPropertyList( XPropertyListType::LineEnd, rPath, rReferer )
{
}