summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-19 12:16:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-19 14:30:50 +0200
commitd4a066c3e4b7ebcdb16ffcb88b6b2c744c127ea1 (patch)
tree41042ca9f06117196e18d583d69cbdc9bafd445a
parentbe8c414567f49242164b1fdfb12764b16be355c1 (diff)
inline some defines
which don't add any value anymore Change-Id: I45977d972d4d02926630b749d3ec736416138cf5
-rw-r--r--dbaccess/source/ui/browser/dsEntriesNoExp.cxx4
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx8
-rw-r--r--dbaccess/source/ui/control/dbtreelistbox.cxx2
-rw-r--r--dbaccess/source/ui/control/tabletree.cxx4
-rw-r--r--dbaccess/source/ui/inc/listviewitems.hxx2
-rw-r--r--dtrans/source/win32/ftransl/ftransl.cxx3
-rw-r--r--sc/inc/global.hxx3
-rw-r--r--sc/source/core/data/global.cxx4
-rw-r--r--sc/source/ui/docshell/impex.cxx4
-rw-r--r--sd/inc/glob.hxx6
-rw-r--r--sd/qa/unit/import-tests.cxx4
-rw-r--r--sd/source/core/drawdoc.cxx4
-rw-r--r--sd/source/core/drawdoc3.cxx8
-rw-r--r--sd/source/core/drawdoc4.cxx38
-rw-r--r--sd/source/core/sdpage.cxx16
-rw-r--r--sd/source/core/sdpage2.cxx6
-rw-r--r--sd/source/core/stlfamily.cxx24
-rw-r--r--sd/source/core/stlpool.cxx76
-rw-r--r--sd/source/core/stlsheet.cxx32
-rw-r--r--sd/source/filter/ppt/pptin.cxx12
-rw-r--r--sd/source/filter/xml/sdtransform.cxx4
-rw-r--r--sd/source/ui/dlg/dlgolbul.cxx2
-rw-r--r--sd/source/ui/dlg/prltempl.cxx2
-rw-r--r--sd/source/ui/dlg/unchss.cxx4
-rw-r--r--sd/source/ui/docshell/grdocsh.cxx4
-rw-r--r--sd/source/ui/func/fuconrec.cxx2
-rw-r--r--sd/source/ui/func/fuconstr.cxx4
-rw-r--r--sd/source/ui/func/fuolbull.cxx2
-rw-r--r--sd/source/ui/func/fuprobjs.cxx2
-rw-r--r--sd/source/ui/func/futempl.cxx20
-rw-r--r--sd/source/ui/unoidl/unoobj.cxx4
-rw-r--r--sd/source/ui/unoidl/unopage.cxx4
-rw-r--r--sd/source/ui/view/drawview.cxx6
-rw-r--r--sd/source/ui/view/drtxtob1.cxx2
-rw-r--r--sd/source/ui/view/drviews2.cxx4
-rw-r--r--sd/source/ui/view/drviewsf.cxx18
-rw-r--r--sd/source/ui/view/outlnvsh.cxx2
-rw-r--r--sd/source/ui/view/viewshe3.cxx2
-rw-r--r--sd/source/ui/view/viewshel.cxx2
-rw-r--r--sw/source/core/bastyp/calc.cxx15
-rw-r--r--sw/source/filter/xml/xmlithlp.cxx52
41 files changed, 194 insertions, 223 deletions
diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
index 0df6b7bbcf68..74e07e2a7910 100644
--- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
+++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
@@ -106,7 +106,7 @@ SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType( const SvTree
void SbaTableQueryBrowser::select(SvTreeListEntry* _pEntry, bool _bSelect)
{
- SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : nullptr;
+ SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SvLBoxItemType::String) : nullptr;
if (pTextItem)
{
static_cast<OBoldListboxString*>(pTextItem)->emphasize(_bSelect);
@@ -128,7 +128,7 @@ void SbaTableQueryBrowser::selectPath(SvTreeListEntry* _pEntry, bool _bSelect)
bool SbaTableQueryBrowser::isSelected(SvTreeListEntry* _pEntry)
{
- SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : nullptr;
+ SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SvLBoxItemType::String) : nullptr;
if (pTextItem)
return static_cast<OBoldListboxString*>(pTextItem)->isEmphasized();
else {
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 2f14c616b6a5..ca2dc64699fe 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -2141,7 +2141,7 @@ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvTreeListEntry*, _pParent, bool)
DBTreeListUserData* pData = static_cast< DBTreeListUserData* >(_pParent->GetUserData());
assert(pData && "SbaTableQueryBrowser::OnExpandEntry: No user data!");
#if OSL_DEBUG_LEVEL > 0
- SvLBoxString* pString = static_cast<SvLBoxString*>(pFirstParent->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING));
+ SvLBoxString* pString = static_cast<SvLBoxString*>(pFirstParent->GetFirstItem(SvLBoxItemType::String));
OSL_ENSURE(pString,"SbaTableQueryBrowser::OnExpandEntry: No string item!");
#endif
@@ -2266,7 +2266,7 @@ bool SbaTableQueryBrowser::ensureEntryObject( SvTreeListEntry* _pEntry )
SvTreeListEntry* pParent = m_pTreeView->getListBox().GetParent(_pEntry);
if ( pParent != pDataSourceEntry )
{
- SvLBoxString* pString = static_cast<SvLBoxString*>(_pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING));
+ SvLBoxString* pString = static_cast<SvLBoxString*>(_pEntry->GetFirstItem(SvLBoxItemType::String));
OSL_ENSURE(pString,"There must be a string item!");
OUString aName(pString->GetText());
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pParent->GetUserData());
@@ -2517,7 +2517,7 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry )
Reference<XConnection> xOldConnection(xRowSetProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION),UNO_QUERY);
// the name of the table or query
- SvLBoxString* pString = static_cast<SvLBoxString*>(_pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING));
+ SvLBoxString* pString = static_cast<SvLBoxString*>(_pEntry->GetFirstItem(SvLBoxItemType::String));
OSL_ENSURE(pString,"There must be a string item!");
const OUString sSimpleName = pString->GetText();
OUStringBuffer sNameBuffer(sSimpleName);
@@ -2527,7 +2527,7 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry )
while( m_pTreeModel->GetParent(pTemp) != pConnection )
{
sNameBuffer.insert(0,'/');
- pString = static_cast<SvLBoxString*>(pTemp->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING));
+ pString = static_cast<SvLBoxString*>(pTemp->GetFirstItem(SvLBoxItemType::String));
OSL_ENSURE(pString,"There must be a string item!");
sNameBuffer.insert(0,pString->GetText());
pTemp = m_pTreeModel->GetParent(pTemp);
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index a8efa986d117..d5b169be3feb 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -191,7 +191,7 @@ void DBTreeListBox::ModelHasEntryInvalidated( SvTreeListEntry* _pEntry )
if (m_aSelectedEntries.find(_pEntry) != m_aSelectedEntries.end())
{
- SvLBoxItem* pTextItem = _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING);
+ SvLBoxItem* pTextItem = _pEntry->GetFirstItem(SvLBoxItemType::String);
if ( pTextItem && !static_cast< OBoldListboxString* >( pTextItem )->isEmphasized() )
{
implStopSelectionTimer();
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index c8b52bab7100..73c1620f5f2a 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -318,7 +318,7 @@ bool OTableTreeListBox::isWildcardChecked(SvTreeListEntry* _pEntry)
{
if (_pEntry)
{
- OBoldListboxString* pTextItem = static_cast<OBoldListboxString*>(_pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING));
+ OBoldListboxString* pTextItem = static_cast<OBoldListboxString*>(_pEntry->GetFirstItem(SvLBoxItemType::String));
if (pTextItem)
return pTextItem->isEmphasized();
}
@@ -359,7 +359,7 @@ void OTableTreeListBox::implEmphasize(SvTreeListEntry* _pEntry, bool _bChecked,
|| bAllObjectsEntryAffected // or it is the "all objects" entry
)
{
- OBoldListboxString* pTextItem = static_cast<OBoldListboxString*>(_pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING));
+ OBoldListboxString* pTextItem = static_cast<OBoldListboxString*>(_pEntry->GetFirstItem(SvLBoxItemType::String));
if (pTextItem)
pTextItem->emphasize(_bChecked);
diff --git a/dbaccess/source/ui/inc/listviewitems.hxx b/dbaccess/source/ui/inc/listviewitems.hxx
index 15cc9c609eb2..9acbf5719a81 100644
--- a/dbaccess/source/ui/inc/listviewitems.hxx
+++ b/dbaccess/source/ui/inc/listviewitems.hxx
@@ -25,8 +25,6 @@
namespace dbaui
{
- #define SV_ITEM_ID_BOLDLBSTRING SvLBoxItemType::String
-
// OBoldListboxString
class OBoldListboxString : public SvLBoxString
{
diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx
index c395d4e70e31..9eec3d23742a 100644
--- a/dtrans/source/win32/ftransl/ftransl.cxx
+++ b/dtrans/source/win32/ftransl/ftransl.cxx
@@ -43,7 +43,6 @@
#define CPPUTYPE_DEFAULT CPPUTYPE_SEQSALINT8
#define CPPUTYPE_OUSTR cppu::UnoType<OUString>::get()
#define CPPUTYPE_SALINT32 cppu::UnoType<sal_Int32>::get()
-#define EMPTY_OUSTR OUString()
const OUString Windows_FormatName ("windows_formatname");
const css::uno::Type CppuType_ByteSequence = cppu::UnoType<css::uno::Sequence<sal_Int8>>::get();
@@ -528,7 +527,7 @@ DataFlavor SAL_CALL CDataFormatTranslatorUNO::getDataFlavorFromSystemDataType( c
{
OSL_PRECOND( aSysDataType.hasValue( ), "Empty system data type delivered" );
- DataFlavor aFlavor = mkDataFlv( EMPTY_OUSTR, EMPTY_OUSTR, CPPUTYPE_SEQSALINT8 );
+ DataFlavor aFlavor = mkDataFlv( OUString(), OUString(), CPPUTYPE_SEQSALINT8 );
if ( aSysDataType.getValueType( ) == CPPUTYPE_SALINT32 )
{
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index fdb05f367094..438cfe804b44 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -42,9 +42,6 @@ enum class SvNumFormatType : sal_Int16;
#define SC_COLLATOR_IGNORES css::i18n::CollatorOptions::CollatorOptions_IGNORE_CASE
-#define SC_TRANSLITERATION_IGNORECASE TransliterationFlags::IGNORE_CASE
-#define SC_TRANSLITERATION_CASESENSE TransliterationFlags::NONE
-
// Calc has lots of names...
// Clipboard names are in so3/soapp.hxx now
// STRING_SCAPP was "scalc3", "scalc4", now just "scalc"
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 4ec80cb92025..d3777cfe7135 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -982,7 +982,7 @@ utl::TransliterationWrapper* ScGlobal::GetpTransliteration()
{
const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguageTag().getLanguageType();
pTransliteration = new ::utl::TransliterationWrapper(
- ::comphelper::getProcessComponentContext(), SC_TRANSLITERATION_IGNORECASE );
+ ::comphelper::getProcessComponentContext(), TransliterationFlags::IGNORE_CASE );
pTransliteration->loadModuleIfNeeded( eOfficeLanguage );
}
OSL_ENSURE(
@@ -1030,7 +1030,7 @@ CollatorWrapper* ScGlobal::GetCaseCollator()
if ( !pCaseTransliteration )
{
const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguageTag().getLanguageType();
- pCaseTransliteration = new ::utl::TransliterationWrapper(::comphelper::getProcessComponentContext(), SC_TRANSLITERATION_CASESENSE );
+ pCaseTransliteration = new ::utl::TransliterationWrapper(::comphelper::getProcessComponentContext(), TransliterationFlags::NONE );
pCaseTransliteration->loadModuleIfNeeded( eOfficeLanguage );
}
return pCaseTransliteration;
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 12f914b2473d..1e9e0d263f18 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1300,7 +1300,7 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm )
// For date recognition
::utl::TransliterationWrapper aTransliteration(
- comphelper::getProcessComponentContext(), SC_TRANSLITERATION_IGNORECASE );
+ comphelper::getProcessComponentContext(), TransliterationFlags::IGNORE_CASE );
aTransliteration.loadModuleIfNeeded( eDocLang );
CalendarWrapper aCalendar( comphelper::getProcessComponentContext() );
aCalendar.loadDefaultCalendar(
@@ -1310,7 +1310,7 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm )
if ( eDocLang != LANGUAGE_ENGLISH_US )
{
pEnglishTransliteration.reset(new ::utl::TransliterationWrapper (
- comphelper::getProcessComponentContext(), SC_TRANSLITERATION_IGNORECASE ));
+ comphelper::getProcessComponentContext(), TransliterationFlags::IGNORE_CASE ));
aTransliteration.loadModuleIfNeeded( LANGUAGE_ENGLISH_US );
pEnglishCalendar.reset(new CalendarWrapper ( comphelper::getProcessComponentContext() ));
pEnglishCalendar->loadDefaultCalendar(
diff --git a/sd/inc/glob.hxx b/sd/inc/glob.hxx
index 88743def8397..32e2d7f54d2f 100644
--- a/sd/inc/glob.hxx
+++ b/sd/inc/glob.hxx
@@ -47,12 +47,6 @@
#define SD_ANIMATIONINFO_ID 1
#define SD_IMAPINFO_ID 2
-// FamilyId of presentation templates
-#define SD_STYLE_FAMILY_GRAPHICS SfxStyleFamily::Para
-#define SD_STYLE_FAMILY_PSEUDO SfxStyleFamily::Pseudo
-#define SD_STYLE_FAMILY_CELL SfxStyleFamily::Frame
-#define SD_STYLE_FAMILY_MASTERPAGE SfxStyleFamily::Page // ex LT_FAMILY
-
// Separator between layout name and template name of presentation templates
#define SD_LT_SEPARATOR "~LT~"
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 73bf57049128..b3730014a4fa 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -495,7 +495,7 @@ void SdImportTest::testMasterPageStyleParent()
SdStyleSheetPool *const pPool(pDoc->GetSdStyleSheetPool());
int parents(0);
- SfxStyleSheetIterator iter(pPool, SD_STYLE_FAMILY_MASTERPAGE);
+ SfxStyleSheetIterator iter(pPool, SfxStyleFamily::Page);
for (SfxStyleSheetBase * pStyle = iter.First(); pStyle; pStyle = iter.Next())
{
OUString const name(pStyle->GetName());
@@ -505,7 +505,7 @@ void SdImportTest::testMasterPageStyleParent()
++parents;
// check that parent exists
SfxStyleSheetBase *const pParentStyle(
- pPool->Find(parent, SD_STYLE_FAMILY_MASTERPAGE));
+ pPool->Find(parent, SfxStyleFamily::Page));
CPPUNIT_ASSERT(pParentStyle);
CPPUNIT_ASSERT_EQUAL(pParentStyle->GetName(), parent);
// check that parent has the same master page as pStyle
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 80b02412d092..d0f6506804ac 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -596,10 +596,10 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
// Set default style of Drawing Engine
OUString aName( SdResId(STR_STANDARD_STYLESHEET_NAME));
- SetDefaultStyleSheet(static_cast<SfxStyleSheet*>(mxStyleSheetPool->Find(aName, SD_STYLE_FAMILY_GRAPHICS)));
+ SetDefaultStyleSheet(static_cast<SfxStyleSheet*>(mxStyleSheetPool->Find(aName, SfxStyleFamily::Para)));
// #i119287# Set default StyleSheet for SdrGrafObj and SdrOle2Obj
- SetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj(static_cast<SfxStyleSheet*>(mxStyleSheetPool->Find(SdResId(STR_POOLSHEET_OBJNOLINENOFILL), SD_STYLE_FAMILY_GRAPHICS)));
+ SetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj(static_cast<SfxStyleSheet*>(mxStyleSheetPool->Find(SdResId(STR_POOLSHEET_OBJNOLINENOFILL), SfxStyleFamily::Para)));
// Initialize DrawOutliner and DocumentOutliner, but don't initialize the
// global outliner, as it is not document specific like StyleSheetPool and
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index d09e3438b54e..d1d3da08ac36 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -1545,8 +1545,8 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
// only worry about presentation templates
OUString aName;
SdStyleSheetPool* pSourceStyleSheetPool = static_cast<SdStyleSheetPool*>( pSourceDoc->GetStyleSheetPool() );
- pSourceStyleSheetPool->SetSearchMask(SD_STYLE_FAMILY_MASTERPAGE);
- static_cast<SdStyleSheetPool*>( mxStyleSheetPool.get())->SetSearchMask(SD_STYLE_FAMILY_MASTERPAGE);
+ pSourceStyleSheetPool->SetSearchMask(SfxStyleFamily::Page);
+ static_cast<SdStyleSheetPool*>( mxStyleSheetPool.get())->SetSearchMask(SfxStyleFamily::Page);
SdStyleSheetVector aCreatedStyles; // List of created stylesheets
SfxStyleSheetBase* pHisSheet = pSourceStyleSheetPool->First();
@@ -1566,7 +1566,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
aName = aTargetNewLayoutName + aName.copy(nPos);
}
- SfxStyleSheet* pMySheet = static_cast<SfxStyleSheet*>( mxStyleSheetPool->Find(aName, SD_STYLE_FAMILY_MASTERPAGE) );
+ SfxStyleSheet* pMySheet = static_cast<SfxStyleSheet*>( mxStyleSheetPool->Find(aName, SfxStyleFamily::Page) );
if (pMySheet)
{
@@ -1588,7 +1588,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
{
// create new style
OUString aHelpFile;
- pMySheet = static_cast<SfxStyleSheet*>( &mxStyleSheetPool->Make(aName, SD_STYLE_FAMILY_MASTERPAGE, pHisSheet->GetMask()) );
+ pMySheet = static_cast<SfxStyleSheet*>( &mxStyleSheetPool->Make(aName, SfxStyleFamily::Page, pHisSheet->GetMask()) );
pMySheet->SetHelpId( aHelpFile, pHisSheet->GetHelpId(aHelpFile) );
pMySheet->GetItemSet().ClearItem(); // Delete all
pMySheet->GetItemSet().Put(pHisSheet->GetItemSet());
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index c8b8e052c9eb..0772dbe74eb6 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -134,7 +134,7 @@ void SdDrawDocument::CreateLayoutTemplates()
sal_uInt16 nMask = SFXSTYLEBIT_AUTO;
OUString aName(aStdName);
- pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetHelpId( aHelpFile, HID_STANDARD_STYLESHEET_NAME );
SfxItemSet& rISet = pSheet->GetItemSet();
@@ -254,7 +254,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Object with arrowhead
aName = SdResId(STR_POOLSHEET_OBJWITHARROW);
- pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aStdName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJWITHARROW );
pISet = &pSheet->GetItemSet();
@@ -276,7 +276,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Object with Shadow
aName = SdResId(STR_POOLSHEET_OBJWITHSHADOW);
- pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aStdName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJWITHSHADOW );
pISet = &pSheet->GetItemSet();
@@ -288,7 +288,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Object without filling
aName = SdResId(STR_POOLSHEET_OBJWITHOUTFILL);
- pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aStdName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJWITHOUTFILL );
pISet = &pSheet->GetItemSet();
@@ -299,7 +299,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Object no fill no line
aName = SdResId(STR_POOLSHEET_OBJNOLINENOFILL);
- pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aStdName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJNOLINENOFILL );
pISet = &pSheet->GetItemSet();
@@ -310,7 +310,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Text
aName = SdResId(STR_POOLSHEET_TEXT);
- pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aStdName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TEXT );
pISet = &pSheet->GetItemSet();
@@ -320,7 +320,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Text body
aName = SdResId(STR_POOLSHEET_TEXTBODY);
- pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aStdName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TEXTBODY );
pISet = &pSheet->GetItemSet();
@@ -332,7 +332,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Text body, justified
aName = SdResId(STR_POOLSHEET_TEXTBODY_JUSTIFY);
- pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aStdName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TEXTBODY_JUSTIFY );
pISet = &pSheet->GetItemSet();
@@ -344,7 +344,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Text body, indented
aName = SdResId(STR_POOLSHEET_TEXTBODY_INDENT);
- pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aStdName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TEXTBODY_INDENT );
pISet = &pSheet->GetItemSet();
@@ -359,7 +359,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Title
aName = SdResId(STR_POOLSHEET_TITLE);
- pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aStdName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TITLE );
pISet = &pSheet->GetItemSet();
@@ -371,7 +371,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Title1
aName = SdResId(STR_POOLSHEET_TITLE1);
- pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aStdName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TITLE1 );
pISet = &pSheet->GetItemSet();
@@ -392,7 +392,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Title2
aName = SdResId(STR_POOLSHEET_TITLE2);
- pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aStdName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TITLE2 );
pISet = &pSheet->GetItemSet();
@@ -421,7 +421,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Headline
aName = SdResId(STR_POOLSHEET_HEADLINE);
- pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aStdName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_HEADLINE );
pISet = &pSheet->GetItemSet();
@@ -436,7 +436,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Headline1
aName = SdResId(STR_POOLSHEET_HEADLINE1);
- pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aStdName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_HEADLINE1 );
pISet = &pSheet->GetItemSet();
@@ -453,7 +453,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Headline2
aName = SdResId(STR_POOLSHEET_HEADLINE2);
- pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aStdName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_HEADLINE2 );
pISet = &pSheet->GetItemSet();
@@ -471,7 +471,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Measurements
aName = SdResId(STR_POOLSHEET_MEASURE);
- pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
+ pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
pSheet->SetParent(aStdName);
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_MEASURE );
pISet = &pSheet->GetItemSet();
@@ -495,7 +495,7 @@ void SdDrawDocument::CreateLayoutTemplates()
static Any implMakeSolidCellStyle( SdStyleSheetPool* pSSPool, const OUString& rName, const OUString& rParent, const Color& rColor )
{
- SfxStyleSheetBase* pSheet = &(pSSPool->Make(rName, SD_STYLE_FAMILY_CELL, SFXSTYLEBIT_AUTO));
+ SfxStyleSheetBase* pSheet = &(pSSPool->Make(rName, SfxStyleFamily::Frame, SFXSTYLEBIT_AUTO));
pSheet->SetParent(rParent);
SfxItemSet* pISet = &pSheet->GetItemSet();
pISet->Put(XFillStyleItem(drawing::FillStyle_SOLID));
@@ -540,7 +540,7 @@ void SdDrawDocument::CreateDefaultCellStyles()
OUString aDefaultCellStyleName( "default" );
- pSheet = &(pSSPool->Make(aDefaultCellStyleName, SD_STYLE_FAMILY_CELL, SFXSTYLEBIT_AUTO));
+ pSheet = &(pSSPool->Make(aDefaultCellStyleName, SfxStyleFamily::Frame, SFXSTYLEBIT_AUTO));
pSheet->SetHelpId( OUString(), HID_SD_CELL_STYLE_DEFAULT );
SfxItemSet& rISet = pSheet->GetItemSet();
@@ -1067,7 +1067,7 @@ void SdDrawDocument::RenameLayoutTemplate(const OUString& rOldLayoutName, const
aOldName = aOldName.copy(0, nPos + aSep.getLength());
std::vector<StyleReplaceData> aReplList;
- SfxStyleSheetIterator aIter(mxStyleSheetPool.get(), SD_STYLE_FAMILY_MASTERPAGE);
+ SfxStyleSheetIterator aIter(mxStyleSheetPool.get(), SfxStyleFamily::Page);
SfxStyleSheetBase* pSheet = aIter.First();
while (pSheet)
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 1016ceb96fa6..c61e44f9ce7e 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -553,7 +553,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
for (sal_uInt16 nLevel = 1; nLevel < 10; nLevel++)
{
OUString aName( maLayoutName + " " + OUString::number( nLevel ) );
- SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pModel->GetStyleSheetPool()->Find(aName, SD_STYLE_FAMILY_MASTERPAGE));
+ SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pModel->GetStyleSheetPool()->Find(aName, SfxStyleFamily::Page));
DBG_ASSERT(pSheet, "StyleSheet for outline object not found");
if (pSheet)
pSdrObj->StartListening(*pSheet);
@@ -615,7 +615,7 @@ SfxStyleSheet* SdPage::GetStyleSheetForMasterPageBackground() const
aName += STR_LAYOUT_BACKGROUND;
SfxStyleSheetBasePool* pStShPool = pModel->GetStyleSheetPool();
- SfxStyleSheetBase* pResult = pStShPool->Find(aName, SD_STYLE_FAMILY_MASTERPAGE);
+ SfxStyleSheetBase* pResult = pStShPool->Find(aName, SfxStyleFamily::Page);
return static_cast<SfxStyleSheet*>(pResult);
}
@@ -662,7 +662,7 @@ SfxStyleSheet* SdPage::GetStyleSheetForPresObj(PresObjKind eObjKind) const
}
SfxStyleSheetBasePool* pStShPool = pModel->GetStyleSheetPool();
- SfxStyleSheetBase* pResult = pStShPool->Find(aName, SD_STYLE_FAMILY_MASTERPAGE);
+ SfxStyleSheetBase* pResult = pStShPool->Find(aName, SfxStyleFamily::Page);
return static_cast<SfxStyleSheet*>(pResult);
}
@@ -707,7 +707,7 @@ SdStyleSheet* SdPage::getPresentationStyle( sal_uInt32 nHelpId ) const
}
SfxStyleSheetBasePool* pStShPool = pModel->GetStyleSheetPool();
- SfxStyleSheetBase* pResult = pStShPool->Find(aStyleName, SD_STYLE_FAMILY_MASTERPAGE);
+ SfxStyleSheetBase* pResult = pStShPool->Find(aStyleName, SfxStyleFamily::Page);
return dynamic_cast<SdStyleSheet*>(pResult);
}
@@ -1501,7 +1501,7 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto
if( std::find( rShapes.begin(), rShapes.end(), pObj ) != rShapes.end() )
continue;
- bool bPresStyle = pObj->GetStyleSheet() && (pObj->GetStyleSheet()->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE);
+ bool bPresStyle = pObj->GetStyleSheet() && (pObj->GetStyleSheet()->GetFamily() == SfxStyleFamily::Page);
SdrObjKind eSdrObjKind = static_cast< SdrObjKind >( pObj->GetObjIdentifier() );
switch( eKind )
@@ -1980,7 +1980,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const ::tools::Rectangle& rN
for (sal_Int32 i=1; i<=9; i++)
{
OUString sLayoutName( aName + OUString::number( i ) );
- SfxStyleSheet* pOutlineSheet = static_cast<SfxStyleSheet*>(static_cast<SdDrawDocument*>(pModel)->GetStyleSheetPool()->Find(sLayoutName, SD_STYLE_FAMILY_MASTERPAGE));
+ SfxStyleSheet* pOutlineSheet = static_cast<SfxStyleSheet*>(static_cast<SdDrawDocument*>(pModel)->GetStyleSheetPool()->Find(sLayoutName, SfxStyleFamily::Page));
if (pOutlineSheet)
{
@@ -2132,7 +2132,7 @@ SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourceObj, P
{
// assign new template
OUString aName( rPage.GetLayoutName() + " " + OUString::number( nLevel ) );
- SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>( pModel->GetStyleSheetPool()->Find(aName, SD_STYLE_FAMILY_MASTERPAGE) );
+ SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>( pModel->GetStyleSheetPool()->Find(aName, SfxStyleFamily::Page) );
if (pSheet)
{
@@ -2141,7 +2141,7 @@ SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourceObj, P
SfxStyleSheet* pSubtitleSheet = rPage.GetStyleSheetForPresObj(PRESOBJ_TEXT);
if (pSubtitleSheet)
- pOutlParaObj->ChangeStyleSheetName(SD_STYLE_FAMILY_MASTERPAGE, pSubtitleSheet->GetName(), pSheet->GetName());
+ pOutlParaObj->ChangeStyleSheetName(SfxStyleFamily::Page, pSubtitleSheet->GetName(), pSheet->GetName());
}
pNewObj->StartListening(*pSheet);
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 6057a9dacc14..21903145ea61 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -165,11 +165,11 @@ void SdPage::SetPresentationLayout(const OUString& rLayoutName,
OUString::number( (i <= 0 ) ? 1 : i + 1 );
aFullName = maLayoutName + " " +
OUString::number( (i <= 0 ) ? 1 : i + 1);
- pSheet = pStShPool->Find(aOldFullName, SD_STYLE_FAMILY_MASTERPAGE);
+ pSheet = pStShPool->Find(aOldFullName, SfxStyleFamily::Page);
DBG_ASSERT(pSheet, "Old outline style sheet not found");
aOldOutlineStyles.push_back(pSheet);
- pSheet = pStShPool->Find(aFullName, SD_STYLE_FAMILY_MASTERPAGE);
+ pSheet = pStShPool->Find(aFullName, SfxStyleFamily::Page);
DBG_ASSERT(pSheet, "New outline style sheet not found");
aOutlineStyles.push_back(pSheet);
@@ -188,7 +188,7 @@ void SdPage::SetPresentationLayout(const OUString& rLayoutName,
OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
if( pOPO )
- pOPO->SetStyleSheets( i, aFullName, SD_STYLE_FAMILY_MASTERPAGE );
+ pOPO->SetStyleSheets( i, aFullName, SfxStyleFamily::Page );
}
}
diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx
index 64f399192cb8..b08444ac27d4 100644
--- a/sd/source/core/stlfamily.cxx
+++ b/sd/source/core/stlfamily.cxx
@@ -74,7 +74,7 @@ PresStyleMap& SdStyleFamilyImpl::getStyleSheets()
maStyleSheets.clear();
// The iterator will return only style sheets of family master page
- std::shared_ptr<SfxStyleSheetIterator> aSSSIterator = std::make_shared<SfxStyleSheetIterator>(mxPool.get(), SD_STYLE_FAMILY_MASTERPAGE);
+ std::shared_ptr<SfxStyleSheetIterator> aSSSIterator = std::make_shared<SfxStyleSheetIterator>(mxPool.get(), SfxStyleFamily::Page);
for ( SfxStyleSheetBase* pStyle = aSSSIterator->First(); pStyle;
pStyle = aSSSIterator->Next() )
{
@@ -98,7 +98,7 @@ SdStyleFamily::SdStyleFamily( const rtl::Reference< SfxStyleSheetPool >& xPool,
}
SdStyleFamily::SdStyleFamily( const rtl::Reference< SfxStyleSheetPool >& xPool, const SdPage* pMasterPage )
-: mnFamily( SD_STYLE_FAMILY_MASTERPAGE )
+: mnFamily( SfxStyleFamily::Page )
, mxPool( xPool )
, mpImpl( new SdStyleFamilyImpl )
{
@@ -133,7 +133,7 @@ SdStyleSheet* SdStyleFamily::GetSheetByName( const OUString& rName )
SdStyleSheet* pRet = nullptr;
if( !rName.isEmpty() )
{
- if( mnFamily == SD_STYLE_FAMILY_MASTERPAGE )
+ if( mnFamily == SfxStyleFamily::Page )
{
PresStyleMap& rStyleMap = mpImpl->getStyleSheets();
PresStyleMap::iterator iter( rStyleMap.find(rName) );
@@ -183,7 +183,7 @@ Sequence< OUString > SAL_CALL SdStyleFamily::getSupportedServiceNames()
// XNamed
OUString SAL_CALL SdStyleFamily::getName()
{
- if( mnFamily == SD_STYLE_FAMILY_MASTERPAGE )
+ if( mnFamily == SfxStyleFamily::Page )
{
SdPage* pPage = static_cast< SdPage* >( mpImpl->mxMasterPage.get() );
if( pPage == nullptr )
@@ -222,7 +222,7 @@ Sequence< OUString > SAL_CALL SdStyleFamily::getElementNames()
throwIfDisposed();
- if( mnFamily == SD_STYLE_FAMILY_MASTERPAGE )
+ if( mnFamily == SfxStyleFamily::Page )
{
PresStyleMap& rStyleMap = mpImpl->getStyleSheets();
Sequence< OUString > aNames( rStyleMap.size() );
@@ -265,7 +265,7 @@ sal_Bool SAL_CALL SdStyleFamily::hasByName( const OUString& aName )
if( !aName.isEmpty() )
{
- if( mnFamily == SD_STYLE_FAMILY_MASTERPAGE )
+ if( mnFamily == SfxStyleFamily::Page )
{
PresStyleMap& rStyleSheets = mpImpl->getStyleSheets();
PresStyleMap::iterator iter( rStyleSheets.find(aName) );
@@ -305,7 +305,7 @@ sal_Bool SAL_CALL SdStyleFamily::hasElements()
SolarMutexGuard aGuard;
throwIfDisposed();
- if( mnFamily == SD_STYLE_FAMILY_MASTERPAGE )
+ if( mnFamily == SfxStyleFamily::Page )
{
return true;
}
@@ -329,7 +329,7 @@ sal_Int32 SAL_CALL SdStyleFamily::getCount()
throwIfDisposed();
sal_Int32 nCount = 0;
- if( mnFamily == SD_STYLE_FAMILY_MASTERPAGE )
+ if( mnFamily == SfxStyleFamily::Page )
{
return mpImpl->getStyleSheets().size();
}
@@ -353,7 +353,7 @@ Any SAL_CALL SdStyleFamily::getByIndex( sal_Int32 Index )
if( Index >= 0 )
{
- if( mnFamily == SD_STYLE_FAMILY_MASTERPAGE )
+ if( mnFamily == SfxStyleFamily::Page )
{
PresStyleMap& rStyleSheets = mpImpl->getStyleSheets();
if( !rStyleSheets.empty() )
@@ -437,7 +437,7 @@ Reference< XInterface > SAL_CALL SdStyleFamily::createInstance()
SolarMutexGuard aGuard;
throwIfDisposed();
- if( mnFamily == SD_STYLE_FAMILY_MASTERPAGE )
+ if( mnFamily == SfxStyleFamily::Page )
{
throw IllegalAccessException();
}
@@ -491,8 +491,8 @@ Any SdStyleFamily::getPropertyValue( const OUString& PropertyName )
OUString sDisplayName;
switch( mnFamily )
{
- case SD_STYLE_FAMILY_MASTERPAGE: sDisplayName = getName(); break;
- case SD_STYLE_FAMILY_CELL: sDisplayName = SdResId(STR_CELL_STYLE_FAMILY); break;
+ case SfxStyleFamily::Page: sDisplayName = getName(); break;
+ case SfxStyleFamily::Frame: sDisplayName = SdResId(STR_CELL_STYLE_FAMILY); break;
default: sDisplayName = SdResId(STR_GRAPHICS_STYLE_FAMILY); break;
}
return Any( sDisplayName );
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index d11f09013af5..3f92f2250a98 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -114,8 +114,8 @@ SdStyleSheetPool::SdStyleSheetPool(SfxItemPool const& _rPool, SdDrawDocument* pD
rtl::Reference< SfxStyleSheetPool > xPool( this );
// create graphics family
- mxGraphicFamily = new SdStyleFamily( xPool, SD_STYLE_FAMILY_GRAPHICS );
- mxCellFamily = new SdStyleFamily( xPool, SD_STYLE_FAMILY_CELL );
+ mxGraphicFamily = new SdStyleFamily( xPool, SfxStyleFamily::Para );
+ mxCellFamily = new SdStyleFamily( xPool, SfxStyleFamily::Frame );
mxTableFamily = sdr::table::CreateTableDesignFamily();
Reference< XNamed > xNamed( mxTableFamily, UNO_QUERY );
@@ -145,7 +145,7 @@ SfxStyleSheetBase* SdStyleSheetPool::GetTitleSheet(const OUString& rLayoutName)
OUString aName(rLayoutName);
aName += SD_LT_SEPARATOR;
aName += STR_LAYOUT_TITLE;
- SfxStyleSheetBase* pResult = Find(aName, SD_STYLE_FAMILY_MASTERPAGE);
+ SfxStyleSheetBase* pResult = Find(aName, SfxStyleFamily::Page);
return pResult;
}
@@ -165,7 +165,7 @@ void SdStyleSheetPool::CreateOutlineSheetList (const OUString& rLayoutName, std:
for (sal_Int32 nSheet = 1; nSheet < 10; nSheet++)
{
OUString aFullName(aName + " " + OUString::number( nSheet ) );
- SfxStyleSheetBase* pSheet = Find(aFullName, SD_STYLE_FAMILY_MASTERPAGE);
+ SfxStyleSheetBase* pSheet = Find(aFullName, SfxStyleFamily::Page);
if (pSheet)
rOutlineStyles.push_back(pSheet);
@@ -217,10 +217,10 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
{
OUString aLevelName( aPrefix + aName + " " + OUString::number( nLevel ) ) ;
- if (!Find(aLevelName, SD_STYLE_FAMILY_MASTERPAGE))
+ if (!Find(aLevelName, SfxStyleFamily::Page))
{
bCreated = true;
- pSheet = &Make(aLevelName, SD_STYLE_FAMILY_MASTERPAGE,nUsedMask);
+ pSheet = &Make(aLevelName, SfxStyleFamily::Page,nUsedMask);
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_OUTLINE + nLevel );
pSheet->SetParent( OUString() );
@@ -314,7 +314,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
{
OUString aLevelName( aPrefix + aName + " " + OUString::number( nLevel ) );
- pSheet = Find(aLevelName, SD_STYLE_FAMILY_MASTERPAGE);
+ pSheet = Find(aLevelName, SfxStyleFamily::Page);
DBG_ASSERT( pSheet, "missing layout style!");
@@ -332,11 +332,11 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
**************************************************************************/
aName = aPrefix + STR_LAYOUT_TITLE;
- if (!Find(aName, SD_STYLE_FAMILY_MASTERPAGE))
+ if (!Find(aName, SfxStyleFamily::Page))
{
bCreated = true;
- pSheet = &Make(aName, SD_STYLE_FAMILY_MASTERPAGE,nUsedMask);
+ pSheet = &Make(aName, SfxStyleFamily::Page,nUsedMask);
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_TITLE );
pSheet->SetParent( OUString() );
SfxItemSet& rTitleSet = pSheet->GetItemSet();
@@ -378,11 +378,11 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
**************************************************************************/
aName = aPrefix + STR_LAYOUT_SUBTITLE;
- if (!Find(aName, SD_STYLE_FAMILY_MASTERPAGE))
+ if (!Find(aName, SfxStyleFamily::Page))
{
bCreated = true;
- pSheet = &Make(aName, SD_STYLE_FAMILY_MASTERPAGE,nUsedMask);
+ pSheet = &Make(aName, SfxStyleFamily::Page,nUsedMask);
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_SUBTITLE );
pSheet->SetParent( OUString() );
SfxItemSet& rSubtitleSet = pSheet->GetItemSet();
@@ -427,11 +427,11 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
**************************************************************************/
aName = aPrefix + STR_LAYOUT_NOTES;
- if (!Find(aName, SD_STYLE_FAMILY_MASTERPAGE))
+ if (!Find(aName, SfxStyleFamily::Page))
{
bCreated = true;
- pSheet = &Make(aName, SD_STYLE_FAMILY_MASTERPAGE,nUsedMask);
+ pSheet = &Make(aName, SfxStyleFamily::Page,nUsedMask);
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_NOTES );
pSheet->SetParent( OUString() );
SfxItemSet& rNotesSet = pSheet->GetItemSet();
@@ -472,11 +472,11 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
**************************************************************************/
aName = aPrefix + STR_LAYOUT_BACKGROUNDOBJECTS;
- if (!Find(aName, SD_STYLE_FAMILY_MASTERPAGE))
+ if (!Find(aName, SfxStyleFamily::Page))
{
bCreated = true;
- pSheet = &Make(aName, SD_STYLE_FAMILY_MASTERPAGE,nUsedMask);
+ pSheet = &Make(aName, SfxStyleFamily::Page,nUsedMask);
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_BACKGROUNDOBJECTS );
pSheet->SetParent( OUString() );
SfxItemSet& rBackgroundObjectsSet = pSheet->GetItemSet();
@@ -494,11 +494,11 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
**************************************************************************/
aName = aPrefix + STR_LAYOUT_BACKGROUND;
- if (!Find(aName, SD_STYLE_FAMILY_MASTERPAGE))
+ if (!Find(aName, SfxStyleFamily::Page))
{
bCreated = true;
- pSheet = &Make(aName, SD_STYLE_FAMILY_MASTERPAGE,nUsedMask);
+ pSheet = &Make(aName, SfxStyleFamily::Page,nUsedMask);
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_BACKGROUND );
pSheet->SetParent( OUString() );
SfxItemSet& rBackgroundSet = pSheet->GetItemSet();
@@ -521,12 +521,12 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
void SdStyleSheetPool::CopyGraphicSheets(SdStyleSheetPool& rSourcePool)
{
- CopySheets( rSourcePool, SD_STYLE_FAMILY_GRAPHICS );
+ CopySheets( rSourcePool, SfxStyleFamily::Para );
}
void SdStyleSheetPool::CopyCellSheets(SdStyleSheetPool& rSourcePool)
{
- CopySheets( rSourcePool, SD_STYLE_FAMILY_CELL );
+ CopySheets( rSourcePool, SfxStyleFamily::Frame );
}
void SdStyleSheetPool::CopyTableStyles(SdStyleSheetPool const & rSourcePool)
@@ -588,12 +588,12 @@ void SdStyleSheetPool::CopyTableStyles(SdStyleSheetPool const & rSourcePool)
void SdStyleSheetPool::CopyCellSheets(SdStyleSheetPool& rSourcePool, SdStyleSheetVector& rCreatedSheets)
{
- CopySheets( rSourcePool, SD_STYLE_FAMILY_CELL, rCreatedSheets );
+ CopySheets( rSourcePool, SfxStyleFamily::Frame, rCreatedSheets );
}
void SdStyleSheetPool::RenameAndCopyGraphicSheets(SdStyleSheetPool& rSourcePool, SdStyleSheetVector& rCreatedSheets, OUString const &rRenameSuffix)
{
- CopySheets( rSourcePool, SD_STYLE_FAMILY_GRAPHICS, rCreatedSheets, rRenameSuffix );
+ CopySheets( rSourcePool, SfxStyleFamily::Para, rCreatedSheets, rRenameSuffix );
}
void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily )
@@ -740,15 +740,15 @@ void SdStyleSheetPool::CopyLayoutSheets(const OUString& rLayoutName, SdStyleShee
for (std::vector<OUString>::const_iterator it = aNameList.begin(); it != aNameList.end(); ++it)
{
- pSheet = Find(*it, SD_STYLE_FAMILY_MASTERPAGE);
+ pSheet = Find(*it, SfxStyleFamily::Page);
if (!pSheet)
{
- SfxStyleSheetBase* pSourceSheet = rSourcePool.Find(*it, SD_STYLE_FAMILY_MASTERPAGE);
+ SfxStyleSheetBase* pSourceSheet = rSourcePool.Find(*it, SfxStyleFamily::Page);
DBG_ASSERT(pSourceSheet, "CopyLayoutSheets: Style sheet missing");
if (pSourceSheet)
{
// In the case one comes with Methusalem-Docs.
- SfxStyleSheetBase& rNewSheet = Make(*it, SD_STYLE_FAMILY_MASTERPAGE);
+ SfxStyleSheetBase& rNewSheet = Make(*it, SfxStyleFamily::Page);
OUString file;
rNewSheet.SetHelpId( file, pSourceSheet->GetHelpId( file ) );
rNewSheet.GetItemSet().Put(pSourceSheet->GetItemSet());
@@ -816,7 +816,7 @@ void SdStyleSheetPool::CreateLayoutSheetList(const OUString& rLayoutName, SdStyl
{
OUString aLayoutNameWithSep(rLayoutName + SD_LT_SEPARATOR);
- SfxStyleSheetIterator aIter(this, SD_STYLE_FAMILY_MASTERPAGE);
+ SfxStyleSheetIterator aIter(this, SfxStyleFamily::Page);
SfxStyleSheetBase* pSheet = aIter.First();
while (pSheet)
@@ -843,60 +843,60 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
sal_uInt16 nUsedMask = SFXSTYLEBIT_USED;
aName = SdResId(STR_PSEUDOSHEET_TITLE);
- if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == nullptr )
+ if( (pSheet = Find(aName, SfxStyleFamily::Pseudo)) == nullptr )
{
- pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
+ pSheet = &Make(aName, SfxStyleFamily::Pseudo, nUsedMask);
pSheet->SetParent( OUString() );
static_cast<SfxStyleSheet*>(pSheet)->StartListening(*this);
}
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_TITLE );
aName = SdResId(STR_PSEUDOSHEET_SUBTITLE);
- if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == nullptr )
+ if( (pSheet = Find(aName, SfxStyleFamily::Pseudo)) == nullptr )
{
- pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
+ pSheet = &Make(aName, SfxStyleFamily::Pseudo, nUsedMask);
pSheet->SetParent( OUString() );
static_cast<SfxStyleSheet*>(pSheet)->StartListening(*this);
}
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_SUBTITLE );
aName = SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS);
- if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == nullptr )
+ if( (pSheet = Find(aName, SfxStyleFamily::Pseudo)) == nullptr )
{
- pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
+ pSheet = &Make(aName, SfxStyleFamily::Pseudo, nUsedMask);
pSheet->SetParent( OUString() );
static_cast<SfxStyleSheet*>(pSheet)->StartListening(*this);
}
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_BACKGROUNDOBJECTS );
aName = SdResId(STR_PSEUDOSHEET_BACKGROUND);
- if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == nullptr )
+ if( (pSheet = Find(aName, SfxStyleFamily::Pseudo)) == nullptr )
{
- pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
+ pSheet = &Make(aName, SfxStyleFamily::Pseudo, nUsedMask);
pSheet->SetParent( OUString() );
static_cast<SfxStyleSheet*>(pSheet)->StartListening(*this);
}
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_BACKGROUND );
aName = SdResId(STR_PSEUDOSHEET_NOTES);
- if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == nullptr )
+ if( (pSheet = Find(aName, SfxStyleFamily::Pseudo)) == nullptr )
{
- pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
+ pSheet = &Make(aName, SfxStyleFamily::Pseudo, nUsedMask);
pSheet->SetParent( OUString() );
static_cast<SfxStyleSheet*>(pSheet)->StartListening(*this);
}
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_NOTES );
pParent = nullptr;
- SetSearchMask(SD_STYLE_FAMILY_PSEUDO);
+ SetSearchMask(SfxStyleFamily::Pseudo);
aName = SdResId(STR_PSEUDOSHEET_OUTLINE);
for (sal_Int32 nLevel = 1; nLevel < 10; nLevel++)
{
OUString aLevelName( aName + " " + OUString::number( nLevel ) );
- if( (pSheet = Find(aLevelName, SD_STYLE_FAMILY_PSEUDO)) == nullptr )
+ if( (pSheet = Find(aLevelName, SfxStyleFamily::Pseudo)) == nullptr )
{
- pSheet = &Make(aLevelName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
+ pSheet = &Make(aLevelName, SfxStyleFamily::Pseudo, nUsedMask);
if (pSheet)
{
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 8910ac419a42..042512f05b8e 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -175,7 +175,7 @@ bool SdStyleSheet::SetParent(const OUString& rParentName)
if (SfxStyleSheet::SetParent(rParentName))
{
// PseudoStyleSheets do not have their own ItemSets
- if (nFamily != SD_STYLE_FAMILY_PSEUDO)
+ if (nFamily != SfxStyleFamily::Pseudo)
{
if( !rParentName.isEmpty() )
{
@@ -208,7 +208,7 @@ bool SdStyleSheet::SetParent(const OUString& rParentName)
*/
SfxItemSet& SdStyleSheet::GetItemSet()
{
- if (nFamily == SD_STYLE_FAMILY_GRAPHICS || nFamily == SD_STYLE_FAMILY_MASTERPAGE)
+ if (nFamily == SfxStyleFamily::Para || nFamily == SfxStyleFamily::Page)
{
// we create the ItemSet 'on demand' if necessary
if (!pSet)
@@ -229,7 +229,7 @@ SfxItemSet& SdStyleSheet::GetItemSet()
return *pSet;
}
- else if( nFamily == SD_STYLE_FAMILY_CELL )
+ else if( nFamily == SfxStyleFamily::Frame )
{
if (!pSet)
{
@@ -367,7 +367,7 @@ SdStyleSheet* SdStyleSheet::GetRealStyleSheet() const
{
/* no page available yet. This can happen when actualizing the
document templates. */
- SfxStyleSheetIterator aIter(pPool, SD_STYLE_FAMILY_MASTERPAGE);
+ SfxStyleSheetIterator aIter(pPool, SfxStyleFamily::Page);
SfxStyleSheetBase* pSheet = aIter.First();
if( pSheet )
aRealStyle = pSheet->GetName();
@@ -417,12 +417,12 @@ SdStyleSheet* SdStyleSheet::GetRealStyleSheet() const
}
aRealStyle += aInternalName;
- pRealStyle = static_cast< SdStyleSheet* >( pPool->Find(aRealStyle, SD_STYLE_FAMILY_MASTERPAGE) );
+ pRealStyle = static_cast< SdStyleSheet* >( pPool->Find(aRealStyle, SfxStyleFamily::Page) );
#ifdef DBG_UTIL
if( !pRealStyle )
{
- SfxStyleSheetIterator aIter(pPool, SD_STYLE_FAMILY_MASTERPAGE);
+ SfxStyleSheetIterator aIter(pPool, SfxStyleFamily::Page);
if( aIter.Count() > 0 )
// StyleSheet not found, but pool already loaded
DBG_ASSERT(pRealStyle, "Internal StyleSheet not found");
@@ -479,7 +479,7 @@ SdStyleSheet* SdStyleSheet::GetPseudoStyleSheet() const
}
}
- pPseudoStyle = static_cast<SdStyleSheet*>(pPool->Find(aStyleName, SD_STYLE_FAMILY_PSEUDO));
+ pPseudoStyle = static_cast<SdStyleSheet*>(pPool->Find(aStyleName, SfxStyleFamily::Pseudo));
DBG_ASSERT(pPseudoStyle, "PseudoStyleSheet missing");
return pPseudoStyle;
@@ -490,7 +490,7 @@ void SdStyleSheet::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
// first, base class functionality
SfxStyleSheet::Notify(rBC, rHint);
- if (nFamily != SD_STYLE_FAMILY_PSEUDO)
+ if (nFamily != SfxStyleFamily::Pseudo)
return;
/* if the dummy gets a notify about a changed attribute, he takes care that
@@ -517,14 +517,14 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, bool bOnlyMissingItems)
height. */
SfxStyleFamily eFamily = nFamily;
OUString aStyleName(aName);
- if (eFamily == SD_STYLE_FAMILY_PSEUDO)
+ if (eFamily == SfxStyleFamily::Pseudo)
{
SfxStyleSheet* pRealStyle = GetRealStyleSheet();
eFamily = pRealStyle->GetFamily();
aStyleName = pRealStyle->GetName();
}
- if (eFamily == SD_STYLE_FAMILY_MASTERPAGE &&
+ if (eFamily == SfxStyleFamily::Page &&
aStyleName.indexOf(STR_LAYOUT_OUTLINE) != -1 &&
rSet.GetItemState(EE_CHAR_FONTHEIGHT) == SfxItemState::SET)
{
@@ -635,12 +635,12 @@ OUString SdStyleSheet::GetFamilyString( SfxStyleFamily eFamily )
{
switch( eFamily )
{
- case SD_STYLE_FAMILY_CELL:
+ case SfxStyleFamily::Frame:
return OUString( "cell" );
default:
OSL_FAIL( "SdStyleSheet::GetFamilyString(), illegal family!" );
SAL_FALLTHROUGH;
- case SD_STYLE_FAMILY_GRAPHICS:
+ case SfxStyleFamily::Para:
return OUString( "graphics" );
}
}
@@ -951,7 +951,7 @@ void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, con
if( pEntry->nWID == WID_STYLE_FAMILY )
throw PropertyVetoException();
- if( (pEntry->nWID == EE_PARA_NUMBULLET) && (GetFamily() == SD_STYLE_FAMILY_MASTERPAGE) )
+ if( (pEntry->nWID == EE_PARA_NUMBULLET) && (GetFamily() == SfxStyleFamily::Page) )
{
OUString aStr;
const sal_uInt32 nTempHelpId = GetHelpId( aStr );
@@ -1028,7 +1028,7 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName )
if( pEntry->nWID == WID_STYLE_FAMILY )
{
- if( nFamily == SD_STYLE_FAMILY_MASTERPAGE )
+ if( nFamily == SfxStyleFamily::Page )
{
const OUString aLayoutName( GetName() );
aAny <<= aLayoutName.copy( 0, aLayoutName.indexOf( SD_LT_SEPARATOR) );
@@ -1041,7 +1041,7 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName )
else if( pEntry->nWID == WID_STYLE_DISPNAME )
{
OUString aDisplayName;
- if ( nFamily == SD_STYLE_FAMILY_MASTERPAGE )
+ if ( nFamily == SfxStyleFamily::Page )
{
const SdStyleSheet* pStyleSheet = GetPseudoStyleSheet();
if (pStyleSheet != nullptr)
@@ -1298,7 +1298,7 @@ void SdStyleSheet::BroadcastSdStyleSheetChange(SfxStyleSheetBase const * pStyleS
{
OUString aName( sStyleName + OUString::number(n) );
- SfxStyleSheetBase* pSheet = pSSPool->Find( aName, SD_STYLE_FAMILY_PSEUDO);
+ SfxStyleSheetBase* pSheet = pSSPool->Find( aName, SfxStyleFamily::Pseudo);
if(pSheet)
{
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index ef16cadef0d6..e3cc6508a771 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -601,7 +601,7 @@ bool ImplSdPPTImport::Import()
if ( nMasterNum == 1 )
{
// standardsheet
- pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find(SdResId(STR_STANDARD_STYLESHEET_NAME), SD_STYLE_FAMILY_GRAPHICS ));
+ pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find(SdResId(STR_STANDARD_STYLESHEET_NAME), SfxStyleFamily::Para ));
if ( pSheet )
{
SfxItemSet& rItemSet = pSheet->GetItemSet();
@@ -614,7 +614,7 @@ bool ImplSdPPTImport::Import()
}
// PSEUDO
- pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find(SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS), SD_STYLE_FAMILY_PSEUDO ));
+ pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find(SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS), SfxStyleFamily::Pseudo ));
if ( pSheet )
{
SfxItemSet& rItemSet = pSheet->GetItemSet();
@@ -679,7 +679,7 @@ bool ImplSdPPTImport::Import()
OUString aName( pPage->GetLayoutName() );
aName += " ";
aName += OUString::number( nLevel + 1 );
- SfxStyleSheet* pOutlineSheet = static_cast<SfxStyleSheet*>( mpDoc->GetStyleSheetPool()->Find( aName, SD_STYLE_FAMILY_MASTERPAGE ) );
+ SfxStyleSheet* pOutlineSheet = static_cast<SfxStyleSheet*>( mpDoc->GetStyleSheetPool()->Find( aName, SfxStyleFamily::Page ) );
DBG_ASSERT( pOutlineSheet, "Template for outline object not found" );
if ( pOutlineSheet )
{
@@ -2249,7 +2249,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
OUString aName( pPage->GetLayoutName() );
aName += " ";
aName += OUString::number( nLevel );
- pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find( aName, SD_STYLE_FAMILY_MASTERPAGE ));
+ pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find( aName, SfxStyleFamily::Page ));
if ( pSheet )
pText->StartListening( *pSheet );
pStyleSheetAry[ nLevel - 1 ] = pSheet;
@@ -2288,10 +2288,10 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
case PRESOBJ_SLIDENUMBER :
case PRESOBJ_FOOTER :
case PRESOBJ_HEADER :
- pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find(SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS), SD_STYLE_FAMILY_PSEUDO ));
+ pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find(SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS), SfxStyleFamily::Pseudo ));
break;
default :
- pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find(SdResId(STR_STANDARD_STYLESHEET_NAME), SD_STYLE_FAMILY_GRAPHICS ));
+ pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find(SdResId(STR_STANDARD_STYLESHEET_NAME), SfxStyleFamily::Para ));
}
}
break;
diff --git a/sd/source/filter/xml/sdtransform.cxx b/sd/source/filter/xml/sdtransform.cxx
index 920ae5980530..c2ce55e066cd 100644
--- a/sd/source/filter/xml/sdtransform.cxx
+++ b/sd/source/filter/xml/sdtransform.cxx
@@ -122,8 +122,8 @@ void SdTransformOOo2xDocument::transformDrawPages()
void SdTransformOOo2xDocument::transformStyles()
{
- transformStyles( SD_STYLE_FAMILY_GRAPHICS );
- transformStyles( SD_STYLE_FAMILY_MASTERPAGE );
+ transformStyles( SfxStyleFamily::Para );
+ transformStyles( SfxStyleFamily::Page );
}
void SdTransformOOo2xDocument::transformStyles( SfxStyleFamily eFam )
diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx
index 1ca852217a17..175cdd88f6b3 100644
--- a/sd/source/ui/dlg/dlgolbul.cxx
+++ b/sd/source/ui/dlg/dlgolbul.cxx
@@ -97,7 +97,7 @@ OutlineBulletDlg::OutlineBulletDlg(
if(bOutliner)
{
SfxStyleSheetBasePool* pSSPool = pView->GetDocSh()->GetStyleSheetPool();
- SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( STR_LAYOUT_OUTLINE " 1", SD_STYLE_FAMILY_PSEUDO);
+ SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( STR_LAYOUT_OUTLINE " 1", SfxStyleFamily::Pseudo);
if( pFirstStyleSheet )
pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pItem));
}
diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
index 039f72dbd650..f6297ec9ddd2 100644
--- a/sd/source/ui/dlg/prltempl.cxx
+++ b/sd/source/ui/dlg/prltempl.cxx
@@ -99,7 +99,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh,
if( SfxItemState::SET != aInputSet.GetItemState(EE_PARA_NUMBULLET, false, &pItem ))
{
OUString aStyleName(SdResId(STR_PSEUDOSHEET_OUTLINE) + " 1");
- SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( aStyleName, SD_STYLE_FAMILY_PSEUDO);
+ SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( aStyleName, SfxStyleFamily::Pseudo);
if(pFirstStyleSheet)
if( SfxItemState::SET == pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, &pItem) )
diff --git a/sd/source/ui/dlg/unchss.cxx b/sd/source/ui/dlg/unchss.cxx
index d1d9b8e53358..b3392c51894f 100644
--- a/sd/source/ui/dlg/unchss.cxx
+++ b/sd/source/ui/dlg/unchss.cxx
@@ -99,7 +99,7 @@ void StyleSheetUndoAction::Undo()
SdrModel::MigrateItemSet( mpOldSet.get(), &aNewSet, mpDoc );
mpStyleSheet->GetItemSet().Set(aNewSet);
- if( mpStyleSheet->GetFamily() == SD_STYLE_FAMILY_PSEUDO )
+ if( mpStyleSheet->GetFamily() == SfxStyleFamily::Pseudo )
static_cast<SdStyleSheet*>(mpStyleSheet)->GetRealStyleSheet()->Broadcast(SfxHint(SfxHintId::DataChanged));
else
mpStyleSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
@@ -111,7 +111,7 @@ void StyleSheetUndoAction::Redo()
SdrModel::MigrateItemSet( mpNewSet.get(), &aNewSet, mpDoc );
mpStyleSheet->GetItemSet().Set(aNewSet);
- if( mpStyleSheet->GetFamily() == SD_STYLE_FAMILY_PSEUDO )
+ if( mpStyleSheet->GetFamily() == SfxStyleFamily::Pseudo )
static_cast<SdStyleSheet*>(mpStyleSheet)->GetRealStyleSheet()->Broadcast(SfxHint(SfxHintId::DataChanged));
else
mpStyleSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
diff --git a/sd/source/ui/docshell/grdocsh.cxx b/sd/source/ui/docshell/grdocsh.cxx
index f1ce852ca48c..fe533b17a5ad 100644
--- a/sd/source/ui/docshell/grdocsh.cxx
+++ b/sd/source/ui/docshell/grdocsh.cxx
@@ -55,7 +55,7 @@ GraphicDocShell::GraphicDocShell(SfxObjectCreateMode eMode,
DocumentType eDocType) :
DrawDocShell(eMode, bDataObject, eDocType)
{
- SetStyleFamily( SD_STYLE_FAMILY_GRAPHICS );
+ SetStyleFamily( SfxStyleFamily::Para );
}
GraphicDocShell::GraphicDocShell(SfxModelFlags nModelCreationFlags,
@@ -63,7 +63,7 @@ GraphicDocShell::GraphicDocShell(SfxModelFlags nModelCreationFlags,
DocumentType eDocType) :
DrawDocShell(nModelCreationFlags, bDataObject, eDocType)
{
- SetStyleFamily( SD_STYLE_FAMILY_GRAPHICS );
+ SetStyleFamily( SfxStyleFamily::Para );
}
GraphicDocShell::~GraphicDocShell()
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index b9b52738a0b1..1377429ed056 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -479,7 +479,7 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj)
OUString aName(SdResId(STR_POOLSHEET_MEASURE));
SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>( pPage->GetModel()->
GetStyleSheetPool()->
- Find(aName, SD_STYLE_FAMILY_GRAPHICS));
+ Find(aName, SfxStyleFamily::Para));
DBG_ASSERT(pSheet, "StyleSheet missing");
if (pSheet)
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index dc005c0e968d..8f376fb3d72a 100644
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -320,7 +320,7 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj,
aName = aName.copy(0, n) + STR_LAYOUT_BACKGROUNDOBJECTS;
SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pPage->GetModel()->
GetStyleSheetPool()->
- Find(aName, SD_STYLE_FAMILY_MASTERPAGE));
+ Find(aName, SfxStyleFamily::Page));
DBG_ASSERT(pSheet, "StyleSheet missing");
if (pSheet)
{
@@ -350,7 +350,7 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj,
OUString aName(SdResId(STR_POOLSHEET_OBJWITHOUTFILL));
SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pPage->GetModel()->
GetStyleSheetPool()->
- Find(aName, SD_STYLE_FAMILY_GRAPHICS));
+ Find(aName, SfxStyleFamily::Para));
DBG_ASSERT(pSheet, "Stylesheet missing");
if (pSheet)
{
diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index 46dc6495a489..2da671bafa29 100644
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -329,7 +329,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u
if(bOutliner)
{
SfxStyleSheetBasePool* pSSPool = mpView->GetDocSh()->GetStyleSheetPool();
- SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( STR_LAYOUT_OUTLINE " 1", SD_STYLE_FAMILY_PSEUDO);
+ SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( STR_LAYOUT_OUTLINE " 1", SfxStyleFamily::Pseudo);
if( pFirstStyleSheet )
pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pItem));
}
diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx
index 8f18c041790e..7d27ee9c07fa 100644
--- a/sd/source/ui/func/fuprobjs.cxx
+++ b/sd/source/ui/func/fuprobjs.cxx
@@ -128,7 +128,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
}
SfxStyleSheetBasePool* pStyleSheetPool = mpDocSh->GetStyleSheetPool();
- SfxStyleSheetBase* pStyleSheet = pStyleSheetPool->Find( aStyleName, SD_STYLE_FAMILY_MASTERPAGE );
+ SfxStyleSheetBase* pStyleSheet = pStyleSheetPool->Find( aStyleName, SfxStyleFamily::Page );
DBG_ASSERT(pStyleSheet, "StyleSheet missing");
if( pStyleSheet )
diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx
index a7f8412d5d82..89c798af391d 100644
--- a/sd/source/ui/func/futempl.cxx
+++ b/sd/source/ui/func/futempl.cxx
@@ -114,9 +114,9 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
{
OUString sFamily = static_cast<const SfxStringItem &>( pArgs->Get( SID_STYLE_FAMILYNAME ) ).GetValue();
if (sFamily == "graphics")
- nFamily = SD_STYLE_FAMILY_GRAPHICS;
+ nFamily = SfxStyleFamily::Para;
else
- nFamily = SD_STYLE_FAMILY_PSEUDO;
+ nFamily = SfxStyleFamily::Pseudo;
}
OUString aStyleName;
@@ -226,7 +226,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
pStyleSheet = pSSPool->Find( aStyleName, nFamily);
// do not set presentation styles, they will be set implicit
- if ( pStyleSheet && pStyleSheet->GetFamily() != SD_STYLE_FAMILY_PSEUDO )
+ if ( pStyleSheet && pStyleSheet->GetFamily() != SfxStyleFamily::Pseudo )
{
SfxStyleSheet* pOldStyleSheet = mpView->GetStyleSheet();
OUString aStr;
@@ -238,10 +238,10 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
pStyleSheet->GetFamily() == pOldStyleSheet->GetFamily() ||
// allow if old was background objects and new is graphics
- (pStyleSheet->GetFamily() == SD_STYLE_FAMILY_GRAPHICS && pOldStyleSheet->GetHelpId( aStr ) == HID_PSEUDOSHEET_BACKGROUNDOBJECTS) ||
+ (pStyleSheet->GetFamily() == SfxStyleFamily::Para && pOldStyleSheet->GetHelpId( aStr ) == HID_PSEUDOSHEET_BACKGROUNDOBJECTS) ||
// allow if old was presentation and we are a drawing document
- (pOldStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE && mpDoc->GetDocumentType() == DocumentType::Draw) )
+ (pOldStyleSheet->GetFamily() == SfxStyleFamily::Page && mpDoc->GetDocumentType() == DocumentType::Draw) )
{
mpView->SetStyleSheet( static_cast<SfxStyleSheet*>(pStyleSheet));
mpDoc->SetChanged();
@@ -261,7 +261,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
pStyleSheet = pSSPool->Find( aStyleName, nFamily);
}
// no presentation object templates, they are only allowed implicitly
- if( pStyleSheet && pStyleSheet->GetFamily() != SD_STYLE_FAMILY_PSEUDO )
+ if( pStyleSheet && pStyleSheet->GetFamily() != SfxStyleFamily::Pseudo )
{
static_cast<SdStyleSheetPool*>( pSSPool )->SetActualStyleSheet( pStyleSheet );
@@ -302,11 +302,11 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
SfxStyleFamily eFamily = pStyleSheet->GetFamily();
- if (eFamily == SD_STYLE_FAMILY_GRAPHICS)
+ if (eFamily == SfxStyleFamily::Para)
{
pStdDlg.disposeAndReset(pFact ? pFact->CreateSdTabTemplateDlg(mpViewShell->GetActiveWindow(), mpDoc->GetDocSh(), *pStyleSheet, mpDoc, mpView) : nullptr);
}
- else if (eFamily == SD_STYLE_FAMILY_PSEUDO)
+ else if (eFamily == SfxStyleFamily::Pseudo)
{
OUString aName(pStyleSheet->GetName());
bool bBackground = false;
@@ -385,7 +385,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
{
nRetMask = pStyleSheet->GetMask();
- if (eFamily == SD_STYLE_FAMILY_PSEUDO)
+ if (eFamily == SfxStyleFamily::Pseudo)
{
SfxItemSet aTempSet(*pOutSet);
/* Extract SvxBrushItem out of set and insert SvxBackgroundColorItem */
@@ -413,7 +413,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
SvxNumRule aRule(*aTempSet.GetItem<SvxNumBulletItem>(EE_PARA_NUMBULLET)->GetNumRule());
OUString sStyleName(SdResId(STR_PSEUDOSHEET_OUTLINE) + " 1");
- SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( sStyleName, SD_STYLE_FAMILY_PSEUDO);
+ SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( sStyleName, SfxStyleFamily::Pseudo);
if(pFirstStyleSheet)
{
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index be4785c732fc..2b0b22635c84 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -1034,7 +1034,7 @@ void SdXShape::SetStyleSheet( const uno::Any& rAny )
const SfxStyleSheet* pOldStyleSheet = pObj->GetStyleSheet();
if( pOldStyleSheet != pStyleSheet )
{
- if( pStyleSheet == nullptr || (pStyleSheet->GetFamily() != SD_STYLE_FAMILY_GRAPHICS && pStyleSheet->GetFamily() != SD_STYLE_FAMILY_MASTERPAGE) )
+ if( pStyleSheet == nullptr || (pStyleSheet->GetFamily() != SfxStyleFamily::Para && pStyleSheet->GetFamily() != SfxStyleFamily::Page) )
throw lang::IllegalArgumentException();
pObj->SetStyleSheet( pStyleSheet, false );
@@ -1060,7 +1060,7 @@ uno::Any SdXShape::GetStyleSheet() const
SfxStyleSheet* pStyleSheet = pObj->GetStyleSheet();
// it is possible for shapes inside a draw to have a presentation style
// but we don't want this for the api
- if( (pStyleSheet == nullptr) || ((pStyleSheet->GetFamily() != SD_STYLE_FAMILY_GRAPHICS) && !mpModel->IsImpressDocument()) )
+ if( (pStyleSheet == nullptr) || ((pStyleSheet->GetFamily() != SfxStyleFamily::Para) && !mpModel->IsImpressDocument()) )
return Any();
return Any( uno::Reference< style::XStyle >( dynamic_cast< SfxUnoStyleSheet* >( pStyleSheet ) ) );
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 506891188a3d..fd1f877ec78b 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -2908,7 +2908,7 @@ void SdMasterPage::setBackground( const Any& rValue )
OUString aLayoutName( static_cast< SdPage* >( SvxFmDrawPage::mpPage )->GetLayoutName() );
aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR)+4);
aLayoutName += STR_LAYOUT_BACKGROUND;
- SfxStyleSheetBase* pStyleSheet = pSSPool->Find( aLayoutName, SD_STYLE_FAMILY_MASTERPAGE );
+ SfxStyleSheetBase* pStyleSheet = pSSPool->Find( aLayoutName, SfxStyleFamily::Page );
if( pStyleSheet )
{
@@ -2952,7 +2952,7 @@ void SdMasterPage::getBackground( Any& rValue )
OUString aLayoutName( static_cast< SdPage* >(SvxFmDrawPage::mpPage)->GetLayoutName() );
aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR)+4);
aLayoutName += STR_LAYOUT_BACKGROUND;
- SfxStyleSheetBase* pStyleSheet = pSSPool->Find( aLayoutName, SD_STYLE_FAMILY_MASTERPAGE );
+ SfxStyleSheetBase* pStyleSheet = pSSPool->Find( aLayoutName, SfxStyleFamily::Page );
if( pStyleSheet )
{
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index c3db13f13da1..d635b1bdf804 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -195,7 +195,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
sal_Int16 nDepth = pOutliner->GetDepth( nParaPos );
OUString aName = rPage.GetLayoutName() + " " +
OUString::number((nDepth <= 0) ? 1 : nDepth + 1);
- SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pStShPool->Find(aName, SD_STYLE_FAMILY_MASTERPAGE));
+ SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pStShPool->Find(aName, SfxStyleFamily::Page));
//We have no stylesheet if we access outline level 10
//in the master preview, there is no true style backing
//that entry
@@ -225,7 +225,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
{
OUString aSheetName = rPage.GetLayoutName() + " " +
OUString::number((nChild <= 0) ? 1 : nChild + 1);
- SfxStyleSheet* pOutlSheet = static_cast< SfxStyleSheet* >(pStShPool->Find(aSheetName, SD_STYLE_FAMILY_MASTERPAGE));
+ SfxStyleSheet* pOutlSheet = static_cast< SfxStyleSheet* >(pStShPool->Find(aSheetName, SfxStyleFamily::Page));
if( pOutlSheet )
pOutlSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
@@ -304,7 +304,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
OUString aName = rPage.GetLayoutName() + " " +
OUString::number(nLevel);
SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pStShPool->
- Find(aName, SD_STYLE_FAMILY_MASTERPAGE));
+ Find(aName, SfxStyleFamily::Page));
DBG_ASSERT(pSheet, "StyleSheet not found");
SfxItemSet aTempSet( pSheet->GetItemSet() );
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index f88384daf008..bd90cfdfc1f7 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -363,7 +363,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
const SvxNumBulletItem *pItem = nullptr;
SfxStyleSheetBasePool* pSSPool = mpView->GetDocSh()->GetStyleSheetPool();
OUString sStyleName(SdResId(STR_PSEUDOSHEET_OUTLINE) + " 1");
- SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find(sStyleName, SD_STYLE_FAMILY_PSEUDO);
+ SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find(sStyleName, SfxStyleFamily::Pseudo);
if( pFirstStyleSheet )
pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pItem));
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 02d514ae611c..3d50e77825c5 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -2931,7 +2931,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( rReq.GetSlot() == SID_STYLE_EDIT && !rReq.GetArgs() )
{
SfxStyleSheet* pStyleSheet = mpDrawView->GetStyleSheet();
- if( pStyleSheet && pStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE)
+ if( pStyleSheet && pStyleSheet->GetFamily() == SfxStyleFamily::Page)
pStyleSheet = static_cast<SdStyleSheet*>(pStyleSheet)->GetPseudoStyleSheet();
if( (pStyleSheet == nullptr) && GetView()->IsTextEdit() )
@@ -2939,7 +2939,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
GetView()->SdrEndTextEdit();
pStyleSheet = mpDrawView->GetStyleSheet();
- if(pStyleSheet && pStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE)
+ if(pStyleSheet && pStyleSheet->GetFamily() == SfxStyleFamily::Page)
pStyleSheet = static_cast<SdStyleSheet*>(pStyleSheet)->GetPseudoStyleSheet();
}
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 11b3e60813bb..5261ff37d6d2 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -443,16 +443,16 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
}
else
{
- if (pStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE)
+ if (pStyleSheet->GetFamily() == SfxStyleFamily::Page)
pStyleSheet = static_cast<SdStyleSheet*>(pStyleSheet)->GetPseudoStyleSheet();
if( pStyleSheet )
{
SfxStyleFamily eFamily = pStyleSheet->GetFamily();
- if ((eFamily == SD_STYLE_FAMILY_GRAPHICS && nSlotId == SID_STYLE_FAMILY2) ||
- (eFamily == SD_STYLE_FAMILY_CELL && nSlotId == SID_STYLE_FAMILY3) ||
- (eFamily == SD_STYLE_FAMILY_PSEUDO && nSlotId == SID_STYLE_FAMILY5))
+ if ((eFamily == SfxStyleFamily::Para && nSlotId == SID_STYLE_FAMILY2) ||
+ (eFamily == SfxStyleFamily::Frame && nSlotId == SID_STYLE_FAMILY3) ||
+ (eFamily == SfxStyleFamily::Pseudo && nSlotId == SID_STYLE_FAMILY5))
{
SfxTemplateItem aTmpItem ( nWhich, pStyleSheet->GetName() );
aAllSet.Put( aTmpItem, aTmpItem.Which() );
@@ -486,7 +486,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
std::unique_ptr<SfxPoolItem> pItem;
GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get());
- if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO)
+ if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SfxStyleFamily::Pseudo)
rSet.Put(SfxBoolItem(nWhich,false));
else
{
@@ -501,7 +501,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
std::unique_ptr<SfxPoolItem> pItem;
GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get());
- if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO)
+ if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SfxStyleFamily::Pseudo)
{
rSet.DisableItem(nWhich);
}
@@ -513,7 +513,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
std::unique_ptr<SfxPoolItem> pItem;
GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get());
- if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO)
+ if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SfxStyleFamily::Pseudo)
rSet.DisableItem(nWhich);
}
break;
@@ -528,11 +528,11 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get());
if (pFamilyItem)
{
- if (static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO)
+ if (static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SfxStyleFamily::Pseudo)
{
rSet.DisableItem(nWhich);
}
- else if (static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_GRAPHICS)
+ else if (static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SfxStyleFamily::Para)
{
if (!mpDrawView->AreObjectsMarked())
{
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index c65fe6c31b3d..242e7cccae41 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1474,7 +1474,7 @@ void OutlineViewShell::GetAttrState( SfxItemSet& rSet )
std::unique_ptr<SfxPoolItem> pItem;
GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get());
- if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO)
+ if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SfxStyleFamily::Pseudo)
{
SfxItemSet aSet(*rSet.GetPool(), svl::Items<SID_STATUS_LAYOUT, SID_STATUS_LAYOUT>{});
GetStatusBarState(aSet);
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx
index 719d46ef108b..f342cb53193f 100644
--- a/sd/source/ui/view/viewshe3.cxx
+++ b/sd/source/ui/view/viewshe3.cxx
@@ -99,7 +99,7 @@ void ViewShell::GetMenuState( SfxItemSet &rSet )
SfxStyleSheet* pStyleSheet = pDrView->GetStyleSheet();
if( pStyleSheet )
{
- if (pStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE)
+ if (pStyleSheet->GetFamily() == SfxStyleFamily::Page)
pStyleSheet = static_cast<SdStyleSheet*>(pStyleSheet)->GetPseudoStyleSheet();
if( pStyleSheet )
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index f335beaa3a54..7744f3fd6976 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -931,7 +931,7 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16&
if(bOutliner)
{
SfxStyleSheetBasePool* pSSPool = mpView->GetDocSh()->GetStyleSheetPool();
- SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( STR_LAYOUT_OUTLINE " 1", SD_STYLE_FAMILY_PSEUDO);
+ SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( STR_LAYOUT_OUTLINE " 1", SfxStyleFamily::Pseudo);
if( pFirstStyleSheet )
pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pItem));
}
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index aadcb6db70a0..2952244fd88c 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -52,9 +52,6 @@
using namespace ::com::sun::star;
-// shortcut
-#define RESOURCE SwViewShell::GetShellRes()
-
const sal_Char sCalc_Add[] = "add";
const sal_Char sCalc_Sub[] = "sub";
const sal_Char sCalc_Mul[] = "mul";
@@ -408,12 +405,12 @@ OUString SwCalc::GetStrResult( double nValue )
if( nValue >= DBL_MAX )
switch( m_eError )
{
- case SwCalcError::Syntax : return RESOURCE->aCalc_Syntax;
- case SwCalcError::DivByZero : return RESOURCE->aCalc_ZeroDiv;
- case SwCalcError::FaultyBrackets : return RESOURCE->aCalc_Brack;
- case SwCalcError::OverflowInPower : return RESOURCE->aCalc_Pow;
- case SwCalcError::Overflow : return RESOURCE->aCalc_Overflow;
- default : return RESOURCE->aCalc_Default;
+ case SwCalcError::Syntax : return SwViewShell::GetShellRes()->aCalc_Syntax;
+ case SwCalcError::DivByZero : return SwViewShell::GetShellRes()->aCalc_ZeroDiv;
+ case SwCalcError::FaultyBrackets : return SwViewShell::GetShellRes()->aCalc_Brack;
+ case SwCalcError::OverflowInPower : return SwViewShell::GetShellRes()->aCalc_Pow;
+ case SwCalcError::Overflow : return SwViewShell::GetShellRes()->aCalc_Overflow;
+ default : return SwViewShell::GetShellRes()->aCalc_Default;
}
const sal_Int32 nDecPlaces = 15;
diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx
index 119f72671683..bce229c2a9cd 100644
--- a/sw/source/filter/xml/xmlithlp.cxx
+++ b/sw/source/filter/xml/xmlithlp.cxx
@@ -40,40 +40,26 @@ using ::editeng::SvxBorderLine;
using namespace ::xmloff::token;
using namespace ::com::sun::star;
-#define API_LINE_NONE 0x7FFF
-#define API_LINE_SOLID 0
-#define API_LINE_DOTTED 1
-#define API_LINE_DASHED 2
-#define API_LINE_DOUBLE 3
-#define API_LINE_EMBOSSED 10
-#define API_LINE_ENGRAVED 11
-#define API_LINE_OUTSET 12
-#define API_LINE_INSET 13
-#define API_LINE_FINE_DASHED table::BorderLineStyle::FINE_DASHED
-#define API_LINE_DASH_DOT table::BorderLineStyle::DASH_DOT
-#define API_LINE_DASH_DOT_DOT table::BorderLineStyle::DASH_DOT_DOT
-#define API_LINE_DOUBLE_THIN table::BorderLineStyle::DOUBLE_THIN
-
#define SVX_XML_BORDER_WIDTH_THIN 0
#define SVX_XML_BORDER_WIDTH_MIDDLE 1
#define SVX_XML_BORDER_WIDTH_THICK 2
const struct SvXMLEnumMapEntry<sal_uInt16> psXML_BorderStyles[] =
{
- { XML_NONE, API_LINE_NONE },
- { XML_HIDDEN, API_LINE_NONE },
- { XML_SOLID, API_LINE_SOLID },
- { XML_DOUBLE, API_LINE_DOUBLE },
- { XML_DOUBLE_THIN, API_LINE_DOUBLE_THIN },
- { XML_DOTTED, API_LINE_DOTTED },
- { XML_DASHED, API_LINE_DASHED },
- { XML_FINE_DASHED, API_LINE_FINE_DASHED },
- { XML_DASH_DOT, API_LINE_DASH_DOT },
- { XML_DASH_DOT_DOT, API_LINE_DASH_DOT_DOT },
- { XML_GROOVE, API_LINE_ENGRAVED },
- { XML_RIDGE, API_LINE_EMBOSSED },
- { XML_INSET, API_LINE_INSET },
- { XML_OUTSET, API_LINE_OUTSET },
+ { XML_NONE, table::BorderLineStyle::NONE },
+ { XML_HIDDEN, table::BorderLineStyle::NONE },
+ { XML_SOLID, table::BorderLineStyle::SOLID },
+ { XML_DOUBLE, table::BorderLineStyle::DOUBLE },
+ { XML_DOUBLE_THIN, table::BorderLineStyle::DOUBLE_THIN },
+ { XML_DOTTED, table::BorderLineStyle::DOTTED },
+ { XML_DASHED, table::BorderLineStyle::DASHED },
+ { XML_FINE_DASHED, table::BorderLineStyle::FINE_DASHED },
+ { XML_DASH_DOT, table::BorderLineStyle::DASH_DOT },
+ { XML_DASH_DOT_DOT, table::BorderLineStyle::DASH_DOT_DOT },
+ { XML_GROOVE, table::BorderLineStyle::ENGRAVED },
+ { XML_RIDGE, table::BorderLineStyle::EMBOSSED },
+ { XML_INSET, table::BorderLineStyle::INSET },
+ { XML_OUTSET, table::BorderLineStyle::OUTSET },
{ XML_TOKEN_INVALID, 0 }
};
@@ -150,7 +136,7 @@ bool sw_frmitems_parseXMLBorder( const OUString& rValue,
void sw_frmitems_setXMLBorderStyle( SvxBorderLine& rLine, sal_uInt16 nStyle )
{
SvxBorderLineStyle eStyle = SvxBorderLineStyle::NONE;
- if ( nStyle != API_LINE_NONE )
+ if ( nStyle != table::BorderLineStyle::NONE )
eStyle = SvxBorderLineStyle( nStyle );
rLine.SetBorderLineStyle(eStyle);
}
@@ -162,7 +148,7 @@ bool sw_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
bool bHasColor, const Color& rColor )
{
// first of all, delete an empty line
- if( (bHasStyle && API_LINE_NONE == nStyle) ||
+ if( (bHasStyle && table::BorderLineStyle::NONE == nStyle) ||
(bHasWidth && USHRT_MAX == nNamedWidth && 0 == nWidth) )
{
bool bRet = nullptr != rpLine;
@@ -186,10 +172,10 @@ bool sw_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
if( ( bHasWidth &&
(USHRT_MAX != nNamedWidth || (nWidth != rpLine->GetWidth() ) ) ) ||
( bHasStyle &&
- ((API_LINE_SOLID == nStyle && rpLine->GetDistance()) ||
- (API_LINE_DOUBLE == nStyle && !rpLine->GetDistance())) ) )
+ ((table::BorderLineStyle::SOLID == nStyle && rpLine->GetDistance()) ||
+ (table::BorderLineStyle::DOUBLE == nStyle && !rpLine->GetDistance())) ) )
{
- bool bDouble = (bHasWidth && API_LINE_DOUBLE == nStyle ) ||
+ bool bDouble = (bHasWidth && table::BorderLineStyle::DOUBLE == nStyle ) ||
rpLine->GetDistance();
// fdo#38542: for double borders, do not override the width