[Libreoffice-commits] core.git: chart2/source editeng/source filter/source include/editeng include/svx sc/source sd/inc sd/source svx/source sw/source

Noel Grandin noelgrandin at gmail.com
Mon May 9 11:15:43 UTC 2016


 chart2/source/controller/drawinglayer/DrawViewWrapper.cxx |    2 
 editeng/source/editeng/editobj.cxx                        |   14 +++--
 editeng/source/editeng/editobj2.hxx                       |    7 +-
 editeng/source/outliner/outliner.cxx                      |   26 +++++-----
 editeng/source/outliner/outlobj.cxx                       |    4 -
 editeng/source/outliner/outlvw.cxx                        |   24 ++++-----
 filter/source/msfilter/msdffimp.cxx                       |    4 -
 filter/source/msfilter/svdfppt.cxx                        |    2 
 include/editeng/editobj.hxx                               |    5 +-
 include/editeng/outliner.hxx                              |   35 ++++++++------
 include/editeng/outlobj.hxx                               |    5 +-
 include/svx/svdetc.hxx                                    |    4 -
 include/svx/svdmodel.hxx                                  |    2 
 include/svx/svdoutl.hxx                                   |    2 
 include/svx/svdtext.hxx                                   |    3 -
 sc/source/filter/excel/xiescher.cxx                       |    2 
 sc/source/ui/drawfunc/futext2.cxx                         |    2 
 sc/source/ui/unoobj/editsrc.cxx                           |    2 
 sd/inc/Outliner.hxx                                       |   12 ++--
 sd/source/core/drawdoc.cxx                                |   12 ++--
 sd/source/core/drawdoc4.cxx                               |    6 +-
 sd/source/core/sdpage.cxx                                 |   14 ++---
 sd/source/core/text/textapi.cxx                           |    4 -
 sd/source/ui/annotations/annotationmanager.cxx            |    2 
 sd/source/ui/annotations/annotationwindow.cxx             |    2 
 sd/source/ui/dlg/SpellDialogChildWindow.cxx               |    2 
 sd/source/ui/dlg/headerfooterdlg.cxx                      |    4 -
 sd/source/ui/func/fuexpand.cxx                            |    8 +--
 sd/source/ui/func/fuhhconv.cxx                            |    4 -
 sd/source/ui/func/fuinsfil.cxx                            |    4 -
 sd/source/ui/func/fusearch.cxx                            |    4 -
 sd/source/ui/func/fusumry.cxx                             |    4 -
 sd/source/ui/func/futext.cxx                              |    2 
 sd/source/ui/view/DocumentRenderer.cxx                    |    8 +--
 sd/source/ui/view/Outliner.cxx                            |    2 
 sd/source/ui/view/drtxtob.cxx                             |    6 +-
 sd/source/ui/view/drviews2.cxx                            |    4 -
 sd/source/ui/view/drviewse.cxx                            |    4 -
 sd/source/ui/view/outlnvsh.cxx                            |    6 +-
 sd/source/ui/view/outlview.cxx                            |    2 
 sd/source/ui/view/sdview.cxx                              |    6 +-
 svx/source/inc/svdoutlinercache.hxx                       |    4 -
 svx/source/sdr/properties/textproperties.cxx              |    2 
 svx/source/svdraw/svdedxv.cxx                             |    2 
 svx/source/svdraw/svdetc.cxx                              |    2 
 svx/source/svdraw/svdmodel.cxx                            |    8 +--
 svx/source/svdraw/svdotext.cxx                            |    8 +--
 svx/source/svdraw/svdotxed.cxx                            |    4 -
 svx/source/svdraw/svdoutl.cxx                             |    6 +-
 svx/source/svdraw/svdoutlinercache.cxx                    |   12 ++--
 svx/source/svdraw/svdtext.cxx                             |    2 
 svx/source/table/cell.cxx                                 |    6 +-
 svx/source/table/svdotable.cxx                            |    2 
 svx/source/table/tablecontroller.cxx                      |    2 
 svx/source/table/tablertfimporter.cxx                     |    2 
 svx/source/unodraw/unoshtxt.cxx                           |    4 -
 sw/source/core/fields/textapi.cxx                         |    6 +-
 sw/source/filter/html/htmldrawwriter.cxx                  |    2 
 sw/source/filter/ww8/ww8graf.cxx                          |    4 -
 sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx      |    2 
 sw/source/uibase/docvw/SidebarWin.cxx                     |    2 
 sw/source/uibase/lingu/sdrhhcwrap.cxx                     |    2 
 sw/source/uibase/uiview/viewdraw.cxx                      |    2 
 63 files changed, 182 insertions(+), 171 deletions(-)

New commits:
commit 17076d8ecf77f313b7a93912528f9cb0fd0d3ea8
Author: Noel Grandin <noelgrandin at gmail.com>
Date:   Mon May 9 09:05:57 2016 +0200

    convert OUTLINER_MODE to scoped enum
    
    Change-Id: I7ac45d7fbd5e77a105cbe942c6d4fd6cfc8ff909
    Reviewed-on: https://gerrit.libreoffice.org/24789
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index 75a1b07..b96c3f3 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -99,7 +99,7 @@ OutputDevice * lcl_GetParentRefDevice( const uno::Reference< frame::XModel > & x
 DrawViewWrapper::DrawViewWrapper( SdrModel* pSdrModel, OutputDevice* pOut)
             : E3dView(pSdrModel, pOut)
             , m_pMarkHandleProvider(nullptr)
-            , m_apOutliner(SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pSdrModel))
+            , m_apOutliner(SdrMakeOutliner(OutlinerMode::TextObject, *pSdrModel))
             , m_bRestoreMapMode( false )
 {
     SetBufferedOutputAllowed(true);
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 7190147..06ac069 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -321,12 +321,12 @@ const SfxItemPool* EditTextObject::GetPool() const
     return mpImpl->GetPool();
 }
 
-sal_uInt16 EditTextObject::GetUserType() const
+OutlinerMode EditTextObject::GetUserType() const
 {
     return mpImpl->GetUserType();
 }
 
-void EditTextObject::SetUserType( sal_uInt16 n )
+void EditTextObject::SetUserType( OutlinerMode n )
 {
     mpImpl->SetUserType(n);
 }
@@ -510,7 +510,7 @@ EditTextObjectImpl::EditTextObjectImpl( EditTextObject* pFront, SfxItemPool* pP
 {
     nVersion = 0;
     nMetric = 0xFFFF;
-    nUserType = 0;
+    nUserType = OutlinerMode::DontKnow;
     nObjSettings = 0;
     pPortionInfo = nullptr;
 
@@ -604,7 +604,7 @@ EditTextObjectImpl::~EditTextObjectImpl()
 }
 
 
-void EditTextObjectImpl::SetUserType( sal_uInt16 n )
+void EditTextObjectImpl::SetUserType( OutlinerMode n )
 {
     nUserType = n;
 }
@@ -1207,7 +1207,7 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const
 
     rOStream.WriteUInt16( nMetric );
 
-    rOStream.WriteUInt16( nUserType );
+    rOStream.WriteUInt16( (sal_uInt16)nUserType );
     rOStream.WriteUInt32( nObjSettings );
 
     rOStream.WriteBool( bVertical );
@@ -1454,7 +1454,9 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
 
     if ( nVersion >= 600 )
     {
-        rIStream.ReadUInt16( nUserType );
+        sal_uInt16 nTmp;
+        rIStream.ReadUInt16( nTmp );
+        nUserType = (OutlinerMode)nTmp;
         rIStream.ReadUInt32( nObjSettings );
     }
 
diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx
index aeeab19..289427f 100644
--- a/editeng/source/editeng/editobj2.hxx
+++ b/editeng/source/editeng/editobj2.hxx
@@ -22,6 +22,7 @@
 
 #include <editeng/editobj.hxx>
 #include <editeng/fieldupdater.hxx>
+#include <editeng/outliner.hxx>
 #include <editdoc.hxx>
 
 #include <unotools/fontcvt.hxx>
@@ -171,7 +172,7 @@ private:
     sal_uInt32              nObjSettings;
     sal_uInt16              nMetric;
     sal_uInt16              nVersion;
-    sal_uInt16              nUserType;
+    OutlinerMode            nUserType;
     SvtScriptType           nScriptType;
 
     bool                    bOwnerOfPool:1;
@@ -192,8 +193,8 @@ public:
     EditTextObjectImpl(const EditTextObjectImpl&) = delete;
     EditTextObjectImpl& operator=(const EditTextObjectImpl&) = delete;
 
-    sal_uInt16 GetUserType() const { return nUserType;}
-    void SetUserType( sal_uInt16 n );
+    OutlinerMode GetUserType() const { return nUserType;}
+    void SetUserType( OutlinerMode n );
 
     void NormalizeString( svl::SharedStringPool& rPool );
     std::vector<svl::SharedString> GetSharedStrings() const;
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 12ae416..906367c 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -193,7 +193,7 @@ void Outliner::ParagraphDeleted( sal_Int32 nPara )
     }
 }
 
-void Outliner::Init( sal_uInt16 nMode )
+void Outliner::Init( OutlinerMode nMode )
 {
     nOutlinerMode = nMode;
 
@@ -206,14 +206,14 @@ void Outliner::Init( sal_uInt16 nMode )
 
     switch ( ImplGetOutlinerMode() )
     {
-        case OUTLINERMODE_TEXTOBJECT:
-        case OUTLINERMODE_TITLEOBJECT:
+        case OutlinerMode::TextObject:
+        case OutlinerMode::TitleObject:
             break;
 
-        case OUTLINERMODE_OUTLINEOBJECT:
+        case OutlinerMode::OutlineObject:
             nCtrl |= EEControlBits::OUTLINER2;
             break;
-        case OUTLINERMODE_OUTLINEVIEW:
+        case OutlinerMode::OutlineView:
             nCtrl |= EEControlBits::OUTLINER;
             break;
 
@@ -259,7 +259,7 @@ void Outliner::SetDepth( Paragraph* pPara, sal_Int16 nNewDepth )
         ImplInitDepth( nPara, nNewDepth, true );
         ImplCalcBulletText( nPara, false, false );
 
-        if ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
+        if ( ImplGetOutlinerMode() == OutlinerMode::OutlineObject )
             ImplSetLevelDependendStyleSheet( nPara );
 
         DepthChangedHdl();
@@ -385,7 +385,7 @@ OutlinerParaObject* Outliner::CreateParaObject( sal_Int32 nStartPara, sal_Int32
         return nullptr;
 
     EditTextObject* pText = pEditEngine->CreateTextObject( nStartPara, nCount );
-    const bool bIsEditDoc(OUTLINERMODE_TEXTOBJECT == ImplGetOutlinerMode());
+    const bool bIsEditDoc(OutlinerMode::TextObject == ImplGetOutlinerMode());
     ParagraphDataVector aParagraphDataVector(nCount);
     const sal_Int32 nLastPara(nStartPara + nCount - 1);
 
@@ -448,8 +448,8 @@ void Outliner::SetText( const OUString& rText, Paragraph* pPara )
 
             // In the outliner mode, filter the tabs and set the indentation
             // about a LRSpaceItem. In EditEngine mode intend over old tabs
-            if( ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) ||
-                ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW ) )
+            if( ( ImplGetOutlinerMode() == OutlinerMode::OutlineObject ) ||
+                ( ImplGetOutlinerMode() == OutlinerMode::OutlineView ) )
             {
                 // Extract Tabs
                 sal_uInt16 nTabs = 0;
@@ -693,7 +693,7 @@ void Outliner::ImplCheckNumBulletItem( sal_Int32 nPara )
 void Outliner::ImplSetLevelDependendStyleSheet( sal_Int32 nPara )
 {
 
-    DBG_ASSERT( ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) || ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW ), "SetLevelDependendStyleSheet: Wrong Mode!" );
+    DBG_ASSERT( ( ImplGetOutlinerMode() == OutlinerMode::OutlineObject ) || ( ImplGetOutlinerMode() == OutlinerMode::OutlineView ), "SetLevelDependendStyleSheet: Wrong Mode!" );
 
     SfxStyleSheet* pStyle = GetStyleSheet( nPara );
 
@@ -1181,7 +1181,7 @@ void Outliner::ImpTextPasted( sal_Int32 nStartPara, sal_Int32 nCount )
 
     while( nCount && pPara )
     {
-        if( ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT )
+        if( ImplGetOutlinerMode() != OutlinerMode::TextObject )
         {
             nDepthChangedHdlPrevDepth = pPara->GetDepth();
             mnDepthChangeHdlPrevFlags = pPara->nFlags;
@@ -1234,7 +1234,7 @@ bool Outliner::ImpCanIndentSelectedPages( OutlinerView* pCurView )
 
     // If the first paragraph is on level 0 it can not indented in any case,
     // possible there might be indentations in the following on the 0 level.
-    if ( ( mnFirstSelPage == 0 ) && ( ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT ) )
+    if ( ( mnFirstSelPage == 0 ) && ( ImplGetOutlinerMode() != OutlinerMode::TextObject ) )
     {
         if ( nDepthChangedHdlPrevDepth == 1 )   // is the only page
             return false;
@@ -1252,7 +1252,7 @@ bool Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView )
     return RemovingPagesHdl( pCurView );
 }
 
-Outliner::Outliner(SfxItemPool* pPool, sal_uInt16 nMode)
+Outliner::Outliner(SfxItemPool* pPool, OutlinerMode nMode)
     : pHdlParagraph(nullptr)
     , mnFirstSelPage(0)
     , nDepthChangedHdlPrevDepth(0)
diff --git a/editeng/source/outliner/outlobj.cxx b/editeng/source/outliner/outlobj.cxx
index 9b65120..9e67af1 100644
--- a/editeng/source/outliner/outlobj.cxx
+++ b/editeng/source/outliner/outlobj.cxx
@@ -110,12 +110,12 @@ bool OutlinerParaObject::isWrongListEqual( const OutlinerParaObject& r ) const
     return mpImpl->isWrongListEqual(*r.mpImpl);
 }
 
-sal_uInt16 OutlinerParaObject::GetOutlinerMode() const
+OutlinerMode OutlinerParaObject::GetOutlinerMode() const
 {
     return mpImpl->mpEditTextObject->GetUserType();
 }
 
-void OutlinerParaObject::SetOutlinerMode(sal_uInt16 nNew)
+void OutlinerParaObject::SetOutlinerMode(OutlinerMode nNew)
 {
     // create a const pointer to avoid an early call to
     // make_unique() in the dereference of mpImpl
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index c4891e2..5f5a8d1 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -122,7 +122,7 @@ bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, vcl::Window* pFrameWin )
             break;
             case KeyFuncType::DELETE:
             {
-                if( !bReadOnly && !bSelection && ( pOwner->ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT ) )
+                if( !bReadOnly && !bSelection && ( pOwner->ImplGetOutlinerMode() != OutlinerMode::TextObject ) )
                 {
                     if( aSel.nEndPos == pOwner->pEditEngine->GetTextLen( aSel.nEndPara ) )
                     {
@@ -148,14 +148,14 @@ bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, vcl::Window* pFrameWin )
             {
                 if ( !bReadOnly && !aKeyCode.IsMod1() && !aKeyCode.IsMod2() )
                 {
-                    if ( ( pOwner->ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT ) &&
-                         ( pOwner->ImplGetOutlinerMode() != OUTLINERMODE_TITLEOBJECT ) &&
+                    if ( ( pOwner->ImplGetOutlinerMode() != OutlinerMode::TextObject ) &&
+                         ( pOwner->ImplGetOutlinerMode() != OutlinerMode::TitleObject ) &&
                          ( bSelection || !aSel.nStartPos ) )
                     {
                         Indent( aKeyCode.IsShift() ? (-1) : (+1) );
                         bKeyProcessed = true;
                     }
-                    else if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) &&
+                    else if ( ( pOwner->ImplGetOutlinerMode() == OutlinerMode::TextObject ) &&
                               !bSelection && !aSel.nEndPos && pOwner->ImplHasNumberFormat( aSel.nEndPara ) )
                     {
                         Indent( aKeyCode.IsShift() ? (-1) : (+1) );
@@ -285,7 +285,7 @@ sal_Int32 OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTa
 
 bool OutlinerView::MouseMove( const MouseEvent& rMEvt )
 {
-    if( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) || pEditView->GetEditEngine()->IsInSelectionMode())
+    if( ( pOwner->ImplGetOutlinerMode() == OutlinerMode::TextObject ) || pEditView->GetEditEngine()->IsInSelectionMode())
         return pEditView->MouseMove( rMEvt );
 
     Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -300,7 +300,7 @@ bool OutlinerView::MouseMove( const MouseEvent& rMEvt )
 
 bool OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
 {
-    if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) || pEditView->GetEditEngine()->IsInSelectionMode() )
+    if ( ( pOwner->ImplGetOutlinerMode() == OutlinerMode::TextObject ) || pEditView->GetEditEngine()->IsInSelectionMode() )
         return pEditView->MouseButtonDown( rMEvt );
 
     Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -332,7 +332,7 @@ bool OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
     }
 
     // special case for outliner view in impress, check if double click hits the page icon for toggle
-    if( (nPara == EE_PARA_NOT_FOUND) && (pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW) && (eTarget == MouseTarget::Text) && (rMEvt.GetClicks() == 2) )
+    if( (nPara == EE_PARA_NOT_FOUND) && (pOwner->ImplGetOutlinerMode() == OutlinerMode::OutlineView) && (eTarget == MouseTarget::Text) && (rMEvt.GetClicks() == 2) )
     {
         ESelection aSel( pEditView->GetSelection() );
         nPara = aSel.nStartPara;
@@ -348,7 +348,7 @@ bool OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
 
 bool OutlinerView::MouseButtonUp( const MouseEvent& rMEvt )
 {
-    if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) || pEditView->GetEditEngine()->IsInSelectionMode() )
+    if ( ( pOwner->ImplGetOutlinerMode() == OutlinerMode::TextObject ) || pEditView->GetEditEngine()->IsInSelectionMode() )
         return pEditView->MouseButtonUp( rMEvt );
 
     Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -506,7 +506,7 @@ void OutlinerView::Indent( short nDiff )
 
         if( nOldDepth != nNewDepth )
         {
-            if ( ( nPara == aSel.nStartPara ) && aSel.nStartPara && ( pOwner->ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT ))
+            if ( ( nPara == aSel.nStartPara ) && aSel.nStartPara && ( pOwner->ImplGetOutlinerMode() != OutlinerMode::TextObject ))
             {
                 // Special case: the predecessor of an indented paragraph is
                 // invisible and is now on the same level as the visible
@@ -538,7 +538,7 @@ void OutlinerView::Indent( short nDiff )
             pOwner->ImplInitDepth( nPara, nNewDepth, true );
             pOwner->ImplCalcBulletText( nPara, false, false );
 
-            if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
+            if ( pOwner->ImplGetOutlinerMode() == OutlinerMode::OutlineObject )
                 pOwner->ImplSetLevelDependendStyleSheet( nPara );
 
             // Notify App
@@ -689,7 +689,7 @@ void OutlinerView::PasteSpecial()
         pOwner->bPasting = true;
         pEditView->PasteSpecial();
 
-        if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
+        if ( pOwner->ImplGetOutlinerMode() == OutlinerMode::OutlineObject )
         {
             const sal_Int32 nParaCount = pOwner->pEditEngine->GetParagraphCount();
 
@@ -1404,7 +1404,7 @@ sal_uLong OutlinerView::Read( SvStream& rInput, const OUString& rBaseURL, EEText
             pOwner->ImplInitDepth( n, nDepth, false );
         }
 
-        if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
+        if ( pOwner->ImplGetOutlinerMode() == OutlinerMode::OutlineObject )
             pOwner->ImplSetLevelDependendStyleSheet( n );
     }
 
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index b84bae1..56a25dd 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3615,7 +3615,7 @@ void SvxMSDffManager::ReadObjText( const OUString& rText, SdrObject* pObj )
     if ( pText )
     {
         SdrOutliner& rOutliner = pText->ImpGetDrawOutliner();
-        rOutliner.Init( OUTLINERMODE_TEXTOBJECT );
+        rOutliner.Init( OutlinerMode::TextObject );
 
         bool bOldUpdateMode = rOutliner.GetUpdateMode();
         rOutliner.SetUpdateMode( false );
@@ -4444,7 +4444,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
                                 if  ( bCreateNewParaObject )
                                 {
                                     OutlinerParaObject* pNewText = rOutliner.CreateParaObject();
-                                    rOutliner.Init( OUTLINERMODE_TEXTOBJECT );
+                                    rOutliner.Init( OutlinerMode::TextObject );
                                     static_cast<SdrObjCustomShape*>(pRet)->NbcSetOutlinerParaObject( pNewText );
                                 }
                             }
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 7ac251c..5320b57 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -2219,7 +2219,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
         sal_uInt32 nDestinationInstance = pTextObj->GetDestinationInstance() ;
         SdrOutliner& rOutliner = pText->ImpGetDrawOutliner();
         if ( ( pText->GetObjInventor() == SdrInventor ) && ( pText->GetObjIdentifier() == OBJ_TITLETEXT ) ) // Outliner-Style for Title-Text object?!? (->of DL)
-            rOutliner.Init( OUTLINERMODE_TITLEOBJECT );             // Outliner reset
+            rOutliner.Init( OutlinerMode::TitleObject );             // Outliner reset
 
         bool bOldUpdateMode = rOutliner.GetUpdateMode();
         rOutliner.SetUpdateMode( false );
diff --git a/include/editeng/editobj.hxx b/include/editeng/editobj.hxx
index c0d4f27..a3ab3a9 100644
--- a/include/editeng/editobj.hxx
+++ b/include/editeng/editobj.hxx
@@ -39,6 +39,7 @@ class SfxStyleSheetPool;
 class SvxFieldItem;
 class SvxFieldData;
 class SvStream;
+enum class OutlinerMode;
 
 namespace editeng {
 
@@ -85,8 +86,8 @@ public:
     std::vector<svl::SharedString> GetSharedStrings() const;
 
     const SfxItemPool* GetPool() const;
-    sal_uInt16 GetUserType() const;    // For OutlinerMode, it can however not save in compatible format
-    void SetUserType( sal_uInt16 n );
+    OutlinerMode GetUserType() const;    // For OutlinerMode, it can however not save in compatible format
+    void SetUserType( OutlinerMode n );
 
     bool IsVertical() const;
     void SetVertical( bool bVertical );
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 78b2e21..8b71ae1 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -560,16 +560,21 @@ struct EBulletInfo
     EBulletInfo() : bVisible( false ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {}
 };
 
-#define OUTLINERMODE_DONTKNOW       0x0000
-#define OUTLINERMODE_TEXTOBJECT     0x0001
-#define OUTLINERMODE_TITLEOBJECT    0x0002
-#define OUTLINERMODE_OUTLINEOBJECT  0x0003
-#define OUTLINERMODE_OUTLINEVIEW    0x0004
-
-#define OUTLINERMODE_USERMASK       0x00FF
+enum class OutlinerMode {
+    DontKnow       = 0x0000,
+    TextObject     = 0x0001,
+    TitleObject    = 0x0002,
+    OutlineObject  = 0x0003,
+    OutlineView    = 0x0004,
+    Subtitle       = 0x0101,
+    Note           = 0x0201
+};
+namespace o3tl
+{
+    template<> struct typed_flags<OutlinerMode> : is_typed_flags<OutlinerMode, 0x030f> {};
+}
 
-#define OUTLINERMODE_SUBTITLE       (0x0100|OUTLINERMODE_TEXTOBJECT)
-#define OUTLINERMODE_NOTE           (0x0200|OUTLINERMODE_TEXTOBJECT)
+#define OUTLINERMODE_USERMASK       (OutlinerMode)0x00FF
 
 class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
 {
@@ -611,7 +616,7 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
     const sal_Int16     nMinDepth;
     sal_Int32           nFirstPage;
 
-    sal_uInt16          nOutlinerMode;
+    OutlinerMode        nOutlinerMode;
 
     bool                bFirstParaIsEmpty;
     sal_uInt8           nBlockInsCallback;
@@ -646,7 +651,7 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
     bool        ImpCanDeleteSelectedPages( OutlinerView* pCurView );
     bool        ImpCanDeleteSelectedPages( OutlinerView* pCurView, sal_Int32 nFirstPage, sal_Int32 nPages );
 
-    sal_uInt16  ImplGetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
+    OutlinerMode ImplGetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
     void        ImplCheckDepth( sal_Int16& rnDepth ) const;
 
 protected:
@@ -667,11 +672,11 @@ protected:
 
 public:
 
-                    Outliner( SfxItemPool* pPool, sal_uInt16 nOutlinerMode );
+                    Outliner( SfxItemPool* pPool, OutlinerMode nOutlinerMode );
     virtual         ~Outliner();
 
-    void            Init( sal_uInt16 nOutlinerMode );
-    sal_uInt16      GetMode() const { return nOutlinerMode; }
+    void            Init( OutlinerMode nOutlinerMode );
+    OutlinerMode    GetMode() const { return nOutlinerMode; }
 
     void            SetVertical( bool bVertical );
     bool            IsVertical() const;
@@ -950,7 +955,7 @@ public:
     // this is needed for StarOffice Api
     void            SetLevelDependendStyleSheet( sal_Int32 nPara );
 
-    sal_uInt16      GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
+    OutlinerMode    GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
 
     // spell and return a sentence
     bool            SpellSentence(EditView& rEditView, svx::SpellPortions& rToFill, bool bIsGrammarChecking );
diff --git a/include/editeng/outlobj.hxx b/include/editeng/outlobj.hxx
index f4d9c6a..6bde289 100644
--- a/include/editeng/outlobj.hxx
+++ b/include/editeng/outlobj.hxx
@@ -27,6 +27,7 @@
 #include <o3tl/cow_wrapper.hxx>
 
 class EditTextObject;
+enum class OutlinerMode;
 
 /**
  * This is the guts of OutlinerParaObject, refcounted and shared among
@@ -74,8 +75,8 @@ public:
     bool isWrongListEqual(const OutlinerParaObject& rCompare) const;
 
     // outliner mode access
-    sal_uInt16 GetOutlinerMode() const;
-    void SetOutlinerMode(sal_uInt16 nNew);
+    OutlinerMode GetOutlinerMode() const;
+    void SetOutlinerMode(OutlinerMode nNew);
 
     // vertical access
     bool IsVertical() const;
diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx
index 6f92187..577a1d9 100644
--- a/include/svx/svdetc.hxx
+++ b/include/svx/svdetc.hxx
@@ -53,7 +53,7 @@ namespace com { namespace sun { namespace star { namespace lang {
  * The resulting default font height, however, stays the same (the logical
  * font height is converted).
  */
-SVX_DLLPUBLIC SdrOutliner* SdrMakeOutliner(sal_uInt16 nOutlinerMode, SdrModel& rMod);
+SVX_DLLPUBLIC SdrOutliner* SdrMakeOutliner(OutlinerMode nOutlinerMode, SdrModel& rMod);
 
 /**
  * Global default settings for the DrawingEngine.
@@ -95,7 +95,7 @@ public:
     // Create an Outliner with the engine-global default values on the heap.
     // If pMod != nullptr, the MapMode of the passed model is used.
     // The resulting default font height, however, stays the same (the logical font height is converted).
-    friend SVX_DLLPUBLIC SdrOutliner* SdrMakeOutliner(sal_uInt16 nOutlinerMode, SdrModel& rMod);
+    friend SVX_DLLPUBLIC SdrOutliner* SdrMakeOutliner(OutlinerMode nOutlinerMode, SdrModel& rMod);
 };
 
 class SfxItemSet;
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 350acef..d906713 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -580,7 +580,7 @@ public:
 
     void ReformatAllTextObjects();
 
-    SdrOutliner* createOutliner( sal_uInt16 nOutlinerMode );
+    SdrOutliner* createOutliner( OutlinerMode nOutlinerMode );
     void disposeOutliner( SdrOutliner* pOutliner );
 
     bool IsWriter() const { return !bMyPool; }
diff --git a/include/svx/svdoutl.hxx b/include/svx/svdoutl.hxx
index 9025741..c76fbb9 100644
--- a/include/svx/svdoutl.hxx
+++ b/include/svx/svdoutl.hxx
@@ -34,7 +34,7 @@ protected:
     const SdrPage* mpVisualizedPage;
 
 public:
-    SdrOutliner( SfxItemPool* pItemPool, sal_uInt16 nMode );
+    SdrOutliner( SfxItemPool* pItemPool, OutlinerMode nMode );
     virtual ~SdrOutliner() ;
 
     void  SetTextObj( const SdrTextObj* pObj );
diff --git a/include/svx/svdtext.hxx b/include/svx/svdtext.hxx
index b2f6ce1..8338428 100644
--- a/include/svx/svdtext.hxx
+++ b/include/svx/svdtext.hxx
@@ -30,6 +30,7 @@ class SdrOutliner;
 class SdrTextObj;
 class SdrModel;
 class SfxItemSet;
+enum class OutlinerMode;
 
 namespace sdr { namespace properties {
     class TextProperties;
@@ -46,7 +47,7 @@ public:
     virtual ~SdrText();
 
     virtual void SetModel(SdrModel* pNewModel);
-    void ForceOutlinerParaObject( sal_uInt16 nOutlMode );
+    void ForceOutlinerParaObject( OutlinerMode nOutlMode );
 
     virtual void SetOutlinerParaObject( OutlinerParaObject* pTextObject );
     OutlinerParaObject* GetOutlinerParaObject() const;
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index b76bd75..d5d793c 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -1447,7 +1447,7 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
                 std::unique_ptr< EditTextObject > xEditObj(
                     XclImpStringHelper::CreateTextObject( GetRoot(), *maTextData.mxString ) );
                 OutlinerParaObject* pOutlineObj = new OutlinerParaObject( *xEditObj );
-                pOutlineObj->SetOutlinerMode( OUTLINERMODE_TEXTOBJECT );
+                pOutlineObj->SetOutlinerMode( OutlinerMode::TextObject );
                 // text object takes ownership of the outliner object
                 pTextObj->NbcSetOutlinerParaObject( pOutlineObj );
             }
diff --git a/sc/source/ui/drawfunc/futext2.cxx b/sc/source/ui/drawfunc/futext2.cxx
index 124c770..30f6e4f 100644
--- a/sc/source/ui/drawfunc/futext2.cxx
+++ b/sc/source/ui/drawfunc/futext2.cxx
@@ -27,7 +27,7 @@
 SdrOutliner* FuText::MakeOutliner()
 {
     ScViewData& rViewData = pViewShell->GetViewData();
-    SdrOutliner* pOutl = SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, *pDrDoc);
+    SdrOutliner* pOutl = SdrMakeOutliner(OutlinerMode::OutlineObject, *pDrDoc);
 
     rViewData.UpdateOutlinerFlags(*pOutl);
 
diff --git a/sc/source/ui/unoobj/editsrc.cxx b/sc/source/ui/unoobj/editsrc.cxx
index d52b773..ed82fa2 100644
--- a/sc/source/ui/unoobj/editsrc.cxx
+++ b/sc/source/ui/unoobj/editsrc.cxx
@@ -181,7 +181,7 @@ void ScAnnotationEditSource::UpdateData()
             EditTextObject* pEditObj = pEditEngine->CreateTextObject();
             OutlinerParaObject* pOPO = new OutlinerParaObject( *pEditObj );
             delete pEditObj;
-            pOPO->SetOutlinerMode( OUTLINERMODE_TEXTOBJECT );
+            pOPO->SetOutlinerMode( OutlinerMode::TextObject );
             pObj->NbcSetOutlinerParaObject( pOPO );
             pObj->ActionChanged();
         }
diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index 73434a7..3c7296a 100644
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -114,14 +114,14 @@ public:
         @param pDoc
             The draw document from which to take the content.
         @param nMode
-            The valid values <const>OUTLINERMODE_DONTKNOW</const>,
-            <const>OUTLINERMODE_TEXTOBJECT</const>,
-            <const>OUTLINERMODE_TITLEOBJECT</const>,
-            <const>OUTLINERMODE_OUTLINEOBJECT</const>, and
-            <const>OUTLINERMODE_OUTLINEVIEW</const> are defined in
+            The valid values <const>OutlinerMode::DontKnow</const>,
+            <const>OutlinerMode::TextObject</const>,
+            <const>OutlinerMode::TitleObject</const>,
+            <const>OutlinerMode::OutlineObject</const>, and
+            <const>OutlinerMode::OutlineView</const> are defined in
             editeng/outliner.hxx.
     */
-    Outliner( SdDrawDocument* pDoc, sal_uInt16 nMode );
+    Outliner( SdDrawDocument* pDoc, OutlinerMode nMode );
     virtual ~Outliner();
     /// Forbid copy construction and copy assignment
     Outliner(const Outliner&) = delete;
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 5b38cd4..2bf77d9 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -764,8 +764,8 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
 
                 if (nId == OBJ_TITLETEXT)
                 {
-                    if( pOPO && pOPO->GetOutlinerMode() == OUTLINERMODE_DONTKNOW )
-                        pOPO->SetOutlinerMode( OUTLINERMODE_TITLEOBJECT );
+                    if( pOPO && pOPO->GetOutlinerMode() == OutlinerMode::DontKnow )
+                        pOPO->SetOutlinerMode( OutlinerMode::TitleObject );
 
                     // sal_True: don't delete "hard" attributes when doing this.
                     if (pTitleSheet)
@@ -773,8 +773,8 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
                 }
                 else if (nId == OBJ_OUTLINETEXT)
                 {
-                    if( pOPO && pOPO->GetOutlinerMode() == OUTLINERMODE_DONTKNOW )
-                        pOPO->SetOutlinerMode( OUTLINERMODE_OUTLINEOBJECT );
+                    if( pOPO && pOPO->GetOutlinerMode() == OutlinerMode::DontKnow )
+                        pOPO->SetOutlinerMode( OutlinerMode::OutlineObject );
 
                     std::vector<SfxStyleSheetBase*>::iterator iter;
                     for (iter = aOutlineList.begin(); iter != aOutlineList.end(); ++iter)
@@ -816,7 +816,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
 {
     if (!mpOutliner && bCreateOutliner)
     {
-        mpOutliner = new ::sd::Outliner( this, OUTLINERMODE_TEXTOBJECT );
+        mpOutliner = new ::sd::Outliner( this, OutlinerMode::TextObject );
 
         if (mpDocSh)
             mpOutliner->SetRefDevice( SD_MOD()->GetRefDevice( *mpDocSh ) );
@@ -834,7 +834,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
 {
     if ( !mpInternalOutliner && bCreateOutliner )
     {
-        mpInternalOutliner = new ::sd::Outliner( this, OUTLINERMODE_TEXTOBJECT );
+        mpInternalOutliner = new ::sd::Outliner( this, OutlinerMode::TextObject );
 
         // This outliner is only used to create special text objects. As no
         // information about portions is saved in this outliner, the update mode
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 3dceb0c..2f9f8ba 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -884,12 +884,12 @@ void SdDrawDocument::SpellObject(SdrTextObj* pObj)
         Link<EditStatus&,void> aEvtHdl = pOutl->GetStatusEventHdl();
         pOutl->SetStatusEventHdl(LINK(this, SdDrawDocument, OnlineSpellEventHdl));
 
-        sal_uInt16 nOldOutlMode = pOutl->GetMode();
-        sal_uInt16 nOutlMode = OUTLINERMODE_TEXTOBJECT;
+        OutlinerMode nOldOutlMode = pOutl->GetMode();
+        OutlinerMode nOutlMode = OutlinerMode::TextObject;
         if (pObj->GetObjInventor() == SdrInventor &&
             pObj->GetObjIdentifier() == OBJ_OUTLINETEXT)
         {
-            nOutlMode = OUTLINERMODE_OUTLINEOBJECT;
+            nOutlMode = OutlinerMode::OutlineObject;
         }
         pOutl->Init( nOutlMode );
 
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 409bf445..0019945 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -458,8 +458,8 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
         {
             SdrOutliner* pOutliner = static_cast<SdDrawDocument*>( GetModel() )->GetInternalOutliner();
 
-            sal_uInt16 nOutlMode = pOutliner->GetMode();
-            pOutliner->Init( OUTLINERMODE_TEXTOBJECT );
+            OutlinerMode nOutlMode = pOutliner->GetMode();
+            pOutliner->Init( OutlinerMode::TextObject );
             pOutliner->SetStyleSheet( 0, nullptr );
             pOutliner->SetVertical( bVertical );
 
@@ -2384,7 +2384,7 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO
         if (!pOutliner)
         {
             SfxItemPool* pPool = static_cast<SdDrawDocument*>(GetModel())->GetDrawOutliner().GetEmptyItemSet().GetPool();
-            pOutl = new ::Outliner( pPool, OUTLINERMODE_OUTLINEOBJECT );
+            pOutl = new ::Outliner( pPool, OutlinerMode::OutlineObject );
             pOutl->SetRefDevice( SD_MOD()->GetRefDevice( *static_cast<SdDrawDocument*>( GetModel() )->GetDocSh() ) );
             pOutl->SetEditTextObjectPool(pPool);
             pOutl->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetModel()->GetStyleSheetPool()));
@@ -2392,7 +2392,7 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO
             pOutl->SetUpdateMode( false );
         }
 
-        sal_uInt16 nOutlMode = pOutl->GetMode();
+        OutlinerMode nOutlMode = pOutl->GetMode();
         Size aPaperSize = pOutl->GetPaperSize();
         bool bUpdateMode = pOutl->GetUpdateMode();
         pOutl->SetUpdateMode(false);
@@ -2411,7 +2411,7 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO
         {
             case PRESOBJ_OUTLINE:
             {
-                pOutl->Init( OUTLINERMODE_OUTLINEOBJECT );
+                pOutl->Init( OutlinerMode::OutlineObject );
 
                 aString += "\t";
                 aString += rString;
@@ -2443,14 +2443,14 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO
 
             case PRESOBJ_TITLE:
             {
-                pOutl->Init( OUTLINERMODE_TITLEOBJECT );
+                pOutl->Init( OutlinerMode::TitleObject );
                 aString += rString;
             }
             break;
 
             default:
             {
-                pOutl->Init( OUTLINERMODE_TEXTOBJECT );
+                pOutl->Init( OutlinerMode::TextObject );
                 aString += rString;
 
                 // check if we need to add a text field
diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx
index 086a06d..bae26ef 100644
--- a/sd/source/core/text/textapi.cxx
+++ b/sd/source/core/text/textapi.cxx
@@ -227,7 +227,7 @@ SvxTextForwarder* TextAPIEditSource::GetTextForwarder()
     if (!m_xImpl->mpOutliner)
     {
         //init draw model first
-        m_xImpl->mpOutliner = new Outliner(m_xImpl->mpDoc, OUTLINERMODE_TEXTOBJECT);
+        m_xImpl->mpOutliner = new Outliner(m_xImpl->mpDoc, OutlinerMode::TextObject);
         m_xImpl->mpDoc->SetCalcFieldValueHdl(m_xImpl->mpOutliner);
     }
 
@@ -244,7 +244,7 @@ void TextAPIEditSource::SetText( OutlinerParaObject& rText )
         if (!m_xImpl->mpOutliner)
         {
             //init draw model first
-            m_xImpl->mpOutliner = new Outliner(m_xImpl->mpDoc, OUTLINERMODE_TEXTOBJECT);
+            m_xImpl->mpOutliner = new Outliner(m_xImpl->mpDoc, OutlinerMode::TextObject);
             m_xImpl->mpDoc->SetCalcFieldValueHdl(m_xImpl->mpOutliner);
         }
 
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index baee94a..9f574b5 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -427,7 +427,7 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq )
     TextApiObject* pTextApi = getTextApiObject( xAnnotation );
     if( pTextApi )
     {
-        std::unique_ptr< ::Outliner > pOutliner( new ::Outliner(GetAnnotationPool(),OUTLINERMODE_TEXTOBJECT) );
+        std::unique_ptr< ::Outliner > pOutliner( new ::Outliner(GetAnnotationPool(),OutlinerMode::TextObject) );
 
         mpDoc->SetCalcFieldValueHdl( pOutliner.get() );
         pOutliner->SetUpdateMode( true );
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index 2998292..19a4729 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -326,7 +326,7 @@ void AnnotationWindow::InitControls()
     aSettings.SetStyleSettings(aStyleSettings);
     mpMeta->SetSettings(aSettings);
 
-    mpOutliner = new ::Outliner(GetAnnotationPool(),OUTLINERMODE_TEXTOBJECT);
+    mpOutliner = new ::Outliner(GetAnnotationPool(),OutlinerMode::TextObject);
     Doc()->SetCalcFieldValueHdl( mpOutliner );
     mpOutliner->SetUpdateMode( true );
     Rescale();
diff --git a/sd/source/ui/dlg/SpellDialogChildWindow.cxx b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
index 1791ec6..6870683 100644
--- a/sd/source/ui/dlg/SpellDialogChildWindow.cxx
+++ b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
@@ -147,7 +147,7 @@ void SpellDialogChildWindow::ProvideOutliner()
                 // to create one.
                 mbOwnOutliner = true;
                 SdDrawDocument *pDoc = pViewShell->GetDoc();
-                mpSdOutliner = new Outliner(pDoc, OUTLINERMODE_TEXTOBJECT);
+                mpSdOutliner = new Outliner(pDoc, OutlinerMode::TextObject);
                 StartListening(*pDoc);
             }
             else if( dynamic_cast< const OutlineViewShell *>( pViewShell ) !=  nullptr)
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index 1ff03d0..b1b1471 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -624,8 +624,8 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType &rLanguage, boo
         if( pObj )
         {
             Outliner* pOutl = mpDoc->GetInternalOutliner();
-            pOutl->Init( OUTLINERMODE_TEXTOBJECT );
-            sal_uInt16 nOutlMode = pOutl->GetMode();
+            pOutl->Init( OutlinerMode::TextObject );
+            OutlinerMode nOutlMode = pOutl->GetMode();
 
             EditEngine* pEdit = const_cast< EditEngine* >(&pOutl->GetEditEngine());
 
diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx
index 17bb5e4..cc163dd 100644
--- a/sd/source/ui/func/fuexpand.cxx
+++ b/sd/source/ui/func/fuexpand.cxx
@@ -88,7 +88,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
     if (pActualPage)
     {
         ::sd::Outliner* pOutl =
-              new ::sd::Outliner( mpDoc, OUTLINERMODE_OUTLINEOBJECT );
+              new ::sd::Outliner( mpDoc, OutlinerMode::OutlineObject );
         pOutl->SetUpdateMode(false);
         pOutl->EnableUndo(false);
 
@@ -185,11 +185,11 @@ void FuExpandPage::DoExecute( SfxRequest& )
                         continue;
 
                     OutlinerParaObject* pOutlinerParaObject = pOutl->CreateParaObject( nParaPos, 1);
-                    pOutlinerParaObject->SetOutlinerMode(OUTLINERMODE_TITLEOBJECT);
+                    pOutlinerParaObject->SetOutlinerMode(OutlinerMode::TitleObject);
 
                     if( pOutlinerParaObject->GetDepth(0) != -1 )
                     {
-                        SdrOutliner* pTempOutl = SdrMakeOutliner(OUTLINERMODE_TITLEOBJECT, *mpDoc);
+                        SdrOutliner* pTempOutl = SdrMakeOutliner(OutlinerMode::TitleObject, *mpDoc);
 
                         pTempOutl->SetText( *pOutlinerParaObject );
 
@@ -217,7 +217,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
                         // create structuring text objects
                         OutlinerParaObject* pOPO = pOutl->CreateParaObject(++nParaPos, nChildCount);
 
-                        SdrOutliner* pTempOutl = SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, *mpDoc);
+                        SdrOutliner* pTempOutl = SdrMakeOutliner(OutlinerMode::OutlineObject, *mpDoc);
                         pTempOutl->SetText( *pOPO );
 
                         sal_Int32 nParaCount2 = pTempOutl->GetParagraphCount();
diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx
index 7e3a74d..ccec7b0 100644
--- a/sd/source/ui/func/fuhhconv.cxx
+++ b/sd/source/ui/func/fuhhconv.cxx
@@ -65,7 +65,7 @@ FuHangulHanjaConversion::FuHangulHanjaConversion (
     if ( dynamic_cast< const DrawViewShell *>( mpViewShell ) !=  nullptr )
     {
         bOwnOutliner = true;
-        pSdOutliner = new Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
+        pSdOutliner = new Outliner( mpDoc, OutlinerMode::TextObject );
     }
     else if ( dynamic_cast< const OutlineViewShell *>( mpViewShell ) !=  nullptr )
     {
@@ -112,7 +112,7 @@ void FuHangulHanjaConversion::StartConversion( sal_Int16 nSourceLanguage, sal_In
             pSdOutliner->EndConversion();
 
             bOwnOutliner = true;
-            pSdOutliner = new Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
+            pSdOutliner = new Outliner( mpDoc, OutlinerMode::TextObject );
             pSdOutliner->BeginConversion();
         }
         else if ( pSdOutliner && dynamic_cast< const OutlineViewShell *>( mpViewShell ) !=  nullptr && bOwnOutliner )
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index 113c46e..d541006 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -444,7 +444,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium)
            - the draw outliner of the drawing engine has to draw something in
              between
            - the global outliner could be used in SdPage::CreatePresObj */
-        std::unique_ptr<SdrOutliner> pOutliner(new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT ));
+        std::unique_ptr<SdrOutliner> pOutliner(new ::sd::Outliner( mpDoc, OutlinerMode::TextObject ));
 
         // set reference device
         pOutliner->SetRefDevice( SD_MOD()->GetRefDevice( *mpDocSh ) );
@@ -594,7 +594,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
        - the draw outliner of the drawing engine has to draw something in
          between
        - the global outliner could be used in SdPage::CreatePresObj */
-    std::unique_ptr< ::Outliner> pOutliner(new ::Outliner( &mpDoc->GetItemPool(), OUTLINERMODE_OUTLINEOBJECT ));
+    std::unique_ptr< ::Outliner> pOutliner(new ::Outliner( &mpDoc->GetItemPool(), OutlinerMode::OutlineObject ));
     pOutliner->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(mpDoc->GetStyleSheetPool()));
 
     // set reference device
diff --git a/sd/source/ui/func/fusearch.cxx b/sd/source/ui/func/fusearch.cxx
index 6c839ab..3e1a986 100644
--- a/sd/source/ui/func/fusearch.cxx
+++ b/sd/source/ui/func/fusearch.cxx
@@ -77,7 +77,7 @@ void FuSearch::DoExecute( SfxRequest& )
     if ( dynamic_cast< const DrawViewShell *>( mpViewShell ) !=  nullptr )
     {
         bOwnOutliner = true;
-        pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
+        pSdOutliner = new ::sd::Outliner( mpDoc, OutlinerMode::TextObject );
     }
     else if ( dynamic_cast< const OutlineViewShell *>( mpViewShell ) !=  nullptr )
     {
@@ -115,7 +115,7 @@ void FuSearch::SearchAndReplace( const SvxSearchItem* pSearchItem )
             pSdOutliner->EndSpelling();
 
             bOwnOutliner = true;
-            pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
+            pSdOutliner = new ::sd::Outliner( mpDoc, OutlinerMode::TextObject );
             pSdOutliner->PrepareSpelling();
         }
         else if ( pSdOutliner && dynamic_cast< const OutlineViewShell *>( pViewShell ) !=  nullptr && bOwnOutliner )
diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx
index 3100e09..072d34c 100644
--- a/sd/source/ui/func/fusumry.cxx
+++ b/sd/source/ui/func/fusumry.cxx
@@ -159,7 +159,7 @@ void FuSummaryPage::DoExecute( SfxRequest& )
                     pNotesPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers);
                     pNotesPage->setHeaderFooterSettings(pActualNotesPage->getHeaderFooterSettings());
 
-                    pOutl = new ::sd::Outliner( mpDoc, OUTLINERMODE_OUTLINEOBJECT );
+                    pOutl = new ::sd::Outliner( mpDoc, OutlinerMode::OutlineObject );
                     pOutl->SetUpdateMode(false);
                     pOutl->EnableUndo(false);
 
@@ -177,7 +177,7 @@ void FuSummaryPage::DoExecute( SfxRequest& )
                 // #118876#, check if the OutlinerParaObject is created successfully
                 if( pParaObj )
                 {
-                    pParaObj->SetOutlinerMode( OUTLINERMODE_OUTLINEOBJECT );
+                    pParaObj->SetOutlinerMode( OutlinerMode::OutlineObject );
                     pOutl->AddText(*pParaObj);
                 }
             }
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index f5d83bd..c55ddfa 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -1043,7 +1043,7 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag)
                  nSdrObjKind == OBJ_OUTLINETEXT || !mxTextObj->IsEmptyPresObj() ) )
             {
                 // create new outliner (owned by SdrObjEditView)
-                SdrOutliner* pOutl = SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, *mpDoc);
+                SdrOutliner* pOutl = SdrMakeOutliner(OutlinerMode::OutlineObject, *mpDoc);
 
                 if (bEmptyOutliner)
                     mpView->SdrEndTextEdit(true);
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index f817a6b..3eee817 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1119,11 +1119,11 @@ namespace {
             // Get and set up the outliner.
             const Rectangle aOutRect (rPrinter.GetPageOffset(), rPrinter.GetOutputSize());
             Outliner* pOutliner = rDocument.GetInternalOutliner();
-            const sal_uInt16 nSavedOutlMode (pOutliner->GetMode());
+            const OutlinerMode nSavedOutlMode (pOutliner->GetMode());
             const bool bSavedUpdateMode (pOutliner->GetUpdateMode());
             const Size aSavedPaperSize (pOutliner->GetPaperSize());
 
-            pOutliner->Init(OUTLINERMODE_OUTLINEVIEW);
+            pOutliner->Init(OutlinerMode::OutlineView);
             pOutliner->SetPaperSize(aOutRect.GetSize());
             pOutliner->SetUpdateMode(true);
             pOutliner->Clear();
@@ -1636,8 +1636,8 @@ private:
         }
 
         Outliner* pOutliner = mrBase.GetDocument()->GetInternalOutliner();
-        pOutliner->Init(OUTLINERMODE_OUTLINEVIEW);
-        const sal_uInt16 nSavedOutlMode (pOutliner->GetMode());
+        pOutliner->Init(OutlinerMode::OutlineView);
+        const OutlinerMode nSavedOutlMode (pOutliner->GetMode());
         const bool bSavedUpdateMode (pOutliner->GetUpdateMode());
         const Size aSavedPaperSize (pOutliner->GetPaperSize());
         const MapMode aSavedMapMode (pOutliner->GetRefMapMode());
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 4aca676..5cae4f9 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -137,7 +137,7 @@ private:
     OutlinerView* mpOutlineView;
 };
 
-Outliner::Outliner( SdDrawDocument* pDoc, sal_uInt16 nMode )
+Outliner::Outliner( SdDrawDocument* pDoc, OutlinerMode nMode )
     : SdrOutliner( &pDoc->GetItemPool(), nMode ),
       mpImpl(new Implementation()),
       meMode(SEARCH),
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index 187cbf0..25e0e44 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -269,7 +269,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
                     bool bOutlineViewSh = dynamic_cast< const OutlineViewShell *>( mpViewShell ) !=  nullptr;
 
                     if (pOLV &&
-                        ( pOLV->GetOutliner()->GetMode() == OUTLINERMODE_OUTLINEOBJECT || bOutlineViewSh ) )
+                        ( pOLV->GetOutliner()->GetMode() == OutlinerMode::OutlineObject || bOutlineViewSh ) )
                     {
                         // Outliner at outline-mode
                         ::Outliner* pOutl = pOLV->GetOutliner();
@@ -279,7 +279,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
                         Paragraph* pPara = aSelList.empty() ? nullptr : *(aSelList.begin());
 
                         // find out if we are a OutlineView
-                        bool bIsOutlineView(OUTLINERMODE_OUTLINEVIEW == pOLV->GetOutliner()->GetMode());
+                        bool bIsOutlineView(OutlinerMode::OutlineView == pOLV->GetOutliner()->GetMode());
 
                         // This is ONLY for OutlineViews
                         if(bIsOutlineView)
@@ -294,7 +294,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
                         }
                         else
                         {
-                            // old behaviour for OUTLINERMODE_OUTLINEOBJECT
+                            // old behaviour for OutlinerMode::OutlineObject
                             if(pOutl->GetAbsPos(pPara) > 0)
                             {
                                 // not at top
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 340936a..e610c44 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1943,8 +1943,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
             else
             {
                 Outliner* pOutl = GetDoc()->GetInternalOutliner();
-                pOutl->Init( OUTLINERMODE_TEXTOBJECT );
-                sal_uInt16 nOutlMode = pOutl->GetMode();
+                pOutl->Init( OutlinerMode::TextObject );
+                OutlinerMode nOutlMode = pOutl->GetMode();
                 pOutl->SetStyleSheet( 0, nullptr );
                 pOutl->QuickInsertField( *pFieldItem, ESelection() );
                 OutlinerParaObject* pOutlParaObject = pOutl->CreateParaObject();
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index b4f59a6..f421652 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -1436,8 +1436,8 @@ void DrawViewShell::InsertURLField(const OUString& rURL, const OUString& rText,
     else
     {
         Outliner* pOutl = GetDoc()->GetInternalOutliner();
-        pOutl->Init( OUTLINERMODE_TEXTOBJECT );
-        sal_uInt16 nOutlMode = pOutl->GetMode();
+        pOutl->Init( OutlinerMode::TextObject );
+        OutlinerMode nOutlMode = pOutl->GetMode();
 
         SvxURLField aURLField(rURL, rText, SVXURLFORMAT_REPR);
         aURLField.SetTargetFrame(rTarget);
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 2c8787d..86f7156 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1602,7 +1602,7 @@ void OutlineViewShell::UpdateTitleObject( SdPage* pPage, Paragraph* pPara )
         OutlinerParaObject* pOPO = pTO ? rOutliner.CreateParaObject(rOutliner.GetAbsPos(pPara), 1) : nullptr;
         if (pOPO)
         {
-            pOPO->SetOutlinerMode( OUTLINERMODE_TITLEOBJECT );
+            pOPO->SetOutlinerMode( OutlinerMode::TitleObject );
             pOPO->SetVertical( pTO->IsVerticalWriting() );
             if( pTO->GetOutlinerParaObject() && (pOPO->GetTextObject() == pTO->GetOutlinerParaObject()->GetTextObject()) )
             {
@@ -1665,11 +1665,11 @@ void OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
 
     bool bNewObject = false;
 
-    sal_uInt16 eOutlinerMode = OUTLINERMODE_TITLEOBJECT;
+    OutlinerMode eOutlinerMode = OutlinerMode::TitleObject;
     pTO = static_cast<SdrTextObj*>(pPage->GetPresObj( PRESOBJ_TEXT ));
     if( !pTO )
     {
-        eOutlinerMode = OUTLINERMODE_OUTLINEOBJECT;
+        eOutlinerMode = OutlinerMode::OutlineObject;
         pTO = OutlineView::GetOutlineTextObject( pPage );
     }
 
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 69e5fe2..f3d9457 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -94,7 +94,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie
     {
         // initialize Outliner: set Reference Device
         bInitOutliner = true;
-        mrOutliner.Init( OUTLINERMODE_OUTLINEVIEW );
+        mrOutliner.Init( OutlinerMode::OutlineView );
         mrOutliner.SetRefDevice( SD_MOD()->GetRefDevice( rDocSh ) );
         //viewsize without the width of the image and number in front
         mnPaperWidth = (mrOutlineViewShell.GetActiveWindow()->GetViewSize().Width() - 4000);
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index d108263..969fbc7 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -659,7 +659,7 @@ bool View::SdrBeginTextEdit(
         sd::tools::EventMultiplexerEvent::EID_BEGIN_TEXT_EDIT, static_cast<void*>(pObj) );
 
     if( pOutl==nullptr && pObj )
-        pOutl = SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pObj->GetModel());
+        pOutl = SdrMakeOutliner(OutlinerMode::TextObject, *pObj->GetModel());
 
     // make draw&impress specific initialisations
     if( pOutl )
@@ -1257,7 +1257,7 @@ bool View::ShouldToggleOn(
         return false;
 
     bool bToggleOn = false;
-    std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pSdrModel));
+    std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OutlinerMode::TextObject, *pSdrModel));
     const size_t nMarkCount = GetMarkedObjectCount();
     for (size_t nIndex = 0; nIndex < nMarkCount && !bToggleOn; ++nIndex)
     {
@@ -1325,7 +1325,7 @@ void View::ChangeMarkedObjectsBulletsNumbering(
 
     const bool bToggleOn = ShouldToggleOn( bToggle, bHandleBullets );
 
-    std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pSdrModel));
+    std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OutlinerMode::TextObject, *pSdrModel));
     std::unique_ptr<OutlinerView> pOutlinerView(new OutlinerView(pOutliner.get(), pWindow));
 
     const size_t nMarkCount = GetMarkedObjectCount();
diff --git a/svx/source/inc/svdoutlinercache.hxx b/svx/source/inc/svdoutlinercache.hxx
index 3bc3212..f3aa9ec 100644
--- a/svx/source/inc/svdoutlinercache.hxx
+++ b/svx/source/inc/svdoutlinercache.hxx
@@ -26,7 +26,7 @@
 
 class SdrModel;
 class SdrOutliner;
-
+enum class OutlinerMode;
 
 class SdrOutlinerCache
 {
@@ -40,7 +40,7 @@ public:
     SdrOutlinerCache( SdrModel* pModel );
     ~SdrOutlinerCache();
 
-    SdrOutliner* createOutliner( sal_uInt16 nOutlinerMode );
+    SdrOutliner* createOutliner( OutlinerMode nOutlinerMode );
     void disposeOutliner( SdrOutliner* pOutliner );
     std::vector< SdrOutliner* > GetActiveOutliners() const;
 };
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index 180b907..de35ec3 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -405,7 +405,7 @@ namespace sdr
                 && !rObj.IsTextEditActive()
                 && !rObj.IsLinkedText())
             {
-                Outliner* pOutliner = SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, *rObj.GetModel());
+                Outliner* pOutliner = SdrMakeOutliner(OutlinerMode::OutlineObject, *rObj.GetModel());
                 const svx::ITextProvider& rTextProvider(getTextProvider());
                 sal_Int32 nText = rTextProvider.getTextCount();
 
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index e831650..2c7bd27 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -709,7 +709,7 @@ bool SdrObjEditView::SdrBeginTextEdit(
         mxTextEditObj.reset( pObj );
         pTextEditOutliner=pGivenOutliner;
         if (pTextEditOutliner==nullptr)
-            pTextEditOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, *mxTextEditObj->GetModel() );
+            pTextEditOutliner = SdrMakeOutliner( OutlinerMode::TextObject, *mxTextEditObj->GetModel() );
 
         {
             SvtAccessibilityOptions aOptions;
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 091cfca..6c4484d 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -406,7 +406,7 @@ SdrEngineDefaults& SdrEngineDefaults::GetDefaults()
     return *rGlobalData.pDefaults;
 }
 
-SdrOutliner* SdrMakeOutliner(sal_uInt16 nOutlinerMode, SdrModel& rModel)
+SdrOutliner* SdrMakeOutliner(OutlinerMode nOutlinerMode, SdrModel& rModel)
 {
     SfxItemPool* pPool = &rModel.GetItemPool();
     SdrOutliner* pOutl = new SdrOutliner( pPool, nOutlinerMode );
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 4aea8c6..8f0beef 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -214,15 +214,15 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
 
     // can't create DrawOutliner OnDemand, because I can't get the Pool,
     // then (only from 302 onwards!)
-    pDrawOutliner = SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *this);
+    pDrawOutliner = SdrMakeOutliner(OutlinerMode::TextObject, *this);
     ImpSetOutlinerDefaults(pDrawOutliner, true);
 
-    pHitTestOutliner = SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *this);
+    pHitTestOutliner = SdrMakeOutliner(OutlinerMode::TextObject, *this);
     ImpSetOutlinerDefaults(pHitTestOutliner, true);
 
     /* Start Text Chaining related code */
     // Initialize Chaining Outliner
-    pChainingOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, *this );
+    pChainingOutliner = SdrMakeOutliner( OutlinerMode::TextObject, *this );
     ImpSetOutlinerDefaults(pChainingOutliner, true);
 
     // Make a TextChain
@@ -1953,7 +1953,7 @@ void SdrModel::ReformatAllTextObjects()
     ImpReformatAllTextObjects();
 }
 
-SdrOutliner* SdrModel::createOutliner( sal_uInt16 nOutlinerMode )
+SdrOutliner* SdrModel::createOutliner( OutlinerMode nOutlinerMode )
 {
     if( nullptr == mpOutlinerCache )
         mpOutlinerCache = new SdrOutlinerCache(this);
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 11a535d..151ff79 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1229,9 +1229,9 @@ void SdrTextObj::ImpCheckMasterCachable()
 void SdrTextObj::ImpInitDrawOutliner( SdrOutliner& rOutl ) const
 {
     rOutl.SetUpdateMode(false);
-    sal_uInt16 nOutlinerMode = OUTLINERMODE_OUTLINEOBJECT;
+    OutlinerMode nOutlinerMode = OutlinerMode::OutlineObject;
     if ( !IsOutlText() )
-        nOutlinerMode = OUTLINERMODE_TEXTOBJECT;
+        nOutlinerMode = OutlinerMode::TextObject;
     rOutl.Init( nOutlinerMode );
 
     rOutl.SetGlobalCharStretching();
@@ -1520,9 +1520,9 @@ void SdrTextObj::ForceOutlinerParaObject()
     SdrText* pText = getActiveText();
     if( pText && (pText->GetOutlinerParaObject() == nullptr) )
     {
-        sal_uInt16 nOutlMode = OUTLINERMODE_TEXTOBJECT;
+        OutlinerMode nOutlMode = OutlinerMode::TextObject;
         if( IsTextFrame() && eTextKind == OBJ_OUTLINETEXT )
-            nOutlMode = OUTLINERMODE_OUTLINEOBJECT;
+            nOutlMode = OutlinerMode::OutlineObject;
 
         pText->ForceOutlinerParaObject( nOutlMode );
     }
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index 02b20fe..824f105 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -45,9 +45,9 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
 
     mbInEditMode = true;
 
-    sal_uInt16 nOutlinerMode = OUTLINERMODE_OUTLINEOBJECT;
+    OutlinerMode nOutlinerMode = OutlinerMode::OutlineObject;
     if ( !IsOutlText() )
-        nOutlinerMode = OUTLINERMODE_TEXTOBJECT;
+        nOutlinerMode = OutlinerMode::TextObject;
     rOutl.Init( nOutlinerMode );
     rOutl.SetRefDevice( pModel->GetRefDevice() );
 
diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx
index 998c520..1e3ea5e 100644
--- a/svx/source/svdraw/svdoutl.cxx
+++ b/svx/source/svdraw/svdoutl.cxx
@@ -26,7 +26,7 @@
 #include <svl/itempool.hxx>
 
 
-SdrOutliner::SdrOutliner( SfxItemPool* pItemPool, sal_uInt16 nMode )
+SdrOutliner::SdrOutliner( SfxItemPool* pItemPool, OutlinerMode nMode )
 :   Outliner( pItemPool, nMode ),
     //mpPaintInfoRec( NULL )
     mpVisualizedPage(nullptr)
@@ -44,9 +44,9 @@ void SdrOutliner::SetTextObj( const SdrTextObj* pObj )
     if( pObj && pObj != mpTextObj.get() )
     {
         SetUpdateMode(false);
-        sal_uInt16 nOutlinerMode2 = OUTLINERMODE_OUTLINEOBJECT;
+        OutlinerMode nOutlinerMode2 = OutlinerMode::OutlineObject;
         if ( !pObj->IsOutlText() )
-            nOutlinerMode2 = OUTLINERMODE_TEXTOBJECT;
+            nOutlinerMode2 = OutlinerMode::TextObject;
         Init( nOutlinerMode2 );
 
         SetGlobalCharStretching();
diff --git a/svx/source/svdraw/svdoutlinercache.cxx b/svx/source/svdraw/svdoutlinercache.cxx
index 72e0069..65c29b4 100644
--- a/svx/source/svdraw/svdoutlinercache.cxx
+++ b/svx/source/svdraw/svdoutlinercache.cxx
@@ -30,16 +30,16 @@ SdrOutlinerCache::SdrOutlinerCache( SdrModel* pModel )
 {
 }
 
-SdrOutliner* SdrOutlinerCache::createOutliner( sal_uInt16 nOutlinerMode )
+SdrOutliner* SdrOutlinerCache::createOutliner( OutlinerMode nOutlinerMode )
 {
     SdrOutliner* pOutliner = nullptr;
 
-    if( (OUTLINERMODE_OUTLINEOBJECT == nOutlinerMode) && !maModeOutline.empty() )
+    if( (OutlinerMode::OutlineObject == nOutlinerMode) && !maModeOutline.empty() )
     {
         pOutliner = maModeOutline.back();
         maModeOutline.pop_back();
     }
-    else if( (OUTLINERMODE_TEXTOBJECT == nOutlinerMode) && !maModeText.empty() )
+    else if( (OutlinerMode::TextObject == nOutlinerMode) && !maModeText.empty() )
     {
         pOutliner = maModeText.back();
         maModeText.pop_back();
@@ -76,9 +76,9 @@ void SdrOutlinerCache::disposeOutliner( SdrOutliner* pOutliner )
 {
     if( pOutliner )
     {
-        sal_uInt16 nOutlMode = pOutliner->GetOutlinerMode();
+        OutlinerMode nOutlMode = pOutliner->GetOutlinerMode();
 
-        if( OUTLINERMODE_OUTLINEOBJECT == nOutlMode )
+        if( OutlinerMode::OutlineObject == nOutlMode )
         {
             maModeOutline.push_back(pOutliner);
             pOutliner->Clear();
@@ -87,7 +87,7 @@ void SdrOutlinerCache::disposeOutliner( SdrOutliner* pOutliner )
             // Deregister on outliner, might be reused from outliner cache
             pOutliner->SetNotifyHdl( Link<EENotify&,void>() );
         }
-        else if( OUTLINERMODE_TEXTOBJECT == nOutlMode )
+        else if( OutlinerMode::TextObject == nOutlMode )
         {
             maModeText.push_back(pOutliner);
             pOutliner->Clear();
diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx
index 8e804d8..483f7e5 100644
--- a/svx/source/svdraw/svdtext.cxx
+++ b/svx/source/svdraw/svdtext.cxx
@@ -169,7 +169,7 @@ void SdrText::SetModel( SdrModel* pNewModel )
     }
 }
 
-void SdrText::ForceOutlinerParaObject( sal_uInt16 nOutlMode )
+void SdrText::ForceOutlinerParaObject( OutlinerMode nOutlMode )
 {
     if( mpModel && !mpOutlinerParaObject )
     {
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 5e51751..f4d11de 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -431,7 +431,7 @@ void Cell::SetModel(SdrModel* pNewModel)
 
         SetStyleSheet( nullptr, true );
         SdrText::SetModel( pNewModel );
-        ForceOutlinerParaObject( OUTLINERMODE_TEXTOBJECT );
+        ForceOutlinerParaObject( OutlinerMode::TextObject );
     }
 }
 
@@ -713,7 +713,7 @@ sal_Int32 Cell::getMinimumHeight()
         Outliner& rOutliner=rTableObj.ImpGetDrawOutliner();
         rOutliner.SetPaperSize(aSize);
         rOutliner.SetUpdateMode(true);
-        ForceOutlinerParaObject( OUTLINERMODE_TEXTOBJECT );
+        ForceOutlinerParaObject( OutlinerMode::TextObject );
 
         if( GetOutlinerParaObject() )
         {
@@ -770,7 +770,7 @@ void Cell::SetOutlinerParaObject( OutlinerParaObject* pTextObject )
     maSelection.nStartPara = EE_PARA_MAX_COUNT;
 
     if( pTextObject == nullptr )
-        ForceOutlinerParaObject( OUTLINERMODE_TEXTOBJECT );
+        ForceOutlinerParaObject( OutlinerMode::TextObject );
 }
 
 
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 07426a0..2ea9c8a 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -1747,7 +1747,7 @@ bool SdrTableObj::BegTextEdit(SdrOutliner& rOutl)
 
     mbInEditMode = true;
 
-    rOutl.Init( OUTLINERMODE_TEXTOBJECT );
+    rOutl.Init( OutlinerMode::TextObject );
     rOutl.SetRefDevice( pModel->GetRefDevice() );
 
         bool bUpdMerk=rOutl.GetUpdateMode();
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 927bacc..5119b88 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -1891,7 +1891,7 @@ void SvxTableController::EditCell( const CellPos& rPos, vcl::Window* pWindow, co
             pTableObj->setActiveCell( aPos );
 
             // create new outliner, owner will be the SdrObjEditView
-            SdrOutliner* pOutl = mpModel ? SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, *mpModel) : nullptr;
+            SdrOutliner* pOutl = mpModel ? SdrMakeOutliner(OutlinerMode::OutlineObject, *mpModel) : nullptr;
             if (pOutl && pTableObj->IsVerticalWriting())
                 pOutl->SetVertical( true );
 
diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx
index a2237c4..c785bac 100644
--- a/svx/source/table/tablertfimporter.cxx
+++ b/svx/source/table/tablertfimporter.cxx
@@ -125,7 +125,7 @@ private:
 
 SdrTableRTFParser::SdrTableRTFParser( SdrTableObj& rTableObj )
 : mrTableObj( rTableObj )
-, mpOutliner( SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, *rTableObj.GetModel() ) )
+, mpOutliner( SdrMakeOutliner( OutlinerMode::TextObject, *rTableObj.GetModel() ) )
 , mrItemPool( rTableObj.GetModel()->GetItemPool() )
 , mnLastToken( 0 )
 , mbNewDef( false )
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 04988f6..a6ef500 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -563,9 +563,9 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
         if( mpOutliner == nullptr )
         {
             SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( mpObject  );
-            sal_uInt16 nOutlMode = OUTLINERMODE_TEXTOBJECT;
+            OutlinerMode nOutlMode = OutlinerMode::TextObject;
             if( pTextObj && pTextObj->IsTextFrame() && pTextObj->GetTextKind() == OBJ_OUTLINETEXT )
-                nOutlMode = OUTLINERMODE_OUTLINEOBJECT;
+                nOutlMode = OutlinerMode::OutlineObject;
 
             mpOutliner = mpModel->createOutliner( nOutlMode );
 
diff --git a/sw/source/core/fields/textapi.cxx b/sw/source/core/fields/textapi.cxx
index 4f3c855..565eb8f 100644
--- a/sw/source/core/fields/textapi.cxx
+++ b/sw/source/core/fields/textapi.cxx
@@ -125,7 +125,7 @@ SvxTextForwarder* SwTextAPIEditSource::GetTextForwarder()
     {
         //init draw model first
         pImpl->mpDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
-        pImpl->mpOutliner = new Outliner( pImpl->mpPool, OUTLINERMODE_TEXTOBJECT );
+        pImpl->mpOutliner = new Outliner( pImpl->mpPool, OutlinerMode::TextObject );
         pImpl->mpDoc->SetCalcFieldValueHdl( pImpl->mpOutliner );
     }
 
@@ -143,7 +143,7 @@ void SwTextAPIEditSource::SetText( OutlinerParaObject& rText )
         {
             //init draw model first
             pImpl->mpDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
-            pImpl->mpOutliner = new Outliner( pImpl->mpPool, OUTLINERMODE_TEXTOBJECT );
+            pImpl->mpOutliner = new Outliner( pImpl->mpPool, OutlinerMode::TextObject );
             pImpl->mpDoc->SetCalcFieldValueHdl( pImpl->mpOutliner );
         }
 
@@ -159,7 +159,7 @@ void SwTextAPIEditSource::SetString( const OUString& rText )
         {
             //init draw model first
             pImpl->mpDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
-            pImpl->mpOutliner = new Outliner( pImpl->mpPool, OUTLINERMODE_TEXTOBJECT );
+            pImpl->mpOutliner = new Outliner( pImpl->mpPool, OutlinerMode::TextObject );
             pImpl->mpDoc->SetCalcFieldValueHdl( pImpl->mpOutliner );
         }
         else
diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx
index c9769f8..3685ea1 100644
--- a/sw/source/filter/html/htmldrawwriter.cxx
+++ b/sw/source/filter/html/htmldrawwriter.cxx
@@ -293,7 +293,7 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt,
     rWrt.Strm().WriteChar( '>' );
 
     // Was jetzt kommt ist das Gegenstueck zu SdrTextObjectt::SetText()
-    Outliner aOutliner(nullptr, OUTLINERMODE_TEXTOBJECT);
+    Outliner aOutliner(nullptr, OutlinerMode::TextObject);
     aOutliner.SetUpdateMode( false );
     aOutliner.SetText( *pOutlinerParaObj );
     OUString aText( aOutliner.GetText( aOutliner.GetParagraph(0),
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 666b6c1..022a59c 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -963,7 +963,7 @@ OutlinerParaObject* SwWW8ImplReader::ImportAsOutliner(OUString &rString, WW8_CP
 
         EditTextObject* pTemporaryText = m_pDrawEditEngine->CreateTextObject();
         pRet = new OutlinerParaObject(*pTemporaryText);
-        pRet->SetOutlinerMode( OUTLINERMODE_TEXTOBJECT );
+        pRet->SetOutlinerMode( OutlinerMode::TextObject );
         delete pTemporaryText;
 
         m_pDrawEditEngine->SetText( OUString() );
@@ -1172,7 +1172,7 @@ void SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
         bool bVertical = pTextObj->IsVerticalWriting();
         EditTextObject* pTemporaryText = m_pDrawEditEngine->CreateTextObject();
         OutlinerParaObject* pOp = new OutlinerParaObject(*pTemporaryText);
-        pOp->SetOutlinerMode( OUTLINERMODE_TEXTOBJECT );
+        pOp->SetOutlinerMode( OutlinerMode::TextObject );
         pOp->SetVertical( bVertical );
         delete pTemporaryText;
         pTextObj->NbcSetOutlinerParaObject( pOp );
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index d78167a..38bfe02 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -768,7 +768,7 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
                 {
                     SdrOutliner aTmpOutliner(pDoc->getIDocumentDrawModelAccess().GetDrawModel()->
                                              GetDrawOutliner().GetEmptyItemSet().GetPool(),
-                                                OUTLINERMODE_TEXTOBJECT );
+                                                OutlinerMode::TextObject );
                     aTmpOutliner.SetRefDevice( pDoc->getIDocumentDeviceAccess().getPrinter( false ) );
                     MapMode aMapMode (MAP_TWIP);
                     aTmpOutliner.SetRefMapMode(aMapMode);
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index acac39f..621277e 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -598,7 +598,7 @@ void SwSidebarWin::InitControls()
     }
 
     SwDocShell* aShell = mrView.GetDocShell();
-    mpOutliner = new Outliner(&aShell->GetPool(),OUTLINERMODE_TEXTOBJECT);
+    mpOutliner = new Outliner(&aShell->GetPool(),OutlinerMode::TextObject);
     aShell->GetDoc()->SetCalcFieldValueHdl( mpOutliner );
     mpOutliner->SetUpdateMode( true );
     Rescale();
diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx b/sw/source/uibase/lingu/sdrhhcwrap.cxx
index 5395ffe..a5a7494 100644
--- a/sw/source/uibase/lingu/sdrhhcwrap.cxx
+++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx
@@ -54,7 +54,7 @@ SdrHHCWrapper::SdrHHCWrapper( SwView* pVw,
        bool bInteractive ) :
     SdrOutliner(pVw->GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->
                              GetDrawOutliner().GetEmptyItemSet().GetPool(),
-                OUTLINERMODE_TEXTOBJECT ),
+                OutlinerMode::TextObject ),
     pView( pVw ),
     pTextObj( nullptr ),
     pOutlView( nullptr ),
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 9c1e436..2ab98fe 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -491,7 +491,7 @@ bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin,
 {
     SwWrtShell *pSh = &GetWrtShell();
     SdrView *pSdrView = pSh->GetDrawView();
-    SdrOutliner* pOutliner = ::SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pSdrView->GetModel());
+    SdrOutliner* pOutliner = ::SdrMakeOutliner(OutlinerMode::TextObject, *pSdrView->GetModel());
     uno::Reference< linguistic2::XSpellChecker1 >  xSpell( ::GetSpellChecker() );
     if (pOutliner)
     {


More information about the Libreoffice-commits mailing list