[Libreoffice-commits] core.git: sd/inc sd/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Apr 3 08:20:01 UTC 2020


 sd/inc/pres.hxx                                           |   41 -
 sd/source/core/anminfo.cxx                                |    4 
 sd/source/core/sdpage.cxx                                 |  383 +++++++-------
 sd/source/core/sdpage2.cxx                                |    6 
 sd/source/core/undo/undoobjects.cxx                       |   12 
 sd/source/filter/html/htmlex.cxx                          |   20 
 sd/source/filter/ppt/pptin.cxx                            |   86 +--
 sd/source/filter/xml/sdxmlwrp.cxx                         |    4 
 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx |    2 
 sd/source/ui/dlg/PhotoAlbumDialog.cxx                     |    4 
 sd/source/ui/dlg/headerfooterdlg.cxx                      |   14 
 sd/source/ui/dlg/masterlayoutdlg.cxx                      |   24 
 sd/source/ui/func/fuexpand.cxx                            |   10 
 sd/source/ui/func/fuinsert.cxx                            |    4 
 sd/source/ui/func/fuinsfil.cxx                            |    2 
 sd/source/ui/func/fusumry.cxx                             |    6 
 sd/source/ui/func/futext.cxx                              |   10 
 sd/source/ui/inc/DrawViewShell.hxx                        |    2 
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx    |    4 
 sd/source/ui/table/tablefunction.cxx                      |    4 
 sd/source/ui/unoidl/unoobj.cxx                            |    2 
 sd/source/ui/unoidl/unopage.cxx                           |   85 +--
 sd/source/ui/view/DocumentRenderer.cxx                    |    2 
 sd/source/ui/view/drawview.cxx                            |   26 
 sd/source/ui/view/drviews1.cxx                            |    2 
 sd/source/ui/view/drviews2.cxx                            |    8 
 sd/source/ui/view/drviews7.cxx                            |    6 
 sd/source/ui/view/drviewse.cxx                            |    4 
 sd/source/ui/view/outlnvsh.cxx                            |   10 
 sd/source/ui/view/outlview.cxx                            |   20 
 sd/source/ui/view/sdview.cxx                              |   34 -
 sd/source/ui/view/sdview2.cxx                             |    2 
 sd/source/ui/view/sdview4.cxx                             |    6 
 sd/source/ui/view/sdview5.cxx                             |   14 
 34 files changed, 433 insertions(+), 430 deletions(-)

New commits:
commit 10055ff899ed8f9c205155cd15c6de81cba37471
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Thu Apr 2 21:04:59 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Apr 3 10:19:24 2020 +0200

    convert PresObjKind to scoped enum
    
    Change-Id: I30761f15f46f91435e80296c4f685bc691bb6304
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91600
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sd/inc/pres.hxx b/sd/inc/pres.hxx
index d5b29c3cb04d..6019283af66b 100644
--- a/sd/inc/pres.hxx
+++ b/sd/inc/pres.hxx
@@ -19,28 +19,27 @@
 #ifndef INCLUDED_SD_INC_PRES_HXX
 #define INCLUDED_SD_INC_PRES_HXX
 
-enum PresObjKind
+enum class PresObjKind
 {
-    PRESOBJ_NONE = 0,
-    PRESOBJ_TITLE,
-    PRESOBJ_OUTLINE,
-    PRESOBJ_TEXT,
-    PRESOBJ_GRAPHIC,
-    PRESOBJ_OBJECT,
-    PRESOBJ_CHART,
-    PRESOBJ_ORGCHART,
-    PRESOBJ_TABLE,
-    PRESOBJ_PAGE,
-    PRESOBJ_HANDOUT,
-    PRESOBJ_NOTES,
-    PRESOBJ_HEADER,
-    PRESOBJ_FOOTER,
-    PRESOBJ_DATETIME,
-    PRESOBJ_SLIDENUMBER,
-    PRESOBJ_CALC,
-    PRESOBJ_MEDIA,
-
-    PRESOBJ_MAX
+    NONE = 0,
+    Title,
+    Outline,
+    Text,
+    Graphic,
+    Object,
+    Chart,
+    OrgChart,
+    Table,
+    Page,
+    Handout,
+    Notes,
+    Header,
+    Footer,
+    DateTime,
+    SlideNumber,
+    Calc,
+    Media,
+    LAST = Media
 };
 
 enum class PageKind
diff --git a/sd/source/core/anminfo.cxx b/sd/source/core/anminfo.cxx
index d54a318d67d4..5abc0accf39e 100644
--- a/sd/source/core/anminfo.cxx
+++ b/sd/source/core/anminfo.cxx
@@ -28,7 +28,7 @@ using namespace ::com::sun::star;
 
 SdAnimationInfo::SdAnimationInfo(SdrObject& rObject)
                : SdrObjUserData(SdrInventor::StarDrawUserData, SD_ANIMATIONINFO_ID),
-                 mePresObjKind              (PRESOBJ_NONE),
+                 mePresObjKind              (PresObjKind::NONE),
                  meEffect                   (presentation::AnimationEffect_NONE),
                  meTextEffect               (presentation::AnimationEffect_NONE),
                  meSpeed                    (presentation::AnimationSpeed_SLOW),
@@ -52,7 +52,7 @@ SdAnimationInfo::SdAnimationInfo(SdrObject& rObject)
 
 SdAnimationInfo::SdAnimationInfo(const SdAnimationInfo& rAnmInfo, SdrObject& rObject)
                : SdrObjUserData             (rAnmInfo),
-                 mePresObjKind               (PRESOBJ_NONE),
+                 mePresObjKind               (PresObjKind::NONE),
                  meEffect                   (rAnmInfo.meEffect),
                  meTextEffect               (rAnmInfo.meTextEffect),
                  meSpeed                    (rAnmInfo.meSpeed),
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 7b50a3a9b0f9..8f697e1ec2f5 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <algorithm>
+#include <array>
 
 #include <comphelper/classids.hxx>
 #include <comphelper/embeddedobjectcontainer.hxx>
@@ -212,17 +213,17 @@ SdrObject* SdPage::GetPresObj(PresObjKind eObjKind, int nIndex, bool bFuzzySearc
             {
                 bFound = true;
             }
-            else if( bFuzzySearch && (eObjKind == PRESOBJ_OUTLINE) )
+            else if( bFuzzySearch && (eObjKind == PresObjKind::Outline) )
             {
                 switch( pInfo->mePresObjKind )
                 {
-                case PRESOBJ_GRAPHIC:
-                case PRESOBJ_OBJECT:
-                case PRESOBJ_CHART:
-                case PRESOBJ_ORGCHART:
-                case PRESOBJ_TABLE:
-                case PRESOBJ_CALC:
-                case PRESOBJ_MEDIA:
+                case PresObjKind::Graphic:
+                case PresObjKind::Object:
+                case PresObjKind::Chart:
+                case PresObjKind::OrgChart:
+                case PresObjKind::Table:
+                case PresObjKind::Calc:
+                case PresObjKind::Media:
                     bFound = true;
                     break;
                 default:
@@ -287,7 +288,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
 
     switch( eObjKind )
     {
-        case PRESOBJ_TITLE:
+        case PresObjKind::Title:
         {
             pSdrObj = new SdrRectObj(getSdrModelFromSdrPage(), OBJ_TITLETEXT);
 
@@ -298,7 +299,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
         }
         break;
 
-        case PRESOBJ_OUTLINE:
+        case PresObjKind::Outline:
         {
             pSdrObj = new SdrRectObj(getSdrModelFromSdrPage(), OBJ_OUTLINETEXT);
 
@@ -309,7 +310,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
         }
         break;
 
-        case PRESOBJ_NOTES:
+        case PresObjKind::Notes:
         {
             pSdrObj = new SdrRectObj(getSdrModelFromSdrPage(), OBJ_TEXT);
 
@@ -320,13 +321,13 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
         }
         break;
 
-        case PRESOBJ_TEXT:
+        case PresObjKind::Text:
         {
             pSdrObj = new SdrRectObj(getSdrModelFromSdrPage(), OBJ_TEXT);
         }
         break;
 
-        case PRESOBJ_GRAPHIC:
+        case PresObjKind::Graphic:
         {
             BitmapEx aBmpEx(BMP_PRESOBJ_GRAPHIC);
             Graphic  aGraphic( aBmpEx );
@@ -345,8 +346,8 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
         }
         break;
 
-        case PRESOBJ_MEDIA:
-        case PRESOBJ_OBJECT:
+        case PresObjKind::Media:
+        case PresObjKind::Object:
         {
             pSdrObj = new SdrOle2Obj(getSdrModelFromSdrPage());
             BitmapEx aBmpEx(BMP_PRESOBJ_OBJECT);
@@ -355,7 +356,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
         }
         break;
 
-        case PRESOBJ_CHART:
+        case PresObjKind::Chart:
         {
             pSdrObj = new SdrOle2Obj(getSdrModelFromSdrPage());
             static_cast<SdrOle2Obj*>(pSdrObj)->SetProgName( "StarChart" );
@@ -365,7 +366,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
         }
         break;
 
-        case PRESOBJ_ORGCHART:
+        case PresObjKind::OrgChart:
         {
             pSdrObj = new SdrOle2Obj(getSdrModelFromSdrPage());
             static_cast<SdrOle2Obj*>(pSdrObj)->SetProgName( "StarOrg" );
@@ -375,8 +376,8 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
         }
         break;
 
-        case PRESOBJ_TABLE:
-        case PRESOBJ_CALC:
+        case PresObjKind::Table:
+        case PresObjKind::Calc:
         {
             pSdrObj = new SdrOle2Obj(getSdrModelFromSdrPage());
             static_cast<SdrOle2Obj*>(pSdrObj)->SetProgName( "StarCalc" );
@@ -386,7 +387,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
         }
         break;
 
-        case PRESOBJ_HANDOUT:
+        case PresObjKind::Handout:
         {
             // Save the first standard page at SdrPageObj
             // #i105146# We want no content to be displayed for PageKind::Handout,
@@ -395,7 +396,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
         }
         break;
 
-        case PRESOBJ_PAGE:
+        case PresObjKind::Page:
         {
             // Save note pages at SdrPageObj
             sal_uInt16 nDestPageNum(GetPageNum());
@@ -419,10 +420,10 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
         }
         break;
 
-        case PRESOBJ_HEADER:
-        case PRESOBJ_FOOTER:
-        case PRESOBJ_DATETIME:
-        case PRESOBJ_SLIDENUMBER:
+        case PresObjKind::Header:
+        case PresObjKind::Footer:
+        case PresObjKind::DateTime:
+        case PresObjKind::SlideNumber:
         {
             pSdrObj = new SdrRectObj(getSdrModelFromSdrPage(), OBJ_TEXT);
             bEmptyPresObj = false;
@@ -469,11 +470,11 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
             // check if we need another vertical adjustment than the default
             SdrTextVertAdjust eV = SDRTEXTVERTADJUST_TOP;
 
-            if( (eObjKind == PRESOBJ_FOOTER) && (mePageKind != PageKind::Standard) )
+            if( (eObjKind == PresObjKind::Footer) && (mePageKind != PageKind::Standard) )
             {
                 eV = SDRTEXTVERTADJUST_BOTTOM;
             }
-            else if( (eObjKind == PRESOBJ_SLIDENUMBER) && (mePageKind != PageKind::Standard) )
+            else if( (eObjKind == PresObjKind::SlideNumber) && (mePageKind != PageKind::Standard) )
             {
                 eV = SDRTEXTVERTADJUST_BOTTOM;
             }
@@ -502,7 +503,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
             pOutliner->SetStyleSheet( 0, nullptr );
         }
 
-        if( (eObjKind == PRESOBJ_HEADER) || (eObjKind == PRESOBJ_FOOTER) || (eObjKind == PRESOBJ_SLIDENUMBER) || (eObjKind == PRESOBJ_DATETIME) )
+        if( (eObjKind == PresObjKind::Header) || (eObjKind == PresObjKind::Footer) || (eObjKind == PresObjKind::SlideNumber) || (eObjKind == PresObjKind::DateTime) )
         {
             SfxItemSet aTempAttr(static_cast< SdDrawDocument& >(getSdrModelFromSdrPage()).GetPool());
             aTempAttr.Put( SvxFontHeightItem( 493, 100, EE_CHAR_FONTHEIGHT ) );
@@ -511,15 +512,15 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
 
             SvxAdjust eH = SvxAdjust::Left;
 
-            if( (eObjKind == PRESOBJ_DATETIME) && (mePageKind != PageKind::Standard ) )
+            if( (eObjKind == PresObjKind::DateTime) && (mePageKind != PageKind::Standard ) )
             {
                 eH = SvxAdjust::Right;
             }
-            else if( (eObjKind == PRESOBJ_FOOTER) && (mePageKind == PageKind::Standard ) )
+            else if( (eObjKind == PresObjKind::Footer) && (mePageKind == PageKind::Standard ) )
             {
                 eH = SvxAdjust::Center;
             }
-            else if( eObjKind == PRESOBJ_SLIDENUMBER )
+            else if( eObjKind == PresObjKind::SlideNumber )
             {
                 eH = SvxAdjust::Right;
             }
@@ -547,7 +548,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
                 pSdrObj->SetStyleSheet(pSheetForPresObj, false);
         }
 
-        if (eObjKind == PRESOBJ_OUTLINE)
+        if (eObjKind == PresObjKind::Outline)
         {
             for (sal_uInt16 nLevel = 1; nLevel < 10; nLevel++)
             {
@@ -559,11 +560,11 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
             }
         }
 
-        if ( eObjKind == PRESOBJ_OBJECT   ||
-             eObjKind == PRESOBJ_CHART    ||
-             eObjKind == PRESOBJ_ORGCHART ||
-             eObjKind == PRESOBJ_CALC    ||
-             eObjKind == PRESOBJ_GRAPHIC )
+        if ( eObjKind == PresObjKind::Object   ||
+             eObjKind == PresObjKind::Chart    ||
+             eObjKind == PresObjKind::OrgChart ||
+             eObjKind == PresObjKind::Calc    ||
+             eObjKind == PresObjKind::Graphic )
         {
             SfxItemSet aSet( static_cast< SdDrawDocument& >(getSdrModelFromSdrPage()).GetPool() );
             aSet.Put( makeSdrTextContourFrameItem( true ) );
@@ -628,28 +629,28 @@ SfxStyleSheet* SdPage::GetStyleSheetForPresObj(PresObjKind eObjKind) const
 
     switch (eObjKind)
     {
-        case PRESOBJ_OUTLINE:
+        case PresObjKind::Outline:
         {
             aName = GetLayoutName() + " " + OUString::number( 1 );
         }
         break;
 
-        case PRESOBJ_TITLE:
+        case PresObjKind::Title:
             aName += STR_LAYOUT_TITLE;
             break;
 
-        case PRESOBJ_NOTES:
+        case PresObjKind::Notes:
             aName += STR_LAYOUT_NOTES;
             break;
 
-        case PRESOBJ_TEXT:
+        case PresObjKind::Text:
             aName += STR_LAYOUT_SUBTITLE;
             break;
 
-        case PRESOBJ_HEADER:
-        case PRESOBJ_FOOTER:
-        case PRESOBJ_DATETIME:
-        case PRESOBJ_SLIDENUMBER:
+        case PresObjKind::Header:
+        case PresObjKind::Footer:
+        case PresObjKind::DateTime:
+        case PresObjKind::SlideNumber:
             aName += STR_LAYOUT_BACKGROUNDOBJECTS;
             break;
 
@@ -817,7 +818,7 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
 
         // delete all available handout presentation objects
         SdrObject *pObj=nullptr;
-        while( (pObj = pMasterPage->GetPresObj(PRESOBJ_HANDOUT)) != nullptr )
+        while( (pObj = pMasterPage->GetPresObj(PresObjKind::Handout)) != nullptr )
         {
             pMasterPage->RemoveObject(pObj->GetOrdNum());
 
@@ -839,7 +840,7 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
 
         while( iter != aAreas.end() )
         {
-            SdrPageObj* pPageObj = static_cast<SdrPageObj*>(pMasterPage->CreatePresObj(PRESOBJ_HANDOUT, false, (*iter++)) );
+            SdrPageObj* pPageObj = static_cast<SdrPageObj*>(pMasterPage->CreatePresObj(PresObjKind::Handout, false, (*iter++)) );
             // #i105146# We want no content to be displayed for PageKind::Handout,
             // so just never set a page as content
             pPageObj->SetReferencedPage(nullptr);
@@ -851,13 +852,13 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
 
     if( mePageKind != PageKind::Handout )
     {
-        SdrObject* pMasterTitle = pMasterPage->GetPresObj( PRESOBJ_TITLE );
+        SdrObject* pMasterTitle = pMasterPage->GetPresObj( PresObjKind::Title );
         if( pMasterTitle == nullptr )
-            pMasterPage->CreateDefaultPresObj(PRESOBJ_TITLE);
+            pMasterPage->CreateDefaultPresObj(PresObjKind::Title);
 
-        SdrObject* pMasterOutline = pMasterPage->GetPresObj( mePageKind==PageKind::Notes ? PRESOBJ_NOTES : PRESOBJ_OUTLINE );
+        SdrObject* pMasterOutline = pMasterPage->GetPresObj( mePageKind==PageKind::Notes ? PresObjKind::Notes : PresObjKind::Outline );
         if( pMasterOutline == nullptr )
-            pMasterPage->CreateDefaultPresObj( mePageKind == PageKind::Standard ? PRESOBJ_OUTLINE : PRESOBJ_NOTES );
+            pMasterPage->CreateDefaultPresObj( mePageKind == PageKind::Standard ? PresObjKind::Outline : PresObjKind::Notes );
     }
 
     // create header&footer objects
@@ -867,22 +868,22 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
 
     if( mePageKind != PageKind::Standard )
     {
-        SdrObject* pHeader = pMasterPage->GetPresObj( PRESOBJ_HEADER );
+        SdrObject* pHeader = pMasterPage->GetPresObj( PresObjKind::Header );
         if( pHeader == nullptr )
-            pMasterPage->CreateDefaultPresObj( PRESOBJ_HEADER );
+            pMasterPage->CreateDefaultPresObj( PresObjKind::Header );
     }
 
-    SdrObject* pDate   = pMasterPage->GetPresObj( PRESOBJ_DATETIME );
+    SdrObject* pDate   = pMasterPage->GetPresObj( PresObjKind::DateTime );
     if( pDate == nullptr )
-        pMasterPage->CreateDefaultPresObj( PRESOBJ_DATETIME );
+        pMasterPage->CreateDefaultPresObj( PresObjKind::DateTime );
 
-    SdrObject* pFooter = pMasterPage->GetPresObj( PRESOBJ_FOOTER );
+    SdrObject* pFooter = pMasterPage->GetPresObj( PresObjKind::Footer );
     if( pFooter == nullptr )
-        pMasterPage->CreateDefaultPresObj( PRESOBJ_FOOTER );
+        pMasterPage->CreateDefaultPresObj( PresObjKind::Footer );
 
-    SdrObject* pNumber = pMasterPage->GetPresObj( PRESOBJ_SLIDENUMBER );
+    SdrObject* pNumber = pMasterPage->GetPresObj( PresObjKind::SlideNumber );
     if( pNumber == nullptr )
-        pMasterPage->CreateDefaultPresObj( PRESOBJ_SLIDENUMBER );
+        pMasterPage->CreateDefaultPresObj( PresObjKind::SlideNumber );
 }
 
 namespace {
@@ -891,14 +892,14 @@ static const o3tl::enumarray<PageKind, char const *> PageKindVector = {
     "PageKind::Standard", "PageKind::Notes", "PageKind::Handout"
 };
 
-const char* const PresObjKindVector[] = {
+static const o3tl::enumarray<PresObjKind, const char*> PresObjKindVector = {
     "PRESOBJ_NONE", "PRESOBJ_TITLE", "PRESOBJ_OUTLINE",
     "PRESOBJ_TEXT" ,"PRESOBJ_GRAPHIC" , "PRESOBJ_OBJECT",
     "PRESOBJ_CHART", "PRESOBJ_ORGCHART", "PRESOBJ_TABLE",
     "PRESOBJ_PAGE", "PRESOBJ_HANDOUT",
     "PRESOBJ_NOTES","PRESOBJ_HEADER", "PRESOBJ_FOOTER",
     "PRESOBJ_DATETIME", "PRESOBJ_SLIDENUMBER", "PRESOBJ_CALC",
-    "PRESOBJ_MEDIA", "PRESOBJ_MAX"
+    "PRESOBJ_MEDIA"
 };
 
 void getPresObjProp( const SdPage& rPage, const char* sObjKind, const char* sPageKind, double presObjPropValue[] )
@@ -965,22 +966,22 @@ void getPresObjProp( const SdPage& rPage, const char* sObjKind, const char* sPag
 
 SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind)
 {
-    if( eObjKind == PRESOBJ_TITLE )
+    if( eObjKind == PresObjKind::Title )
     {
         ::tools::Rectangle aTitleRect( GetTitleRect() );
-        return CreatePresObj(PRESOBJ_TITLE, false, aTitleRect);
+        return CreatePresObj(PresObjKind::Title, false, aTitleRect);
     }
-    else if( eObjKind == PRESOBJ_OUTLINE )
+    else if( eObjKind == PresObjKind::Outline )
     {
         ::tools::Rectangle aLayoutRect( GetLayoutRect() );
-        return CreatePresObj( PRESOBJ_OUTLINE, false, aLayoutRect);
+        return CreatePresObj( PresObjKind::Outline, false, aLayoutRect);
     }
-    else if( eObjKind == PRESOBJ_NOTES )
+    else if( eObjKind == PresObjKind::Notes )
     {
         ::tools::Rectangle aLayoutRect( GetLayoutRect() );
-        return CreatePresObj( PRESOBJ_NOTES, false, aLayoutRect);
+        return CreatePresObj( PresObjKind::Notes, false, aLayoutRect);
     }
-    else if( (eObjKind == PRESOBJ_FOOTER) || (eObjKind == PRESOBJ_DATETIME) || (eObjKind == PRESOBJ_SLIDENUMBER) || (eObjKind == PRESOBJ_HEADER ) )
+    else if( (eObjKind == PresObjKind::Footer) || (eObjKind == PresObjKind::DateTime) || (eObjKind == PresObjKind::SlideNumber) || (eObjKind == PresObjKind::Header ) )
     {
         double propvalue[] = {0,0,0,0};
         const char* sObjKind = PresObjKindVector[eObjKind];
@@ -1003,7 +1004,7 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind)
             aSize.setWidth( long( aSize.Width() * propvalue[1] ) );
             aSize.setHeight( long( aSize.Height() * propvalue[0] ) );
 
-            if(eObjKind == PRESOBJ_HEADER )
+            if(eObjKind == PresObjKind::Header )
             {
                 OSL_FAIL( "SdPage::CreateDefaultPresObj() - can't create a header placeholder for a master slide" );
                 return nullptr;
@@ -1206,6 +1207,11 @@ void SdPage::DestroyDefaultPresObj(PresObjKind eObjKind)
 const int MAX_PRESOBJS = 7; // maximum number of presentation objects per layout
 const int VERTICAL = 0x8000;
 
+static constexpr PresObjKind operator|(PresObjKind e, int x)
+{
+    return static_cast<PresObjKind>(static_cast<int>(e) | x);
+}
+
 namespace {
 
 struct LayoutDescriptor
@@ -1213,64 +1219,66 @@ struct LayoutDescriptor
     PresObjKind meKind[MAX_PRESOBJS];
     bool mbVertical[MAX_PRESOBJS];
 
-    LayoutDescriptor( int k0 = 0, int k1 = 0, int k2 = 0, int k3 = 0, int k4 = 0, int k5 = 0, int k6 = 0 );
+    LayoutDescriptor( PresObjKind k0 = PresObjKind::NONE, PresObjKind k1 = PresObjKind::NONE, PresObjKind k2 = PresObjKind::NONE, PresObjKind k3 = PresObjKind::NONE, PresObjKind k4 = PresObjKind::NONE, PresObjKind k5 = PresObjKind::NONE, PresObjKind k6 = PresObjKind::NONE );
 };
 
 }
 
-LayoutDescriptor::LayoutDescriptor( int k0, int k1, int k2, int k3, int k4, int k5, int k6 )
+LayoutDescriptor::LayoutDescriptor( PresObjKind k0, PresObjKind k1, PresObjKind k2, PresObjKind k3, PresObjKind k4, PresObjKind k5, PresObjKind k6 )
 {
-    meKind[0] = static_cast<PresObjKind>(k0 & (~VERTICAL)); mbVertical[0] = (k0 & VERTICAL) == VERTICAL;
-    meKind[1] = static_cast<PresObjKind>(k1 & (~VERTICAL)); mbVertical[1] = (k1 & VERTICAL) == VERTICAL;
-    meKind[2] = static_cast<PresObjKind>(k2 & (~VERTICAL)); mbVertical[2] = (k2 & VERTICAL) == VERTICAL;
-    meKind[3] = static_cast<PresObjKind>(k3 & (~VERTICAL)); mbVertical[3] = (k3 & VERTICAL) == VERTICAL;
-    meKind[4] = static_cast<PresObjKind>(k4 & (~VERTICAL)); mbVertical[4] = (k4 & VERTICAL) == VERTICAL;
-    meKind[5] = static_cast<PresObjKind>(k5 & (~VERTICAL)); mbVertical[5] = (k5 & VERTICAL) == VERTICAL;
-    meKind[6] = static_cast<PresObjKind>(k6 & (~VERTICAL)); mbVertical[6] = (k6 & VERTICAL) == VERTICAL;
+    auto removeVertical = [&] (PresObjKind k) { return static_cast<PresObjKind>(static_cast<int>(k) & ~VERTICAL); };
+    auto isVertical = [&] (PresObjKind k) { return bool(static_cast<int>(k) & VERTICAL); };
+    meKind[0] = removeVertical(k0); mbVertical[0] = isVertical(k0);
+    meKind[1] = removeVertical(k1); mbVertical[1] = isVertical(k1);
+    meKind[2] = removeVertical(k2); mbVertical[2] = isVertical(k2);
+    meKind[3] = removeVertical(k3); mbVertical[3] = isVertical(k3);
+    meKind[4] = removeVertical(k4); mbVertical[4] = isVertical(k4);
+    meKind[5] = removeVertical(k5); mbVertical[5] = isVertical(k5);
+    meKind[6] = removeVertical(k6); mbVertical[6] = isVertical(k6);
 }
 
 static const LayoutDescriptor& GetLayoutDescriptor( AutoLayout eLayout )
 {
     static const LayoutDescriptor aLayouts[AUTOLAYOUT_END-AUTOLAYOUT_START] =
     {
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_TEXT ),                                 // AUTOLAYOUT_TITLE
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE ),                              // AUTOLAYOUT_TITLE_CONTENT
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE ),                              // AUTOLAYOUT_CHART
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ),             // AUTOLAYOUT_TITLE_2CONTENT
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ),             // AUTOLAYOUT_TEXTCHART
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE ),                              // AUTOLAYOUT_ORG
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ),             // AUTOLAYOUT_TEXTCLbIP
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ),             // AUTOLAYOUT_CHARTTEXT
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE ),                              // AUTOLAYOUT_TAB
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ),             // AUTOLAYOUT_CLIPTEXT
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ),             // AUTOLAYOUT_TEXTOBJ
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OBJECT ),                               // AUTOLAYOUT_OBJ
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ),    // AUTOLAYOUT_TITLE_CONTENT_2CONTENT
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ),             // AUTOLAYOUT_TEXTOBJ
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ),             // AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ),    // AUTOLAYOUT_TITLE_2CONTENT_CONTENT
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ),    // AUTOLAYOUT_TITLE_2CONTENT_OVER_CONTENT
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ),             // AUTOLAYOUT_TEXTOVEROBJ
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE,                   // AUTOLAYOUT_TITLE_4CONTENT
-            PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ),
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_NONE ),                                 // AUTOLAYOUT_TITLE_ONLY
-        LayoutDescriptor( PRESOBJ_NONE ),                                                // AUTOLAYOUT_NONE
-        LayoutDescriptor( PRESOBJ_PAGE, PRESOBJ_NOTES ),                                 // AUTOLAYOUT_NOTES
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Text ),                                 // AUTOLAYOUT_TITLE
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline ),                              // AUTOLAYOUT_TITLE_CONTENT
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline ),                              // AUTOLAYOUT_CHART
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline, PresObjKind::Outline ),             // AUTOLAYOUT_TITLE_2CONTENT
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline, PresObjKind::Outline ),             // AUTOLAYOUT_TEXTCHART
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline ),                              // AUTOLAYOUT_ORG
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline, PresObjKind::Outline ),             // AUTOLAYOUT_TEXTCLbIP
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline, PresObjKind::Outline ),             // AUTOLAYOUT_CHARTTEXT
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline ),                              // AUTOLAYOUT_TAB
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline, PresObjKind::Outline ),             // AUTOLAYOUT_CLIPTEXT
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline, PresObjKind::Outline ),             // AUTOLAYOUT_TEXTOBJ
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Object ),                               // AUTOLAYOUT_OBJ
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline, PresObjKind::Outline, PresObjKind::Outline ),    // AUTOLAYOUT_TITLE_CONTENT_2CONTENT
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline, PresObjKind::Outline ),             // AUTOLAYOUT_TEXTOBJ
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline, PresObjKind::Outline ),             // AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline, PresObjKind::Outline, PresObjKind::Outline ),    // AUTOLAYOUT_TITLE_2CONTENT_CONTENT
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline, PresObjKind::Outline, PresObjKind::Outline ),    // AUTOLAYOUT_TITLE_2CONTENT_OVER_CONTENT
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline, PresObjKind::Outline ),             // AUTOLAYOUT_TEXTOVEROBJ
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline, PresObjKind::Outline,                   // AUTOLAYOUT_TITLE_4CONTENT
+            PresObjKind::Outline, PresObjKind::Outline ),
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::NONE ),                                 // AUTOLAYOUT_TITLE_ONLY
+        LayoutDescriptor( PresObjKind::NONE ),                                                // AUTOLAYOUT_NONE
+        LayoutDescriptor( PresObjKind::Page, PresObjKind::Notes ),                                 // AUTOLAYOUT_NOTES
         LayoutDescriptor( ),                                                              // AUTOLAYOUT_HANDOUT1
         LayoutDescriptor( ),                                                              // AUTOLAYOUT_HANDOUT2
         LayoutDescriptor( ),                                                              // AUTOLAYOUT_HANDOUT3
         LayoutDescriptor( ),                                                              // AUTOLAYOUT_HANDOUT4
         LayoutDescriptor( ),                                                              // AUTOLAYOUT_HANDOUT6
-        LayoutDescriptor( PRESOBJ_TITLE|VERTICAL, PRESOBJ_OUTLINE|VERTICAL, PRESOBJ_OUTLINE ),// AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT
-        LayoutDescriptor( PRESOBJ_TITLE|VERTICAL, PRESOBJ_OUTLINE|VERTICAL ),            // AUTOLAYOUT_VTITLE_VCONTENT
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE|VERTICAL ),                     // AUTOLAYOUT_TITLE_VCONTENT
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE|VERTICAL, PRESOBJ_OUTLINE|VERTICAL ),   // AUTOLAYOUT_TITLE_2VTEXT
+        LayoutDescriptor( PresObjKind::Title|VERTICAL, PresObjKind::Outline|VERTICAL, PresObjKind::Outline ),// AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT
+        LayoutDescriptor( PresObjKind::Title|VERTICAL, PresObjKind::Outline|VERTICAL ),            // AUTOLAYOUT_VTITLE_VCONTENT
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline|VERTICAL ),                     // AUTOLAYOUT_TITLE_VCONTENT
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline|VERTICAL, PresObjKind::Outline|VERTICAL ),   // AUTOLAYOUT_TITLE_2VTEXT
         LayoutDescriptor( ),                                                              // AUTOLAYOUT_HANDOUT9
-        LayoutDescriptor( PRESOBJ_TEXT, PRESOBJ_NONE ),                                 // AUTOLAYOUT_ONLY_TEXT
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE,               // AUTOLAYOUT_4CLIPART
-            PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC ),
-        LayoutDescriptor( PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE,              // AUTOLAYOUT_TITLE_6CONTENT
-            PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE )
+        LayoutDescriptor( PresObjKind::Text, PresObjKind::NONE ),                                 // AUTOLAYOUT_ONLY_TEXT
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline, PresObjKind::Outline,               // AUTOLAYOUT_4CLIPART
+            PresObjKind::Graphic, PresObjKind::Graphic ),
+        LayoutDescriptor( PresObjKind::Title, PresObjKind::Outline, PresObjKind::Outline,              // AUTOLAYOUT_TITLE_6CONTENT
+            PresObjKind::Outline, PresObjKind::Outline, PresObjKind::Outline, PresObjKind::Outline )
     };
 
     if( (eLayout < AUTOLAYOUT_START) || (eLayout >= AUTOLAYOUT_END) )
@@ -1345,9 +1353,9 @@ static void CalcAutoLayoutRectangles( SdPage const & rPage,::tools::Rectangle* r
     if( rPage.GetPageKind() != PageKind::Handout )
     {
         SdPage& rMasterPage = static_cast<SdPage&>(rPage.TRG_GetMasterPage());
-        SdrObject* pMasterTitle = rMasterPage.GetPresObj( PRESOBJ_TITLE );
-        SdrObject* pMasterSubTitle = rMasterPage.GetPresObj( PRESOBJ_TEXT );
-        SdrObject* pMasterOutline = rMasterPage.GetPresObj( rPage.GetPageKind()==PageKind::Notes ? PRESOBJ_NOTES : PRESOBJ_OUTLINE );
+        SdrObject* pMasterTitle = rMasterPage.GetPresObj( PresObjKind::Title );
+        SdrObject* pMasterSubTitle = rMasterPage.GetPresObj( PresObjKind::Text );
+        SdrObject* pMasterOutline = rMasterPage.GetPresObj( rPage.GetPageKind()==PageKind::Notes ? PresObjKind::Notes : PresObjKind::Outline );
 
         if( pMasterTitle )
             aTitleRect = pMasterTitle->GetLogicRect();
@@ -1441,19 +1449,17 @@ static void CalcAutoLayoutRectangles( SdPage const & rPage,::tools::Rectangle* r
     }
 }
 
-static void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescriptor, std::vector< SdrObject* >& rShapes, bool bInit, bool bSwitchLayout )
+static void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescriptor, std::array<SdrObject*, MAX_PRESOBJS>& rShapes, bool bInit, bool bSwitchLayout )
 {
-    int i;
-
     // init list of indexes for each presentation shape kind
     // this is used to find subsequent shapes with the same presentation shape kind
-    int PresObjIndex[PRESOBJ_MAX];
-    for( i = 0; i < PRESOBJ_MAX; i++ ) PresObjIndex[i] = 1;
+    o3tl::enumarray<PresObjKind,int> PresObjIndex;
+    PresObjIndex.fill(1);
 
     bool bMissing = false;
 
     // for each entry in the layoutdescriptor, arrange a presentation shape
-    for (i = 0; (i < MAX_PRESOBJS) && (rDescriptor.meKind[i] != PRESOBJ_NONE); i++)
+    for (int i = 0; (i <= static_cast<int>(PresObjKind::LAST)) && (rDescriptor.meKind[i] != PresObjKind::NONE); i++)
     {
         PresObjKind eKind = rDescriptor.meKind[i];
         SdrObject* pObj = nullptr;
@@ -1476,7 +1482,7 @@ static void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDe
         return;
 
     // for each entry in the layoutdescriptor, look for an alternative shape
-    for (i = 0; (i < MAX_PRESOBJS) && (rDescriptor.meKind[i] != PRESOBJ_NONE); i++)
+    for (int i = 0; (i <= static_cast<int>(PresObjKind::LAST)) && (rDescriptor.meKind[i] != PresObjKind::NONE); i++)
     {
         if( rShapes[i] )
             continue;
@@ -1506,24 +1512,24 @@ static void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDe
 
             switch( eKind )
             {
-            case PRESOBJ_TITLE:
+            case PresObjKind::Title:
                 bFound = eSdrObjKind == OBJ_TITLETEXT;
                 break;
-            case PRESOBJ_TABLE:
+            case PresObjKind::Table:
                 bFound = eSdrObjKind == OBJ_TABLE;
                 break;
-            case PRESOBJ_MEDIA:
+            case PresObjKind::Media:
                 bFound = eSdrObjKind == OBJ_MEDIA;
                 break;
-            case PRESOBJ_OUTLINE:
+            case PresObjKind::Outline:
                 bFound = (eSdrObjKind == OBJ_OUTLINETEXT) ||
                          ((eSdrObjKind == OBJ_TEXT) && bPresStyle) ||
                          (eSdrObjKind == OBJ_TABLE) || (eSdrObjKind == OBJ_MEDIA) || (eSdrObjKind == OBJ_GRAF) || (eSdrObjKind == OBJ_OLE2);
                 break;
-            case PRESOBJ_GRAPHIC:
+            case PresObjKind::Graphic:
                 bFound = eSdrObjKind == OBJ_GRAF;
                 break;
-            case PRESOBJ_OBJECT:
+            case PresObjKind::Object:
                 if( eSdrObjKind == OBJ_OLE2 )
                 {
                     SdrOle2Obj* pOle2 = dynamic_cast< SdrOle2Obj* >( pObj );
@@ -1559,18 +1565,18 @@ static void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDe
                      }
                 }
                 break;
-            case PRESOBJ_CHART:
-            case PRESOBJ_CALC:
+            case PresObjKind::Chart:
+            case PresObjKind::Calc:
                 if( eSdrObjKind == OBJ_OLE2 )
                 {
                     SdrOle2Obj* pOle2 = dynamic_cast< SdrOle2Obj* >( pObj );
                     if( pOle2 )
                     {
                         if(
-                            ((eKind == PRESOBJ_CHART) &&
+                            ((eKind == PresObjKind::Chart) &&
                                 ( pOle2->GetProgName() == "StarChart" || pOle2->IsChart() ) )
                             ||
-                            ((eKind == PRESOBJ_CALC) &&
+                            ((eKind == PresObjKind::Calc) &&
                                 ( pOle2->GetProgName() == "StarCalc" || pOle2->IsCalc() ) ) )
                         {
                             bFound = true;
@@ -1583,12 +1589,12 @@ static void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDe
                     bFound = true;
                 }
                 break;
-            case PRESOBJ_PAGE:
-            case PRESOBJ_HANDOUT:
+            case PresObjKind::Page:
+            case PresObjKind::Handout:
                 bFound = eSdrObjKind == OBJ_PAGE;
                 break;
-            case PRESOBJ_NOTES:
-            case PRESOBJ_TEXT:
+            case PresObjKind::Notes:
+            case PresObjKind::Text:
                 bFound = (bPresStyle && (eSdrObjKind == OBJ_TEXT)) || (eSdrObjKind == OBJ_OUTLINETEXT);
                 break;
             default:
@@ -1626,15 +1632,14 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, bool bInit, bool bCreate )
     OUString sLayoutName( enumtoString(meAutoLayout) );
     CalcAutoLayoutRectangles( *this, aRectangle, sLayoutName);
 
-    std::set< SdrObject* > aUsedPresentationObjects;
+    o3tl::sorted_vector< SdrObject* > aUsedPresentationObjects;
 
-    std::vector< SdrObject* > aLayoutShapes(PRESOBJ_MAX, nullptr);
+    std::array<SdrObject*, MAX_PRESOBJS > aLayoutShapes;
+    aLayoutShapes.fill(nullptr);
     findAutoLayoutShapesImpl( *this, aDescriptor, aLayoutShapes, bInit, bSwitchLayout );
 
-    int i;
-
     // for each entry in the layoutdescriptor, arrange a presentation shape
-    for (i = 0; (i < MAX_PRESOBJS) && (aDescriptor.meKind[i] != PRESOBJ_NONE); i++)
+    for (int i = 0; (i <= static_cast<int>(PresObjKind::LAST)) && (aDescriptor.meKind[i] != PresObjKind::NONE); i++)
     {
         PresObjKind eKind = aDescriptor.meKind[i];
         SdrObject* pObj = InsertAutoLayoutShape( aLayoutShapes[i], eKind, aDescriptor.mbVertical[i], aRectangle[i], bInit );
@@ -1913,9 +1918,9 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const ::tools::Rectangle& rN
                         * presentation template: adjust test height
                         **********************************************************/
 
-                        if (pObj == GetPresObj(PRESOBJ_TITLE, 0))
+                        if (pObj == GetPresObj(PresObjKind::Title, 0))
                         {
-                            SfxStyleSheet* pTitleSheet = GetStyleSheetForPresObj(PRESOBJ_TITLE);
+                            SfxStyleSheet* pTitleSheet = GetStyleSheetForPresObj(PresObjKind::Title);
 
                             if (pTitleSheet)
                             {
@@ -1945,7 +1950,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const ::tools::Rectangle& rN
                                 pTitleSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
                             }
                         }
-                        else if (pObj == GetPresObj(PRESOBJ_OUTLINE, 0))
+                        else if (pObj == GetPresObj(PresObjKind::Outline, 0))
                         {
                             OUString aName(GetLayoutName() + " ");
 
@@ -2005,9 +2010,9 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const ::tools::Rectangle& rN
                                 }
                             }
                         }
-                        else if (pObj == GetPresObj(PRESOBJ_NOTES, 0))
+                        else if (pObj == GetPresObj(PresObjKind::Notes, 0))
                         {
-                            SfxStyleSheet* pNotesSheet = GetStyleSheetForPresObj(PRESOBJ_NOTES);
+                            SfxStyleSheet* pNotesSheet = GetStyleSheetForPresObj(PresObjKind::Notes);
 
                             if (pNotesSheet)
                             {
@@ -2081,9 +2086,9 @@ static SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourc
     const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && rPage.IsInserted();
 
     SdrObject* pNewObj = pSourceObj;
-    if((eObjKind == PRESOBJ_OUTLINE) && (pSourceObj->GetObjIdentifier() == OBJ_TEXT) )
+    if((eObjKind == PresObjKind::Outline) && (pSourceObj->GetObjIdentifier() == OBJ_TEXT) )
     {
-        pNewObj = rPage.CreatePresObj(PRESOBJ_OUTLINE, bVertical, rRect);
+        pNewObj = rPage.CreatePresObj(PresObjKind::Outline, bVertical, rRect);
 
         // Set text of the subtitle into PRESOBJ_OUTLINE
         OutlinerParaObject* pOutlParaObj = pSourceObj->GetOutlinerParaObject();
@@ -2108,7 +2113,7 @@ static SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourc
 
                 if (pSheet && nLevel == 1)
                 {
-                    SfxStyleSheet* pSubtitleSheet = rPage.GetStyleSheetForPresObj(PRESOBJ_TEXT);
+                    SfxStyleSheet* pSubtitleSheet = rPage.GetStyleSheetForPresObj(PresObjKind::Text);
 
                     if (pSubtitleSheet)
                         pOutlParaObj->ChangeStyleSheetName(SfxStyleFamily::Page, pSubtitleSheet->GetName(), pSheet->GetName());
@@ -2134,10 +2139,10 @@ static SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourc
                 SdrObject::Free( pSourceObj );
         }
     }
-    else if((eObjKind == PRESOBJ_TEXT) && (pSourceObj->GetObjIdentifier() == OBJ_OUTLINETEXT) )
+    else if((eObjKind == PresObjKind::Text) && (pSourceObj->GetObjIdentifier() == OBJ_OUTLINETEXT) )
     {
         // is there an outline shape we can use to replace empty subtitle shape?
-        pNewObj = rPage.CreatePresObj(PRESOBJ_TEXT, bVertical, rRect);
+        pNewObj = rPage.CreatePresObj(PresObjKind::Text, bVertical, rRect);
 
         // Set text of the outline object into PRESOBJ_TITLE
         OutlinerParaObject* pOutlParaObj = pSourceObj->GetOutlinerParaObject();
@@ -2164,7 +2169,7 @@ static SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourc
 
             pNewObj->SetMergedItemSet(aSet);
 
-            SfxStyleSheet* pSheet = rPage.GetStyleSheetForPresObj(PRESOBJ_TEXT);
+            SfxStyleSheet* pSheet = rPage.GetStyleSheetForPresObj(PresObjKind::Text);
             if (pSheet)
                 pNewObj->SetStyleSheet(pSheet, true);
 
@@ -2178,14 +2183,14 @@ static SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourc
                 SdrObject::Free( pSourceObj );
         }
     }
-    else if((eObjKind == PRESOBJ_OUTLINE) && (pSourceObj->GetObjIdentifier() != OBJ_OUTLINETEXT) )
+    else if((eObjKind == PresObjKind::Outline) && (pSourceObj->GetObjIdentifier() != OBJ_OUTLINETEXT) )
     {
         switch( pSourceObj->GetObjIdentifier() )
         {
-        case OBJ_TABLE: eObjKind = PRESOBJ_TABLE; break;
-        case OBJ_MEDIA: eObjKind = PRESOBJ_MEDIA; break;
-        case OBJ_GRAF: eObjKind = PRESOBJ_GRAPHIC; break;
-        case OBJ_OLE2: eObjKind = PRESOBJ_OBJECT; break;
+        case OBJ_TABLE: eObjKind = PresObjKind::Table; break;
+        case OBJ_MEDIA: eObjKind = PresObjKind::Media; break;
+        case OBJ_GRAF: eObjKind = PresObjKind::Graphic; break;
+        case OBJ_OLE2: eObjKind = PresObjKind::Object; break;
         }
     }
 
@@ -2243,7 +2248,7 @@ SdrObject* SdPage::InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind,
 
                 // here make sure the correct anchoring is used when the object
                 // is re-used but orientation is changed
-                if(PRESOBJ_OUTLINE == eObjKind)
+                if(PresObjKind::Outline == eObjKind)
                     pTextObject->SetMergedItem(SdrTextHorzAdjustItem( bVertical ? SDRTEXTHORZADJUST_RIGHT : SDRTEXTHORZADJUST_BLOCK ));
             }
 
@@ -2296,12 +2301,12 @@ SdrObject* SdPage::InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind,
         }
 
         // make adjustments for vertical title and outline shapes
-        if( bVertical && (( eObjKind == PRESOBJ_TITLE) || (eObjKind == PRESOBJ_OUTLINE)))
+        if( bVertical && (( eObjKind == PresObjKind::Title) || (eObjKind == PresObjKind::Outline)))
         {
             SfxItemSet aNewSet(pObj->GetMergedItemSet());
             aNewSet.Put( makeSdrTextAutoGrowWidthItem(true) );
             aNewSet.Put( makeSdrTextAutoGrowHeightItem(false) );
-            if( eObjKind == PRESOBJ_OUTLINE )
+            if( eObjKind == PresObjKind::Outline )
             {
                 aNewSet.Put( SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP) );
                 aNewSet.Put( SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT) );
@@ -2324,7 +2329,7 @@ SdrObject* SdPage::InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind,
 
 PresObjKind SdPage::GetPresObjKind(SdrObject* pObj) const
 {
-    PresObjKind eKind = PRESOBJ_NONE;
+    PresObjKind eKind = PresObjKind::NONE;
     if( (pObj != nullptr) && (maPresentationShapeList.hasShape(*pObj)) )
     {
         SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pObj);
@@ -2346,7 +2351,7 @@ void SdPage::RemovePresObj(const SdrObject* pObj)
     {
         SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(const_cast<SdrObject&>(*pObj));
         if( pInfo )
-            pInfo->mePresObjKind = PRESOBJ_NONE;
+            pInfo->mePresObjKind = PresObjKind::NONE;
         maPresentationShapeList.removeShape(const_cast<SdrObject&>(*pObj));
     }
 }
@@ -2406,7 +2411,7 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO
 
     switch( eObjKind )
     {
-        case PRESOBJ_OUTLINE:
+        case PresObjKind::Outline:
         {
             pOutl->Init( OutlinerMode::OutlineObject );
 
@@ -2432,7 +2437,7 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO
         }
         break;
 
-        case PRESOBJ_TITLE:
+        case PresObjKind::Title:
         {
             pOutl->Init( OutlinerMode::TitleObject );
             aString += rString;
@@ -2449,16 +2454,16 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO
 
             switch( eObjKind )
             {
-            case PRESOBJ_HEADER:
+            case PresObjKind::Header:
                 pData.reset(new SvxHeaderField());
                 break;
-            case PRESOBJ_FOOTER:
+            case PresObjKind::Footer:
                 pData .reset(new SvxFooterField());
                 break;
-            case PRESOBJ_SLIDENUMBER:
+            case PresObjKind::SlideNumber:
                 pData.reset(new SvxPageField());
                 break;
-            case PRESOBJ_DATETIME:
+            case PresObjKind::DateTime:
                 pData.reset(new SvxDateTimeField());
                 break;
             default:
@@ -2606,7 +2611,7 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const
     bool isMobileDevice = comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()) || comphelper::LibreOfficeKit::isTablet(SfxLokHelper::getView());
 #endif
 
-    if (eObjKind == PRESOBJ_TITLE)
+    if (eObjKind == PresObjKind::Title)
     {
         if (mbMaster)
         {
@@ -2630,7 +2635,7 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const
         else
             aString = SdResId(STR_PRESOBJ_TITLE);
     }
-    else if (eObjKind == PRESOBJ_OUTLINE)
+    else if (eObjKind == PresObjKind::Outline)
     {
         if (mbMaster)
         {
@@ -2644,7 +2649,7 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const
         else
             aString = SdResId(STR_PRESOBJ_OUTLINE);
     }
-    else if (eObjKind == PRESOBJ_NOTES)
+    else if (eObjKind == PresObjKind::Notes)
     {
         if (mbMaster)
         {
@@ -2658,30 +2663,30 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const
         else
             aString = SdResId(STR_PRESOBJ_NOTESTEXT);
     }
-    else if (eObjKind == PRESOBJ_TEXT)
+    else if (eObjKind == PresObjKind::Text)
     {
         if (isMobileDevice)
             aString = SdResId(STR_PRESOBJ_TEXT_MOBILE);
         else
             aString = SdResId(STR_PRESOBJ_TEXT);
     }
-    else if (eObjKind == PRESOBJ_GRAPHIC)
+    else if (eObjKind == PresObjKind::Graphic)
     {
         aString = SdResId( STR_PRESOBJ_GRAPHIC );
     }
-    else if (eObjKind == PRESOBJ_OBJECT)
+    else if (eObjKind == PresObjKind::Object)
     {
         aString = SdResId( STR_PRESOBJ_OBJECT );
     }
-    else if (eObjKind == PRESOBJ_CHART)
+    else if (eObjKind == PresObjKind::Chart)
     {
         aString = SdResId( STR_PRESOBJ_CHART );
     }
-    else if (eObjKind == PRESOBJ_ORGCHART)
+    else if (eObjKind == PresObjKind::OrgChart)
     {
         aString = SdResId( STR_PRESOBJ_ORGCHART );
     }
-    else if (eObjKind == PRESOBJ_CALC)
+    else if (eObjKind == PresObjKind::Calc)
     {
         aString = SdResId( STR_PRESOBJ_TABLE );
     }
@@ -2766,7 +2771,7 @@ void SdPage::setHeaderFooterSettings( const sd::HeaderFooterSettings& rNewSettin
     if(!pMasterPage)
         return;
 
-    SdrObject* pCandidate = pMasterPage->GetPresObj( PRESOBJ_HEADER );
+    SdrObject* pCandidate = pMasterPage->GetPresObj( PresObjKind::Header );
 
     if(pCandidate)
     {
@@ -2774,7 +2779,7 @@ void SdPage::setHeaderFooterSettings( const sd::HeaderFooterSettings& rNewSettin
         pCandidate->GetViewContact().flushViewObjectContacts();
     }
 
-    pCandidate = pMasterPage->GetPresObj( PRESOBJ_DATETIME );
+    pCandidate = pMasterPage->GetPresObj( PresObjKind::DateTime );
 
     if(pCandidate)
     {
@@ -2782,7 +2787,7 @@ void SdPage::setHeaderFooterSettings( const sd::HeaderFooterSettings& rNewSettin
         pCandidate->GetViewContact().flushViewObjectContacts();
     }
 
-    pCandidate = pMasterPage->GetPresObj( PRESOBJ_FOOTER );
+    pCandidate = pMasterPage->GetPresObj( PresObjKind::Footer );
 
     if(pCandidate)
     {
@@ -2790,7 +2795,7 @@ void SdPage::setHeaderFooterSettings( const sd::HeaderFooterSettings& rNewSettin
         pCandidate->GetViewContact().flushViewObjectContacts();
     }
 
-    pCandidate = pMasterPage->GetPresObj( PRESOBJ_SLIDENUMBER );
+    pCandidate = pMasterPage->GetPresObj( PresObjKind::SlideNumber );
 
     if(pCandidate)
     {
@@ -2831,7 +2836,7 @@ bool SdPage::checkVisibility(
         {
             PresObjKind eKind = pCheckPage->GetPresObjKind(pObj);
 
-            if((eKind == PRESOBJ_FOOTER) || (eKind == PRESOBJ_HEADER) || (eKind == PRESOBJ_DATETIME) || (eKind == PRESOBJ_SLIDENUMBER) )
+            if((eKind == PresObjKind::Footer) || (eKind == PresObjKind::Header) || (eKind == PresObjKind::DateTime) || (eKind == PresObjKind::SlideNumber) )
             {
                 const bool bSubContentProcessing(rDisplayInfo.GetSubContentActive());
 
@@ -2847,13 +2852,13 @@ bool SdPage::checkVisibility(
 
                         switch( eKind )
                         {
-                        case PRESOBJ_FOOTER:
+                        case PresObjKind::Footer:
                             return rSettings.mbFooterVisible;
-                        case PRESOBJ_HEADER:
+                        case PresObjKind::Header:
                             return rSettings.mbHeaderVisible;
-                        case PRESOBJ_DATETIME:
+                        case PresObjKind::DateTime:
                             return rSettings.mbDateTimeVisible;
-                        case PRESOBJ_SLIDENUMBER:
+                        case PresObjKind::SlideNumber:
                             return rSettings.mbSlideNumberVisible;
                         default:
                             break;
@@ -2861,7 +2866,7 @@ bool SdPage::checkVisibility(
                     }
                 }
             } // check for placeholders on master
-            else if( (eKind != PRESOBJ_NONE) && pCheckPage->IsMasterPage() && ( pVisualizedPage != pCheckPage ) )
+            else if( (eKind != PresObjKind::NONE) && pCheckPage->IsMasterPage() && ( pVisualizedPage != pCheckPage ) )
             {
                 // presentation objects on master slide are always invisible if slide is shown.
                 return false;
@@ -2889,10 +2894,10 @@ bool SdPage::RestoreDefaultText( SdrObject* pObj )
     {
         PresObjKind ePresObjKind = GetPresObjKind(pTextObj);
 
-        if (ePresObjKind == PRESOBJ_TITLE   ||
-            ePresObjKind == PRESOBJ_OUTLINE ||
-            ePresObjKind == PRESOBJ_NOTES   ||
-            ePresObjKind == PRESOBJ_TEXT)
+        if (ePresObjKind == PresObjKind::Title   ||
+            ePresObjKind == PresObjKind::Outline ||
+            ePresObjKind == PresObjKind::Notes   ||
+            ePresObjKind == PresObjKind::Text)
         {
             OUString aString( GetPresObjText(ePresObjKind) );
 
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index d6b29fa96594..9b79f54a9c31 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -224,7 +224,7 @@ void SdPage::SetPresentationLayout(const OUString& rLayoutName,
             // We do net get PresObjKind via GetPresObjKind() since there are
             // only PresObjListe considered. But we want to consider all "Title
             // objects" here (paste from clipboard etc.)
-            SfxStyleSheet* pSheet = GetStyleSheetForPresObj(PRESOBJ_TITLE);
+            SfxStyleSheet* pSheet = GetStyleSheetForPresObj(PresObjKind::Title);
 
             if (pSheet)
                 pObj->SetStyleSheet(pSheet, true);
@@ -247,7 +247,7 @@ void SdPage::SetPresentationLayout(const OUString& rLayoutName,
 
 void SdPage::EndListenOutlineText()
 {
-    SdrObject* pOutlineTextObj = GetPresObj(PRESOBJ_OUTLINE);
+    SdrObject* pOutlineTextObj = GetPresObj(PresObjKind::Outline);
 
     if (!pOutlineTextObj)
         return;
@@ -436,7 +436,7 @@ SdrPage* SdPage::CloneSdrPage(SdrModel& rTargetModel) const
 SfxStyleSheet* SdPage::GetTextStyleSheetForObject( SdrObject* pObj ) const
 {
     const PresObjKind eKind = GetPresObjKind(pObj);
-    if( eKind != PRESOBJ_NONE )
+    if( eKind != PresObjKind::NONE )
     {
         return GetStyleSheetForPresObj(eKind);
     }
diff --git a/sd/source/core/undo/undoobjects.cxx b/sd/source/core/undo/undoobjects.cxx
index 9af99eb5a7e8..b00fc68aa8d9 100644
--- a/sd/source/core/undo/undoobjects.cxx
+++ b/sd/source/core/undo/undoobjects.cxx
@@ -252,8 +252,8 @@ void UndoObjectUserCall::Redo()
 
 UndoObjectPresentationKind::UndoObjectPresentationKind(SdrObject& rObject)
 :   SdrUndoObj(rObject)
-,   meOldKind(PRESOBJ_NONE)
-,   meNewKind(PRESOBJ_NONE)
+,   meOldKind(PresObjKind::NONE)
+,   meNewKind(PresObjKind::NONE)
 ,   mxPage( static_cast<SdPage*>(rObject.getSdrPageFromSdrObject()) )
 ,   mxSdrObject( &rObject )
 {
@@ -269,9 +269,9 @@ void UndoObjectPresentationKind::Undo()
     {
         SdPage* pPage = mxPage.get();
         meNewKind =  pPage->GetPresObjKind( mxSdrObject.get() );
-        if( meNewKind != PRESOBJ_NONE )
+        if( meNewKind != PresObjKind::NONE )
             pPage->RemovePresObj( mxSdrObject.get() );
-        if( meOldKind != PRESOBJ_NONE )
+        if( meOldKind != PresObjKind::NONE )
             pPage->InsertPresObj( mxSdrObject.get(), meOldKind );
     }
 }
@@ -281,9 +281,9 @@ void UndoObjectPresentationKind::Redo()
     if( mxPage.is() && mxSdrObject.is() )
     {
         SdPage* pPage = mxPage.get();
-        if( meOldKind != PRESOBJ_NONE )
+        if( meOldKind != PresObjKind::NONE )
             pPage->RemovePresObj( mxSdrObject.get() );
-        if( meNewKind != PRESOBJ_NONE )
+        if( meNewKind != PresObjKind::NONE )
             pPage->InsertPresObj( mxSdrObject.get(), meNewKind );
     }
 }
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index a2a12503f2f6..41f455b221fe 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -805,11 +805,11 @@ void HtmlExport::SetDocColors( SdPage* pPage )
     if( mpDoc->GetDocumentType() == DocumentType::Impress )
     {
         // default text color from the outline template of the first page
-        pSheet = pPage->GetStyleSheetForPresObj(PRESOBJ_OUTLINE);
+        pSheet = pPage->GetStyleSheetForPresObj(PresObjKind::Outline);
         if(pSheet == nullptr)
-            pSheet = pPage->GetStyleSheetForPresObj(PRESOBJ_TEXT);
+            pSheet = pPage->GetStyleSheetForPresObj(PresObjKind::Text);
         if(pSheet == nullptr)
-            pSheet = pPage->GetStyleSheetForPresObj(PRESOBJ_TITLE);
+            pSheet = pPage->GetStyleSheetForPresObj(PresObjKind::Title);
     }
 
     if(pSheet == nullptr)
@@ -1173,7 +1173,7 @@ bool HtmlExport::WriteHtml( const OUString& rFileName, bool bAddExtension, const
  */
 OUString HtmlExport::CreateTextForTitle( SdrOutliner* pOutliner, SdPage* pPage, const Color& rBackgroundColor )
 {
-    SdrTextObj* pTO = static_cast<SdrTextObj*>(pPage->GetPresObj(PRESOBJ_TITLE));
+    SdrTextObj* pTO = static_cast<SdrTextObj*>(pPage->GetPresObj(PresObjKind::Title));
     if(!pTO)
         pTO = GetLayoutTextObject(pPage);
 
@@ -1204,7 +1204,7 @@ OUString HtmlExport::CreateTextForPage(SdrOutliner* pOutliner, SdPage const * pP
 
         switch (eKind)
         {
-            case PRESOBJ_NONE:
+            case PresObjKind::NONE:
             {
                 if (pObject->GetObjIdentifier() == OBJ_GRUP)
                 {
@@ -1226,15 +1226,15 @@ OUString HtmlExport::CreateTextForPage(SdrOutliner* pOutliner, SdPage const * pP
             }
             break;
 
-            case PRESOBJ_TABLE:
+            case PresObjKind::Table:
             {
                 SdrTableObj* pTableObject = static_cast<SdrTableObj*>(pObject);
                 WriteTable(aStr, pTableObject, pOutliner, rBackgroundColor);
             }
             break;
 
-            case PRESOBJ_TEXT:
-            case PRESOBJ_OUTLINE:
+            case PresObjKind::Text:
+            case PresObjKind::Outline:
             {
                 SdrTextObj* pTextObject = static_cast<SdrTextObj*>(pObject);
                 if (pTextObject->IsEmptyPresObj())
@@ -1367,7 +1367,7 @@ OUString HtmlExport::CreateTextForNotesPage( SdrOutliner* pOutliner,
 {
     OUStringBuffer aStr;
 
-    SdrTextObj* pTO = static_cast<SdrTextObj*>(pPage->GetPresObj(PRESOBJ_NOTES));
+    SdrTextObj* pTO = static_cast<SdrTextObj*>(pPage->GetPresObj(PresObjKind::Notes));
 
     if (pTO && !pTO->IsEmptyPresObj())
     {
@@ -2193,7 +2193,7 @@ OUString const & HtmlExport::getDocumentTitle()
             // if there is a non-empty title object, use their first passage
             // as page title
             SdPage* pSdPage = mpDoc->GetSdPage(0, PageKind::Standard);
-            SdrObject* pTitleObj = pSdPage->GetPresObj(PRESOBJ_TITLE);
+            SdrObject* pTitleObj = pSdPage->GetPresObj(PresObjKind::Title);
             if (pTitleObj && !pTitleObj->IsEmptyPresObj())
             {
                 OutlinerParaObject* pParaObject = pTitleObj->GetOutlinerParaObject();
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 35faad90da2f..abe8420b2a80 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -645,7 +645,7 @@ bool ImplSdPPTImport::Import()
                         }
 
                         // titlestylesheet
-                        pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE );
+                        pSheet = pPage->GetStyleSheetForPresObj( PresObjKind::Title );
                         if ( pSheet )
                         {
                             SfxItemSet& rItemSet = pSheet->GetItemSet();
@@ -681,7 +681,7 @@ bool ImplSdPPTImport::Import()
                         for ( nLevel = 0; nLevel < 9; delete pParagraphs[ nLevel++ ] ) ;
 
                         // subtitle stylesheet
-                        pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TEXT );
+                        pSheet = pPage->GetStyleSheetForPresObj( PresObjKind::Text );
                         if ( pSheet )
                         {
                             SfxItemSet& rItemSet = pSheet->GetItemSet();
@@ -694,7 +694,7 @@ bool ImplSdPPTImport::Import()
                     }
                     else if ( ePgKind == PageKind::Notes )
                     {
-                        pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_NOTES );
+                        pSheet = pPage->GetStyleSheetForPresObj( PresObjKind::Notes );
                         if ( pSheet )
                         {
                             SfxItemSet& rItemSet = pSheet->GetItemSet();
@@ -1013,7 +1013,7 @@ bool ImplSdPPTImport::Import()
                     pNotesPage->TRG_SetMasterPage(*pSdrModel->GetMasterPage(nNotesMasterNum));
                     pNotesPage->SetAutoLayout( AUTOLAYOUT_NOTES, true );
                     pSdrModel->InsertPage( pNotesPage );
-                    SdrObject* pPageObj = pNotesPage->GetPresObj( PRESOBJ_PAGE );
+                    SdrObject* pPageObj = pNotesPage->GetPresObj( PresObjKind::Page );
                     if ( pPageObj )
                         static_cast<SdrPageObj*>(pPageObj)->SetReferencedPage(pSdrModel->GetPage(( nPage << 1 ) + 1));
                 }
@@ -2168,7 +2168,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
 
     ppStyleSheetAry = nullptr;
 
-    PresObjKind ePresKind = PRESOBJ_NONE;
+    PresObjKind ePresKind = PresObjKind::NONE;
     PptOEPlaceholderAtom* pPlaceHolder = pTextObj->GetOEPlaceHolderAtom();
     OUString aPresentationText;
     if ( pPlaceHolder )
@@ -2179,32 +2179,32 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
             case PptPlaceholder::MASTERCENTEREDTITLE :
             case PptPlaceholder::MASTERTITLE :
             {
-                ePresKind = PRESOBJ_TITLE;
+                ePresKind = PresObjKind::Title;
                 aPresentationText = pPage->GetPresObjText( ePresKind );
             }
             break;
             case PptPlaceholder::MASTERBODY :
             {
-                ePresKind = PRESOBJ_OUTLINE;
+                ePresKind = PresObjKind::Outline;
                 aPresentationText = pPage->GetPresObjText( ePresKind );
             }
             break;
             case PptPlaceholder::MASTERSUBTITLE :
             {
-                ePresKind = PRESOBJ_TEXT;
+                ePresKind = PresObjKind::Text;
                 aPresentationText = pPage->GetPresObjText( ePresKind );
             }
             break;
             case PptPlaceholder::MASTERNOTESBODYIMAGE :
             {
-                ePresKind = PRESOBJ_NOTES;
+                ePresKind = PresObjKind::Notes;
                 aPresentationText = pPage->GetPresObjText( ePresKind );
             }
             break;
-            case PptPlaceholder::MASTERDATE :           ePresKind = PRESOBJ_DATETIME;   break;
-            case PptPlaceholder::MASTERSLIDENUMBER :    ePresKind = PRESOBJ_SLIDENUMBER;break;
-            case PptPlaceholder::MASTERFOOTER :         ePresKind = PRESOBJ_FOOTER;     break;
-            case PptPlaceholder::MASTERHEADER :         ePresKind = PRESOBJ_HEADER;     break;
+            case PptPlaceholder::MASTERDATE :           ePresKind = PresObjKind::DateTime;   break;
+            case PptPlaceholder::MASTERSLIDENUMBER :    ePresKind = PresObjKind::SlideNumber;break;
+            case PptPlaceholder::MASTERFOOTER :         ePresKind = PresObjKind::Footer;     break;
+            case PptPlaceholder::MASTERHEADER :         ePresKind = PresObjKind::Header;     break;
             default: break;
         }
     }
@@ -2213,7 +2213,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
         case TSS_Type::PageTitle :
         case TSS_Type::Title :
         {
-            pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE );
+            pSheet = pPage->GetStyleSheetForPresObj( PresObjKind::Title );
             if ( pSheet )
                 static_cast<SdrAttrObj*>(pText)->SdrAttrObj::NbcSetStyleSheet( pSheet, true );
             DBG_ASSERT( pSheet, "ImplSdPPTImport::ApplyTextObj -> could not get stylesheet for titleobject (SJ)" );
@@ -2221,7 +2221,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
         break;
         case TSS_Type::Subtitle :
         {
-            pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TEXT );
+            pSheet = pPage->GetStyleSheetForPresObj( PresObjKind::Text );
             if ( pSheet )
                 static_cast<SdrAttrObj*>(pText)->SdrAttrObj::NbcSetStyleSheet( pSheet, true );
             DBG_ASSERT( pSheet, "ImplSdPPTImport::ApplyTextObj -> could not get stylesheet for subtitleobject (SJ)" );
@@ -2250,14 +2250,14 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
             if ( pPlaceHolder && ( ( pPlaceHolder->nPlaceholderId == PptPlaceholder::NOTESSLIDEIMAGE )
                 || ( pPlaceHolder->nPlaceholderId == PptPlaceholder::MASTERNOTESSLIDEIMAGE ) ) )
             {
-                pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE );
+                pSheet = pPage->GetStyleSheetForPresObj( PresObjKind::Title );
                 if ( pSheet )
                     static_cast<SdrAttrObj*>(pText)->SdrAttrObj::NbcSetStyleSheet( pSheet, true );
                 DBG_ASSERT( pSheet, "ImplSdPPTImport::ApplyTextObj -> could not get stylesheet for titleobject (SJ)" );
             }
             else
             {
-                pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_NOTES );
+                pSheet = pPage->GetStyleSheetForPresObj( PresObjKind::Notes );
                 DBG_ASSERT( pSheet, "ImplSdPPTImport::ApplyTextObj -> could not get stylesheet for notesobj (SJ)" );
                 if ( pSheet )
                     static_cast<SdrAttrObj*>(pText)->SdrAttrObj::NbcSetStyleSheet( pSheet, true );
@@ -2269,10 +2269,10 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
         {
             switch( ePresKind )
             {
-                case PRESOBJ_DATETIME :
-                case PRESOBJ_SLIDENUMBER :
-                case PRESOBJ_FOOTER :
-                case PRESOBJ_HEADER :
+                case PresObjKind::DateTime :
+                case PresObjKind::SlideNumber :
+                case PresObjKind::Footer :
+                case PresObjKind::Header :
                     pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find(SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS), SfxStyleFamily::Pseudo ));
                 break;
                 default :
@@ -2290,8 +2290,8 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
         if ( m_eCurrentPageKind == PPT_MASTERPAGE )
         {
             bool bCreatePlaceHolder = ( pTextObj->GetInstance() != TSS_Type::Unused );
-            bool bIsHeaderFooter = ( ePresKind == PRESOBJ_HEADER) || (ePresKind == PRESOBJ_FOOTER)
-                                        || (ePresKind == PRESOBJ_DATETIME) || (ePresKind == PRESOBJ_SLIDENUMBER);
+            bool bIsHeaderFooter = ( ePresKind == PresObjKind::Header) || (ePresKind == PresObjKind::Footer)
+                                        || (ePresKind == PresObjKind::DateTime) || (ePresKind == PresObjKind::SlideNumber);
             if ( bCreatePlaceHolder && ( pTextObj->GetInstance() == TSS_Type::TextInShape ) )
                 bCreatePlaceHolder = bIsHeaderFooter;
             if ( bCreatePlaceHolder )
@@ -2348,7 +2348,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
             {
                 sal_uInt32 nPlacementId = pPlaceHolder->nPlacementId;
                 PptPlaceholder nPlaceholderId = pPlaceHolder->nPlaceholderId;
-                PresObjKind ePresObjKind = PRESOBJ_NONE;
+                PresObjKind ePresObjKind = PresObjKind::NONE;
                 bool    bEmptyPresObj = true;
                 bool    bVertical = false;
                 if ( ( pTextObj->GetShapeType() == mso_sptRectangle ) || ( pTextObj->GetShapeType() == mso_sptTextBox ) )
@@ -2358,17 +2358,17 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
                     bEmptyPresObj = ( pTextObj->Count() == 0 ) || ( pTextObj->Count() == 1 && pTextObj->First()->GetTextSize() == 0 );
                     switch ( nPlaceholderId )
                     {
-                        case PptPlaceholder::NOTESBODY :            ePresObjKind = PRESOBJ_NOTES;   break;
+                        case PptPlaceholder::NOTESBODY :            ePresObjKind = PresObjKind::Notes;   break;
                         case PptPlaceholder::VERTICALTEXTTITLE :
                             bVertical = true;
                             [[fallthrough]];
-                        case PptPlaceholder::TITLE :                ePresObjKind = PRESOBJ_TITLE;   break;
+                        case PptPlaceholder::TITLE :                ePresObjKind = PresObjKind::Title;   break;
                         case PptPlaceholder::VERTICALTEXTBODY :
                             bVertical = true;
                             [[fallthrough]];
-                        case PptPlaceholder::BODY :                 ePresObjKind = PRESOBJ_OUTLINE; break;
-                        case PptPlaceholder::CENTEREDTITLE :        ePresObjKind = PRESOBJ_TITLE;   break;
-                        case PptPlaceholder::SUBTITLE :             ePresObjKind = PRESOBJ_TEXT;    break;      // PRESOBJ_OUTLINE
+                        case PptPlaceholder::BODY :                 ePresObjKind = PresObjKind::Outline; break;
+                        case PptPlaceholder::CENTEREDTITLE :        ePresObjKind = PresObjKind::Title;   break;
+                        case PptPlaceholder::SUBTITLE :             ePresObjKind = PresObjKind::Text;    break;      // PresObjKind::Outline
 
                         default :
                         {
@@ -2377,11 +2377,11 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
                                 switch ( nPlaceholderId )
                                 {
                                     case PptPlaceholder::MEDIACLIP :
-                                    case PptPlaceholder::OBJECT : ePresObjKind = PRESOBJ_OBJECT; break;
-                                    case PptPlaceholder::GRAPH : ePresObjKind = PRESOBJ_CHART; break;
-                                    case PptPlaceholder::TABLE : ePresObjKind = PRESOBJ_TABLE; break;
-                                    case PptPlaceholder::CLIPART : ePresObjKind = PRESOBJ_GRAPHIC; break;
-                                    case PptPlaceholder::ORGANISZATIONCHART : ePresObjKind = PRESOBJ_ORGCHART; break;
+                                    case PptPlaceholder::OBJECT : ePresObjKind = PresObjKind::Object; break;
+                                    case PptPlaceholder::GRAPH : ePresObjKind = PresObjKind::Chart; break;
+                                    case PptPlaceholder::TABLE : ePresObjKind = PresObjKind::Table; break;
+                                    case PptPlaceholder::CLIPART : ePresObjKind = PresObjKind::Graphic; break;
+                                    case PptPlaceholder::ORGANISZATIONCHART : ePresObjKind = PresObjKind::OrgChart; break;
                                     default: break;
                                 }
                             }
@@ -2396,16 +2396,16 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
                         switch ( nPlaceholderId )
                         {
                             case PptPlaceholder::MEDIACLIP :
-                            case PptPlaceholder::OBJECT : ePresObjKind = PRESOBJ_OBJECT; break;
-                            case PptPlaceholder::GRAPH : ePresObjKind = PRESOBJ_CHART; break;
-                            case PptPlaceholder::TABLE : ePresObjKind = PRESOBJ_CALC; break;
-                            case PptPlaceholder::CLIPART : ePresObjKind = PRESOBJ_GRAPHIC; break;
-                            case PptPlaceholder::ORGANISZATIONCHART : ePresObjKind = PRESOBJ_ORGCHART; break;
+                            case PptPlaceholder::OBJECT : ePresObjKind = PresObjKind::Object; break;
+                            case PptPlaceholder::GRAPH : ePresObjKind = PresObjKind::Chart; break;
+                            case PptPlaceholder::TABLE : ePresObjKind = PresObjKind::Calc; break;
+                            case PptPlaceholder::CLIPART : ePresObjKind = PresObjKind::Graphic; break;
+                            case PptPlaceholder::ORGANISZATIONCHART : ePresObjKind = PresObjKind::OrgChart; break;
                             default: break;
                         }
                     }
                 }
-                if ( ePresObjKind != PRESOBJ_NONE )
+                if ( ePresObjKind != PresObjKind::NONE )
                 {
                     if ( !bEmptyPresObj )
                     {
@@ -2436,8 +2436,8 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
 
                         if ((m_eCurrentPageKind != PPT_NOTEPAGE) && (nPlacementId != 0xffffffff) && pPage->TRG_HasMasterPage())
                         {
-                            SdrObject* pTitleObj = static_cast<SdPage&>(pPage->TRG_GetMasterPage()).GetPresObj( PRESOBJ_TITLE );
-                            SdrObject* pOutlineObj = static_cast<SdPage&>(pPage->TRG_GetMasterPage()).GetPresObj( PRESOBJ_OUTLINE );
+                            SdrObject* pTitleObj = static_cast<SdPage&>(pPage->TRG_GetMasterPage()).GetPresObj( PresObjKind::Title );
+                            SdrObject* pOutlineObj = static_cast<SdPage&>(pPage->TRG_GetMasterPage()).GetPresObj( PresObjKind::Outline );
 
                             ::tools::Rectangle aTitleRect;
                             ::tools::Rectangle aOutlineRect;
@@ -2579,7 +2579,7 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rData, SvxMSD
             const ProcessData& rProcessData=static_cast<const ProcessData&>(rClientData);
             if(rProcessData.pPage.page)
                 static_cast<SdPage *>(rProcessData.pPage.page)->InsertPresObj(
-                    pObj, PRESOBJ_PAGE );
+                    pObj, PresObjKind::Page );
         }
 
         DffRecordHeader aMasterShapeHd;
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index c866a5ab6680..ab365ac60304 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -404,7 +404,7 @@ ErrCode ReadThroughComponent(
 
 }
 
-//PRESOBJ_OUTLINEs in master pages are the preview of the outline styles
+//PresObjKind::Outlines in master pages are the preview of the outline styles
 //numbering format. Since fdo#78151 toggling bullets on and off changes
 //the style they are a preview of, previously toggling bullets on and off
 //would only affect the preview paragraph itself without an effect on the
@@ -419,7 +419,7 @@ static void fixupOutlinePlaceholderNumberingDepths(SdDrawDocument* pDoc)
     for (sal_uInt16 i = 0; i < pDoc->GetMasterSdPageCount(PageKind::Standard); ++i)
     {
         SdPage *pMasterPage = pDoc->GetMasterSdPage(i, PageKind::Standard);
-        SdrObject* pMasterOutline = pMasterPage->GetPresObj(PRESOBJ_OUTLINE);
+        SdrObject* pMasterOutline = pMasterPage->GetPresObj(PresObjKind::Outline);
         if (!pMasterOutline)
             continue;
         OutlinerParaObject* pOutlParaObj = pMasterOutline->GetOutlinerParaObject();
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index d0fc351dee60..43420abcbb2b 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -716,7 +716,7 @@ uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes()
         SdPage* pNotesPge = pDoc->GetSdPage((pCurrPge->GetPageNum()-1)>>1, PageKind::Notes);
         if (pNotesPge)
         {
-            SdrObject* pNotesObj = pNotesPge->GetPresObj(PRESOBJ_NOTES);
+            SdrObject* pNotesObj = pNotesPge->GetPresObj(PresObjKind::Notes);
             if (pNotesObj)
             {
                 OutlinerParaObject* pPara = pNotesObj->GetOutlinerParaObject();
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 2704d5a756bf..14e43dd75229 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -738,12 +738,12 @@ void SdPhotoAlbumDialog::createCaption(const awt::Size& aPageSize )
 
     // try to get existing PresObj
     const ::tools::Rectangle rRect(CapPos,CapSize);
-    SdrObject* pSdrObj = pSlide->GetPresObj(PRESOBJ_TITLE);
+    SdrObject* pSdrObj = pSlide->GetPresObj(PresObjKind::Title);
 
     if(!pSdrObj)
     {
         // if not exists, create. Beware: It is already inserted to the SdPage
-        pSdrObj = pSlide->CreatePresObj(PRESOBJ_TITLE,false,rRect);
+        pSdrObj = pSlide->CreatePresObj(PresObjKind::Title,false,rRect);
     }
     else
     {
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index d912ca226204..5b674925163a 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -551,7 +551,7 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType &rLanguage, boo
     if( !pPage )
         return;
 
-    SdrTextObj* pObj = static_cast<SdrTextObj*>(pPage->GetPresObj( PRESOBJ_DATETIME ));
+    SdrTextObj* pObj = static_cast<SdrTextObj*>(pPage->GetPresObj( PresObjKind::DateTime ));
     if( !pObj )
         return;
 
@@ -730,12 +730,12 @@ void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools:
     // paint presentation objects from masterpage
     if (nullptr != mpMaster)
     {
-        SdrTextObj* pMasterTitle = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_TITLE));
-        SdrTextObj* pMasterOutline = static_cast<SdrTextObj*>(mpMaster->GetPresObj(mpMaster->GetPageKind() == PageKind::Notes ? PRESOBJ_NOTES : PRESOBJ_OUTLINE));
-        SdrTextObj* pHeader = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_HEADER));
-        SdrTextObj* pFooter = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_FOOTER));
-        SdrTextObj* pDate = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_DATETIME));
-        SdrTextObj* pNumber = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PRESOBJ_SLIDENUMBER));
+        SdrTextObj* pMasterTitle = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PresObjKind::Title));
+        SdrTextObj* pMasterOutline = static_cast<SdrTextObj*>(mpMaster->GetPresObj(mpMaster->GetPageKind() == PageKind::Notes ? PresObjKind::Notes : PresObjKind::Outline));
+        SdrTextObj* pHeader = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PresObjKind::Header));
+        SdrTextObj* pFooter = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PresObjKind::Footer));
+        SdrTextObj* pDate = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PresObjKind::DateTime));
+        SdrTextObj* pNumber = static_cast<SdrTextObj*>(mpMaster->GetPresObj(PresObjKind::SlideNumber));
 
         if (pMasterTitle)
             Paint(rRenderContext, pMasterTitle, true, true);
diff --git a/sd/source/ui/dlg/masterlayoutdlg.cxx b/sd/source/ui/dlg/masterlayoutdlg.cxx
index 881ed7b5bf36..d5bac1c6a328 100644
--- a/sd/source/ui/dlg/masterlayoutdlg.cxx
+++ b/sd/source/ui/dlg/masterlayoutdlg.cxx
@@ -58,10 +58,10 @@ MasterLayoutDialog::MasterLayoutDialog(weld::Window* pParent, SdDrawDocument* pD
             break;
     }
 
-    mbOldHeader = mpCurrentPage->GetPresObj( PRESOBJ_HEADER ) != nullptr;
-    mbOldDate = mpCurrentPage->GetPresObj( PRESOBJ_DATETIME ) != nullptr;
-    mbOldFooter = mpCurrentPage->GetPresObj( PRESOBJ_FOOTER ) != nullptr;
-    mbOldPageNumber = mpCurrentPage->GetPresObj( PRESOBJ_SLIDENUMBER ) != nullptr;
+    mbOldHeader = mpCurrentPage->GetPresObj( PresObjKind::Header ) != nullptr;
+    mbOldDate = mpCurrentPage->GetPresObj( PresObjKind::DateTime ) != nullptr;
+    mbOldFooter = mpCurrentPage->GetPresObj( PresObjKind::Footer ) != nullptr;
+    mbOldPageNumber = mpCurrentPage->GetPresObj( PresObjKind::SlideNumber ) != nullptr;
 
     mxCBHeader->set_active( mbOldHeader );
     mxCBDate->set_active( mbOldDate );
@@ -87,33 +87,33 @@ void MasterLayoutDialog::applyChanges()
     if( (mpCurrentPage->GetPageKind() != PageKind::Standard) && (mbOldHeader != mxCBHeader->get_active() ) )
     {
         if( mbOldHeader )
-            remove( PRESOBJ_HEADER );
+            remove( PresObjKind::Header );
         else
-            create( PRESOBJ_HEADER );
+            create( PresObjKind::Header );
     }
 
     if( mbOldFooter != mxCBFooter->get_active() )
     {
         if( mbOldFooter )
-            remove( PRESOBJ_FOOTER );
+            remove( PresObjKind::Footer );
         else
-            create( PRESOBJ_FOOTER );
+            create( PresObjKind::Footer );
     }
 
     if( mbOldDate != mxCBDate->get_active() )
     {
         if( mbOldDate )
-            remove( PRESOBJ_DATETIME );
+            remove( PresObjKind::DateTime );
         else
-            create( PRESOBJ_DATETIME );
+            create( PresObjKind::DateTime );
     }
 
     if( mbOldPageNumber != mxCBPageNumber->get_active() )
     {
         if( mbOldPageNumber )
-            remove( PRESOBJ_SLIDENUMBER );
+            remove( PresObjKind::SlideNumber );
         else
-            create( PRESOBJ_SLIDENUMBER );
+            create( PresObjKind::SlideNumber );
     }
 
     mpDoc->EndUndo();
diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx
index cc3e910f8819..b95ad8515b67 100644
--- a/sd/source/ui/func/fuexpand.cxx
+++ b/sd/source/ui/func/fuexpand.cxx
@@ -100,7 +100,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
     SdrLayerIDSet aVisibleLayers = pActualPage->TRG_GetMasterPageVisibleLayers();
     sal_uInt16 nActualPageNum = pActualPage->GetPageNum();
     SdPage* pActualNotesPage = static_cast<SdPage*>(mpDoc->GetPage(nActualPageNum + 1));
-    SdrTextObj* pActualOutline = static_cast<SdrTextObj*>(pActualPage->GetPresObj(PRESOBJ_OUTLINE));
+    SdrTextObj* pActualOutline = static_cast<SdrTextObj*>(pActualPage->GetPresObj(PresObjKind::Outline));
 
     if (pActualOutline)
     {
@@ -178,8 +178,8 @@ void FuExpandPage::DoExecute( SfxRequest& )
                 pNotesPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers);
 
                 // create title text objects
-                SdrTextObj* pTextObj = static_cast<SdrTextObj*>(pPage->GetPresObj(PRESOBJ_TITLE));
-                SAL_WARN_IF(!pTextObj, "sd.core", "worrying lack of PRESOBJ_TITLE object");
+                SdrTextObj* pTextObj = static_cast<SdrTextObj*>(pPage->GetPresObj(PresObjKind::Title));
+                SAL_WARN_IF(!pTextObj, "sd.core", "worrying lack of PresObjKind::Title object");
                 if (!pTextObj)
                     continue;
 
@@ -203,13 +203,13 @@ void FuExpandPage::DoExecute( SfxRequest& )
 
                 pTextObj->SetEmptyPresObj(false);
 
-                SfxStyleSheet* pSheet = pPage->GetStyleSheetForPresObj(PRESOBJ_TITLE);
+                SfxStyleSheet* pSheet = pPage->GetStyleSheetForPresObj(PresObjKind::Title);
                 pTextObj->NbcSetStyleSheet(pSheet, false);
 
                 SdrTextObj* pOutlineObj = nullptr;
                 sal_Int32 nChildCount = aOutliner.GetChildCount(pPara);
                 if (nChildCount > 0)
-                    pOutlineObj = static_cast<SdrTextObj*>( pPage->GetPresObj(PRESOBJ_OUTLINE) );
+                    pOutlineObj = static_cast<SdrTextObj*>( pPage->GetPresObj(PresObjKind::Outline) );
                 if (pOutlineObj)
                 {
                     // create structuring text objects
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 5226627911de..7b66e6a53348 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -161,7 +161,7 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq )
             sal_Int8    nAction = DND_ACTION_COPY;
             SdrObject* pPickObj;
 
-            if( ( ( pPickObj = mpView->GetSelectedSingleObject( mpView->GetPage() ) ) && mbReplaceExistingImage ) || (pPickObj = mpView->GetEmptyPresentationObject( PRESOBJ_GRAPHIC ) ) )
+            if( ( ( pPickObj = mpView->GetSelectedSingleObject( mpView->GetPage() ) ) && mbReplaceExistingImage ) || (pPickObj = mpView->GetEmptyPresentationObject( PresObjKind::Graphic ) ) )
             {
                 nAction = DND_ACTION_LINK;
             } else {
@@ -287,7 +287,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
          nSlotId == SID_INSERT_DIAGRAM ||
          nSlotId == SID_INSERT_MATH )
     {
-        PresObjKind ePresObjKind = (nSlotId == SID_INSERT_DIAGRAM) ? PRESOBJ_CHART : PRESOBJ_OBJECT;
+        PresObjKind ePresObjKind = (nSlotId == SID_INSERT_DIAGRAM) ? PresObjKind::Chart : PresObjKind::Object;
 
         SdrObject* pPickObj = mpView->GetEmptyPresentationObject( ePresObjKind );
 
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index 932a942986e3..90051588f815 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -619,7 +619,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
                                     SdResId(STR_UNDO_INSERT_FILE), OUString(), 0, nViewShellId );
 
         sal_Int32 nSourcePos = 0;
-        SfxStyleSheet* pStyleSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE );
+        SfxStyleSheet* pStyleSheet = pPage->GetStyleSheetForPresObj( PresObjKind::Outline );
         Paragraph* pSourcePara = pOutliner->GetParagraph( 0 );
         while (pSourcePara)
         {
diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx
index f84dba0f65e3..5984ffa19d44 100644
--- a/sd/source/ui/func/fusumry.cxx
+++ b/sd/source/ui/func/fusumry.cxx
@@ -100,7 +100,7 @@ void FuSummaryPage::DoExecute( SfxRequest& )
         if (nSelectedPages <= 1 || pActualPage->IsSelected())
         {
             SdPage* pActualNotesPage = mpDoc->GetSdPage(i, PageKind::Notes);
-            SdrTextObj* pTextObj = static_cast<SdrTextObj*>( pActualPage->GetPresObj(PRESOBJ_TITLE) );
+            SdrTextObj* pTextObj = static_cast<SdrTextObj*>( pActualPage->GetPresObj(PresObjKind::Title) );
 
             if (pTextObj && !pTextObj->IsEmptyPresObj())
             {
@@ -168,7 +168,7 @@ void FuSummaryPage::DoExecute( SfxRequest& )
 
                     pOutl->SetDefTab( mpDoc->GetDefaultTabulator() );
                     pOutl->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(mpDoc->GetStyleSheetPool()));
-                    pStyle = pSummaryPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE );
+                    pStyle = pSummaryPage->GetStyleSheetForPresObj( PresObjKind::Outline );
                     pOutl->SetStyleSheet( 0, pStyle );
                 }
 
@@ -187,7 +187,7 @@ void FuSummaryPage::DoExecute( SfxRequest& )
     if (!pSummaryPage)
         return;
 
-    SdrTextObj* pTextObj = static_cast<SdrTextObj*>( pSummaryPage->GetPresObj(PRESOBJ_OUTLINE) );
+    SdrTextObj* pTextObj = static_cast<SdrTextObj*>( pSummaryPage->GetPresObj(PresObjKind::Outline) );
 
     if (!pTextObj)
         return;
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index fc216d5d1389..67f86e54c53d 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -1180,10 +1180,10 @@ void FuText::DeleteDefaultText()
 
     PresObjKind ePresObjKind = pPage->GetPresObjKind(mxTextObj.get());
 
-    if ( !((ePresObjKind == PRESOBJ_TITLE   ||
-          ePresObjKind == PRESOBJ_OUTLINE ||
-          ePresObjKind == PRESOBJ_NOTES   ||
-          ePresObjKind == PRESOBJ_TEXT) &&
+    if ( !((ePresObjKind == PresObjKind::Title   ||
+          ePresObjKind == PresObjKind::Outline ||
+          ePresObjKind == PresObjKind::Notes   ||
+          ePresObjKind == PresObjKind::Text) &&
           !pPage->IsMasterPage()) )
         return;
 
@@ -1199,7 +1199,7 @@ void FuText::DeleteDefaultText()
         pOutliner->EnableUndo(true);
 
     if (pSheet &&
-        (ePresObjKind == PRESOBJ_NOTES || ePresObjKind == PRESOBJ_TEXT))
+        (ePresObjKind == PresObjKind::Notes || ePresObjKind == PresObjKind::Text))
         pOutliner->SetStyleSheet(0, pSheet);
 
     mxTextObj->SetEmptyPresObj(true);
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 02c8918747c7..ffd39eda94f6 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -141,7 +141,7 @@ public:
     OUString        GetSelectionText( bool bCompleteWords );
     bool            HasSelection( bool bText ) const;
 
-    //If we are editing a PRESOBJ_OUTLINE return the Outliner and fill rSel
+    //If we are editing a PresObjKind::Outline return the Outliner and fill rSel
     //with the current selection
     ::Outliner*     GetOutlinerForMasterPageOutlineTextObj(ESelection &rSel);
 
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index b371aa2ea1b8..0f421b7f99ba 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -565,7 +565,7 @@ void SlotManager::GetMenuState (SfxItemSet& rSet)
             while (aSelectedPages.HasMoreElements())
             {
                 SdPage* pPage = aSelectedPages.GetNextElement()->GetPage();
-                SdrObject* pObj = pPage->GetPresObj(PRESOBJ_OUTLINE);
+                SdrObject* pObj = pPage->GetPresObj(PresObjKind::Outline);
                 if (pObj!=nullptr )
                 {
                     if( !pObj->IsEmptyPresObj() )
@@ -606,7 +606,7 @@ void SlotManager::GetMenuState (SfxItemSet& rSet)
             while (aSelectedPages.HasMoreElements())
             {
                 SdPage* pPage = aSelectedPages.GetNextElement()->GetPage();
-                SdrObject* pObj = pPage->GetPresObj(PRESOBJ_TITLE);
+                SdrObject* pObj = pPage->GetPresObj(PresObjKind::Title);
 
                 if (pObj!=nullptr && !pObj->IsEmptyPresObj())
                     bDisable = false;
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index 3a72c05921dd..2a031e525d32 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -121,7 +121,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
 
         ::tools::Rectangle aRect;
 
-        SdrObject* pPickObj = mpView->GetEmptyPresentationObject( PRESOBJ_TABLE );
+        SdrObject* pPickObj = mpView->GetEmptyPresentationObject( PresObjKind::Table );
         if( pPickObj )
         {
             aRect = pPickObj->GetLogicRect();
@@ -194,7 +194,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
             if(pPage && pPage->IsPresObj(pPickObj))
             {
                 pObj->SetUserCall( pPickObj->GetUserCall() );
-                pPage->InsertPresObj( pObj, PRESOBJ_TABLE );
+                pPage->InsertPresObj( pObj, PresObjKind::Table );
             }
         }
 
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 52fe89fb072c..f3fee3332659 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -834,7 +834,7 @@ bool SdXShape::IsPresObj() const
     {
         SdPage* pPage = dynamic_cast<SdPage* >(pObj->getSdrPageFromSdrObject());
         if(pPage)
-            return pPage->GetPresObjKind(pObj) != PRESOBJ_NONE;
+            return pPage->GetPresObjKind(pObj) != PresObjKind::NONE;
     }
     return false;
 }
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index e728f0fb9e05..3551d7e5b552 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -412,81 +412,81 @@ SdrObject * SdGenericDrawPage::CreateSdrObject_( const Reference< drawing::XShap
 
     aType = aType.copy( aPrefix.getLength() );
 
-    PresObjKind eObjKind = PRESOBJ_NONE;
+    PresObjKind eObjKind = PresObjKind::NONE;
 
     if( aType == "TitleTextShape" )
     {
-        eObjKind = PRESOBJ_TITLE;
+        eObjKind = PresObjKind::Title;
     }
     else if( aType == "OutlinerShape" )
     {
-        eObjKind = PRESOBJ_OUTLINE;
+        eObjKind = PresObjKind::Outline;
     }
     else if( aType == "SubtitleShape" )
     {
-        eObjKind = PRESOBJ_TEXT;
+        eObjKind = PresObjKind::Text;
     }
     else if( aType == "OLE2Shape" )
     {
-        eObjKind = PRESOBJ_OBJECT;
+        eObjKind = PresObjKind::Object;
     }
     else if( aType == "ChartShape" )
     {
-        eObjKind = PRESOBJ_CHART;
+        eObjKind = PresObjKind::Chart;
     }
     else if( aType == "CalcShape" )
     {
-        eObjKind = PRESOBJ_CALC;
+        eObjKind = PresObjKind::Calc;
     }
     else if( aType == "TableShape" )
     {
-        eObjKind = PRESOBJ_TABLE;
+        eObjKind = PresObjKind::Table;
     }
     else if( aType == "GraphicObjectShape" )
     {
-        eObjKind = PRESOBJ_GRAPHIC;
+        eObjKind = PresObjKind::Graphic;
     }
     else if( aType == "OrgChartShape" )
     {
-        eObjKind = PRESOBJ_ORGCHART;
+        eObjKind = PresObjKind::OrgChart;
     }
     else if( aType == "PageShape" )
     {
         if( GetPage()->GetPageKind() == PageKind::Notes && GetPage()->IsMasterPage() )
-            eObjKind = PRESOBJ_TITLE;
+            eObjKind = PresObjKind::Title;
         else
-            eObjKind = PRESOBJ_PAGE;
+            eObjKind = PresObjKind::Page;
     }
     else if( aType == "NotesShape" )
     {
-        eObjKind = PRESOBJ_NOTES;
+        eObjKind = PresObjKind::Notes;
     }
     else if( aType == "HandoutShape" )
     {
-        eObjKind = PRESOBJ_HANDOUT;
+        eObjKind = PresObjKind::Handout;
     }
     else if( aType == "FooterShape" )
     {
-        eObjKind = PRESOBJ_FOOTER;
+        eObjKind = PresObjKind::Footer;
     }
     else if( aType == "HeaderShape" )
     {
-        eObjKind = PRESOBJ_HEADER;
+        eObjKind = PresObjKind::Header;
     }
     else if( aType == "SlideNumberShape" )
     {
-        eObjKind = PRESOBJ_SLIDENUMBER;
+        eObjKind = PresObjKind::SlideNumber;
     }
     else if( aType == "DateTimeShape" )
     {
-        eObjKind = PRESOBJ_DATETIME;
+        eObjKind = PresObjKind::DateTime;
     }
     else if( aType == "MediaShape" )
     {
-        eObjKind = PRESOBJ_MEDIA;
+        eObjKind = PresObjKind::Media;
     }
 
-    ::tools::Rectangle aRect( eObjKind == PRESOBJ_TITLE ? GetPage()->GetTitleRect() : GetPage()->GetLayoutRect()  );
+    ::tools::Rectangle aRect( eObjKind == PresObjKind::Title ? GetPage()->GetTitleRect() : GetPage()->GetLayoutRect()  );
 
     const awt::Point aPos( aRect.Left(), aRect.Top() );
     xShape->setPosition( aPos );
@@ -495,7 +495,7 @@ SdrObject * SdGenericDrawPage::CreateSdrObject_( const Reference< drawing::XShap
     xShape->setSize( aSize );
 
     SdrObject *pPresObj = nullptr;
-    if( (eObjKind == PRESOBJ_TABLE) || (eObjKind == PRESOBJ_MEDIA) )
+    if( (eObjKind == PresObjKind::Table) || (eObjKind == PresObjKind::Media) )
     {
         pPresObj = SvxFmDrawPage::CreateSdrObject_( xShape );
         if( pPresObj )
@@ -1387,12 +1387,12 @@ Reference< drawing::XShape >  SdGenericDrawPage::CreateShape(SdrObject *pObj) co
                 {
                     pShape->SetShapeType("com.sun.star.presentation.TitleTextShape");
                 }
-                eKind = PRESOBJ_NONE;
+                eKind = PresObjKind::NONE;
                 break;
             case OBJ_OUTLINETEXT:
                 pShape = new SvxShapeText( pObj );
                 pShape->SetShapeType("com.sun.star.presentation.OutlinerShape");
-                eKind = PRESOBJ_NONE;
+                eKind = PresObjKind::NONE;
                 break;
             }
         }
@@ -1402,66 +1402,65 @@ Reference< drawing::XShape >  SdGenericDrawPage::CreateShape(SdrObject *pObj) co
         if(!xShape.is())
             xShape = SvxFmDrawPage::CreateShape( pObj );
 
-        if( eKind != PRESOBJ_NONE )
+        if( eKind != PresObjKind::NONE )
         {
             OUString aShapeType("com.sun.star.presentation.");
 
             switch( eKind )
             {
-            case PRESOBJ_TITLE:
+            case PresObjKind::Title:
                 aShapeType += "TitleTextShape";
                 break;
-            case PRESOBJ_OUTLINE:
+            case PresObjKind::Outline:
                 aShapeType += "OutlinerShape";
                 break;
-            case PRESOBJ_TEXT:
+            case PresObjKind::Text:
                 aShapeType += "SubtitleShape";
                 break;
-            case PRESOBJ_GRAPHIC:
+            case PresObjKind::Graphic:
                 aShapeType += "GraphicObjectShape";
                 break;
-            case PRESOBJ_OBJECT:
+            case PresObjKind::Object:
                 aShapeType += "OLE2Shape";
                 break;
-            case PRESOBJ_CHART:
+            case PresObjKind::Chart:
                 aShapeType += "ChartShape";
                 break;
-            case PRESOBJ_ORGCHART:
+            case PresObjKind::OrgChart:
                 aShapeType += "OrgChartShape";
                 break;
-            case PRESOBJ_CALC:
+            case PresObjKind::Calc:
                 aShapeType += "CalcShape";
                 break;
-            case PRESOBJ_TABLE:
+            case PresObjKind::Table:
                 aShapeType += "TableShape";
                 break;
-            case PRESOBJ_MEDIA:
+            case PresObjKind::Media:
                 aShapeType += "MediaShape";
                 break;
-            case PRESOBJ_PAGE:
+            case PresObjKind::Page:
                 aShapeType += "PageShape";
                 break;
-            case PRESOBJ_HANDOUT:
+            case PresObjKind::Handout:
                 aShapeType += "HandoutShape";
                 break;
-            case PRESOBJ_NOTES:
+            case PresObjKind::Notes:
                 aShapeType += "NotesShape";
                 break;
-            case PRESOBJ_FOOTER:
+            case PresObjKind::Footer:
                 aShapeType += "FooterShape";
                 break;
-            case PRESOBJ_HEADER:
+            case PresObjKind::Header:
                 aShapeType += "HeaderShape";
                 break;
-            case PRESOBJ_SLIDENUMBER:
+            case PresObjKind::SlideNumber:
                 aShapeType += "SlideNumberShape";
                 break;
-            case PRESOBJ_DATETIME:
+            case PresObjKind::DateTime:
                 aShapeType += "DateTimeShape";
                 break;
             // coverity[dead_error_begin] - following conditions exist to avoid compiler warning
-            case PRESOBJ_NONE:
-            case PRESOBJ_MAX:
+            case PresObjKind::NONE:
                 break;
             }
 
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index b91771f623c4..97672fba3932 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1700,7 +1700,7 @@ private:
                 if (!pTextObj)
                 {
                     bSubTitle = true;
-                    pTextObj = dynamic_cast<SdrTextObj*>(pPage->GetPresObj(PRESOBJ_TEXT));  // is there a subtitle?
+                    pTextObj = dynamic_cast<SdrTextObj*>(pPage->GetPresObj(PresObjKind::Text));  // is there a subtitle?
                 }
 
                 sal_Int32 nParaCount1 = pOutliner->GetParagraphCount();
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index 128a0d4d4c9b..48580601dd19 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -157,8 +157,8 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
                 sal_uInt16 eObjKind = pEditObject->GetObjIdentifier();
                 PresObjKind ePresObjKind = rPage.GetPresObjKind(pEditObject);
 
-                if ( ePresObjKind == PRESOBJ_TITLE ||
-                     ePresObjKind == PRESOBJ_NOTES )
+                if ( ePresObjKind == PresObjKind::Title ||
+                     ePresObjKind == PresObjKind::Notes )
                 {
                     // Presentation object (except outline)
                     SfxStyleSheet* pSheet = rPage.GetStyleSheetForPresObj( ePresObjKind );
@@ -320,8 +320,8 @@ void DrawView::SetMasterAttributes( SdrObject* pObject, const SdPage& rPage, Sfx
         }
 
         if (!bSlide &&
-            (ePresObjKind == PRESOBJ_TITLE ||
-             ePresObjKind == PRESOBJ_NOTES))
+            (ePresObjKind == PresObjKind::Title ||
+             ePresObjKind == PresObjKind::Notes))
         {
             // Presentation object (except outline)
             SfxStyleSheet* pSheet = rPage.GetStyleSheetForPresObj( ePresObjKind );
@@ -574,16 +574,16 @@ void DrawView::DeleteMarked()
                     PresObjKind ePresObjKind(pPage->GetPresObjKind(pObj));

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list