[Libreoffice-commits] core.git: cui/source editeng/source include/rsc include/sfx2 include/svl rsc/inc rsc/source sc/inc sc/source sd/inc sd/source sfx2/source svl/qa svl/source svx/qa svx/source sw/inc sw/source xmloff/source

Noel Grandin noel at peralex.com
Mon May 9 08:20:31 UTC 2016


 cui/source/tabpages/bbdlg.cxx                          |    2 
 cui/source/tabpages/paragrph.cxx                       |    2 
 editeng/source/editeng/editdbg.cxx                     |    2 
 editeng/source/editeng/editobj.cxx                     |    4 
 editeng/source/editeng/editundo.cxx                    |    4 
 editeng/source/editeng/eertfpar.cxx                    |    8 
 editeng/source/editeng/impedit4.cxx                    |    2 
 editeng/source/editeng/impedit5.cxx                    |    4 
 include/rsc/rscsfx.hxx                                 |   18 
 include/sfx2/styfitem.hxx                              |    4 
 include/svl/style.hxx                                  |    2 
 rsc/inc/rscdb.hxx                                      |    2 
 rsc/source/parser/rscicpx.cxx                          |   10 
 rsc/source/parser/rsclex.cxx                           |    2 
 sc/inc/stylehelper.hxx                                 |    6 
 sc/inc/styleuno.hxx                                    |    2 
 sc/source/core/data/attarray.cxx                       |    2 
 sc/source/core/data/documen4.cxx                       |    4 
 sc/source/core/data/documen8.cxx                       |   12 
 sc/source/core/data/document.cxx                       |    4 
 sc/source/core/data/dpoutput.cxx                       |    4 
 sc/source/core/data/fillinfo.cxx                       |    2 
 sc/source/core/data/patattr.cxx                        |    6 
 sc/source/core/data/stlpool.cxx                        |   32 -
 sc/source/core/data/stlsheet.cxx                       |   10 
 sc/source/core/data/table2.cxx                         |    6 
 sc/source/core/data/table3.cxx                         |    2 
 sc/source/core/data/table5.cxx                         |    8 
 sc/source/core/data/table6.cxx                         |    8 
 sc/source/core/tool/stylehelper.cxx                    |   10 
 sc/source/filter/excel/impop.cxx                       |    2 
 sc/source/filter/excel/xecontent.cxx                   |    2 
 sc/source/filter/excel/xepage.cxx                      |    2 
 sc/source/filter/excel/xestyle.cxx                     |    4 
 sc/source/filter/excel/xistyle.cxx                     |   10 
 sc/source/filter/ftools/ftools.cxx                     |    4 
 sc/source/filter/html/htmlexp.cxx                      |    8 
 sc/source/filter/html/htmlimp.cxx                      |    2 
 sc/source/filter/oox/stylesbuffer.cxx                  |   10 
 sc/source/filter/oox/worksheethelper.cxx               |    2 
 sc/source/filter/orcus/interface.cxx                   |    2 
 sc/source/filter/starcalc/scflt.cxx                    |   12 
 sc/source/filter/xml/xmlcondformat.cxx                 |    4 
 sc/source/filter/xml/xmlexprt.cxx                      |    4 
 sc/source/filter/xml/xmlfonte.cxx                      |    2 
 sc/source/ui/Accessibility/AccessiblePageHeader.cxx    |    2 
 sc/source/ui/app/transobj.cxx                          |    4 
 sc/source/ui/condformat/condformatdlgentry.cxx         |    8 
 sc/source/ui/docshell/docfunc.cxx                      |    2 
 sc/source/ui/docshell/docsh3.cxx                       |    2 
 sc/source/ui/docshell/docsh4.cxx                       |   22 -
 sc/source/ui/docshell/docsh6.cxx                       |    6 
 sc/source/ui/styleui/scstyles.src                      |    4 
 sc/source/ui/undo/undoblk.cxx                          |    4 
 sc/source/ui/undo/undocell.cxx                         |    2 
 sc/source/ui/undo/undostyl.cxx                         |    8 
 sc/source/ui/unoobj/cellsuno.cxx                       |   10 
 sc/source/ui/unoobj/fmtuno.cxx                         |    6 
 sc/source/ui/unoobj/servuno.cxx                        |    4 
 sc/source/ui/unoobj/styleuno.cxx                       |   66 +--
 sc/source/ui/view/formatsh.cxx                         |   32 -
 sc/source/ui/view/gridwin.cxx                          |    4 
 sc/source/ui/view/preview.cxx                          |   10 
 sc/source/ui/view/prevwsh.cxx                          |    6 
 sc/source/ui/view/printfun.cxx                         |    4 
 sc/source/ui/view/tabview2.cxx                         |    2 
 sc/source/ui/view/tabvwsha.cxx                         |    2 
 sd/inc/glob.hxx                                        |    8 
 sd/source/core/drawdoc3.cxx                            |    4 
 sd/source/filter/ppt/pptin.cxx                         |    2 
 sd/source/ui/app/res_bmp.src                           |    4 
 sd/source/ui/docshell/docshell.cxx                     |    2 
 sd/source/ui/func/futempl.cxx                          |   22 -
 sd/source/ui/inc/DrawDocShell.hxx                      |    6 
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |    2 
 sd/source/ui/view/drviewse.cxx                         |    2 
 sd/source/ui/view/outlnvsh.cxx                         |    2 
 sd/source/ui/view/viewshe3.cxx                         |    4 
 sfx2/source/dialog/styfitem.cxx                        |    5 
 sfx2/source/dialog/templdlg.cxx                        |   52 +-
 sfx2/source/doc/objcont.cxx                            |    2 
 svl/qa/unit/items/test_IndexedStyleSheets.cxx          |   18 
 svl/source/items/IndexedStyleSheets.cxx                |   15 
 svl/source/items/srchitem.cxx                          |    2 
 svl/source/items/style.cxx                             |    8 
 svx/qa/unit/svdraw/test_SdrTextObject.cxx              |   10 
 svx/source/dialog/srchdlg.cxx                          |   10 
 svx/source/sdr/properties/attributeproperties.cxx      |    2 
 svx/source/styles/CommonStylePreviewRenderer.cxx       |    2 
 svx/source/svdraw/svdobj.cxx                           |    2 
 svx/source/table/cell.cxx                              |    2 
 svx/source/table/tablecontroller.cxx                   |    2 
 svx/source/tbxctrls/tbcontrl.cxx                       |   14 
 sw/inc/docsh.hxx                                       |   20 -
 sw/inc/swabstdlg.hxx                                   |    7 
 sw/inc/view.hxx                                        |    4 
 sw/source/core/doc/docdesc.cxx                         |    4 
 sw/source/core/doc/docfmt.cxx                          |   22 -
 sw/source/core/doc/docnum.cxx                          |    6 
 sw/source/core/txtnode/fntcache.cxx                    |    2 
 sw/source/core/unocore/SwXTextDefaults.cxx             |    2 
 sw/source/core/unocore/unocoll.cxx                     |   12 
 sw/source/core/unocore/unocrsrhelper.cxx               |    4 
 sw/source/core/unocore/unoframe.cxx                    |    6 
 sw/source/core/unocore/unoobj.cxx                      |    6 
 sw/source/core/unocore/unosett.cxx                     |    8 
 sw/source/core/unocore/unostyle.cxx                    |  128 +++---
 sw/source/filter/xml/swxml.cxx                         |    8 
 sw/source/filter/xml/xmlfmt.cxx                        |   14 
 sw/source/filter/xml/xmlimp.cxx                        |   18 
 sw/source/filter/xml/xmlimp.hxx                        |   14 
 sw/source/ui/app/app.src                               |   10 
 sw/source/ui/chrdlg/numpara.cxx                        |    6 
 sw/source/ui/chrdlg/pardlg.cxx                         |    4 
 sw/source/ui/chrdlg/swuiccoll.cxx                      |    6 
 sw/source/ui/dbui/dbinsdlg.cxx                         |    2 
 sw/source/ui/dialog/swdlgfact.cxx                      |    2 
 sw/source/ui/dialog/swdlgfact.hxx                      |    2 
 sw/source/ui/fmtui/tmpdlg.cxx                          |   38 +-
 sw/source/ui/index/cnttab.cxx                          |    4 
 sw/source/ui/misc/docfnote.cxx                         |    6 
 sw/source/ui/misc/linenum.cxx                          |    8 
 sw/source/ui/misc/outline.cxx                          |    4 
 sw/source/uibase/app/docst.cxx                         |  160 ++++----
 sw/source/uibase/app/docstyle.cxx                      |  312 ++++++++---------
 sw/source/uibase/docvw/edtwin.cxx                      |   15 
 sw/source/uibase/inc/numpara.hxx                       |    2 
 sw/source/uibase/inc/tmpdlg.hxx                        |    4 
 sw/source/uibase/sidebar/StylePresetsPanel.cxx         |    2 
 sw/source/uibase/sidebar/ThemePanel.cxx                |    4 
 sw/source/uibase/uiview/formatclipboard.cxx            |    4 
 sw/source/uibase/uiview/viewcoll.cxx                   |    2 
 sw/source/uibase/uiview/viewsrch.cxx                   |    2 
 sw/source/uibase/utlui/tmplctrl.cxx                    |    2 
 sw/source/uibase/utlui/uitool.cxx                      |    2 
 xmloff/source/style/xmlstyle.cxx                       |    4 
 136 files changed, 792 insertions(+), 768 deletions(-)

New commits:
commit bcb41235deaf4b7ca90522bda3ba21a686819e6e
Author: Noel Grandin <noel at peralex.com>
Date:   Wed May 4 11:31:33 2016 +0200

    convert SfxStyleFamily to scoped enum
    
    and update the RSC compiler to accept such
    
    In the process fix some confusion in SD where it was confusing
    SfxStyleFamily and the index of the relevant family
    (which other parts of the code in SVL use)
    
    Change-Id: I1efc9f85fbed8ab76eafe8f6e1ada411753ae5f9

diff --git a/cui/source/tabpages/bbdlg.cxx b/cui/source/tabpages/bbdlg.cxx
index 8f3336d..23422c3 100644
--- a/cui/source/tabpages/bbdlg.cxx
+++ b/cui/source/tabpages/bbdlg.cxx
@@ -69,7 +69,7 @@ void SvxBorderBackgroundDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPa
     // The selection attribute lists (XPropertyList derivates, e.g. XColorList for
     // the color table) need to be added as items (e.g. SvxColorTableItem) to make
     // these pages find the needed attributes for fill style suggestions.
-    // These are added in SwDocStyleSheet::GetItemSet() for the SFX_STYLE_FAMILY_PARA on
+    // These are added in SwDocStyleSheet::GetItemSet() for the SfxStyleFamily::Para on
     // demand, but could also be directly added from the DrawModel.
     else if (nPageId == m_nAreaPageId)
     {
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index a85ec88..9e8f531 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1924,7 +1924,7 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage( vcl::Window* pParent, const SfxI
     if ( pSh )
     {
         SfxStyleSheetBasePool* pPool = pSh->GetStyleSheetPool();
-        pPool->SetSearchMask( SFX_STYLE_FAMILY_PAGE );
+        pPool->SetSearchMask( SfxStyleFamily::Page );
         SfxStyleSheetBase* pStyle = pPool->First();
         OUString aStdName;
 
diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index 64a7e2f..ef6ab7a 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -432,7 +432,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, bool bInfoBox )
         fprintf( fp, "\n==================   Stylesheets   =============================================" );
         fprintf( fp, "\n================================================================================" );
         fprintf( fp, "\n#Template:   %" SAL_PRIuUINT32 "\n", sal_uInt32(nStyles) );
-        SfxStyleSheetIterator aIter( pEE->pImpEditEngine->GetStyleSheetPool(), SFX_STYLE_FAMILY_ALL );
+        SfxStyleSheetIterator aIter( pEE->pImpEditEngine->GetStyleSheetPool(), SfxStyleFamily::All );
         SfxStyleSheetBase* pStyle = aIter.First();
         while ( pStyle )
         {
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index fe784e0..7190147 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -112,7 +112,7 @@ const XParaPortion& XParaPortionList::operator [](size_t i) const
 }
 
 ContentInfo::ContentInfo( SfxItemPool& rPool ) :
-    eFamily(SFX_STYLE_FAMILY_PARA),
+    eFamily(SfxStyleFamily::Para),
     aParaAttribs(rPool, EE_PARA_START, EE_CHAR_END)
 {
 }
@@ -1182,7 +1182,7 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const
 
         // StyleName and Family...
         write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, rC.GetStyle(), eEncoding);
-        rOStream.WriteUInt16( rC.GetFamily() );
+        rOStream.WriteUInt16( (sal_uInt16)rC.GetFamily() );
 
         // Paragraph attributes ...
         rC.GetParaAttribs().Store( rOStream );
diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx
index fdaeefa..faea53b 100644
--- a/editeng/source/editeng/editundo.cxx
+++ b/editeng/source/editeng/editundo.cxx
@@ -209,8 +209,8 @@ EditUndoConnectParas::EditUndoConnectParas(
     EditUndo(EDITUNDO_CONNECTPARAS, pEE),
     aLeftParaAttribs(rLeftParaAttribs),
     aRightParaAttribs(rRightParaAttribs),
-    eLeftStyleFamily(SFX_STYLE_FAMILY_ALL),
-    eRightStyleFamily(SFX_STYLE_FAMILY_ALL),
+    eLeftStyleFamily(SfxStyleFamily::All),
+    eRightStyleFamily(SfxStyleFamily::All),
     bBackward(bBkwrd)
 {
     nNode   = nN;
diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx
index fa8b36b..3f81d4d 100644
--- a/editeng/source/editeng/eertfpar.cxx
+++ b/editeng/source/editeng/eertfpar.cxx
@@ -370,7 +370,7 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
             auto const& pS = it->second;
             mpEditEngine->SetStyleSheet(
                 EditSelection(aStartPaM, aEndPaM),
-                static_cast<SfxStyleSheet*>(mpEditEngine->GetStyleSheetPool()->Find(pS->sName, SFX_STYLE_FAMILY_ALL)));
+                static_cast<SfxStyleSheet*>(mpEditEngine->GetStyleSheetPool()->Find(pS->sName, SfxStyleFamily::All)));
             nOutlLevel = pS->nOutlineNo;
         }
     }
@@ -443,7 +443,7 @@ SvxRTFStyleType* EditRTFParser::FindStyleSheet( const OUString& rName )
 SfxStyleSheet* EditRTFParser::CreateStyleSheet( SvxRTFStyleType* pRTFStyle )
 {
     // Check if a template exists, then it will not be changed!
-    SfxStyleSheet* pStyle = static_cast<SfxStyleSheet*>(mpEditEngine->GetStyleSheetPool()->Find( pRTFStyle->sName, SFX_STYLE_FAMILY_ALL ));
+    SfxStyleSheet* pStyle = static_cast<SfxStyleSheet*>(mpEditEngine->GetStyleSheetPool()->Find( pRTFStyle->sName, SfxStyleFamily::All ));
     if ( pStyle )
         return pStyle;
 
@@ -460,7 +460,7 @@ SfxStyleSheet* EditRTFParser::CreateStyleSheet( SvxRTFStyleType* pRTFStyle )
         }
     }
 
-    pStyle = static_cast<SfxStyleSheet*>( &mpEditEngine->GetStyleSheetPool()->Make( aName, SFX_STYLE_FAMILY_PARA ) );
+    pStyle = static_cast<SfxStyleSheet*>( &mpEditEngine->GetStyleSheetPool()->Make( aName, SfxStyleFamily::Para ) );
 
     // 1) convert and take over Items ...
     ConvertAndPutItems( pStyle->GetItemSet(), pRTFStyle->aAttrSet );
@@ -468,7 +468,7 @@ SfxStyleSheet* EditRTFParser::CreateStyleSheet( SvxRTFStyleType* pRTFStyle )
     // 2) As long as Parent is not in the pool, also create this ...
     if ( !aParent.isEmpty() && ( aParent != aName ) )
     {
-        SfxStyleSheet* pS = static_cast<SfxStyleSheet*>(mpEditEngine->GetStyleSheetPool()->Find( aParent, SFX_STYLE_FAMILY_ALL ));
+        SfxStyleSheet* pS = static_cast<SfxStyleSheet*>(mpEditEngine->GetStyleSheetPool()->Find( aParent, SfxStyleFamily::All ));
         if ( !pS )
         {
             // If not found anywhere, create from RTF ...
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 4cb5d77..fc7744a 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -458,7 +458,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
     if ( GetStyleSheetPool() )
     {
         SfxStyleSheetIteratorPtr aSSSIterator = std::make_shared<SfxStyleSheetIterator>(GetStyleSheetPool(),
-                SFX_STYLE_FAMILY_ALL);
+                SfxStyleFamily::All);
         // fill aStyleSheetToIdMap
         sal_uInt32 nId = 1;
         for ( SfxStyleSheetBase* pStyle = aSSSIterator->First(); pStyle;
diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx
index 0d10336..a20d2cb 100644
--- a/editeng/source/editeng/impedit5.cxx
+++ b/editeng/source/editeng/impedit5.cxx
@@ -82,8 +82,8 @@ void ImpEditEngine::SetStyleSheet( sal_Int32 nPara, SfxStyleSheet* pStyle )
 
             InsertUndo(
                 new EditUndoSetStyleSheet(pEditEngine, aEditDoc.GetPos( pNode ),
-                        aPrevStyleName, pCurStyle ? pCurStyle->GetFamily() : SFX_STYLE_FAMILY_PARA,
-                        aNewStyleName, pStyle ? pStyle->GetFamily() : SFX_STYLE_FAMILY_PARA,
+                        aPrevStyleName, pCurStyle ? pCurStyle->GetFamily() : SfxStyleFamily::Para,
+                        aNewStyleName, pStyle ? pStyle->GetFamily() : SfxStyleFamily::Para,
                         pNode->GetContentAttribs().GetItems() ) );
         }
         if ( pCurStyle )
diff --git a/include/rsc/rscsfx.hxx b/include/rsc/rscsfx.hxx
index 837187a..b4dd3c7 100644
--- a/include/rsc/rscsfx.hxx
+++ b/include/rsc/rscsfx.hxx
@@ -28,13 +28,17 @@
 // Public       (RSC_NOTYPE + 0x300) bis (RSC_NOTYPE + 0x3FF)
 
 //========== S F X =======================================
-enum SfxStyleFamily { SFX_STYLE_FAMILY_CHAR    = 1,
-                      SFX_STYLE_FAMILY_PARA    = 2,
-                      SFX_STYLE_FAMILY_FRAME   = 4,
-                      SFX_STYLE_FAMILY_PAGE    = 8,
-                      SFX_STYLE_FAMILY_PSEUDO  = 16,
-                      SFX_STYLE_FAMILY_ALL   = 0x7fff
-                      };
+// This is used as a flags enum in sw/, but only there,
+// so I don't pull in o3tl::typed_flags here
+enum class SfxStyleFamily {
+    None    = 0x00,
+    Char    = 0x01,
+    Para    = 0x02,
+    Frame   = 0x04,
+    Page    = 0x08,
+    Pseudo  = 0x10,
+    All     = 0x7fff
+};
 
 
 // SfxTemplate
diff --git a/include/sfx2/styfitem.hxx b/include/sfx2/styfitem.hxx
index 64d0926..1fd1016 100644
--- a/include/sfx2/styfitem.hxx
+++ b/include/sfx2/styfitem.hxx
@@ -42,7 +42,7 @@ class SfxStyleFamilyItem: public Resource
     Bitmap          aBitmap;
     OUString        aText;
     OUString        aHelpText;
-    sal_uInt16      nFamily;
+    SfxStyleFamily  nFamily;
     SfxStyleFilter  aFilterList;
 
 public:
@@ -50,7 +50,7 @@ public:
                     ~SfxStyleFamilyItem();
 
     const OUString& GetText() const { return aText; }
-    SfxStyleFamily  GetFamily() const { return (SfxStyleFamily)nFamily; }
+    SfxStyleFamily  GetFamily() const { return nFamily; }
     const SfxStyleFilter& GetFilterList() const { return aFilterList; }
     const Image&    GetImage() const { return aImage; }
 
diff --git a/include/svl/style.hxx b/include/svl/style.hxx
index 8083cb3..a36c375 100644
--- a/include/svl/style.hxx
+++ b/include/svl/style.hxx
@@ -278,7 +278,7 @@ public:
 
 protected:
     SfxStyleSheet() // do not use! needed by MSVC at compile time to satisfy ImplInheritanceHelper2
-        : SfxStyleSheetBase(OUString("dummy"), nullptr, SFX_STYLE_FAMILY_ALL, 0)
+        : SfxStyleSheetBase(OUString("dummy"), nullptr, SfxStyleFamily::All, 0)
     {
         assert(false);
     }
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 4f76a14..ea4cdd0 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -44,6 +44,7 @@ enum class MenuItemBits : sal_Int16;
 enum class ToolBoxItemType;
 enum class ButtonType;
 enum class WindowAlign;
+enum class SfxStyleFamily;
 
 struct WriteRcContext
 {
@@ -151,6 +152,7 @@ class RscTypCont
     inline void SETCONST( RscConst *p1, const char * p2, ToolBoxItemType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
     inline void SETCONST( RscConst *p1, const char * p2, ButtonType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
     inline void SETCONST( RscConst *p1, const char * p2, WindowAlign p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
+    inline void SETCONST( RscConst *p1, const char * p2, SfxStyleFamily p3 ) { SETCONST(p1, p2, static_cast<sal_uInt16>(p3)); }
     void        InitLangType();
     RscEnum *   InitFieldUnitsType();
     RscEnum *   InitColor();
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index e11f08a..2060798 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -1312,11 +1312,11 @@ RscTop * RscTypCont::InitClassSfxStyleFamilyItem( RscTop * pSuper,
         pSfxStyleFamily = new RscEnum( pHS->getID( "StyleFamily" ),
                                     RSC_NOTYPE );
 
-        SETCONST( pSfxStyleFamily, "SFX_STYLE_FAMILY_PARA", SFX_STYLE_FAMILY_PARA );
-        SETCONST( pSfxStyleFamily, "SFX_STYLE_FAMILY_CHAR", SFX_STYLE_FAMILY_CHAR );
-        SETCONST( pSfxStyleFamily, "SFX_STYLE_FAMILY_FRAME",SFX_STYLE_FAMILY_FRAME);
-        SETCONST( pSfxStyleFamily, "SFX_STYLE_FAMILY_PAGE", SFX_STYLE_FAMILY_PAGE );
-        SETCONST( pSfxStyleFamily, "SFX_STYLE_FAMILY_PSEUDO", SFX_STYLE_FAMILY_PSEUDO );
+        SETCONST( pSfxStyleFamily, "SfxStyleFamily::Para", SfxStyleFamily::Para );
+        SETCONST( pSfxStyleFamily, "SfxStyleFamily::Char", SfxStyleFamily::Char );
+        SETCONST( pSfxStyleFamily, "SfxStyleFamily::Frame",SfxStyleFamily::Frame);
+        SETCONST( pSfxStyleFamily, "SfxStyleFamily::Page", SfxStyleFamily::Page );
+        SETCONST( pSfxStyleFamily, "SfxStyleFamily::Pseudo", SfxStyleFamily::Pseudo );
         aBaseLst.push_back( pSfxStyleFamily );
 
         nId = aNmTb.Put( "StyleFamily", VARNAME );
diff --git a/rsc/source/parser/rsclex.cxx b/rsc/source/parser/rsclex.cxx
index f5f7c0c..5edea4c 100644
--- a/rsc/source/parser/rsclex.cxx
+++ b/rsc/source/parser/rsclex.cxx
@@ -221,7 +221,7 @@ int MakeToken( YYSTYPE * pTokenVal )
         Atom        nHashId;
         OStringBuffer aBuf( 256 );
 
-        while( isalnum (c) || (c == '_') || (c == '-') )
+        while( isalnum (c) || (c == '_') || (c == '-') || (c == ':'))
         {
             aBuf.append( sal_Char(c) );
             c = pFI->GetFastChar();
diff --git a/sc/inc/stylehelper.hxx b/sc/inc/stylehelper.hxx
index 1d0939a..8125265 100644
--- a/sc/inc/stylehelper.hxx
+++ b/sc/inc/stylehelper.hxx
@@ -22,11 +22,13 @@
 
 #include <rtl/ustring.hxx>
 
+enum class SfxStyleFamily;
+
 class ScStyleNameConversion
 {
 public:
-    static OUString DisplayToProgrammaticName( const OUString& rDispName, sal_uInt16 nType );
-    static OUString ProgrammaticToDisplayName( const OUString& rProgName, sal_uInt16 nType );
+    static OUString DisplayToProgrammaticName( const OUString& rDispName, SfxStyleFamily nType );
+    static OUString ProgrammaticToDisplayName( const OUString& rProgName, SfxStyleFamily nType );
 };
 
 #endif
diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx
index d1a8fd9..33bb719 100644
--- a/sc/inc/styleuno.hxx
+++ b/sc/inc/styleuno.hxx
@@ -55,7 +55,7 @@ class ScStyleFamiliesObj : public ::cppu::WeakImplHelper<
 private:
     ScDocShell*             pDocShell;
 
-    ScStyleFamilyObj*       GetObjectByType_Impl(sal_uInt16 Type) const;
+    ScStyleFamilyObj*       GetObjectByType_Impl(SfxStyleFamily nType) const;
     ScStyleFamilyObj*       GetObjectByIndex_Impl(sal_uInt32 nIndex) const;
     ScStyleFamilyObj*       GetObjectByName_Impl(const OUString& aName) const;
 
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index ca61b39..d7c1f30 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1734,7 +1734,7 @@ void ScAttrArray::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBo
                 pNewPattern->SetStyleSheet( static_cast<ScStyleSheet*>(
                     pDocument->GetStyleSheetPool()->
                         Find( ScGlobal::GetRscString(STR_STYLENAME_STANDARD),
-                              SFX_STYLE_FAMILY_PARA,
+                              SfxStyleFamily::Para,
                               SFXSTYLEBIT_AUTO | SCSTYLEBIT_STANDARD ) ) );
                 pData[nPos].pPattern = static_cast<const ScPatternAttr*>(
                                             &pDocument->GetPool()->Put(*pNewPattern));
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 780d361..11fba58 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -757,7 +757,7 @@ const SfxPoolItem* ScDocument::GetEffItem(
                         if (!aStyle.isEmpty())
                         {
                             SfxStyleSheetBase* pStyleSheet = xPoolHelper->GetStylePool()->Find(
-                                    aStyle, SFX_STYLE_FAMILY_PARA );
+                                    aStyle, SfxStyleFamily::Para );
                             if ( pStyleSheet && pStyleSheet->GetItemSet().GetItemState(
                                         nWhich, true, &pItem ) == SfxItemState::SET )
                                 return pItem;
@@ -802,7 +802,7 @@ const SfxItemSet* ScDocument::GetCondResult(
         if (!aStyle.isEmpty())
         {
             SfxStyleSheetBase* pStyleSheet =
-                xPoolHelper->GetStylePool()->Find(aStyle, SFX_STYLE_FAMILY_PARA);
+                xPoolHelper->GetStylePool()->Find(aStyle, SfxStyleFamily::Para);
 
             if (pStyleSheet)
                 return &pStyleSheet->GetItemSet();
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 40cac04..a84c2d0 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -221,7 +221,7 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet,
 
     switch ( rStyleSheet.GetFamily() )
     {
-        case SFX_STYLE_FAMILY_PAGE:
+        case SfxStyleFamily::Page:
             {
                 const sal_uInt16 nOldScale = getScaleValue(rStyleSheet, ATTR_PAGE_SCALE);
                 const sal_uInt16 nOldScaleToPages = getScaleValue(rStyleSheet, ATTR_PAGE_SCALETOPAGES);
@@ -241,7 +241,7 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet,
             }
             break;
 
-        case SFX_STYLE_FAMILY_PARA:
+        case SfxStyleFamily::Para:
             {
                 bool bNumFormatChanged;
                 if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
@@ -367,7 +367,7 @@ sal_uInt8 ScDocument::GetEditTextDirection(SCTAB nTab) const
     EEHorizontalTextDirection eRet = EE_HTEXTDIR_DEFAULT;
 
     OUString aStyleName = GetPageStyle( nTab );
-    SfxStyleSheetBase* pStyle = xPoolHelper->GetStylePool()->Find( aStyleName, SFX_STYLE_FAMILY_PAGE );
+    SfxStyleSheetBase* pStyle = xPoolHelper->GetStylePool()->Find( aStyleName, SfxStyleFamily::Page );
     if ( pStyle )
     {
         SfxItemSet& rStyleSet = pStyle->GetItemSet();
@@ -482,7 +482,7 @@ public:
         // the calls.
 
         mrDoc.EnableIdle(false);
-        mpStylePool->SetSearchMask(SFX_STYLE_FAMILY_PAGE);
+        mpStylePool->SetSearchMask(SfxStyleFamily::Page);
     }
 
     ~IdleCalcTextWidthScope()
@@ -553,7 +553,7 @@ bool ScDocument::IdleCalcTextWidth()            // true = try next again
         aScope.setTab(0);
 
     ScTable* pTab = maTabs[aScope.Tab()];
-    ScStyleSheet* pStyle = static_cast<ScStyleSheet*>(aScope.getStylePool()->Find(pTab->aPageStyle, SFX_STYLE_FAMILY_PAGE));
+    ScStyleSheet* pStyle = static_cast<ScStyleSheet*>(aScope.getStylePool()->Find(pTab->aPageStyle, SfxStyleFamily::Page));
     OSL_ENSURE( pStyle, "Missing StyleSheet :-/" );
 
     if (!pStyle || getScaleValue(*pStyle, ATTR_PAGE_SCALETOPAGES) == 0)
@@ -641,7 +641,7 @@ bool ScDocument::IdleCalcTextWidth()            // true = try next again
                 {
                     pTab = maTabs[aScope.Tab()];
                     pStyle = static_cast<ScStyleSheet*>(aScope.getStylePool()->Find(
-                        pTab->aPageStyle, SFX_STYLE_FAMILY_PAGE));
+                        pTab->aPageStyle, SfxStyleFamily::Page));
 
                     if ( pStyle )
                     {
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 75d2336..4d0ea1e 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -4853,7 +4853,7 @@ bool ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle ) const
     if ( bStyleSheetUsageInvalid || rStyle.GetUsage() == ScStyleSheet::UNKNOWN )
     {
         SfxStyleSheetIterator aIter( xPoolHelper->GetStylePool(),
-                    SFX_STYLE_FAMILY_PARA );
+                    SfxStyleFamily::Para );
         for ( const SfxStyleSheetBase* pStyle = aIter.First(); pStyle;
                                        pStyle = aIter.Next() )
         {
@@ -6196,7 +6196,7 @@ bool ScDocument::NeedPageResetAfterTab( SCTAB nTab ) const
         OUString aNew = maTabs[nTab+1]->GetPageStyle();
         if ( aNew != maTabs[nTab]->GetPageStyle() )
         {
-            SfxStyleSheetBase* pStyle = xPoolHelper->GetStylePool()->Find( aNew, SFX_STYLE_FAMILY_PAGE );
+            SfxStyleSheetBase* pStyle = xPoolHelper->GetStylePool()->Find( aNew, SfxStyleFamily::Page );
             if ( pStyle )
             {
                 const SfxItemSet& rSet = pStyle->GetItemSet();
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 75e9dd3..4da8138 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -286,12 +286,12 @@ void lcl_SetStyleById( ScDocument* pDoc, SCTAB nTab,
 
     OUString aStyleName = ScGlobal::GetRscString( nStrId );
     ScStyleSheetPool* pStlPool = pDoc->GetStyleSheetPool();
-    ScStyleSheet* pStyle = static_cast<ScStyleSheet*>( pStlPool->Find( aStyleName, SFX_STYLE_FAMILY_PARA ) );
+    ScStyleSheet* pStyle = static_cast<ScStyleSheet*>( pStlPool->Find( aStyleName, SfxStyleFamily::Para ) );
     if (!pStyle)
     {
         //  create new style (was in ScPivot::SetStyle)
 
-        pStyle = static_cast<ScStyleSheet*>( &pStlPool->Make( aStyleName, SFX_STYLE_FAMILY_PARA,
+        pStyle = static_cast<ScStyleSheet*>( &pStlPool->Make( aStyleName, SfxStyleFamily::Para,
                                                     SFXSTYLEBIT_USERDEF ) );
         pStyle->SetParent( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
         SfxItemSet& rSet = pStyle->GetItemSet();
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index ffeb066..17c6d22 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -328,7 +328,7 @@ bool handleConditionalFormat(ScConditionalFormatList* pCondFormList, const std::
         if (!aData.aStyleName.isEmpty())
         {
             SfxStyleSheetBase* pStyleSheet =
-                pStlPool->Find( aData.aStyleName, SFX_STYLE_FAMILY_PARA );
+                pStlPool->Find( aData.aStyleName, SfxStyleFamily::Para );
             if ( pStyleSheet )
             {
                 //TODO: cache Style-Sets !!!
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index fccfb43..ba4476a 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -181,7 +181,7 @@ SvStream& ScPatternAttr::Store(SvStream& rStream, sal_uInt16 /* nItemVersion */)
         rStream.WriteUniOrByteString( ScGlobal::GetRscString(STR_STYLENAME_STANDARD),
                                     rStream.GetStreamCharSet() );
 
-    rStream.WriteInt16( SFX_STYLE_FAMILY_PARA );  // due to old data format
+    rStream.WriteInt16( (sal_uInt16) SfxStyleFamily::Para );  // due to old data format
 
     GetItemSet().Store( rStream );
 
@@ -1245,14 +1245,14 @@ void ScPatternAttr::UpdateStyleSheet(ScDocument* pDoc)
 {
     if (pName)
     {
-        pStyle = static_cast<ScStyleSheet*>(pDoc->GetStyleSheetPool()->Find(*pName, SFX_STYLE_FAMILY_PARA));
+        pStyle = static_cast<ScStyleSheet*>(pDoc->GetStyleSheetPool()->Find(*pName, SfxStyleFamily::Para));
 
         //  use Standard if Style is not found,
         //  to avoid empty display in Toolbox-Controller
         //  Assumes that "Standard" is always the 1st entry!
         if (!pStyle)
         {
-            SfxStyleSheetIteratorPtr pIter = pDoc->GetStyleSheetPool()->CreateIterator( SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_ALL );
+            SfxStyleSheetIteratorPtr pIter = pDoc->GetStyleSheetPool()->CreateIterator( SfxStyleFamily::Para, SFXSTYLEBIT_ALL );
             pStyle = dynamic_cast< ScStyleSheet* >(pIter->First());
         }
 
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index 2e859f6..c9acb13 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -102,7 +102,7 @@ SfxStyleSheetBase* ScStyleSheetPool::Create( const OUString&   rName,
                                              sal_uInt16          nMaskP )
 {
     ScStyleSheet* pSheet = new ScStyleSheet( rName, *this, eFamily, nMaskP );
-    if ( eFamily == SFX_STYLE_FAMILY_PARA && ScGlobal::GetRscString(STR_STYLENAME_STANDARD) != rName )
+    if ( eFamily == SfxStyleFamily::Para && ScGlobal::GetRscString(STR_STYLENAME_STANDARD) != rName )
         pSheet->SetParent( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
 
     return pSheet;
@@ -142,7 +142,7 @@ void ScStyleSheetPool::CopyStyleFrom( ScStyleSheetPool* pSrcPool,
         rDestSet.PutExtended( rSourceSet, SfxItemState::DONTCARE, SfxItemState::DEFAULT );
 
         const SfxPoolItem* pItem;
-        if ( eFamily == SFX_STYLE_FAMILY_PAGE )
+        if ( eFamily == SfxStyleFamily::Page )
         {
             //  Set-Items
 
@@ -188,13 +188,13 @@ void ScStyleSheetPool::CopyStdStylesFrom( ScStyleSheetPool* pSrcPool )
 {
     //  Copy Default styles
 
-    CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD),     SFX_STYLE_FAMILY_PARA );
-    CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_RESULT),       SFX_STYLE_FAMILY_PARA );
-    CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_RESULT1),      SFX_STYLE_FAMILY_PARA );
-    CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_HEADLINE),     SFX_STYLE_FAMILY_PARA );
-    CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_HEADLINE1),    SFX_STYLE_FAMILY_PARA );
-    CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD),     SFX_STYLE_FAMILY_PAGE );
-    CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_REPORT),       SFX_STYLE_FAMILY_PAGE );
+    CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD),     SfxStyleFamily::Para );
+    CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_RESULT),       SfxStyleFamily::Para );
+    CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_RESULT1),      SfxStyleFamily::Para );
+    CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_HEADLINE),     SfxStyleFamily::Para );
+    CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_HEADLINE1),    SfxStyleFamily::Para );
+    CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD),     SfxStyleFamily::Page );
+    CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_REPORT),       SfxStyleFamily::Page );
 }
 
 static void lcl_CheckFont( SfxItemSet& rSet, LanguageType eLang, DefaultFontType nFontType, sal_uInt16 nItemId )
@@ -241,7 +241,7 @@ void ScStyleSheetPool::CreateStandardStyles()
 
     // 1. Standard
 
-    pSheet = static_cast<ScStyleSheet*>( &Make( aStrStandard, SFX_STYLE_FAMILY_PARA, SCSTYLEBIT_STANDARD ) );
+    pSheet = static_cast<ScStyleSheet*>( &Make( aStrStandard, SfxStyleFamily::Para, SCSTYLEBIT_STANDARD ) );
     pSheet->SetHelpId( aHelpFile, HID_SC_SHEET_CELL_STD );
 
     //  if default fonts for the document's languages are different from the pool default,
@@ -273,7 +273,7 @@ void ScStyleSheetPool::CreateStandardStyles()
     // 2. Result
 
     pSheet = static_cast<ScStyleSheet*>( &Make( SCSTR( STR_STYLENAME_RESULT ),
-                                    SFX_STYLE_FAMILY_PARA,
+                                    SfxStyleFamily::Para,
                                     SCSTYLEBIT_STANDARD ) );
     pSheet->SetParent( aStrStandard );
     pSheet->SetHelpId( aHelpFile, HID_SC_SHEET_CELL_ERG );
@@ -285,7 +285,7 @@ void ScStyleSheetPool::CreateStandardStyles()
     // 3. Result1
 
     pSheet = static_cast<ScStyleSheet*>( &Make( SCSTR( STR_STYLENAME_RESULT1 ),
-                                    SFX_STYLE_FAMILY_PARA,
+                                    SfxStyleFamily::Para,
                                     SCSTYLEBIT_STANDARD ) );
 
     pSheet->SetParent( SCSTR( STR_STYLENAME_RESULT ) );
@@ -294,7 +294,7 @@ void ScStyleSheetPool::CreateStandardStyles()
     // 4. headline
 
     pSheet = static_cast<ScStyleSheet*>( &Make( SCSTR( STR_STYLENAME_HEADLINE ),
-                                    SFX_STYLE_FAMILY_PARA,
+                                    SfxStyleFamily::Para,
                                     SCSTYLEBIT_STANDARD ) );
 
     pSheet->SetParent( aStrStandard );
@@ -308,7 +308,7 @@ void ScStyleSheetPool::CreateStandardStyles()
     // 5. Ueberschrift1
 
     pSheet = static_cast<ScStyleSheet*>( &Make( SCSTR( STR_STYLENAME_HEADLINE1 ),
-                                    SFX_STYLE_FAMILY_PARA,
+                                    SfxStyleFamily::Para,
                                     SCSTYLEBIT_STANDARD ) );
 
     pSheet->SetParent( SCSTR( STR_STYLENAME_HEADLINE ) );
@@ -321,7 +321,7 @@ void ScStyleSheetPool::CreateStandardStyles()
     // 1. Standard
 
     pSheet = static_cast<ScStyleSheet*>( &Make( aStrStandard,
-                                    SFX_STYLE_FAMILY_PAGE,
+                                    SfxStyleFamily::Page,
                                     SCSTYLEBIT_STANDARD ) );
 
     pSet = &pSheet->GetItemSet();
@@ -362,7 +362,7 @@ void ScStyleSheetPool::CreateStandardStyles()
     // 2. Report
 
     pSheet = static_cast<ScStyleSheet*>( &Make( SCSTR( STR_STYLENAME_REPORT ),
-                                    SFX_STYLE_FAMILY_PAGE,
+                                    SfxStyleFamily::Page,
                                     SCSTYLEBIT_STANDARD ) );
     pSet = &pSheet->GetItemSet();
     pSheet->SetHelpId( aHelpFile, HID_SC_SHEET_PAGE_REP );
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index 0c3a7e1..77078ea 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -76,8 +76,8 @@ bool ScStyleSheet::HasParentSupport () const
 
     switch ( GetFamily() )
     {
-    case SFX_STYLE_FAMILY_PARA: bHasParentSupport = true;   break;
-    case SFX_STYLE_FAMILY_PAGE: bHasParentSupport = false;  break;
+    case SfxStyleFamily::Para: bHasParentSupport = true;   break;
+    case SfxStyleFamily::Page: bHasParentSupport = false;  break;
     default:
         {
             // added to avoid warnings
@@ -131,7 +131,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
     {
         switch ( GetFamily() )
         {
-            case SFX_STYLE_FAMILY_PAGE:
+            case SfxStyleFamily::Page:
                 {
                     // Page templates should not be derivable,
                     // therefore suitable values are set at this point.
@@ -218,7 +218,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
                 }
                 break;
 
-            case SFX_STYLE_FAMILY_PARA:
+            case SfxStyleFamily::Para:
             default:
                 pSet = new SfxItemSet( GetPool().GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END );
                 break;
@@ -250,7 +250,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
 
 bool ScStyleSheet::IsUsed() const
 {
-    if ( GetFamily() == SFX_STYLE_FAMILY_PARA )
+    if ( GetFamily() == SfxStyleFamily::Para )
     {
         // Always query the document to let it decide if a rescan is necessary,
         // and store the state.
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index c677ce1..f5da41e 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -624,11 +624,11 @@ void ScTable::CopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCRO
 
                 if(!aStyleName.isEmpty())
                 {
-                    if(pDocument->GetStyleSheetPool()->Find(aStyleName, SFX_STYLE_FAMILY_PARA))
+                    if(pDocument->GetStyleSheetPool()->Find(aStyleName, SfxStyleFamily::Para))
                         continue;
 
                     pDocument->GetStyleSheetPool()->CopyStyleFrom(
-                            pTable->pDocument->GetStyleSheetPool(), aStyleName, SFX_STYLE_FAMILY_PARA );
+                            pTable->pDocument->GetStyleSheetPool(), aStyleName, SfxStyleFamily::Para );
                 }
             }
         }
@@ -2077,7 +2077,7 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC
                                     if (!aStyleName.isEmpty())
                                     {
                                         SfxStyleSheetBase* pStyleSheet =
-                                            pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PARA );
+                                            pStylePool->Find( aStyleName, SfxStyleFamily::Para );
                                         if ( pStyleSheet )
                                         {
                                             FillMaxRot( pRowInfo, nArrCount, nX1, nX2,
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 3fb4799..6493440 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -1961,7 +1961,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
                                 //TODO: sort?
 
     ScStyleSheet* pStyle = static_cast<ScStyleSheet*>(pDocument->GetStyleSheetPool()->Find(
-                                ScGlobal::GetRscString(STR_STYLENAME_RESULT), SFX_STYLE_FAMILY_PARA ));
+                                ScGlobal::GetRscString(STR_STYLENAME_RESULT), SfxStyleFamily::Para ));
 
     bool bSpaceLeft = true;                                         // Success when inserting?
 
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index 8ba078c..6a2f060 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -72,7 +72,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
     }
 
     SfxStyleSheetBase* pStyle = pDocument->GetStyleSheetPool()->
-                                    Find( aPageStyle, SFX_STYLE_FAMILY_PAGE );
+                                    Find( aPageStyle, SfxStyleFamily::Page );
     if ( !pStyle )
     {
         OSL_FAIL("UpdatePageBreaks: Style not found");
@@ -1121,17 +1121,17 @@ void ScTable::SetPageStyle( const OUString& rName )
     {
         OUString           aStrNew    = rName;
         SfxStyleSheetBasePool*  pStylePool = pDocument->GetStyleSheetPool();
-        SfxStyleSheetBase*      pNewStyle  = pStylePool->Find( aStrNew, SFX_STYLE_FAMILY_PAGE );
+        SfxStyleSheetBase*      pNewStyle  = pStylePool->Find( aStrNew, SfxStyleFamily::Page );
 
         if ( !pNewStyle )
         {
             aStrNew = ScGlobal::GetRscString(STR_STYLENAME_STANDARD);
-            pNewStyle = pStylePool->Find( aStrNew, SFX_STYLE_FAMILY_PAGE );
+            pNewStyle = pStylePool->Find( aStrNew, SfxStyleFamily::Page );
         }
 
         if ( aPageStyle != aStrNew )
         {
-            SfxStyleSheetBase* pOldStyle = pStylePool->Find( aPageStyle, SFX_STYLE_FAMILY_PAGE );
+            SfxStyleSheetBase* pOldStyle = pStylePool->Find( aPageStyle, SfxStyleFamily::Page );
 
             if ( pOldStyle && pNewStyle )
             {
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index c54812a..2c63ed4 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -528,7 +528,7 @@ bool ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW&
 {
     const ScStyleSheet* pSearchStyle = static_cast<const ScStyleSheet*>(
                                         pDocument->GetStyleSheetPool()->Find(
-                                        rSearchItem.GetSearchString(), SFX_STYLE_FAMILY_PARA ));
+                                        rSearchItem.GetSearchString(), SfxStyleFamily::Para ));
 
     SCsCOL nCol = rCol;
     SCsROW nRow = rRow;
@@ -620,7 +620,7 @@ bool ScTable::ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW&
     {
         const ScStyleSheet* pReplaceStyle = static_cast<const ScStyleSheet*>(
                                         pDocument->GetStyleSheetPool()->Find(
-                                        rSearchItem.GetReplaceString(), SFX_STYLE_FAMILY_PARA ));
+                                        rSearchItem.GetReplaceString(), SfxStyleFamily::Para ));
 
         if (pReplaceStyle)
             ApplyStyle( rCol, rRow, *pReplaceStyle );
@@ -638,7 +638,7 @@ bool ScTable::SearchAllStyle(
 {
     const ScStyleSheet* pSearchStyle = static_cast<const ScStyleSheet*>(
                                         pDocument->GetStyleSheetPool()->Find(
-                                        rSearchItem.GetSearchString(), SFX_STYLE_FAMILY_PARA ));
+                                        rSearchItem.GetSearchString(), SfxStyleFamily::Para ));
     bool bSelect = rSearchItem.GetSelection();
     bool bBack = rSearchItem.GetBackward();
     bool bEverFound = false;
@@ -678,7 +678,7 @@ bool ScTable::ReplaceAllStyle(
     {
         const ScStyleSheet* pReplaceStyle = static_cast<const ScStyleSheet*>(
                                         pDocument->GetStyleSheetPool()->Find(
-                                        rSearchItem.GetReplaceString(), SFX_STYLE_FAMILY_PARA ));
+                                        rSearchItem.GetReplaceString(), SfxStyleFamily::Para ));
 
         if (pReplaceStyle)
         {
diff --git a/sc/source/core/tool/stylehelper.cxx b/sc/source/core/tool/stylehelper.cxx
index d1eccbd..e8fece3 100644
--- a/sc/source/core/tool/stylehelper.cxx
+++ b/sc/source/core/tool/stylehelper.cxx
@@ -42,9 +42,9 @@ struct ScDisplayNameMap
     OUString  aProgName;
 };
 
-static const ScDisplayNameMap* lcl_GetStyleNameMap( sal_uInt16 nType )
+static const ScDisplayNameMap* lcl_GetStyleNameMap( SfxStyleFamily nType )
 {
-    if ( nType == SFX_STYLE_FAMILY_PARA )
+    if ( nType == SfxStyleFamily::Para )
     {
         static bool bCellMapFilled = false;
         static ScDisplayNameMap aCellMap[6];
@@ -71,7 +71,7 @@ static const ScDisplayNameMap* lcl_GetStyleNameMap( sal_uInt16 nType )
         }
         return aCellMap;
     }
-    else if ( nType == SFX_STYLE_FAMILY_PAGE )
+    else if ( nType == SfxStyleFamily::Page )
     {
         static bool bPageMapFilled = false;
         static ScDisplayNameMap aPageMap[3];
@@ -104,7 +104,7 @@ static bool lcl_EndsWithUser( const OUString& rString )
     return rString.endsWith(SC_SUFFIX_USER);
 }
 
-OUString ScStyleNameConversion::DisplayToProgrammaticName( const OUString& rDispName, sal_uInt16 nType )
+OUString ScStyleNameConversion::DisplayToProgrammaticName( const OUString& rDispName, SfxStyleFamily nType )
 {
     bool bDisplayIsProgrammatic = false;
 
@@ -131,7 +131,7 @@ OUString ScStyleNameConversion::DisplayToProgrammaticName( const OUString& rDisp
     return rDispName;
 }
 
-OUString ScStyleNameConversion::ProgrammaticToDisplayName( const OUString& rProgName, sal_uInt16 nType )
+OUString ScStyleNameConversion::ProgrammaticToDisplayName( const OUString& rProgName, SfxStyleFamily nType )
 {
     if ( lcl_EndsWithUser( rProgName ) )
     {
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index c4e2717..6d27232 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -1255,7 +1255,7 @@ void ImportExcel::PostDocLoad()
     /*  Set automatic page numbering in Default page style (default is "page number = 1").
         Otherwise hidden tables (i.e. for scenarios) which have Default page style will
         break automatic page numbering. */
-    if( SfxStyleSheetBase* pStyleSheet = GetStyleSheetPool().Find( ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SFX_STYLE_FAMILY_PAGE ) )
+    if( SfxStyleSheetBase* pStyleSheet = GetStyleSheetPool().Find( ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SfxStyleFamily::Page ) )
         pStyleSheet->GetItemSet().Put( SfxUInt16Item( ATTR_PAGE_FIRSTPAGENO, 0 ) );
 
     // outlines for all sheets, sets hidden rows and columns (#i11776# after filtered ranges)
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 1a5ce8d..24cc656 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -621,7 +621,7 @@ XclExpCFImpl::XclExpCFImpl( const XclExpRoot& rRoot, const ScCondFormatEntry& rF
     /*  Get formatting attributes here, and not in WriteBody(). This is needed to
         correctly insert all colors into the palette. */
 
-    if( SfxStyleSheetBase* pStyleSheet = GetDoc().GetStyleSheetPool()->Find( mrFormatEntry.GetStyle(), SFX_STYLE_FAMILY_PARA ) )
+    if( SfxStyleSheetBase* pStyleSheet = GetDoc().GetStyleSheetPool()->Find( mrFormatEntry.GetStyle(), SfxStyleFamily::Para ) )
     {
         const SfxItemSet& rItemSet = pStyleSheet->GetItemSet();
 
diff --git a/sc/source/filter/excel/xepage.cxx b/sc/source/filter/excel/xepage.cxx
index 5fb1951..2895819 100644
--- a/sc/source/filter/excel/xepage.cxx
+++ b/sc/source/filter/excel/xepage.cxx
@@ -210,7 +210,7 @@ XclExpPageSettings::XclExpPageSettings( const XclExpRoot& rRoot ) :
     ScDocument& rDoc = GetDoc();
     SCTAB nScTab = GetCurrScTab();
 
-    if( SfxStyleSheetBase* pStyleSheet = GetStyleSheetPool().Find( rDoc.GetPageStyle( nScTab ), SFX_STYLE_FAMILY_PAGE ) )
+    if( SfxStyleSheetBase* pStyleSheet = GetStyleSheetPool().Find( rDoc.GetPageStyle( nScTab ), SfxStyleFamily::Page ) )
     {
         const SfxItemSet& rItemSet = pStyleSheet->GetItemSet();
         maData.mbValid = true;
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index d56d041..08007ec 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -2837,7 +2837,7 @@ sal_uInt32 XclExpXFBuffer::InsertStyleXF( const SfxStyleSheetBase& rStyleSheet )
 
 void XclExpXFBuffer::InsertUserStyles()
 {
-    SfxStyleSheetIterator aStyleIter( GetDoc().GetStyleSheetPool(), SFX_STYLE_FAMILY_PARA );
+    SfxStyleSheetIterator aStyleIter( GetDoc().GetStyleSheetPool(), SfxStyleFamily::Para );
     for( SfxStyleSheetBase* pStyleSheet = aStyleIter.First(); pStyleSheet; pStyleSheet = aStyleIter.Next() )
         if( pStyleSheet->IsUserDefined() && !lclIsBuiltInStyle( pStyleSheet->GetName() ) )
             InsertStyleXF( *pStyleSheet );
@@ -2884,7 +2884,7 @@ void XclExpXFBuffer::InsertDefaultRecords()
     maFills.push_back( lcl_GetPatternFill_Gray125() );
 
     // index 0: default style
-    if( SfxStyleSheetBase* pDefStyleSheet = GetStyleSheetPool().Find( ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SFX_STYLE_FAMILY_PARA ) )
+    if( SfxStyleSheetBase* pDefStyleSheet = GetStyleSheetPool().Find( ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SfxStyleFamily::Para ) )
     {
         XclExpXFRef xDefStyle( new XclExpXF( GetRoot(), *pDefStyleSheet ) );
         sal_uInt32 nXFId = AppendBuiltInXFWithStyle( xDefStyle, EXC_STYLE_NORMAL );
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index d53c75b..e257458 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -1352,7 +1352,7 @@ void XclImpXF::ApplyPatternToAttrList(
             {
                 ScStyleSheet* pStyleSheet = static_cast<ScStyleSheet*>(
                     pStylePool->Find(
-                        ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SFX_STYLE_FAMILY_PARA));
+                        ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SfxStyleFamily::Para));
 
                 if (pStyleSheet)
                     rPat.SetStyleSheet(pStyleSheet, false);
@@ -1514,7 +1514,7 @@ ScStyleSheet* XclImpStyle::CreateStyleSheet()
             if( pXF ) pXF->SetAllUsedFlags( true );
             // use existing "Default" style sheet
             mpStyleSheet = static_cast< ScStyleSheet* >( GetStyleSheetPool().Find(
-                ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SFX_STYLE_FAMILY_PARA ) );
+                ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SfxStyleFamily::Para ) );
             OSL_ENSURE( mpStyleSheet, "XclImpStyle::CreateStyleSheet - Default style not found" );
             bCreatePattern = true;
         }
@@ -1523,10 +1523,10 @@ ScStyleSheet* XclImpStyle::CreateStyleSheet()
             /*  #i103281# do not create another style sheet of the same name,
                 if it exists already. This is needed to prevent that styles
                 pasted from clipboard get duplicated over and over. */
-            mpStyleSheet = static_cast< ScStyleSheet* >( GetStyleSheetPool().Find( maFinalName, SFX_STYLE_FAMILY_PARA ) );
+            mpStyleSheet = static_cast< ScStyleSheet* >( GetStyleSheetPool().Find( maFinalName, SfxStyleFamily::Para ) );
             if( !mpStyleSheet )
             {
-                mpStyleSheet = &static_cast< ScStyleSheet& >( GetStyleSheetPool().Make( maFinalName, SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_USERDEF ) );
+                mpStyleSheet = &static_cast< ScStyleSheet& >( GetStyleSheetPool().Make( maFinalName, SfxStyleFamily::Para, SFXSTYLEBIT_USERDEF ) );
                 bCreatePattern = true;
             }
         }
@@ -1614,7 +1614,7 @@ void XclImpXFBuffer::CreateUserStyles()
         for styles in different sheets with the same name. Assuming that the
         BIFF4W import filter is never used to import from clipboard... */
     bool bReserveAll = (GetBiff() == EXC_BIFF4) && (GetCurrScTab() > 0);
-    SfxStyleSheetIterator aStyleIter( GetDoc().GetStyleSheetPool(), SFX_STYLE_FAMILY_PARA );
+    SfxStyleSheetIterator aStyleIter( GetDoc().GetStyleSheetPool(), SfxStyleFamily::Para );
     OUString aStandardName = ScGlobal::GetRscString( STR_STYLENAME_STANDARD );
     for( SfxStyleSheetBase* pStyleSheet = aStyleIter.First(); pStyleSheet; pStyleSheet = aStyleIter.Next() )
         if( (pStyleSheet->GetName() != aStandardName) && (bReserveAll || !pStyleSheet->IsUserDefined()) )
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index fb80b93..fde80bd 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -257,12 +257,12 @@ ScStyleSheet& lclMakeStyleSheet( ScStyleSheetPool& rPool, const OUString& rStyle
 
 ScStyleSheet& ScfTools::MakeCellStyleSheet( ScStyleSheetPool& rPool, const OUString& rStyleName, bool bForceName )
 {
-    return lclMakeStyleSheet( rPool, rStyleName, SFX_STYLE_FAMILY_PARA, bForceName );
+    return lclMakeStyleSheet( rPool, rStyleName, SfxStyleFamily::Para, bForceName );
 }
 
 ScStyleSheet& ScfTools::MakePageStyleSheet( ScStyleSheetPool& rPool, const OUString& rStyleName, bool bForceName )
 {
-    return lclMakeStyleSheet( rPool, rStyleName, SFX_STYLE_FAMILY_PAGE, bForceName );
+    return lclMakeStyleSheet( rPool, rStyleName, SfxStyleFamily::Page, bForceName );
 }
 
 // *** byte string import operations *** --------------------------------------
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 108cd63..901ff80 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -473,10 +473,10 @@ const SfxItemSet& ScHTMLExport::PageDefaults( SCTAB nTab )
     // remember defaults for compare in WriteCell
     if ( !aHTMLStyle.bInitialized )
     {
-        pStylePool->SetSearchMask( SFX_STYLE_FAMILY_PARA );
+        pStylePool->SetSearchMask( SfxStyleFamily::Para );
         pStyleSheet = pStylePool->Find(
                 ScGlobal::GetRscString(STR_STYLENAME_STANDARD),
-                SFX_STYLE_FAMILY_PARA );
+                SfxStyleFamily::Para );
         OSL_ENSURE( pStyleSheet, "ParaStyle not found! :-(" );
         if (!pStyleSheet)
             pStyleSheet = pStylePool->First();
@@ -496,8 +496,8 @@ const SfxItemSet& ScHTMLExport::PageDefaults( SCTAB nTab )
 
     // Page style sheet printer settings, e.g. for background graphics.
     // There's only one background graphic in HTML!
-    pStylePool->SetSearchMask( SFX_STYLE_FAMILY_PAGE );
-    pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE );
+    pStylePool->SetSearchMask( SfxStyleFamily::Page );
+    pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SfxStyleFamily::Page );
     OSL_ENSURE( pStyleSheet, "PageStyle not found! :-(" );
     if (!pStyleSheet)
         pStyleSheet = pStylePool->First();
diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx
index 3baae4f..f57b197 100644
--- a/sc/source/filter/html/htmlimp.cxx
+++ b/sc/source/filter/html/htmlimp.cxx
@@ -66,7 +66,7 @@ ScHTMLImport::ScHTMLImport( ScDocument* pDocP, const OUString& rBaseURL, const S
     OutputDevice* pDefaultDev = Application::GetDefaultDevice();
     const OUString& aPageStyle = mpDoc->GetPageStyle( rRange.aStart.Tab() );
     ScStyleSheet* pStyleSheet = static_cast<ScStyleSheet*>(mpDoc->
-        GetStyleSheetPool()->Find( aPageStyle, SFX_STYLE_FAMILY_PAGE ));
+        GetStyleSheetPool()->Find( aPageStyle, SfxStyleFamily::Page ));
     if ( pStyleSheet )
     {
         const SfxItemSet& rSet = pStyleSheet->GetItemSet();
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index b1d40dc..10cc7c5 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -2151,7 +2151,7 @@ void Xf::applyPatternToAttrList( AttrList& rAttrs, SCROW nRow1, SCROW nRow2, sal
             {
                 ScStyleSheet* pStyleSheet = static_cast<ScStyleSheet*>(
                     pStylePool->Find(
-                        ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SFX_STYLE_FAMILY_PARA));
+                        ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SfxStyleFamily::Para));
 
                 if (pStyleSheet)
                     rPat.SetStyleSheet( pStyleSheet, false );
@@ -2243,7 +2243,7 @@ void Xf::writeToDoc( ScDocumentImport& rDoc, const table::CellRangeAddress& rRan
 
         ScStyleSheet* pStyleSheet =
             static_cast<ScStyleSheet*>(
-                rDoc.getDoc().GetStyleSheetPool()->Find(aStyleName, SFX_STYLE_FAMILY_PARA));
+                rDoc.getDoc().GetStyleSheetPool()->Find(aStyleName, SfxStyleFamily::Para));
 
         if (pStyleSheet)
         {
@@ -2631,16 +2631,16 @@ void CellStyle::createCellStyle()
         {
             // use existing "Default" style sheet
             mpStyleSheet = static_cast< ScStyleSheet* >( static_cast< ScStyleSheetPool* >( rDoc.GetStyleSheetPool() )->Find(
-                ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SFX_STYLE_FAMILY_PARA ) );
+                ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SfxStyleFamily::Para ) );
             OSL_ENSURE( mpStyleSheet, "CellStyle::createStyle - Default style not found" );
             bCreatePattern = true;
         }
         else
         {
-            mpStyleSheet = static_cast< ScStyleSheet* >( static_cast< ScStyleSheetPool* >( rDoc.GetStyleSheetPool() )->Find( maFinalName, SFX_STYLE_FAMILY_PARA ) );
+            mpStyleSheet = static_cast< ScStyleSheet* >( static_cast< ScStyleSheetPool* >( rDoc.GetStyleSheetPool() )->Find( maFinalName, SfxStyleFamily::Para ) );
             if( !mpStyleSheet )
             {
-                mpStyleSheet = &static_cast< ScStyleSheet& >( rDoc.GetStyleSheetPool()->Make( maFinalName, SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_USERDEF ) );
+                mpStyleSheet = &static_cast< ScStyleSheet& >( rDoc.GetStyleSheetPool()->Make( maFinalName, SfxStyleFamily::Para, SFXSTYLEBIT_USERDEF ) );
                 bCreatePattern = true;
             }
         }
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index 176d5eb..38da313 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -947,7 +947,7 @@ void WorksheetGlobals::initializeWorksheetImport()
 
     ScStyleSheet* pStyleSheet =
         static_cast<ScStyleSheet*>(rDoc.getDoc().GetStyleSheetPool()->Find(
-            getStyles().getDefaultStyleName(), SFX_STYLE_FAMILY_PARA));
+            getStyles().getDefaultStyleName(), SfxStyleFamily::Para));
 
     if (pStyleSheet)
         rDoc.setCellStyleToSheet(getSheetIndex(), *pStyleSheet);
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 496faea..0bfe90f 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -1207,7 +1207,7 @@ size_t ScOrcusStyles::commit_cell_style()
     }
 
     ScStyleSheetPool* pPool = mrDoc.GetStyleSheetPool();
-    SfxStyleSheetBase& rBase = pPool->Make(maCurrentCellStyle.maName, SFX_STYLE_FAMILY_PARA);
+    SfxStyleSheetBase& rBase = pPool->Make(maCurrentCellStyle.maName, SfxStyleFamily::Para);
     SfxItemSet& rSet = rBase.GetItemSet();
 
     xf& rXf = maCellStyleXfs[maCurrentCellStyle.mnXFId];
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index 43731e0..bfac4b0 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -689,7 +689,7 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
         OUString aName = lcl_MakeOldPageStyleFormatName( i );
 
         ScStyleSheet* pSheet = static_cast<ScStyleSheet*>( &pStylePool->Make( aName,
-                                    SFX_STYLE_FAMILY_PAGE,
+                                    SfxStyleFamily::Page,
                                     SFXSTYLEBIT_USERDEF | SCSTYLEBIT_STANDARD ) );
         // #i68483# set page style name at sheet...
         pDoc->SetPageStyle( static_cast< SCTAB >( i ), aName );
@@ -1107,17 +1107,17 @@ void Sc10Import::LoadPatternCollection()
     {
         Sc10PatternData* pPattern = pPatternCollection->At( i );
         OUString aName( pPattern->Name, strlen(pPattern->Name), DEFCHARSET );
-        SfxStyleSheetBase* pStyle = pStylePool->Find( aName, SFX_STYLE_FAMILY_PARA );
+        SfxStyleSheetBase* pStyle = pStylePool->Find( aName, SfxStyleFamily::Para );
         if( pStyle == nullptr )
-            pStylePool->Make( aName, SFX_STYLE_FAMILY_PARA );
+            pStylePool->Make( aName, SfxStyleFamily::Para );
         else
         {
             pPattern->Name[ 27 ] = 0;
             strcat( pPattern->Name, "_Old" );
             aName = SC10TOSTRING( pPattern->Name );
-            pStylePool->Make( aName, SFX_STYLE_FAMILY_PARA );
+            pStylePool->Make( aName, SfxStyleFamily::Para );
         }
-        pStyle = pStylePool->Find( aName, SFX_STYLE_FAMILY_PARA );
+        pStyle = pStylePool->Find( aName, SfxStyleFamily::Para );
         if( pStyle != nullptr )
         {
             SfxItemSet &rItemSet = pStyle->GetItemSet();
@@ -2104,7 +2104,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
             if (pPattern != nullptr)
             {
                 ScStyleSheet* pStyle = static_cast<ScStyleSheet*>( pStylePool->Find(
-                                    SC10TOSTRING( pPattern->Name ), SFX_STYLE_FAMILY_PARA) );
+                                    SC10TOSTRING( pPattern->Name ), SfxStyleFamily::Para) );
 
                 if (pStyle != nullptr)
                     pDoc->ApplyStyleAreaTab(Col, nStart, Col, nEnd, Tab, *pStyle);
diff --git a/sc/source/filter/xml/xmlcondformat.cxx b/sc/source/filter/xml/xmlcondformat.cxx
index 7a06e0e..7e0e0c0 100644
--- a/sc/source/filter/xml/xmlcondformat.cxx
+++ b/sc/source/filter/xml/xmlcondformat.cxx
@@ -588,7 +588,7 @@ ScXMLCondContext::ScXMLCondContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
                 sExpression = sValue;
                 break;
             case XML_TOK_CONDITION_APPLY_STYLE_NAME:
-                sStyle = ScStyleNameConversion::ProgrammaticToDisplayName(sValue, SFX_STYLE_FAMILY_PARA );
+                sStyle = ScStyleNameConversion::ProgrammaticToDisplayName(sValue, SfxStyleFamily::Para );
                 break;
             case XML_TOK_CONDITION_BASE_CELL_ADDRESS:
                 sAddress = sValue;
@@ -789,7 +789,7 @@ ScXMLDateContext::ScXMLDateContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
                 sDateType = sValue;
                 break;
             case XML_TOK_COND_DATE_STYLE:
-                sStyle = ScStyleNameConversion::ProgrammaticToDisplayName(sValue, SFX_STYLE_FAMILY_PARA );
+                sStyle = ScStyleNameConversion::ProgrammaticToDisplayName(sValue, SfxStyleFamily::Para );
                 break;
             default:
                 break;
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 9042eb6..a92834e 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -4315,7 +4315,7 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab)
                             default:
                                 SAL_WARN("sc", "unimplemented conditional format export");
                         }
-                        OUString sStyle = ScStyleNameConversion::DisplayToProgrammaticName(pEntry->GetStyle(), SFX_STYLE_FAMILY_PARA);
+                        OUString sStyle = ScStyleNameConversion::DisplayToProgrammaticName(pEntry->GetStyle(), SfxStyleFamily::Para);
                         AddAttribute(XML_NAMESPACE_CALC_EXT, XML_APPLY_STYLE_NAME, sStyle);
                         AddAttribute(XML_NAMESPACE_CALC_EXT, XML_VALUE, aCond.makeStringAndClear());
 
@@ -4464,7 +4464,7 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab)
                     {
                         const ScCondDateFormatEntry& rDateFormat = static_cast<const ScCondDateFormatEntry&>(*pFormatEntry);
                         OUString aDateType = getDateStringForType(rDateFormat.GetDateType());
-                        OUString aStyleName = ScStyleNameConversion::DisplayToProgrammaticName(rDateFormat.GetStyleName(), SFX_STYLE_FAMILY_PARA );
+                        OUString aStyleName = ScStyleNameConversion::DisplayToProgrammaticName(rDateFormat.GetStyleName(), SfxStyleFamily::Para );
                         AddAttribute( XML_NAMESPACE_CALC_EXT, XML_STYLE, aStyleName);
                         AddAttribute( XML_NAMESPACE_CALC_EXT, XML_DATE, aDateType);
                         SvXMLElementExport aElementDateFormat(*this, XML_NAMESPACE_CALC_EXT, XML_DATE_IS, true, true);
diff --git a/sc/source/filter/xml/xmlfonte.cxx b/sc/source/filter/xml/xmlfonte.cxx
index 9d39d60..4654add 100644
--- a/sc/source/filter/xml/xmlfonte.cxx
+++ b/sc/source/filter/xml/xmlfonte.cxx
@@ -86,7 +86,7 @@ ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl(ScXMLExport& rExportP,
     const SfxItemPool* pEditPool(rExportP.GetDocument()->GetEditPool());
     AddFontItems(aEditWhichIds, 3, pEditPool, false);
 
-    SfxStyleSheetIteratorPtr pItr = rExportP.GetDocument()->GetStyleSheetPool()->CreateIterator(SFX_STYLE_FAMILY_PAGE, 0xFFFF);
+    SfxStyleSheetIteratorPtr pItr = rExportP.GetDocument()->GetStyleSheetPool()->CreateIterator(SfxStyleFamily::Page, 0xFFFF);
 
     if(pItr)
     {
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
index 1a20e96..eda1199 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
@@ -228,7 +228,7 @@ sal_Int32 SAL_CALL ScAccessiblePageHeader::getAccessibleChildCount() throw (uno:
         ScDocument& rDoc = mpViewShell->GetDocument();
         // find out how many regions (left,center, right) are with content
 
-        SfxStyleSheetBase* pStyle = rDoc.GetStyleSheetPool()->Find(rDoc.GetPageStyle(mpViewShell->GetLocationData().GetPrintTab()), SFX_STYLE_FAMILY_PAGE);
+        SfxStyleSheetBase* pStyle = rDoc.GetStyleSheetPool()->Find(rDoc.GetPageStyle(mpViewShell->GetLocationData().GetPrintTab()), SfxStyleFamily::Page);
         if (pStyle)
         {
             sal_uInt16 nPageWhichId(0);
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index a5d90f4..0800da9 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -668,7 +668,7 @@ void ScTransferObj::InitDocShell(bool bLimitToPageSize)
         Size aPaperSize = SvxPaperInfo::GetPaperSize( PAPER_A4 );       // Twips
         ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
         OUString aStyleName = pDoc->GetPageStyle( aBlock.aStart.Tab() );
-        SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PAGE );
+        SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SfxStyleFamily::Page );
         if (pStyleSheet)
         {
             const SfxItemSet& rSourceSet = pStyleSheet->GetItemSet();
@@ -676,7 +676,7 @@ void ScTransferObj::InitDocShell(bool bLimitToPageSize)
 
             //  CopyStyleFrom kopiert SetItems mit richtigem Pool
             ScStyleSheetPool* pDestPool = rDestDoc.GetStyleSheetPool();
-            pDestPool->CopyStyleFrom( pStylePool, aStyleName, SFX_STYLE_FAMILY_PAGE );
+            pDestPool->CopyStyleFrom( pStylePool, aStyleName, SfxStyleFamily::Page );
         }
 
         ScViewData aViewData( pDocSh, nullptr );
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index 7ca4a18..3e3d7f1 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -143,7 +143,7 @@ void FillStyleListBox( ScDocument* pDoc, ListBox& rLbStyle )
 {
     rLbStyle.SetSeparatorPos(0);
     std::set<OUString> aStyleNames;
-    SfxStyleSheetIterator aStyleIter( pDoc->GetStyleSheetPool(), SFX_STYLE_FAMILY_PARA );
+    SfxStyleSheetIterator aStyleIter( pDoc->GetStyleSheetPool(), SfxStyleFamily::Para );
     for ( SfxStyleSheetBase* pStyle = aStyleIter.First(); pStyle; pStyle = aStyleIter.Next() )
     {
         OUString aName = pStyle->GetName();
@@ -483,7 +483,7 @@ void StyleSelect( ListBox& rLbStyle, ScDocument* pDoc, SvxFontPrevWindow& rWdPre
     if(rLbStyle.GetSelectEntryPos() == 0)
     {
         // call new style dialog
-        SfxUInt16Item aFamilyItem( SID_STYLE_FAMILY, SFX_STYLE_FAMILY_PARA );
+        SfxUInt16Item aFamilyItem( SID_STYLE_FAMILY, (sal_uInt16) SfxStyleFamily::Para );
         SfxStringItem aRefItem( SID_STYLE_REFERENCE, ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
 
         // unlock the dispatcher so SID_STYLE_NEW can be executed
@@ -504,7 +504,7 @@ void StyleSelect( ListBox& rLbStyle, ScDocument* pDoc, SvxFontPrevWindow& rWdPre
             pDisp->Lock(true);
 
         // Find the new style and add it into the style list boxes
-        SfxStyleSheetIterator aStyleIter( pDoc->GetStyleSheetPool(), SFX_STYLE_FAMILY_PARA );
+        SfxStyleSheetIterator aStyleIter( pDoc->GetStyleSheetPool(), SfxStyleFamily::Para );
         bool bFound = false;
         for ( SfxStyleSheetBase* pStyle = aStyleIter.First(); pStyle && !bFound; pStyle = aStyleIter.Next() )
         {
@@ -532,7 +532,7 @@ void StyleSelect( ListBox& rLbStyle, ScDocument* pDoc, SvxFontPrevWindow& rWdPre
     }
 
     OUString aStyleName = rLbStyle.GetSelectEntry();
-    SfxStyleSheetBase* pStyleSheet = pDoc->GetStyleSheetPool()->Find( aStyleName, SFX_STYLE_FAMILY_PARA );
+    SfxStyleSheetBase* pStyleSheet = pDoc->GetStyleSheetPool()->Find( aStyleName, SfxStyleFamily::Para );
     if(pStyleSheet)
     {
         const SfxItemSet& rSet = pStyleSheet->GetItemSet();
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 398a761..a8f85a0 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1392,7 +1392,7 @@ bool ScDocFunc::ApplyStyle( const ScMarkData& rMark, const OUString& rStyleName,
     }
 
     ScStyleSheet* pStyleSheet = static_cast<ScStyleSheet*>( rDoc.GetStyleSheetPool()->Find(
-                                                rStyleName, SFX_STYLE_FAMILY_PARA ));
+                                                rStyleName, SfxStyleFamily::Para ));
     if (!pStyleSheet)
         return false;
 
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 11af532..72bdfad 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -522,7 +522,7 @@ sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, SfxPrinterChangeFlag
     {
         OUString aStyle = aDocument.GetPageStyle( GetCurTab() );
         ScStyleSheetPool* pStPl = aDocument.GetStyleSheetPool();
-        SfxStyleSheet* pStyleSheet = static_cast<SfxStyleSheet*>(pStPl->Find(aStyle, SFX_STYLE_FAMILY_PAGE));
+        SfxStyleSheet* pStyleSheet = static_cast<SfxStyleSheet*>(pStPl->Find(aStyle, SfxStyleFamily::Page));
         if (pStyleSheet)
         {
             SfxItemSet& rSet = pStyleSheet->GetItemSet();
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index b667891..1bedf91 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1278,10 +1278,10 @@ void ScDocShell::DoAutoStyle( const ScRange& rRange, const OUString& rStyle )
 {
     ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool();
     ScStyleSheet* pStyleSheet =
-        pStylePool->FindCaseIns( rStyle, SFX_STYLE_FAMILY_PARA );
+        pStylePool->FindCaseIns( rStyle, SfxStyleFamily::Para );
     if (!pStyleSheet)
         pStyleSheet = static_cast<ScStyleSheet*>(
-            pStylePool->Find( ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SFX_STYLE_FAMILY_PARA ));
+            pStylePool->Find( ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SfxStyleFamily::Para ));
     if (pStyleSheet)
     {
         OSL_ENSURE(rRange.aStart.Tab() == rRange.aEnd.Tab(),
@@ -1304,7 +1304,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
     if (!pStyle)
         return;
 
-    if ( pStyle->GetFamily() == SFX_STYLE_FAMILY_PAGE )
+    if ( pStyle->GetFamily() == SfxStyleFamily::Page )
     {
         if ( nId == SfxStyleSheetHintId::MODIFIED )
         {
@@ -1344,7 +1344,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
             }
         }
     }
-    else if ( pStyle->GetFamily() == SFX_STYLE_FAMILY_PARA )
+    else if ( pStyle->GetFamily() == SfxStyleFamily::Para )
     {
         if ( nId == SfxStyleSheetHintId::MODIFIED)
         {
@@ -1375,7 +1375,7 @@ void ScDocShell::SetPrintZoom( SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages
 {
     OUString aStyleName = aDocument.GetPageStyle( nTab );
     ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool();
-    SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PAGE );
+    SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SfxStyleFamily::Page );
     OSL_ENSURE( pStyleSheet, "PageStyle not found" );
     if ( pStyleSheet )
     {
@@ -1411,7 +1411,7 @@ bool ScDocShell::AdjustPrintZoom( const ScRange& rRange )
 
     OUString aStyleName = aDocument.GetPageStyle( nTab );
     ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool();
-    SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PAGE );
+    SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SfxStyleFamily::Page );
     OSL_ENSURE( pStyleSheet, "PageStyle not found" );
     if ( pStyleSheet )
     {
@@ -1539,7 +1539,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
                     OUString aOldName = aDocument.GetPageStyle( nCurTab );
                     ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool();
                     SfxStyleSheetBase* pStyleSheet
-                        = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE );
+                        = pStylePool->Find( aOldName, SfxStyleFamily::Page );
 
                     OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" );
 
@@ -1588,7 +1588,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
                             if (bUndo)
                             {
                                 GetUndoManager()->AddUndoAction(
-                                        new ScUndoModifyStyle( this, SFX_STYLE_FAMILY_PAGE,
+                                        new ScUndoModifyStyle( this, SfxStyleFamily::Page,
                                                     aOldData, aNewData ) );
                             }
 
@@ -1613,7 +1613,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
                         = aDocument.GetStyleSheetPool();
 
                     SfxStyleSheetBase* pStyleSheet
-                        = pStylePool->Find( aStr, SFX_STYLE_FAMILY_PAGE );
+                        = pStylePool->Find( aStr, SfxStyleFamily::Page );
 
                     OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" );
 
@@ -1761,7 +1761,7 @@ void ScDocShell::GetStatePageStyle( SfxViewShell&   /* rCaller */,
                 {
                     OUString            aStr        = aDocument.GetPageStyle( nCurTab );
                     ScStyleSheetPool*   pStylePool  = aDocument.GetStyleSheetPool();
-                    SfxStyleSheetBase*  pStyleSheet = pStylePool->Find( aStr, SFX_STYLE_FAMILY_PAGE );
+                    SfxStyleSheetBase*  pStyleSheet = pStylePool->Find( aStr, SfxStyleFamily::Page );
 
                     OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" );
 
@@ -2068,7 +2068,7 @@ void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet,
         ScStyleSheetPool*  pStylePool  = aDocument.GetStyleSheetPool();
         SfxStyleSheetBase* pStyleSheet = pStylePool->
                                             Find( aDocument.GetPageStyle( nCurTab ),
-                                                  SFX_STYLE_FAMILY_PAGE );
+                                                  SfxStyleFamily::Page );
 
         OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" );
 
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 9198313..382900a 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -199,7 +199,7 @@ SfxStyleSheetBasePool* ScDocShell::GetStyleSheetPool()
 
 static void lcl_AdjustPool( SfxStyleSheetBasePool* pStylePool )
 {
-    pStylePool->SetSearchMask(SFX_STYLE_FAMILY_PAGE);
+    pStylePool->SetSearchMask(SfxStyleFamily::Page);
     SfxStyleSheetBase *pStyle = pStylePool->First();
     while ( pStyle )
     {
@@ -252,8 +252,8 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, bool bReplace, bool bCellS
     ScStyleSheetPool* pDestPool = aDocument.GetStyleSheetPool();
 
     SfxStyleFamily eFamily = bCellStyles ?
-            ( bPageStyles ? SFX_STYLE_FAMILY_ALL : SFX_STYLE_FAMILY_PARA ) :
-            SFX_STYLE_FAMILY_PAGE;
+            ( bPageStyles ? SfxStyleFamily::All : SfxStyleFamily::Para ) :
+            SfxStyleFamily::Page;
     SfxStyleSheetIterator aIter( pSourcePool, eFamily );
     sal_uInt16 nSourceCount = aIter.Count();
     if ( nSourceCount == 0 )
diff --git a/sc/source/ui/styleui/scstyles.src b/sc/source/ui/styleui/scstyles.src
index 485ac44..ccb7493 100644
--- a/sc/source/ui/styleui/scstyles.src
+++ b/sc/source/ui/styleui/scstyles.src
@@ -26,7 +26,7 @@ SfxStyleFamilies DLG_STYLE_DESIGNER
     {
         SfxStyleFamilyItem
         {
-            StyleFamily = SFX_STYLE_FAMILY_PARA ;
+            StyleFamily = SfxStyleFamily::Para ;
             FilterList [ en-US ] =
             {
                 < "All Styles" ; SFXSTYLEBIT_ALL_VISIBLE ; > ;
@@ -39,7 +39,7 @@ SfxStyleFamilies DLG_STYLE_DESIGNER
 
         SfxStyleFamilyItem
         {
-            StyleFamily = SFX_STYLE_FAMILY_PAGE ;
+            StyleFamily = SfxStyleFamily::Page ;
             FilterList [ en-US ] =
             {
                 < "All Styles" ; SFXSTYLEBIT_ALL ; > ;
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 04e8e8f..8379d46 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -1707,7 +1707,7 @@ void ScUndoSelectionStyle::DoChange( const bool bUndo )
     {
         ScStyleSheetPool* pStlPool = rDoc.GetStyleSheetPool();
         ScStyleSheet* pStyleSheet =
-            static_cast<ScStyleSheet*>( pStlPool->Find( aStyleName, SFX_STYLE_FAMILY_PARA ) );
+            static_cast<ScStyleSheet*>( pStlPool->Find( aStyleName, SfxStyleFamily::Para ) );
         if (!pStyleSheet)
         {
             OSL_FAIL("StyleSheet not found");
@@ -1746,7 +1746,7 @@ void ScUndoSelectionStyle::Repeat(SfxRepeatTarget& rTarget)
         ScDocument& rDoc = pDocShell->GetDocument();
         ScStyleSheetPool* pStlPool = rDoc.GetStyleSheetPool();
         ScStyleSheet* pStyleSheet = static_cast<ScStyleSheet*>( pStlPool->
-                                            Find( aStyleName, SFX_STYLE_FAMILY_PARA ));
+                                            Find( aStyleName, SfxStyleFamily::Para ));
         if (!pStyleSheet)
         {
             OSL_FAIL("StyleSheet not found");
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index 41a5a83..f243308 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -591,7 +591,7 @@ void ScUndoPrintZoom::DoChange( bool bUndo )
     ScDocument& rDoc = pDocShell->GetDocument();
     OUString aStyleName = rDoc.GetPageStyle( nTab );
     ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
-    SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PAGE );
+    SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SfxStyleFamily::Page );
     OSL_ENSURE( pStyleSheet, "PageStyle not found" );
     if ( pStyleSheet )
     {
diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx
index 9d336fa..96ad6cc 100644
--- a/sc/source/ui/undo/undostyl.cxx
+++ b/sc/source/ui/undo/undostyl.cxx
@@ -94,7 +94,7 @@ ScUndoModifyStyle::~ScUndoModifyStyle()
 
 OUString ScUndoModifyStyle::GetComment() const
 {
-    sal_uInt16 nId = (eFamily == SFX_STYLE_FAMILY_PARA) ?
+    sal_uInt16 nId = (eFamily == SfxStyleFamily::Para) ?
                                 STR_UNDO_EDITCELLSTYLE :
                                 STR_UNDO_EDITPAGESTYLE;
     return ScGlobal::GetRscString( nId );
@@ -143,7 +143,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const OUString& rName,
         // create style (with new name)
         pStyle = &pStlPool->Make( aNewName, eStyleFamily, SFXSTYLEBIT_USERDEF );
 
-        if ( eStyleFamily == SFX_STYLE_FAMILY_PARA )
+        if ( eStyleFamily == SfxStyleFamily::Para )
             rDoc.GetPool()->CellStyleCreated( aNewName, &rDoc );
     }
 
@@ -151,7 +151,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const OUString& rName,
     {
         if ( bDelete )
         {
-            if ( eStyleFamily == SFX_STYLE_FAMILY_PARA )
+            if ( eStyleFamily == SfxStyleFamily::Para )
                 lcl_DocStyleChanged( &rDoc, pStyle, true );      // TRUE: remove usage of style
             else
                 rDoc.RemovePageStyleInUse( rName );
@@ -173,7 +173,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const OUString& rName,
             if (pNewSet)
                 rStyleSet.Set( *pNewSet, false );
 
-            if ( eStyleFamily == SFX_STYLE_FAMILY_PARA )
+            if ( eStyleFamily == SfxStyleFamily::Para )
             {
                 lcl_DocStyleChanged( &rDoc, pStyle, false );     // cell styles: row heights
             }
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 1247ab21..213d83f 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -2066,7 +2066,7 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const OUString& aPropert
                         break;
                     case SC_WID_UNO_CELLSTYL:
                         aAny <<= OUString( ScStyleNameConversion::DisplayToProgrammaticName(
-                                    ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SFX_STYLE_FAMILY_PARA ) );
+                                    ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SfxStyleFamily::Para ) );
                         break;
                     case SC_WID_UNO_TBLBORD:
                     case SC_WID_UNO_TBLBORD2:
@@ -2351,7 +2351,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
                         OUString aStrVal;
                         aValue >>= aStrVal;
                         OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName(
-                                                            aStrVal, SFX_STYLE_FAMILY_PARA ));
+                                                            aStrVal, SfxStyleFamily::Para ));
                         pDocShell->GetDocFunc().ApplyStyle( *GetMarkData(), aString, true );
                     }
                     break;
@@ -2539,7 +2539,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
                         if (pStyle)
                             aStyleName = pStyle->GetName();
                         rAny <<= OUString( ScStyleNameConversion::DisplayToProgrammaticName(
-                                                                aStyleName, SFX_STYLE_FAMILY_PARA ) );
+                                                                aStyleName, SfxStyleFamily::Para ) );
                     }
                     break;
                 case SC_WID_UNO_TBLBORD:
@@ -8130,7 +8130,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
             OUString aStrVal;
             aValue >>= aStrVal;
             OUString aNewStr(ScStyleNameConversion::ProgrammaticToDisplayName(
-                                                aStrVal, SFX_STYLE_FAMILY_PAGE ));
+                                                aStrVal, SfxStyleFamily::Page ));
 
             //! Undo? (auch bei SID_STYLE_APPLY an der View)
 
@@ -8455,7 +8455,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
         else if ( pEntry->nWID == SC_WID_UNO_PAGESTL )
         {
             rAny <<= OUString( ScStyleNameConversion::DisplayToProgrammaticName(
-                                rDoc.GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE ) );
+                                rDoc.GetPageStyle( nTab ), SfxStyleFamily::Page ) );
         }
         else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
         {
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index 2abcfb9..e4692ae 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -308,7 +308,7 @@ void SAL_CALL ScTableConditionalFormat::addNew(
             OUString aStrVal;
             if ( rProp.Value >>= aStrVal )
                 aEntry.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName(
-                                                aStrVal, SFX_STYLE_FAMILY_PARA );
+                                                aStrVal, SfxStyleFamily::Para );
         }
         else if ( rProp.Name == SC_UNONAME_FORMULANMSP1 )
         {
@@ -592,14 +592,14 @@ void SAL_CALL ScTableConditionalEntry::setSourcePosition( const table::CellAddre
 OUString SAL_CALL ScTableConditionalEntry::getStyleName() throw(uno::RuntimeException, std::exception)
 {
     SolarMutexGuard aGuard;
-    return ScStyleNameConversion::DisplayToProgrammaticName( aData.maStyle, SFX_STYLE_FAMILY_PARA );
+    return ScStyleNameConversion::DisplayToProgrammaticName( aData.maStyle, SfxStyleFamily::Para );
 }
 
 void SAL_CALL ScTableConditionalEntry::setStyleName( const OUString& aStyleName )
                                             throw(uno::RuntimeException, std::exception)
 {
     SolarMutexGuard aGuard;
-    aData.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName( aStyleName, SFX_STYLE_FAMILY_PARA );
+    aData.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName( aStyleName, SfxStyleFamily::Para );
 }
 
 ScTableValidationObj::ScTableValidationObj(ScDocument* pDoc, sal_uLong nKey,
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 0d242d7..ddfa113 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -412,10 +412,10 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
                 new ScEditFieldObj(xNullContent, nullptr, getFieldType(nType), ESelection())));
         }   break;
         case Type::CELLSTYLE:
-            xRet.set(static_cast<style::XStyle*>(new ScStyleObj( nullptr, SFX_STYLE_FAMILY_PARA, OUString() )));
+            xRet.set(static_cast<style::XStyle*>(new ScStyleObj( nullptr, SfxStyleFamily::Para, OUString() )));
             break;
         case Type::PAGESTYLE:
-            xRet.set(static_cast<style::XStyle*>(new ScStyleObj( nullptr, SFX_STYLE_FAMILY_PAGE, OUString() )));
+            xRet.set(static_cast<style::XStyle*>(new ScStyleObj( nullptr, SfxStyleFamily::Page, OUString() )));
             break;
         case Type::AUTOFORMAT:
             xRet.set(static_cast<container::XIndexAccess*>(new ScAutoFormatObj( SC_AFMTOBJ_INVALID )));
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index d5942b0..4a7b14f 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -372,7 +372,7 @@ static const SfxItemPropertyMap* lcl_GetFooterStyleMap()
 #define SC_FAMILYNAME_CELL  "CellStyles"
 #define SC_FAMILYNAME_PAGE  "PageStyles"
 
-static const sal_uInt16 aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SFX_STYLE_FAMILY_PARA, SFX_STYLE_FAMILY_PAGE };
+static const SfxStyleFamily aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SfxStyleFamily::Para, SfxStyleFamily::Page };
 
 using sc::HMMToTwips;
 using sc::TwipsToHMM;
@@ -422,14 +422,14 @@ void ScStyleFamiliesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
 
 // XStyleFamilies
 
-ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(sal_uInt16 nType) const
+ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(SfxStyleFamily nType) const
 {
     if ( pDocShell )
     {
-        if ( nType == SFX_STYLE_FAMILY_PARA )
-            return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PARA );
-        else if ( nType == SFX_STYLE_FAMILY_PAGE )
-            return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PAGE );
+        if ( nType == SfxStyleFamily::Para )
+            return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Para );
+        else if ( nType == SfxStyleFamily::Page )
+            return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Page );
     }
     OSL_FAIL("getStyleFamilyByType: keine DocShell oder falscher Typ");
     return nullptr;
@@ -448,9 +448,9 @@ ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByName_Impl(const OUString& aName
     if ( pDocShell )
     {
         if ( aName == SC_FAMILYNAME_CELL )
-            return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PARA );
+            return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Para );
         else if ( aName == SC_FAMILYNAME_PAGE )
-            return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PAGE );
+            return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Page );
     }
     // no assertion - called directly from getByName
     return nullptr;
@@ -682,7 +682,7 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno::
         if ( pStyleObj && pStyleObj->GetFamily() == eFamily &&
                 !pStyleObj->IsInserted() )  // noch nicht eingefuegt?
         {
-            OUString aNameStr(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ));
+            OUString aNameStr(ScStyleNameConversion::ProgrammaticToDisplayName( aName, eFamily ));
 
             ScDocument& rDoc = pDocShell->GetDocument();
             ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
@@ -694,7 +694,7 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno::
             {
                 (void)pStylePool->Make( aNameStr, eFamily, SFXSTYLEBIT_USERDEF );
 
-                if ( eFamily == SFX_STYLE_FAMILY_PARA && !rDoc.IsImportingXML() )
+                if ( eFamily == SfxStyleFamily::Para && !rDoc.IsImportingXML() )
                     rDoc.GetPool()->CellStyleCreated( aNameStr, &rDoc );
 
                 pStyleObj->InitDoc( pDocShell, aNameStr );  // Objekt kann benutzt werden
@@ -735,7 +735,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const OUString& aName )
     bool bFound = false;
     if ( pDocShell )
     {
-        OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ));
+        OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, eFamily ));
 
         ScDocument& rDoc = pDocShell->GetDocument();
         ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
@@ -747,7 +747,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const OUString& aName )
         if (pStyle)
         {
             bFound = true;
-            if ( eFamily == SFX_STYLE_FAMILY_PARA )
+            if ( eFamily == SfxStyleFamily::Para )
             {
                 // wie ScViewFunc::RemoveStyleSheetInUse
                 ScopedVclPtrInstance< VirtualDevice > pVDev;
@@ -831,7 +831,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getByName( const OUString& aName )
 {
     SolarMutexGuard aGuard;
     uno::Reference< style::XStyle > xObj(
-        GetObjectByName_Impl( ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ) ));
+        GetObjectByName_Impl( ScStyleNameConversion::ProgrammaticToDisplayName( aName, eFamily ) ));
     if (xObj.is())
         return uno::makeAny(xObj);
     else
@@ -860,7 +860,7 @@ uno::Sequence<OUString> SAL_CALL ScStyleFamilyObj::getElementNames()
             OSL_ENSURE( nPos<nCount, "Anzahl durcheinandergekommen" );
             if (nPos<nCount)
                 pAry[nPos++] = ScStyleNameConversion::DisplayToProgrammaticName(
-                                    pStyle->GetName(), sal::static_int_cast<sal_uInt16>(eFamily) );
+                                    pStyle->GetName(), eFamily );
             pStyle = aIter.Next();
         }
         return aSeq;
@@ -874,7 +874,7 @@ sal_Bool SAL_CALL ScStyleFamilyObj::hasByName( const OUString& aName )
     SolarMutexGuard aGuard;
     if ( pDocShell )
     {
-        OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ));
+        OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, eFamily ));
 
         ScDocument& rDoc = pDocShell->GetDocument();
         ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
@@ -907,9 +907,9 @@ uno::Any SAL_CALL ScStyleFamilyObj::getPropertyValue( const OUString& sPropertyN
         sal_uInt32 nResId = 0;
         switch ( eFamily )
         {
-            case SFX_STYLE_FAMILY_PARA:
+            case SfxStyleFamily::Para:
                 nResId = STR_STYLE_FAMILY_CELL; break;
-            case SFX_STYLE_FAMILY_PAGE:
+            case SfxStyleFamily::Page:
                 nResId = STR_STYLE_FAMILY_PAGE; break;
             default:
                 OSL_FAIL( "ScStyleFamilyObj::getPropertyValue(): invalid family" );
@@ -951,7 +951,7 @@ void SAL_CALL ScStyleFamilyObj::removeVetoableChangeListener( const OUString&, c
 //  Default-ctor wird fuer die Reflection gebraucht
 
 ScStyleObj::ScStyleObj(ScDocShell* pDocSh, SfxStyleFamily eFam, const OUString& rName) :
-    pPropSet( (eFam == SFX_STYLE_FAMILY_PARA) ? lcl_GetCellStyleSet() : lcl_GetPageStyleSet() ),
+    pPropSet( (eFam == SfxStyleFamily::Para) ? lcl_GetCellStyleSet() : lcl_GetPageStyleSet() ),
     pDocShell( pDocSh ),
     eFamily( eFam ),
     aStyleName( rName )
@@ -1060,7 +1060,7 @@ OUString SAL_CALL ScStyleObj::getParentStyle() throw(uno::RuntimeException, std:
     SolarMutexGuard aGuard;
     SfxStyleSheetBase* pStyle = GetStyle_Impl();
     if (pStyle)
-        return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetParent(), sal::static_int_cast<sal_uInt16>(eFamily) );
+        return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetParent(), eFamily );
     return OUString();
 }
 
@@ -1074,20 +1074,20 @@ void SAL_CALL ScStyleObj::setParentStyle( const OUString& rParentStyle )
     if (pStyle)
     {
         //  cell styles cannot be modified if any sheet is protected
-        if ( eFamily == SFX_STYLE_FAMILY_PARA && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
+        if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
             return;         //! exception?
 
         //! DocFunc-Funktion??
         //! Undo ?????????????
 
-        OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( rParentStyle, sal::static_int_cast<sal_uInt16>(eFamily) ));
+        OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( rParentStyle, eFamily ));
         bool bOk = pStyle->SetParent( aString );
         if (bOk)
         {
             //  wie bei setPropertyValue
 
             ScDocument& rDoc = pDocShell->GetDocument();
-            if ( eFamily == SFX_STYLE_FAMILY_PARA )
+            if ( eFamily == SfxStyleFamily::Para )
             {
                 //  Zeilenhoehen anpassen...
 
@@ -1121,7 +1121,7 @@ OUString SAL_CALL ScStyleObj::getName() throw(uno::RuntimeException, std::except
     SolarMutexGuard aGuard;
     SfxStyleSheetBase* pStyle = GetStyle_Impl();
     if (pStyle)
-        return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetName(), sal::static_int_cast<sal_uInt16>(eFamily) );
+        return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetName(), eFamily );
     return OUString();
 }
 
@@ -1133,7 +1133,7 @@ void SAL_CALL ScStyleObj::setName( const OUString& aNewName )
     if (pStyle)
     {
         //  cell styles cannot be renamed if any sheet is protected
-        if ( eFamily == SFX_STYLE_FAMILY_PARA && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
+        if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
             return;         //! exception?
 
         //! DocFunc-Funktion??
@@ -1145,11 +1145,11 @@ void SAL_CALL ScStyleObj::setName( const OUString& aNewName )
             aStyleName = aNewName;       //! notify other objects for this style?
 
             ScDocument& rDoc = pDocShell->GetDocument();
-            if ( eFamily == SFX_STYLE_FAMILY_PARA && !rDoc.IsImportingXML() )
+            if ( eFamily == SfxStyleFamily::Para && !rDoc.IsImportingXML() )
                 rDoc.GetPool()->CellStyleCreated( aNewName, &rDoc );
 
             //  Zellvorlagen = 2, Seitenvorlagen = 4
-            sal_uInt16 nId = ( eFamily == SFX_STYLE_FAMILY_PARA ) ?
+            sal_uInt16 nId = ( eFamily == SfxStyleFamily::Para ) ?
                             SID_STYLE_FAMILY2 : SID_STYLE_FAMILY4;
             SfxBindings* pBindings = pDocShell->GetViewBindings();
             if (pBindings)
@@ -1178,7 +1178,7 @@ const SfxItemSet* ScStyleObj::GetStyleItemSet_Impl( const OUString& rPropName,
     if (pStyle)
     {
         const SfxItemPropertySimpleEntry* pEntry = nullptr;
-        if ( eFamily == SFX_STYLE_FAMILY_PAGE )
+        if ( eFamily == SfxStyleFamily::Page )
         {
             pEntry = lcl_GetHeaderStyleMap()->getByName( rPropName );
             if ( pEntry )     // only item-wids in header/footer map
@@ -1444,7 +1444,7 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault()
     if ( pStyle )
     {
         //  cell styles cannot be modified if any sheet is protected
-        if ( eFamily == SFX_STYLE_FAMILY_PARA && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
+        if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
             throw uno::RuntimeException();
 
         SfxItemSet& rSet = pStyle->GetItemSet();
@@ -1453,7 +1453,7 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault()
         //! merge with SetOneProperty
 
         ScDocument& rDoc = pDocShell->GetDocument();
-        if ( eFamily == SFX_STYLE_FAMILY_PARA )
+        if ( eFamily == SfxStyleFamily::Para )
         {
             //  row heights
 
@@ -1558,12 +1558,12 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt
     if ( pStyle && pEntry )
     {
         //  cell styles cannot be modified if any sheet is protected
-        if ( eFamily == SFX_STYLE_FAMILY_PARA && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
+        if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
             throw uno::RuntimeException();
 
         SfxItemSet& rSet = pStyle->GetItemSet();    // direkt im lebenden Style aendern...
         bool bDone = false;
-        if ( eFamily == SFX_STYLE_FAMILY_PAGE )
+        if ( eFamily == SfxStyleFamily::Page )
         {
             if(pEntry->nWID == SC_WID_UNO_HEADERSET)
             {
@@ -1835,7 +1835,7 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt
         //! Undo ?????????????
 
         ScDocument& rDoc = pDocShell->GetDocument();
-        if ( eFamily == SFX_STYLE_FAMILY_PARA )
+        if ( eFamily == SfxStyleFamily::Para )
         {
             //  Zeilenhoehen anpassen...
 
@@ -2017,7 +2017,7 @@ sal_Bool SAL_CALL ScStyleObj::supportsService( const OUString& rServiceName )
 uno::Sequence<OUString> SAL_CALL ScStyleObj::getSupportedServiceNames()
                                                     throw(uno::RuntimeException, std::exception)
 {
-    bool bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE );
+    bool bPage = ( eFamily == SfxStyleFamily::Page );
     uno::Sequence<OUString> aRet(2);
     OUString* pArray = aRet.getArray();
     pArray[0] = SCSTYLE_SERVICE;
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 0850aad..258a9c3 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -196,7 +196,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
                 SCTAB           nCurTab     = GetViewData()->GetTabNo();
                 OUString        aPageStyle  = pDoc->GetPageStyle( nCurTab );
                 SfxStyleSheet*  pStyleSheet = pStylePool ? static_cast<SfxStyleSheet*>(pStylePool->
-                                    Find( aPageStyle, SFX_STYLE_FAMILY_PAGE )) : nullptr;
+                                    Find( aPageStyle, SfxStyleFamily::Page )) : nullptr;
 
                 if ( pStyleSheet )
                     rSet.Put( SfxTemplateItem( nSlotId, aPageStyle ) );
@@ -217,7 +217,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
                 pTabViewShell->GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
                 SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get());
 
-                bool bPage = pFamilyItem && SFX_STYLE_FAMILY_PAGE == SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue());
+                bool bPage = pFamilyItem && SfxStyleFamily::Page == SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue());
 
                 if ( bProtected || bPage )
                     rSet.DisableItem( nSlotId );
@@ -232,7 +232,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
                 std::unique_ptr<SfxPoolItem> pItem;
                 pTabViewShell->GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
                 SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get());
-                bool bPage = pFamilyItem && SFX_STYLE_FAMILY_PAGE == SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue());
+                bool bPage = pFamilyItem && SfxStyleFamily::Page == SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue());
 
                 if ( bProtected && !bPage )
                     rSet.DisableItem( nSlotId );
@@ -274,7 +274,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
     {
         if (nSlotId == SID_STYLE_PREVIEW)
         {
-            SfxStyleFamily eFamily = SFX_STYLE_FAMILY_PARA;
+            SfxStyleFamily eFamily = SfxStyleFamily::Para;
             const SfxPoolItem* pFamItem;
             if ( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY, true, &pFamItem ) )
                 eFamily = (SfxStyleFamily) static_cast<const SfxUInt16Item*>(pFamItem)->GetValue();
@@ -282,7 +282,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
             OUString aStyleName;
             if (pArgs && SfxItemState::SET == pArgs->GetItemState( nSlotId, true, &pNameItem ))
                 aStyleName = static_cast<const SfxStringItem*>(pNameItem)->GetValue();
-            if ( eFamily == SFX_STYLE_FAMILY_PARA ) // CellStyles
+            if ( eFamily == SfxStyleFamily::Para ) // CellStyles
             {
                 ScMarkData aFuncMark( pViewData->GetMarkData() );
                 ScViewUtil::UnmarkFiltered( aFuncMark, &rDoc );
@@ -354,7 +354,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
         ScStyleSaveData aOldData;       // for undo/redo
         ScStyleSaveData aNewData;
 
-        SfxStyleFamily eFamily = SFX_STYLE_FAMILY_PARA;
+        SfxStyleFamily eFamily = SfxStyleFamily::Para;
         const SfxPoolItem* pFamItem;
         if ( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY, true, &pFamItem ) )
             eFamily = (SfxStyleFamily) static_cast<const SfxUInt16Item*>(pFamItem)->GetValue();
@@ -362,9 +362,9 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
         {
             OUString sFamily = static_cast<const SfxStringItem*>(pFamItem)->GetValue();
             if (sFamily == "CellStyles")
-                eFamily = SFX_STYLE_FAMILY_PARA;
+                eFamily = SfxStyleFamily::Para;
             else if (sFamily == "PageStyles")
-                eFamily = SFX_STYLE_FAMILY_PAGE;
+                eFamily = SfxStyleFamily::Page;
         }
 
         OUString                aStyleName;
@@ -495,7 +495,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
 
         switch ( eFamily )
         {
-            case SFX_STYLE_FAMILY_PARA:
+            case SfxStyleFamily::Para:
             {
                 switch ( nSlotId )
                 {
@@ -652,10 +652,10 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
                     default:
                         break;
                 }
-            } // case SFX_STYLE_FAMILY_PARA:
+            } // case SfxStyleFamily::Para:
             break;
 
-            case SFX_STYLE_FAMILY_PAGE:
+            case SfxStyleFamily::Page:
             {
                 switch ( nSlotId )
                 {
@@ -764,7 +764,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
                     default:
                         break;
                 } // switch ( nSlotId )
-            } // case SFX_STYLE_FAMILY_PAGE:
+            } // case SfxStyleFamily::Page:
             break;
 
             default:
@@ -786,11 +786,11 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
 
                 switch ( eFam )
                 {
-                    case SFX_STYLE_FAMILY_PAGE:
+                    case SfxStyleFamily::Page:
                         nRsc = RID_SCDLG_STYLES_PAGE;
                         break;
 
-                    case SFX_STYLE_FAMILY_PARA:
+                    case SfxStyleFamily::Para:
                     default:
                         {
                             SfxItemSet& rSet = pStyleSheet->GetItemSet();
@@ -876,7 +876,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
 
                         // Attribute comparisons (earlier in ModifyStyleSheet) now here
                         // with the old values (the style is already changed)
-                        if ( SFX_STYLE_FAMILY_PARA == eFam )
+                        if ( SfxStyleFamily::Para == eFam )
                         {
                             SfxItemSet& rNewSet = pStyleSheet->GetItemSet();
                             bool bNumFormatChanged;
@@ -923,7 +923,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
 
                         pDocSh->SetDocumentModified();
 
-                        if ( SFX_STYLE_FAMILY_PARA == eFam )
+                        if ( SfxStyleFamily::Para == eFam )
                         {
                             ScTabViewShell::UpdateNumberFormatter(
                                 static_cast<const SvxNumberInfoItem&>(

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list