forms/source/richtext/rtattributes.hxx                  |   28 +++----
 include/o3tl/typed_flags_set.hxx                        |   17 ++++
 include/svl/poolitem.hxx                                |   17 ----
 sfx2/source/appl/workwin.cxx                            |   60 ++++++++--------
 sfx2/source/dialog/basedlgs.cxx                         |    4 -
 sfx2/source/dialog/dockwin.cxx                          |   24 +++---
 sfx2/source/dialog/splitwin.cxx                         |   12 +--
 sfx2/source/inc/workwin.hxx                             |   58 ++++++++-------
 svl/source/items/poolitem.cxx                           |   44 -----------
 sw/inc/IDocumentContentOperations.hxx                   |   50 ++++++++-----
 sw/inc/IDocumentExternalData.hxx                        |    5 -
 sw/inc/editsh.hxx                                       |    4 -
 sw/inc/ndhints.hxx                                      |    2 
 sw/inc/ndtxt.hxx                                        |   13 +--
 sw/inc/swtypes.hxx                                      |   29 ++++---
 sw/inc/unocrsrhelper.hxx                                |    4 -
 sw/qa/core/uwriter.cxx                                  |   35 ++++-----
 sw/source/core/crsr/crstrvl.cxx                         |    6 -
 sw/source/core/crsr/findattr.cxx                        |    4 -
 sw/source/core/doc/DocumentContentOperationsManager.cxx |   30 ++++----
 sw/source/core/doc/doc.cxx                              |    2 
 sw/source/core/doc/docfmt.cxx                           |    8 +-
 sw/source/core/doc/doclay.cxx                           |    6 -
 sw/source/core/doc/docnum.cxx                           |    8 +-
 sw/source/core/doc/docredln.cxx                         |   14 +--
 sw/source/core/doc/docruby.cxx                          |    4 -
 sw/source/core/doc/docsort.cxx                          |    4 -
 sw/source/core/doc/doctxm.cxx                           |    9 --
 sw/source/core/doc/extinput.cxx                         |    4 -
 sw/source/core/doc/textboxhelper.cxx                    |    2 
 sw/source/core/docnode/ndtbl.cxx                        |    2 
 sw/source/core/edit/autofmt.cxx                         |    2 
 sw/source/core/edit/edatmisc.cxx                        |    4 -
 sw/source/core/edit/edfld.cxx                           |    4 -
 sw/source/core/edit/edglbldc.cxx                        |    4 -
 sw/source/core/edit/editsh.cxx                          |    8 --
 sw/source/core/edit/edlingu.cxx                         |    4 -
 sw/source/core/edit/edtox.cxx                           |    4 -
 sw/source/core/frmedt/fedesc.cxx                        |    2 
 sw/source/core/frmedt/fews.cxx                          |    2 
 sw/source/core/frmedt/tblsel.cxx                        |    2 
 sw/source/core/inc/DocumentContentOperationsManager.hxx |    6 -
 sw/source/core/inc/UndoInsert.hxx                       |    4 -
 sw/source/core/table/swnewtable.cxx                     |    2 
 sw/source/core/table/swtable.cxx                        |   12 +--
 sw/source/core/tox/ToxTextGenerator.cxx                 |    2 
 sw/source/core/txtnode/ndtxt.cxx                        |   48 ++++++------
 sw/source/core/txtnode/thints.cxx                       |   42 +++++------
 sw/source/core/txtnode/txtedt.cxx                       |    4 -
 sw/source/core/undo/rolbck.cxx                          |   10 +-
 sw/source/core/undo/undel.cxx                           |    4 -
 sw/source/core/undo/unins.cxx                           |    4 -
 sw/source/core/undo/unmove.cxx                          |   12 +--
 sw/source/core/undo/unovwr.cxx                          |    6 -
 sw/source/core/undo/unsort.cxx                          |    4 -
 sw/source/core/undo/untbl.cxx                           |    8 +-
 sw/source/core/unocore/unocrsrhelper.cxx                |   10 +-
 sw/source/core/unocore/unofield.cxx                     |    6 -
 sw/source/core/unocore/unoftn.cxx                       |    4 -
 sw/source/core/unocore/unoidx.cxx                       |    6 -
 sw/source/core/unocore/unoobj.cxx                       |    4 -
 sw/source/core/unocore/unoobj2.cxx                      |    2 
 sw/source/core/unocore/unorefmk.cxx                     |   12 +--
 sw/source/core/unocore/unotbl.cxx                       |    4 -
 sw/source/core/unocore/unotext.cxx                      |   12 +--
 sw/source/filter/ascii/parasc.cxx                       |    4 -
 sw/source/filter/basflt/fltshell.cxx                    |    6 -
 sw/source/filter/html/htmlfld.cxx                       |    4 -
 sw/source/filter/html/htmlftn.cxx                       |    2 
 sw/source/filter/html/htmltab.cxx                       |    2 
 sw/source/filter/html/swhtml.cxx                        |    8 +-
 sw/source/filter/ww8/wrtww8.cxx                         |    4 -
 sw/source/filter/ww8/ww8par.cxx                         |   20 ++---
 sw/source/filter/ww8/ww8par3.cxx                        |    4 -
 sw/source/filter/ww8/ww8par5.cxx                        |   52 ++++++-------
 sw/source/ui/misc/insfnote.cxx                          |    2 
 sw/source/uibase/app/docst.cxx                          |    2 
 sw/source/uibase/docvw/PageBreakWin.cxx                 |    2 
 sw/source/uibase/shells/textsh.cxx                      |    2 
 sw/source/uibase/shells/textsh1.cxx                     |    4 -
 sw/source/uibase/shells/txtattr.cxx                     |    2 
 sw/source/uibase/wrtsh/wrtsh1.cxx                       |    2 
 82 files changed, 427 insertions(+), 468 deletions(-)

New commits:
commit 3146851b6984dff768a88770785c5573ec7f6bbb
Author: Noel Grandin <n...@peralex.com>
Date:   Sun Mar 8 15:28:27 2015 +0200

    convert CHILD_ constants to enum class
    
    Change-Id: I1aca134fcc0384df4797cacafa9fbc1ed88d6617

diff --git a/include/o3tl/typed_flags_set.hxx b/include/o3tl/typed_flags_set.hxx
index 001d3fe..4b6e4f5 100644
--- a/include/o3tl/typed_flags_set.hxx
+++ b/include/o3tl/typed_flags_set.hxx
@@ -245,6 +245,23 @@ inline typename o3tl::typed_flags<E>::Self operator |=(
     return lhs;
 }
 
+template<typename E>
+inline typename o3tl::typed_flags<E>::Self operator ^=(E & lhs, E rhs) {
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(lhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(rhs) >= 0);
+    lhs = lhs ^ rhs;
+    return lhs;
+}
+
+template<typename E>
+inline typename o3tl::typed_flags<E>::Self operator ^=(
+    E & lhs, typename o3tl::typed_flags<E>::Wrap rhs)
+{
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(lhs) >= 0);
+    lhs = lhs ^ rhs;
+    return lhs;
+}
+
 #endif /* INCLUDED_O3TL_TYPED_FLAGS_SET_HXX */
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 5af1678..d27f224 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -832,10 +832,10 @@ SvBorder SfxWorkWindow::Arrange_Impl()
             continue;
 
         // First, we assume that there is room for the window.
-        pCli->nVisible |= CHILD_FITS_IN;
+        pCli->nVisible |= SfxChildVisibility::FITS_IN;
 
         // Skip invisiable windows
-        if (pCli->nVisible != CHILD_VISIBLE)
+        if (pCli->nVisible != SfxChildVisibility::VISIBLE)
             continue;
 
         if ( pCli->bResize )
@@ -918,7 +918,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
         pCli->aSize = aSize;
         if( bAllowHiding && !RequestTopToolSpacePixel_Impl( aBorder ) )
         {
-            pCli->nVisible ^= CHILD_FITS_IN;
+            pCli->nVisible ^= SfxChildVisibility::FITS_IN;
             aBorder = aTemp;
         }
     }
@@ -1065,7 +1065,7 @@ void SfxWorkWindow::ShowChildren_Impl()
                 bVisible = !bInvisible || ( nFlags & 
SfxChildWindowFlags::NEVERHIDE );
             }
 
-            if ( CHILD_VISIBLE == (pCli->nVisible & CHILD_VISIBLE) && bVisible 
)
+            if ( SfxChildVisibility::VISIBLE == (pCli->nVisible & 
SfxChildVisibility::VISIBLE) && bVisible )
             {
                 sal_uInt16 nFlags = pCli->bSetFocus ? 0 : SHOW_NOFOCUSCHANGE | 
SHOW_NOACTIVATE;
                 switch ( pCli->pWin->GetType() )
@@ -1455,7 +1455,7 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
                 if ( !bAllChildrenVisible )
                 {
                     if ( pCW->pCli )
-                        pCW->pCli->nVisible &= ~CHILD_ACTIVE;
+                        pCW->pCli->nVisible &= ~SfxChildVisibility::ACTIVE;
                 }
             }
             else if ( pChildWin )
@@ -1471,7 +1471,7 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
                         {
                             // The window is a direct Child
                             if ( bAllChildrenVisible && ( (IsDockingAllowed() 
&& bInternalDockingAllowed) || pCW->pCli->eAlign == SFX_ALIGN_NOALIGNMENT ) )
-                                pCW->pCli->nVisible |= CHILD_NOT_HIDDEN;
+                                pCW->pCli->nVisible |= 
SfxChildVisibility::NOT_HIDDEN;
                         }
                         else
                         {
@@ -1493,8 +1493,8 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
             {
                 if ( pCW->pCli )
                 {
-                    if ( pCW->pCli->nVisible & CHILD_NOT_HIDDEN )
-                        pCW->pCli->nVisible ^= CHILD_NOT_HIDDEN;
+                    if ( pCW->pCli->nVisible & SfxChildVisibility::NOT_HIDDEN )
+                        pCW->pCli->nVisible ^= SfxChildVisibility::NOT_HIDDEN;
                 }
                 else
                     
static_cast<SfxDockingWindow*>(pChildWin->GetWindow())->Disappear_Impl();
@@ -1533,7 +1533,7 @@ void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl 
*pCW, bool bSetFocus )
             if ( aChildren[TbxMatch(nPos)] )// &&
             {
                 // ChildWindow replaces ObjectBar
-                aChildren[TbxMatch(nPos)]->nVisible ^= CHILD_NOT_HIDDEN;
+                aChildren[TbxMatch(nPos)]->nVisible ^= 
SfxChildVisibility::NOT_HIDDEN;
             }
         }
 
@@ -1547,9 +1547,9 @@ void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl 
*pCW, bool bSetFocus )
             // The window is not docked or docked outside of one split windows
             // and must therefore be registered explicitly as a Child
             pCW->pCli = RegisterChild_Impl(*(pChildWin->GetWindow()), 
pChildWin->GetAlignment(), pChildWin->CanGetFocus());
-            pCW->pCli->nVisible = CHILD_VISIBLE;
+            pCW->pCli->nVisible = SfxChildVisibility::VISIBLE;
             if ( pChildWin->GetAlignment() != SFX_ALIGN_NOALIGNMENT && 
bIsFullScreen )
-                pCW->pCli->nVisible ^= CHILD_ACTIVE;
+                pCW->pCli->nVisible ^= SfxChildVisibility::ACTIVE;
             pCW->pCli->bSetFocus = bSetFocus;
         }
         else
@@ -1667,13 +1667,13 @@ void SfxWorkWindow::HidePopups_Impl(bool bHide, bool 
bParent, sal_uInt16 nId )
             SfxChild_Impl *pChild = FindChild_Impl(*pWin);
             if (bHide)
             {
-                pChild->nVisible &= ~CHILD_ACTIVE;
+                pChild->nVisible &= ~SfxChildVisibility::ACTIVE;
                 pCW->Hide();
             }
             else
             {
-                pChild->nVisible |= CHILD_ACTIVE;
-                if ( CHILD_VISIBLE == (pChild->nVisible & CHILD_VISIBLE) )
+                pChild->nVisible |= SfxChildVisibility::ACTIVE;
+                if ( SfxChildVisibility::VISIBLE == (pChild->nVisible & 
SfxChildVisibility::VISIBLE) )
                     pCW->Show( SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
             }
         }
@@ -1724,7 +1724,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier 
eChild,
             {
                 // DockingWindow was dragged out of a SplitWindow
                 pCW->pCli = RegisterChild_Impl(*pDockWin, 
pDockWin->GetAlignment(), pCW->pWin->CanGetFocus());
-                pCW->pCli->nVisible = CHILD_VISIBLE;
+                pCW->pCli->nVisible = SfxChildVisibility::VISIBLE;
             }
 
             pWin = pDockWin;
@@ -1789,7 +1789,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier 
eChild,
                 sal_uInt16 i=aSortedList[m];
                 SfxChild_Impl* pCli = aChildren[i];
 
-                if ( pCli && pCli->nVisible == CHILD_VISIBLE && pCli->pWin )
+                if ( pCli && pCli->nVisible == SfxChildVisibility::VISIBLE && 
pCli->pWin )
                 {
                     switch ( pCli->eAlign )
                     {
@@ -2266,7 +2266,7 @@ void SfxWorkWindow::ShowChildWindow_Impl(sal_uInt16 nId, 
bool bVisible, bool bSe
                 if ( pCW->pCli )
                 {
                     pCW->pCli->bSetFocus = bSetFocus;
-                    pCW->pCli->nVisible = CHILD_VISIBLE;
+                    pCW->pCli->nVisible = SfxChildVisibility::VISIBLE;
                     pChildWin->Show( bSetFocus && pChildWin->WantsFocus() ? 0 
: SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
                 }
                 else
@@ -2277,7 +2277,7 @@ void SfxWorkWindow::ShowChildWindow_Impl(sal_uInt16 nId, 
bool bVisible, bool bSe
             {
                 if ( pCW->pCli )
                 {
-                    pCW->pCli->nVisible = CHILD_VISIBLE ^ CHILD_NOT_HIDDEN;
+                    pCW->pCli->nVisible = SfxChildVisibility::VISIBLE ^ 
SfxChildVisibility::NOT_HIDDEN;
                     pCW->pWin->Hide();
                 }
                 else
@@ -2515,7 +2515,7 @@ void SfxWorkWindow::MakeChildrenVisible_Impl( bool bVis )
         {
             SfxChild_Impl* pCli = aChildren[aSortedList[n]];
             if ( (pCli->eAlign == SFX_ALIGN_NOALIGNMENT) || 
(IsDockingAllowed() && bInternalDockingAllowed) )
-                pCli->nVisible |= CHILD_ACTIVE;
+                pCli->nVisible |= SfxChildVisibility::ACTIVE;
         }
     }
     else
@@ -2525,7 +2525,7 @@ void SfxWorkWindow::MakeChildrenVisible_Impl( bool bVis )
         for ( sal_uInt16 n=0; n<aSortedList.size(); ++n )
         {
             SfxChild_Impl* pCli = aChildren[aSortedList[n]];
-            pCli->nVisible &= ~CHILD_ACTIVE;
+            pCli->nVisible &= ~SfxChildVisibility::ACTIVE;
         }
     }
 }
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index c58505a..ca6f7be 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -731,7 +731,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
             SetPinned_Impl( false );
             pEmptyWin->Actualize();
             OSL_TRACE( "SfxSplitWindow::InsertWindow_Impl - registering empty 
Splitwindow" );
-            pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, true 
)->nVisible = CHILD_VISIBLE;
+            pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, true 
)->nVisible = SfxChildVisibility::VISIBLE;
             pWorkWin->ArrangeChildren_Impl();
             if ( bFadeIn )
                 FadeIn();
@@ -751,7 +751,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
                 OSL_TRACE( "SfxSplitWindow::InsertWindow_Impl - registering 
real Splitwindow" );
             }
 #endif
-            pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, true 
)->nVisible = CHILD_VISIBLE;
+            pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, true 
)->nVisible = SfxChildVisibility::VISIBLE;
             pWorkWin->ArrangeChildren_Impl();
             if ( bFadeIn )
                 FadeIn();
@@ -1105,7 +1105,7 @@ void SfxSplitWindow::SetPinned_Impl( bool bOn )
             Hide();
             pEmptyWin->Actualize();
             OSL_TRACE( "SfxSplitWindow::SetPinned_Impl - registering empty 
Splitwindow" );
-            pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, true )->nVisible 
= CHILD_VISIBLE;
+            pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, true )->nVisible 
= SfxChildVisibility::VISIBLE;
         }
 
         Point aPos( GetPosPixel() );
@@ -1130,7 +1130,7 @@ void SfxSplitWindow::SetPinned_Impl( bool bOn )
             pWorkWin->ReleaseChild_Impl( *pEmptyWin );
             pEmptyWin->Hide();
             OSL_TRACE( "SfxSplitWindow::SetPinned_Impl - registering real 
Splitwindow" );
-            pWorkWin->RegisterChild_Impl( *this, eAlign, true )->nVisible = 
CHILD_VISIBLE;
+            pWorkWin->RegisterChild_Impl( *this, eAlign, true )->nVisible = 
SfxChildVisibility::VISIBLE;
         }
     }
 
@@ -1164,7 +1164,7 @@ void SfxSplitWindow::SetFadeIn_Impl( bool bOn )
             pWorkWin->ReleaseChild_Impl( *pEmptyWin );
             pEmptyWin->Hide();
             OSL_TRACE( "SfxSplitWindow::SetFadeIn_Impl - registering real 
Splitwindow" );
-            pWorkWin->RegisterChild_Impl( *this, eAlign, true )->nVisible = 
CHILD_VISIBLE;
+            pWorkWin->RegisterChild_Impl( *this, eAlign, true )->nVisible = 
SfxChildVisibility::VISIBLE;
             pWorkWin->ArrangeChildren_Impl();
             pWorkWin->ShowChildren_Impl();
         }
@@ -1181,7 +1181,7 @@ void SfxSplitWindow::SetFadeIn_Impl( bool bOn )
             Hide();
             pEmptyWin->Actualize();
             OSL_TRACE( "SfxSplitWindow::SetFadeIn_Impl - registering empty 
Splitwindow" );
-            pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, true )->nVisible 
= CHILD_VISIBLE;
+            pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, true )->nVisible 
= SfxChildVisibility::VISIBLE;
             pWorkWin->ArrangeChildren_Impl();
             pWorkWin->ShowChildren_Impl();
             pWorkWin->ArrangeAutoHideWindows( this );
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index 762a2ff..1d52817 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -31,6 +31,7 @@
 
 #include <rtl/ustring.hxx>
 #include <osl/mutex.hxx>
+#include <o3tl/typed_flags_set.hxx>
 
 #include <sfx2/sfx.hrc>
 #include <sfx2/childwin.hxx>
@@ -49,7 +50,7 @@ struct SfxObjectBar_Impl
     sal_uInt16        nMode; // special visibility flags
     sal_uInt16        nPos;
     sal_uInt16        nIndex;
-    bool          bDestroy;
+    bool              bDestroy;
     SfxInterface*     pIFace;
 
     SfxObjectBar_Impl() :
@@ -67,7 +68,7 @@ struct SfxObjectBar_Impl
 
 struct SfxStatBar_Impl
 {
-    sal_uInt16                  nId;
+    sal_uInt16              nId;
     bool                    bOn;
     bool                    bTemp;
 
@@ -79,19 +80,26 @@ struct SfxStatBar_Impl
 };
 
 
+enum class SfxChildVisibility
+{
+    NOT_VISIBLE  = 0,
+    ACTIVE       = 1,   // not disabled through HidePopups
+    NOT_HIDDEN   = 2,   // not disabled through HideChildWindow
+    FITS_IN      = 4,    // not too large for output size of the parent
+    VISIBLE      = 7,   // NOT_HIDDEN | ACTIVE | FITS_IN)
+};
+namespace o3tl
+{
+    template<> struct typed_flags<SfxChildVisibility> : 
is_typed_flags<SfxChildVisibility, 0x07> {};
+}
 
-#define CHILD_NOT_VISIBLE   0
-#define CHILD_ACTIVE       1    // not disabled through HidePopups
-#define CHILD_NOT_HIDDEN   2    // not disabled through HideChildWindow
-#define CHILD_FITS_IN      4    // not too large for output size of the parent
-#define CHILD_VISIBLE       (CHILD_NOT_HIDDEN | CHILD_ACTIVE | CHILD_FITS_IN)
 
 struct SfxChild_Impl
 {
-    vcl::Window*                         pWin;
+    vcl::Window*                     pWin;
     Size                            aSize;
     SfxChildAlignment               eAlign;
-    sal_uInt16                          nVisible;
+    SfxChildVisibility              nVisible;
     bool                            bResize;
     bool                            bCanGetFocus;
     bool                            bSetFocus;
@@ -101,20 +109,20 @@ struct SfxChild_Impl
         pWin(&rChild), aSize(rSize), eAlign(eAlignment), bResize(false),
         bCanGetFocus( false ), bSetFocus( false )
     {
-        nVisible = bIsVisible ? CHILD_VISIBLE : CHILD_NOT_VISIBLE;
+        nVisible = bIsVisible ? SfxChildVisibility::VISIBLE : 
SfxChildVisibility::NOT_VISIBLE;
     }
 };
 
 struct SfxChildWin_Impl
 {
-    sal_uInt16                         nSaveId;       // the ChildWindow-Id
-    sal_uInt16                         nInterfaceId;  // the current context
-    sal_uInt16                         nId;           // current Id
+    sal_uInt16                      nSaveId;       // the ChildWindow-Id
+    sal_uInt16                      nInterfaceId;  // the current context
+    sal_uInt16                      nId;           // current Id
     SfxChildWindow*                 pWin;
     bool                            bCreate;
     SfxChildWinInfo                 aInfo;
-    SfxChild_Impl*                 pCli;          // != 0 at direct Children
-    sal_uInt16                          nVisibility;
+    SfxChild_Impl*                  pCli;          // != 0 at direct Children
+    sal_uInt16                      nVisibility;
     bool                            bEnable;
     bool                            bDisabled;
 
commit fc4b79f76cf030015c5fdc9609afc0482223d198
Author: Noel Grandin <n...@peralex.com>
Date:   Sun Mar 8 15:27:00 2015 +0200

    convert tExternalDataType to enum class
    
    Change-Id: I3cf5670e8cc616e4284c5f4865d244ee4db2c628

diff --git a/sw/inc/IDocumentExternalData.hxx b/sw/inc/IDocumentExternalData.hxx
index adbaebc..6f985f6 100644
--- a/sw/inc/IDocumentExternalData.hxx
+++ b/sw/inc/IDocumentExternalData.hxx
@@ -24,11 +24,12 @@
 
 namespace sw
 {
-enum tExternalDataType { FIB, STTBF_ASSOC };
+
+enum class tExternalDataType { FIB, STTBF_ASSOC };
 
 struct ExternalDataTypeHash
 {
-    size_t operator()(tExternalDataType eType) const { return eType; }
+    size_t operator()(tExternalDataType eType) const { return 
static_cast<size_t>(eType); }
 };
 
 class ExternalData
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index cd8b821..822fd4f 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2840,7 +2840,7 @@ void WW8Export::WriteFkpPlcUsw()
 
         // Write SttbfAssoc
         WW8SttbAssoc * pSttbfAssoc = dynamic_cast<WW8SttbAssoc *>
-            
(pDoc->getIDocumentExternalData().getExternalData(::sw::STTBF_ASSOC).get());
+            
(pDoc->getIDocumentExternalData().getExternalData(::sw::tExternalDataType::STTBF_ASSOC).get());
 
         if ( pSttbfAssoc )                      // #i106057#
         {
@@ -2862,7 +2862,7 @@ void WW8Export::WriteFkpPlcUsw()
 
     // Reclaim stored FIB data from document.
     ::ww8::WW8FibData * pFibData = dynamic_cast<ww8::WW8FibData *>
-          (pDoc->getIDocumentExternalData().getExternalData(::sw::FIB).get());
+          
(pDoc->getIDocumentExternalData().getExternalData(::sw::tExternalDataType::FIB).get());
 
     if ( pFibData )
     {
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index ec49e48..deae95a 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4882,12 +4882,12 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary 
*pGloss, const SwPosition &rPos)
 
     ::sw::tExternalDataPointer pExternalFibData(pFibData);
 
-    rDoc.getIDocumentExternalData().setExternalData(::sw::FIB, 
pExternalFibData);
+    
rDoc.getIDocumentExternalData().setExternalData(::sw::tExternalDataType::FIB, 
pExternalFibData);
 
     ::sw::tExternalDataPointer pSttbfAsoc
           (new ::ww8::WW8Sttb<ww8::WW8Struct>(*pTableStream, 
pWwFib->fcSttbfAssoc, pWwFib->lcbSttbfAssoc));
 
-    rDoc.getIDocumentExternalData().setExternalData(::sw::STTBF_ASSOC, 
pSttbfAsoc);
+    
rDoc.getIDocumentExternalData().setExternalData(::sw::tExternalDataType::STTBF_ASSOC,
 pSttbfAsoc);
 
     if (pWwFib->fWriteReservation || pWwFib->fReadOnlyRecommended)
     {
commit 9853d0fa7ae50da40d384945afc8871b80194493
Author: Noel Grandin <n...@peralex.com>
Date:   Fri Mar 6 14:06:46 2015 +0200

    convert SfxDockingConfig to enum class
    
    Change-Id: I2cfc9f2f165f970daa2dc42ec4d733dde968b55a

diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index d5e5cab..5af1678 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1720,7 +1720,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier 
eChild,
     {
         if ( eChild == SfxChildIdentifier::DOCKINGWINDOW || 
pDockWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT )
         {
-            if ( eChild == SfxChildIdentifier::SPLITWINDOW && eConfig == 
SFX_TOGGLEFLOATMODE)
+            if ( eChild == SfxChildIdentifier::SPLITWINDOW && eConfig == 
SfxDockingConfig::TOGGLEFLOATMODE)
             {
                 // DockingWindow was dragged out of a SplitWindow
                 pCW->pCli = RegisterChild_Impl(*pDockWin, 
pDockWin->GetAlignment(), pCW->pWin->CanGetFocus());
@@ -1734,7 +1734,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier 
eChild,
             SfxSplitWindow *pSplitWin = 
GetSplitWindow_Impl(pDockWin->GetAlignment());
 
             // configure DockingWindow inside a SplitWindow
-            if ( eConfig == SFX_TOGGLEFLOATMODE)
+            if ( eConfig == SfxDockingConfig::TOGGLEFLOATMODE)
             {
                 // DockingWindow was dragged into a SplitWindow
                 pCW->pCli = 0;
@@ -1773,7 +1773,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier 
eChild,
 
     switch ( eConfig )
     {
-        case SFX_SETDOCKINGRECTS :
+        case SfxDockingConfig::SETDOCKINGRECTS :
         {
             if (nPos == USHRT_MAX || !pDockWin)
                 return;
@@ -1866,9 +1866,9 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier 
eChild,
             break;
         }
 
-        case SFX_MOVEDOCKINGWINDOW :
-        case SFX_ALIGNDOCKINGWINDOW :
-        case SFX_TOGGLEFLOATMODE:
+        case SfxDockingConfig::MOVEDOCKINGWINDOW :
+        case SfxDockingConfig::ALIGNDOCKINGWINDOW :
+        case SfxDockingConfig::TOGGLEFLOATMODE:
         {
             if ( nPos == USHRT_MAX && !pCW )
                 return;
@@ -1904,7 +1904,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier 
eChild,
                 SfxChildWindowFlags nFlags = pCW->aInfo.nFlags;
                 pCW->aInfo = pCW->pWin->GetInfo();
                 pCW->aInfo.nFlags |= nFlags;
-                if ( eConfig != SFX_MOVEDOCKINGWINDOW )
+                if ( eConfig != SfxDockingConfig::MOVEDOCKINGWINDOW )
                     SaveStatus_Impl( pCW->pWin, pCW->aInfo);
             }
 
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index a531433..5662278 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -297,7 +297,7 @@ IMPL_LINK_NOARG(SfxModelessDialog, TimerHdl)
         if ( GetStyle() & WB_SIZEABLE )
             nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
         pImp->aWinState = GetWindowState( nMask );
-        GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( 
SfxChildIdentifier::DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, 
pImp->pMgr->GetType() );
+        GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( 
SfxChildIdentifier::DOCKINGWINDOW, SfxDockingConfig::ALIGNDOCKINGWINDOW, 
pImp->pMgr->GetType() );
     }
     return 0;
 }
@@ -562,7 +562,7 @@ IMPL_LINK_NOARG(SfxFloatingWindow, TimerHdl)
         if ( GetStyle() & WB_SIZEABLE )
             nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
         pImp->aWinState = GetWindowState( nMask );
-        GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( 
SfxChildIdentifier::DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, 
pImp->pMgr->GetType() );
+        GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( 
SfxChildIdentifier::DOCKINGWINDOW, SfxDockingConfig::ALIGNDOCKINGWINDOW, 
pImp->pMgr->GetType() );
     }
     return 0;
 }
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 091dd31..5e21f99 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -616,7 +616,7 @@ void SfxDockingWindow::ToggleFloatingMode()
     pImp->SetDockAlignment(GetAlignment());
 
     // Dock or undock SfxChildWindow correctly.
-    pWorkWin->ConfigChild_Impl( eIdent, SFX_TOGGLEFLOATMODE, pMgr->GetType() );
+    pWorkWin->ConfigChild_Impl( eIdent, SfxDockingConfig::TOGGLEFLOATMODE, 
pMgr->GetType() );
 }
 
 
@@ -637,7 +637,7 @@ void SfxDockingWindow::StartDocking()
     if ( pImp->bSplitable )
         eIdent = SfxChildIdentifier::SPLITWINDOW;
     SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
-    pWorkWin->ConfigChild_Impl( eIdent, SFX_SETDOCKINGRECTS, pMgr->GetType() );
+    pWorkWin->ConfigChild_Impl( eIdent, SfxDockingConfig::SETDOCKINGRECTS, 
pMgr->GetType() );
     pImp->SetDockAlignment(GetAlignment());
 
     if ( pImp->pSplitWin )
@@ -1864,7 +1864,7 @@ void SfxDockingWindow::SetItemSize_Impl( const Size& 
rSize )
     SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
     if ( pImp->bSplitable )
         eIdent = SfxChildIdentifier::SPLITWINDOW;
-    pWorkWin->ConfigChild_Impl( eIdent, SFX_ALIGNDOCKINGWINDOW, 
pMgr->GetType() );
+    pWorkWin->ConfigChild_Impl( eIdent, SfxDockingConfig::ALIGNDOCKINGWINDOW, 
pMgr->GetType() );
 }
 
 void SfxDockingWindow::Disappear_Impl()
@@ -1930,7 +1930,7 @@ IMPL_LINK_NOARG(SfxDockingWindow, TimerHdl)
         if ( pImp->bSplitable )
             eIdent = SfxChildIdentifier::SPLITWINDOW;
         SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
-        pWorkWin->ConfigChild_Impl( eIdent, SFX_ALIGNDOCKINGWINDOW, 
pMgr->GetType() );
+        pWorkWin->ConfigChild_Impl( eIdent, 
SfxDockingConfig::ALIGNDOCKINGWINDOW, pMgr->GetType() );
     }
     return 0;
 }
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index e87e259..762a2ff 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -139,12 +139,12 @@ enum class SfxChildIdentifier
     SPLITWINDOW
 };
 
-enum SfxDockingConfig
+enum class SfxDockingConfig
 {
-    SFX_SETDOCKINGRECTS,
-    SFX_ALIGNDOCKINGWINDOW,
-    SFX_TOGGLEFLOATMODE,
-    SFX_MOVEDOCKINGWINDOW
+    SETDOCKINGRECTS,
+    ALIGNDOCKINGWINDOW,
+    TOGGLEFLOATMODE,
+    MOVEDOCKINGWINDOW
 };
 
 typedef std::vector<SfxChild_Impl*> SfxChildList_Impl;
commit a4f4a8cb00d8b5f7cadef02afa9025e823384860
Author: Noel Grandin <n...@peralex.com>
Date:   Fri Mar 6 14:01:04 2015 +0200

    convert SfxChildIdentifier to enum class
    
    Change-Id: I7fb7b76d0642653efb9f3cfe2b55e3a7c5972c5e

diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 53c4b75..d5e5cab 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1693,7 +1693,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier 
eChild,
     vcl::Window *pWin=0;
     SfxChildWin_Impl *pCW = 0;
 
-    if ( eChild == SFX_CHILDWIN_OBJECTBAR )
+    if ( eChild == SfxChildIdentifier::OBJECTBAR )
         return;
 
     // configure direct childwindow
@@ -1718,9 +1718,9 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier 
eChild,
 
     if ( pDockWin )
     {
-        if ( eChild == SFX_CHILDWIN_DOCKINGWINDOW || pDockWin->GetAlignment() 
== SFX_ALIGN_NOALIGNMENT )
+        if ( eChild == SfxChildIdentifier::DOCKINGWINDOW || 
pDockWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT )
         {
-            if ( eChild == SFX_CHILDWIN_SPLITWINDOW && eConfig == 
SFX_TOGGLEFLOATMODE)
+            if ( eChild == SfxChildIdentifier::SPLITWINDOW && eConfig == 
SFX_TOGGLEFLOATMODE)
             {
                 // DockingWindow was dragged out of a SplitWindow
                 pCW->pCli = RegisterChild_Impl(*pDockWin, 
pDockWin->GetAlignment(), pCW->pWin->CanGetFocus());
@@ -1878,7 +1878,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier 
eChild,
             if ( pCli && pDockWin )
             {
                 eAlign = pDockWin->GetAlignment();
-                if ( eChild == SFX_CHILDWIN_DOCKINGWINDOW || eAlign == 
SFX_ALIGN_NOALIGNMENT)
+                if ( eChild == SfxChildIdentifier::DOCKINGWINDOW || eAlign == 
SFX_ALIGN_NOALIGNMENT)
                 {
                     // configuration inside the SplitWindow, no change for the 
SplitWindows' configuration
                     pCli->bResize = true;
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index cb175b0..a531433 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -297,7 +297,7 @@ IMPL_LINK_NOARG(SfxModelessDialog, TimerHdl)
         if ( GetStyle() & WB_SIZEABLE )
             nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
         pImp->aWinState = GetWindowState( nMask );
-        GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( 
SFX_CHILDWIN_DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() );
+        GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( 
SfxChildIdentifier::DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, 
pImp->pMgr->GetType() );
     }
     return 0;
 }
@@ -562,7 +562,7 @@ IMPL_LINK_NOARG(SfxFloatingWindow, TimerHdl)
         if ( GetStyle() & WB_SIZEABLE )
             nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
         pImp->aWinState = GetWindowState( nMask );
-        GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( 
SFX_CHILDWIN_DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() );
+        GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( 
SfxChildIdentifier::DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, 
pImp->pMgr->GetType() );
     }
     return 0;
 }
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 7d4f6b6..091dd31 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -556,9 +556,9 @@ void SfxDockingWindow::ToggleFloatingMode()
     SfxChildAlignment eLastAlign = GetAlignment();
 
     SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
-    SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW;
+    SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
     if ( pImp->bSplitable )
-        eIdent = SFX_CHILDWIN_SPLITWINDOW;
+        eIdent = SfxChildIdentifier::SPLITWINDOW;
 
     if (IsFloatingMode())
     {
@@ -633,9 +633,9 @@ void SfxDockingWindow::StartDocking()
 {
     if ( !pImp->bConstructed || !pMgr )
         return;
-    SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW;
+    SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
     if ( pImp->bSplitable )
-        eIdent = SFX_CHILDWIN_SPLITWINDOW;
+        eIdent = SfxChildIdentifier::SPLITWINDOW;
     SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
     pWorkWin->ConfigChild_Impl( eIdent, SFX_SETDOCKINGRECTS, pMgr->GetType() );
     pImp->SetDockAlignment(GetAlignment());
@@ -1861,9 +1861,9 @@ void SfxDockingWindow::SetItemSize_Impl( const Size& 
rSize )
     pImp->aSplitSize = rSize;
 
     SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
-    SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW;
+    SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
     if ( pImp->bSplitable )
-        eIdent = SFX_CHILDWIN_SPLITWINDOW;
+        eIdent = SfxChildIdentifier::SPLITWINDOW;
     pWorkWin->ConfigChild_Impl( eIdent, SFX_ALIGNDOCKINGWINDOW, 
pMgr->GetType() );
 }
 
@@ -1926,9 +1926,9 @@ IMPL_LINK_NOARG(SfxDockingWindow, TimerHdl)
         if( !GetFloatingWindow()->IsRollUp() )
             SetFloatingSize( GetOutputSizePixel() );
         pImp->aWinState = GetFloatingWindow()->GetWindowState();
-        SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW;
+        SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
         if ( pImp->bSplitable )
-            eIdent = SFX_CHILDWIN_SPLITWINDOW;
+            eIdent = SfxChildIdentifier::SPLITWINDOW;
         SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
         pWorkWin->ConfigChild_Impl( eIdent, SFX_ALIGNDOCKINGWINDOW, 
pMgr->GetType() );
     }
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index 87a68d7..e87e259 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -131,12 +131,12 @@ struct SfxChildWin_Impl
     {}
 };
 
-enum SfxChildIdentifier
+enum class SfxChildIdentifier
 {
-    SFX_CHILDWIN_STATBAR,
-    SFX_CHILDWIN_OBJECTBAR,
-    SFX_CHILDWIN_DOCKINGWINDOW,
-    SFX_CHILDWIN_SPLITWINDOW
+    STATBAR,
+    OBJECTBAR,
+    DOCKINGWINDOW,
+    SPLITWINDOW
 };
 
 enum SfxDockingConfig
commit 5eea85ec4fa7c458785be749a0e370a0883ff693
Author: Noel Grandin <n...@peralex.com>
Date:   Fri Mar 6 11:12:14 2015 +0200

    convert SwMoveFlags and SwInsertFlags from enum to enum class
    
    Change-Id: I067656a47845c5d3fa143ce400b4ef0f8bf9ac5f

diff --git a/sw/inc/IDocumentContentOperations.hxx 
b/sw/inc/IDocumentContentOperations.hxx
index d58121d..ac1f881 100644
--- a/sw/inc/IDocumentContentOperations.hxx
+++ b/sw/inc/IDocumentContentOperations.hxx
@@ -42,28 +42,37 @@ class SwFmtFld;
 namespace utl { class TransliterationWrapper; }
 namespace svt { class EmbeddedObjectRef; }
 
+enum class SwMoveFlags
+{
+    DEFAULT       = 0x00,
+    ALLFLYS       = 0x01,
+    CREATEUNDOOBJ = 0x02,
+    REDLINES      = 0x04,
+    NO_DELFRMS    = 0x08
+};
+namespace o3tl
+{
+    template<> struct typed_flags<SwMoveFlags> : is_typed_flags<SwMoveFlags, 
0x0f> {};
+}
+
+// constants for inserting text
+enum class SwInsertFlags
+{
+    DEFAULT         = 0x00, // no extras
+    EMPTYEXPAND     = 0x01, // expand empty hints at insert position
+    NOHINTEXPAND    = 0x02, // do not expand any hints at insert pos
+    FORCEHINTEXPAND = 0x04 // expand all hints at insert position
+};
+namespace o3tl
+{
+    template<> struct typed_flags<SwInsertFlags> : 
is_typed_flags<SwInsertFlags, 0x07> {};
+}
+
 /** Text operation/manipulation interface
 */
 class IDocumentContentOperations
 {
 public:
-    enum SwMoveFlags
-    {
-        DOC_MOVEDEFAULT = 0x00,
-        DOC_MOVEALLFLYS = 0x01,
-        DOC_CREATEUNDOOBJ = 0x02,
-        DOC_MOVEREDLINES = 0x04,
-        DOC_NO_DELFRMS = 0x08
-    };
-
-    // constants for inserting text
-    enum InsertFlags
-    {   INS_DEFAULT         = 0x00 // no extras
-    ,   INS_EMPTYEXPAND     = 0x01 // expand empty hints at insert position
-    ,   INS_NOHINTEXPAND    = 0x02 // do not expand any hints at insert pos
-    ,   INS_FORCEHINTEXPAND = 0x04 // expand all hints at insert position
-    };
-
 public:
     /** Copy a selected content range to a position
 
@@ -129,7 +138,7 @@ public:
     /** Insert string into existing text node at position rRg.Point().
      */
     virtual bool InsertString(const SwPaM &rRg, const OUString&,
-              const enum InsertFlags nInsertMode = INS_EMPTYEXPAND ) = 0;
+              const enum SwInsertFlags nInsertMode = 
SwInsertFlags::EMPTYEXPAND ) = 0;
 
     /** change text to Upper/Lower/Hiragana/Katagana/...
      */
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 3e8d5ca..e5bf4b8 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -246,16 +246,15 @@ public:
     ///             of the node, the longest prefix that fits is inserted
     /// @return the prefix of rStr that was actually inserted
     OUString InsertText( const OUString & rStr, const SwIndex & rIdx,
-                     const enum IDocumentContentOperations::InsertFlags nMode
-                         = IDocumentContentOperations::INS_DEFAULT );
+                     const enum SwInsertFlags nMode
+                         = SwInsertFlags::DEFAULT );
 
     /** delete text content
         ATTENTION: must not be called with a range that overlaps the start of
                    an attribute with both extent and dummy char
      */
     void EraseText ( const SwIndex &rIdx, const sal_Int32 nCount = 
SAL_MAX_INT32,
-                     const enum IDocumentContentOperations::InsertFlags nMode
-                         = IDocumentContentOperations::INS_DEFAULT );
+                     const enum SwInsertFlags nMode = SwInsertFlags::DEFAULT );
 
     /** delete all attributes.
         If neither pSet nor nWhich is given, delete all attributes (except
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index f1a4793..6bdc043 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -1093,14 +1093,13 @@ void SwDocTest::randomTest()
                 }
                 break;
             case 4: { // movement
-                IDocumentContentOperations::SwMoveFlags nFlags =
-                    (IDocumentContentOperations::SwMoveFlags)
-                        (getRand(1) ? // FIXME: puterb this more ?
-                         IDocumentContentOperations::DOC_MOVEDEFAULT :
-                         IDocumentContentOperations::DOC_MOVEALLFLYS |
-                         IDocumentContentOperations::DOC_CREATEUNDOOBJ |
-                         IDocumentContentOperations::DOC_MOVEREDLINES |
-                         IDocumentContentOperations::DOC_NO_DELFRMS);
+                SwMoveFlags nFlags =
+                         getRand(1) // FIXME: puterb this more ?
+                         ? SwMoveFlags::DEFAULT
+                         : SwMoveFlags::ALLFLYS |
+                           SwMoveFlags::CREATEUNDOOBJ |
+                           SwMoveFlags::REDLINES |
+                           SwMoveFlags::NO_DELFRMS;
                 SwPosition aTo(getRandomPosition(m_pDoc, i/10));
                 m_pDoc->getIDocumentContentOperations().MoveRange(aCrs, aTo, 
nFlags);
                 break;
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 94a2e77..d192046 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -1669,7 +1669,7 @@ DocumentContentOperationsManager::CopyRange( SwPaM& rPam, 
SwPosition& rPos, cons
             pNode = pDoc->GetNodes().GoNext( &aPam.GetPoint()->nNode );
             pNode->MakeStartIndex( &aPam.GetPoint()->nContent );
             // move to desired position
-            pDoc->getIDocumentContentOperations().MoveRange( aPam, rPos, 
DOC_MOVEDEFAULT );
+            pDoc->getIDocumentContentOperations().MoveRange( aPam, rPos, 
SwMoveFlags::DEFAULT );
 
             pNode = aPam.GetCntntNode();
             *aPam.GetPoint() = rPos;      // Move the cursor for Undo
@@ -1900,11 +1900,11 @@ bool DocumentContentOperationsManager::MoveRange( 
SwPaM& rPaM, SwPosition& rPos,
 
     // Save the paragraph anchored Flys, so that they can be moved.
     _SaveFlyArr aSaveFlyArr;
-    _SaveFlyInRange( rPaM, rPos.nNode, aSaveFlyArr, 0 != ( DOC_MOVEALLFLYS & 
eMvFlags ) );
+    _SaveFlyInRange( rPaM, rPos.nNode, aSaveFlyArr, bool( SwMoveFlags::ALLFLYS 
& eMvFlags ) );
 
     // save redlines (if DOC_MOVEREDLINES is used)
     _SaveRedlines aSaveRedl;
-    if( DOC_MOVEREDLINES & eMvFlags && 
!m_rDoc.getIDocumentRedlineAccess().GetRedlineTbl().empty() )
+    if( SwMoveFlags::REDLINES & eMvFlags && 
!m_rDoc.getIDocumentRedlineAccess().GetRedlineTbl().empty() )
     {
         lcl_SaveRedlines( rPaM, aSaveRedl );
 
@@ -1929,7 +1929,7 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& 
rPaM, SwPosition& rPos,
     {
         m_rDoc.GetIDocumentUndoRedo().ClearRedo();
         pUndoMove = new SwUndoMove( rPaM, rPos );
-        pUndoMove->SetMoveRedlines( eMvFlags == DOC_MOVEREDLINES );
+        pUndoMove->SetMoveRedlines( eMvFlags == SwMoveFlags::REDLINES );
     }
     else
     {
@@ -2143,7 +2143,7 @@ bool DocumentContentOperationsManager::MoveNodeRange( 
SwNodeRange& rRange, SwNod
     SwFtnIdxs aTmpFntIdx;
 
     SwUndoMove* pUndo = 0;
-    if ((DOC_CREATEUNDOOBJ & eMvFlags ) && 
m_rDoc.GetIDocumentUndoRedo().DoesUndo())
+    if ((SwMoveFlags::CREATEUNDOOBJ & eMvFlags ) && 
m_rDoc.GetIDocumentUndoRedo().DoesUndo())
     {
         pUndo = new SwUndoMove( &m_rDoc, rRange, rPos );
     }
@@ -2155,7 +2155,7 @@ bool DocumentContentOperationsManager::MoveNodeRange( 
SwNodeRange& rRange, SwNod
 
     _SaveRedlines aSaveRedl;
     std::vector<SwRangeRedline*> aSavRedlInsPosArr;
-    if( DOC_MOVEREDLINES & eMvFlags && 
!m_rDoc.getIDocumentRedlineAccess().GetRedlineTbl().empty() )
+    if( SwMoveFlags::REDLINES & eMvFlags && 
!m_rDoc.getIDocumentRedlineAccess().GetRedlineTbl().empty() )
     {
         lcl_SaveRedlines( rRange, aSaveRedl );
 
@@ -2196,7 +2196,7 @@ bool DocumentContentOperationsManager::MoveNodeRange( 
SwNodeRange& rRange, SwNod
         pSaveInsPos = new SwNodeIndex( rRange.aStart, -1 );
 
     // move the Nodes
-    bool bNoDelFrms = 0 != (DOC_NO_DELFRMS & eMvFlags);
+    bool bNoDelFrms = bool(SwMoveFlags::NO_DELFRMS & eMvFlags);
     if( m_rDoc.GetNodes()._MoveNodes( rRange, m_rDoc.GetNodes(), rPos, 
!bNoDelFrms ) )
     {
         ++aIdx;     // again back to old position
@@ -2351,7 +2351,7 @@ bool DocumentContentOperationsManager::Overwrite( const 
SwPaM &rRg, const OUStri
             // start behind the characters (to fix the attributes!)
             if (nStart < pNode->GetTxt().getLength())
                 ++rIdx;
-            pNode->InsertText( OUString(c), rIdx, INS_EMPTYEXPAND );
+            pNode->InsertText( OUString(c), rIdx, SwInsertFlags::EMPTYEXPAND );
             if( nStart+1 < rIdx.GetIndex() )
             {
                 rIdx = nStart;
@@ -2393,7 +2393,7 @@ bool DocumentContentOperationsManager::Overwrite( const 
SwPaM &rRg, const OUStri
 }
 
 bool DocumentContentOperationsManager::InsertString( const SwPaM &rRg, const 
OUString &rStr,
-        const enum InsertFlags nInsertMode )
+        const SwInsertFlags nInsertMode )
 {
     // fetching DoesUndo is surprisingly expensive
     bool bDoesUndo = m_rDoc.GetIDocumentUndoRedo().DoesUndo();
@@ -2432,7 +2432,7 @@ bool DocumentContentOperationsManager::InsertString( 
const SwPaM &rRg, const OUS
         SwUndoInsert * pUndo = NULL;
 
         // don't group the start if hints at the start should be expanded
-        if (!(nInsertMode & IDocumentContentOperations::INS_FORCEHINTEXPAND))
+        if (!(nInsertMode & SwInsertFlags::FORCEHINTEXPAND))
         {
             SwUndo *const pLastUndo = m_rDoc.GetUndoManager().GetLastUndo();
             SwUndoInsert *const pUndoInsert(
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 4071f96..a5ab069 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -404,7 +404,7 @@ SwFlyFrmFmt* SwDoc::MakeFlyAndMove( const SwPaM& rPam, 
const SfxItemSet& rSet,
                         GetNodes().MakeTxtNode( aRg.aStart,
                                     (SwTxtFmtColl*)GetDfltTxtFmtColl() );
 
-                    getIDocumentContentOperations().MoveNodeRange( aRg, 
aPos.nNode, IDocumentContentOperations::DOC_MOVEDEFAULT );
+                    getIDocumentContentOperations().MoveNodeRange( aRg, 
aPos.nNode, SwMoveFlags::DEFAULT );
                 }
                 else
                 {
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 8f6c0d9..4e7812a 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -1999,7 +1999,7 @@ bool SwDoc::MoveParagraph( const SwPaM& rPam, long 
nOffset, bool bIsOutlMv )
         nMoved = rPam.End()->nNode.GetIndex() - rPam.Start()->nNode.GetIndex() 
+ 1;
     }
 
-    getIDocumentContentOperations().MoveNodeRange( aMvRg, aIdx, 
IDocumentContentOperations::DOC_MOVEREDLINES );
+    getIDocumentContentOperations().MoveNodeRange( aMvRg, aIdx, 
SwMoveFlags::REDLINES );
 
     if( pUndo )
     {
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 4c49adf..0f3d4aa 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -1159,13 +1159,13 @@ void SwRangeRedline::MoveToSection()
             SwNodeIndex aNdIdx( *pTxtNd );
             SwPosition aPos( aNdIdx, SwIndex( pTxtNd ));
             if( pCSttNd && pCEndNd )
-                pDoc->getIDocumentContentOperations().MoveAndJoin( aPam, aPos, 
IDocumentContentOperations::DOC_MOVEDEFAULT );
+                pDoc->getIDocumentContentOperations().MoveAndJoin( aPam, aPos, 
SwMoveFlags::DEFAULT );
             else
             {
                 if( pCSttNd && !pCEndNd )
                     bDelLastPara = true;
                 pDoc->getIDocumentContentOperations().MoveRange( aPam, aPos,
-                    IDocumentContentOperations::DOC_MOVEDEFAULT );
+                    SwMoveFlags::DEFAULT );
             }
         }
         else
@@ -1175,7 +1175,7 @@ void SwRangeRedline::MoveToSection()
 
             SwPosition aPos( *pSttNd->EndOfSectionNode() );
             pDoc->getIDocumentContentOperations().MoveRange( aPam, aPos,
-                IDocumentContentOperations::DOC_MOVEDEFAULT );
+                SwMoveFlags::DEFAULT );
         }
         pCntntSect = new SwNodeIndex( *pSttNd );
 
@@ -1426,7 +1426,7 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos)
             else
             {
                 pDoc->getIDocumentContentOperations().MoveRange( aPam, aPos,
-                    IDocumentContentOperations::DOC_MOVEALLFLYS );
+                    SwMoveFlags::ALLFLYS );
             }
 
             SetMark();
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 01cc39d..73dfa77 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -406,7 +406,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const 
SwSortOptions& rOpt)
 
         // Move Nodes
         getIDocumentContentOperations().MoveNodeRange( aRg, aStart,
-            IDocumentContentOperations::DOC_MOVEDEFAULT );
+            SwMoveFlags::DEFAULT );
 
         // Insert Move in Undo
         if(pUndoSort)
@@ -733,7 +733,7 @@ void MoveCell(SwDoc* pDoc, const SwTableBox* pSource, const 
SwTableBox* pTar,
     // Insert the Source
     SwNodeIndex aIns( *pTar->GetSttNd()->EndOfSectionNode() );
     pDoc->getIDocumentContentOperations().MoveNodeRange( aRg, aIns,
-        IDocumentContentOperations::DOC_MOVEDEFAULT );
+        SwMoveFlags::DEFAULT );
 
     // If first Node is empty -> delete it
     if(bDelFirst)
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 3f3d357..d0e0894 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1797,10 +1797,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
                 aNumStr += SvxNumberType( rDescs[i-1]->GetNumType() 
).GetNumStr( nBeg+nCount );
         }
     }
-    pNd->InsertText( aNumStr, aPos,
-           static_cast<IDocumentContentOperations::InsertFlags>(
-               IDocumentContentOperations::INS_EMPTYEXPAND |
-               IDocumentContentOperations::INS_FORCEHINTEXPAND) );
+    pNd->InsertText( aNumStr, aPos, SwInsertFlags::EMPTYEXPAND | 
SwInsertFlags::FORCEHINTEXPAND );
     if(pPageNoCharFmt)
     {
         SwFmtCharFmt aCharFmt( pPageNoCharFmt );
diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx
index ce348ef..13fe599 100644
--- a/sw/source/core/doc/extinput.cxx
+++ b/sw/source/core/doc/extinput.cxx
@@ -186,7 +186,7 @@ void SwExtTextInput::SetInputData( const 
CommandExtTextInputData& rData )
             }
 
             pTNd->InsertText( rNewStr, aIdx,
-                    IDocumentContentOperations::INS_EMPTYEXPAND );
+                    SwInsertFlags::EMPTYEXPAND );
             if( !HasMark() )
                 SetMark();
         }
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 4ec9266..8f18852 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1515,7 +1515,7 @@ static void lcl_DelBox( SwTableBox* pBox, _DelTabPara* 
pDelPara )
                 SwIndex aCntIdx( pDelPara->pLastNd,
                         pDelPara->pLastNd->GetTxt().getLength());
                 pDelPara->pLastNd->InsertText( OUString(pDelPara->cCh), 
aCntIdx,
-                    IDocumentContentOperations::INS_EMPTYEXPAND );
+                    SwInsertFlags::EMPTYEXPAND );
                 if( pDelPara->pUndo )
                     pDelPara->pUndo->AddBoxPos( *pDoc, nNdIdx, 
aDelRg.aEnd.GetIndex(),
                                                 aCntIdx.GetIndex() );
diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx
index 3ddb6f6..cb31d27 100644
--- a/sw/source/core/edit/edglbldc.cxx
+++ b/sw/source/core/edit/edglbldc.cxx
@@ -335,9 +335,7 @@ bool SwEditShell::MoveGlobalDocContent( const 
SwGlblDocContents& rArr ,
         aInsPos  = pMyDoc->GetNodes().GetEndOfContent();
 
     bool bRet = pMyDoc->getIDocumentContentOperations().MoveNodeRange( aRg, 
aInsPos,
-        static_cast<IDocumentContentOperations::SwMoveFlags>(
-              IDocumentContentOperations::DOC_MOVEALLFLYS
-            | IDocumentContentOperations::DOC_CREATEUNDOOBJ ));
+              SwMoveFlags::ALLFLYS | SwMoveFlags::CREATEUNDOOBJ );
 
     EndAllAction();
     return bRet;
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 96110ba..39d6d81 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -87,12 +87,10 @@ void SwEditShell::Insert2(const OUString &rStr, const bool 
bForceExpandHints )
 {
     StartAllAction();
     {
-        const enum IDocumentContentOperations::InsertFlags nInsertFlags =
+        const enum SwInsertFlags nInsertFlags =
             (bForceExpandHints)
-            ? static_cast<IDocumentContentOperations::InsertFlags>(
-                    IDocumentContentOperations::INS_FORCEHINTEXPAND |
-                    IDocumentContentOperations::INS_EMPTYEXPAND)
-            : IDocumentContentOperations::INS_EMPTYEXPAND;
+            ? (SwInsertFlags::FORCEHINTEXPAND | SwInsertFlags::EMPTYEXPAND)
+            : SwInsertFlags::EMPTYEXPAND;
 
         for(SwPaM& rCurrentCrsr : getShellCrsr( true )->GetRingContainer())
         {
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 27f9045..22851d5 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -1357,7 +1357,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
             else
             {
                 pDoc->getIDocumentContentOperations().MoveNodeRange( aRg, 
rInsPosNd,
-                    IDocumentContentOperations::DOC_MOVEDEFAULT );
+                    SwMoveFlags::DEFAULT );
             }
             // where is now aInsPos ??
 
diff --git a/sw/source/core/inc/DocumentContentOperationsManager.hxx 
b/sw/source/core/inc/DocumentContentOperationsManager.hxx
index 5adeaa9..c60f47b 100644
--- a/sw/source/core/inc/DocumentContentOperationsManager.hxx
+++ b/sw/source/core/inc/DocumentContentOperationsManager.hxx
@@ -61,7 +61,7 @@ public:
     bool Overwrite(const SwPaM &rRg, const OUString& rStr) SAL_OVERRIDE;
 
     bool InsertString(const SwPaM &rRg, const OUString&,
-              const enum InsertFlags nInsertMode = INS_EMPTYEXPAND ) 
SAL_OVERRIDE;
+              const enum SwInsertFlags nInsertMode = 
SwInsertFlags::EMPTYEXPAND ) SAL_OVERRIDE;
 
     void TransliterateText(const SwPaM& rPaM, utl::TransliterationWrapper&) 
SAL_OVERRIDE;
 
diff --git a/sw/source/core/inc/UndoInsert.hxx 
b/sw/source/core/inc/UndoInsert.hxx
index 1add17e..3c6eb85 100644
--- a/sw/source/core/inc/UndoInsert.hxx
+++ b/sw/source/core/inc/UndoInsert.hxx
@@ -44,7 +44,7 @@ class SwUndoInsert: public SwUndo, private SwUndoSaveCntnt
     bool bIsAppend : 1;
     bool m_bWithRsid : 1;
 
-    const IDocumentContentOperations::InsertFlags m_nInsertFlags;
+    const SwInsertFlags m_nInsertFlags;
 
     friend class ::sw::DocumentContentOperationsManager;     // actually only 
DocumentContentOperationsManager::InsertString, because it uses CanGrouping
     bool CanGrouping( sal_Unicode cIns );
@@ -57,7 +57,7 @@ class SwUndoInsert: public SwUndo, private SwUndoSaveCntnt
 
 public:
     SwUndoInsert( const SwNodeIndex& rNode, sal_Int32 nCntnt, sal_Int32 nLen,
-                  const IDocumentContentOperations::InsertFlags nInsertFlags,
+                  const SwInsertFlags nInsertFlags,
                   bool bWDelim = true );
     SwUndoInsert( const SwNodeIndex& rNode );
     virtual ~SwUndoInsert();
diff --git a/sw/source/core/table/swnewtable.cxx 
b/sw/source/core/table/swnewtable.cxx
index a184f98..8a10f5d 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -906,7 +906,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& 
rBoxes,
                     else
                     {
                         pDoc->getIDocumentContentOperations().MoveNodeRange( 
aRg, rInsPosNd,
-                            IDocumentContentOperations::DOC_NO_DELFRMS );
+                            SwMoveFlags::NO_DELFRMS );
                     }
                 }
             }
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index d74817a..e4d61da 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2054,10 +2054,8 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& 
rTxt, const Color* pCol,
                 pDoc->getIDocumentRedlineAccess().DeleteRedline(aTemp, true, 
USHRT_MAX);
             }
 
-            pTNd->EraseText( aIdx, n,
-                    IDocumentContentOperations::INS_EMPTYEXPAND );
-            pTNd->InsertText( rTxt, aIdx,
-                    IDocumentContentOperations::INS_EMPTYEXPAND );
+            pTNd->EraseText( aIdx, n, SwInsertFlags::EMPTYEXPAND );
+            pTNd->InsertText( rTxt, aIdx, SwInsertFlags::EMPTYEXPAND );
 
             if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
             {
@@ -2101,10 +2099,8 @@ void ChgNumToText( SwTableBox& rBox, sal_uLong nFmt )
                 // Reset DontExpand-Flags before exchange, to retrigger 
expansion
                 pTNd->DontExpandFmt( aIdx, false, false );
                 aIdx = 0;
-                pTNd->EraseText( aIdx, SAL_MAX_INT32,
-                        IDocumentContentOperations::INS_EMPTYEXPAND );
-                pTNd->InsertText( sTmp, aIdx,
-                        IDocumentContentOperations::INS_EMPTYEXPAND );
+                pTNd->EraseText( aIdx, SAL_MAX_INT32, 
SwInsertFlags::EMPTYEXPAND );
+                pTNd->InsertText( sTmp, aIdx, SwInsertFlags::EMPTYEXPAND );
             }
         }
 
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 0fbd0a5..00614b5 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1698,7 +1698,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
     //              ueber die InsertMethode den Text einfuegen und nicht
     //              selbst direkt
     pDest->InsertText( m_Text.copy(nTxtStartIdx, nLen), rDestStart,
-                   IDocumentContentOperations::INS_EMPTYEXPAND );
+                   SwInsertFlags::EMPTYEXPAND );
 
     // um reale Groesse Updaten !
     nLen = pDest->m_Text.getLength() - oldLen;
@@ -1903,7 +1903,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
 }
 
 OUString SwTxtNode::InsertText( const OUString & rStr, const SwIndex & rIdx,
-        const IDocumentContentOperations::InsertFlags nMode )
+        const SwInsertFlags nMode )
 {
     assert(rIdx <= m_Text.getLength()); // invalid index
 
@@ -1924,14 +1924,14 @@ OUString SwTxtNode::InsertText( const OUString & rStr, 
const SwIndex & rIdx,
     assert(nLen != 0);
 
     bool bOldExpFlg = IsIgnoreDontExpand();
-    if (nMode & IDocumentContentOperations::INS_FORCEHINTEXPAND)
+    if (nMode & SwInsertFlags::FORCEHINTEXPAND)
     {
         SetIgnoreDontExpand( true );
     }
 
     Update( rIdx, nLen ); // text content changed!
 
-    if (nMode & IDocumentContentOperations::INS_FORCEHINTEXPAND)
+    if (nMode & SwInsertFlags::FORCEHINTEXPAND)
     {
         SetIgnoreDontExpand( bOldExpFlg );
     }
@@ -1953,8 +1953,8 @@ OUString SwTxtNode::InsertText( const OUString & rStr, 
const SwIndex & rIdx,
 
             if( rIdx == *pEndIdx )
             {
-                if (  (nMode & IDocumentContentOperations::INS_NOHINTEXPAND) ||
-                    (!(nMode & IDocumentContentOperations::INS_FORCEHINTEXPAND)
+                if (  (nMode & SwInsertFlags::NOHINTEXPAND) ||
+                    (!(nMode & SwInsertFlags::FORCEHINTEXPAND)
                      && pHt->DontExpand()) )
                 {
                     // bei leeren Attributen auch Start veraendern
@@ -1973,7 +1973,7 @@ OUString SwTxtNode::InsertText( const OUString & rStr, 
const SwIndex & rIdx,
                     InsertHint( pHt, SetAttrMode::NOHINTADJUST );
                 }
                 // empty hints at insert position?
-                else if ( (nMode & IDocumentContentOperations::INS_EMPTYEXPAND)
+                else if ( (nMode & SwInsertFlags::EMPTYEXPAND)
                         && (*pEndIdx == pHt->GetStart()) )
                 {
                     pHt->GetStart() = pHt->GetStart() - nLen;
@@ -1991,7 +1991,7 @@ OUString SwTxtNode::InsertText( const OUString & rStr, 
const SwIndex & rIdx,
                     continue;
                 }
             }
-            if ( !(nMode & IDocumentContentOperations::INS_NOHINTEXPAND) &&
+            if ( !(nMode & SwInsertFlags::NOHINTEXPAND) &&
                  rIdx == nLen && pHt->GetStart() == rIdx.GetIndex() &&
                  !pHt->IsDontExpandStartAttr() )
             {
@@ -2388,7 +2388,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const 
SwIndex & rDestStart,
 }
 
 void SwTxtNode::EraseText(const SwIndex &rIdx, const sal_Int32 nCount,
-        const IDocumentContentOperations::InsertFlags nMode )
+        const SwInsertFlags nMode )
 {
     assert(rIdx <= m_Text.getLength()); // invalid index
 
@@ -2447,7 +2447,7 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const 
sal_Int32 nCount,
         //    char deletes the hint
         if (   (*pHtEndIdx < nEndIdx)
             || ( (*pHtEndIdx == nEndIdx)     &&
-                 !(IDocumentContentOperations::INS_EMPTYEXPAND & nMode)  &&
+                 !(SwInsertFlags::EMPTYEXPAND & nMode)  &&
                  (  (RES_TXTATR_TOXMARK == nWhich)  ||
                     (RES_TXTATR_REFMARK == nWhich)  ||
                     (RES_TXTATR_CJK_RUBY == nWhich) ||
@@ -3289,7 +3289,7 @@ bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const 
SwIndex* pDestIdx,
                                         aItem,
                                         aDestIdx.GetIndex(),
                                         aDestIdx.GetIndex() );
-                                OUString const ins( 
rDestNd.InsertText(sExpand, aDestIdx, 
IDocumentContentOperations::INS_EMPTYEXPAND));
+                                OUString const ins( 
rDestNd.InsertText(sExpand, aDestIdx, SwInsertFlags::EMPTYEXPAND));
                                 SAL_INFO_IF(ins.getLength() != 
sExpand.getLength(),
                                         "sw.core", "GetExpandTxt lossage");
                                 aDestIdx = nInsPos + nAttrStartIdx;
diff --git a/sw/source/core/txtnode/thints.cxx 
b/sw/source/core/txtnode/thints.cxx
index 4ece3d2..90dad08 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1259,12 +1259,10 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, 
const SetAttrMode nMode )
             "EndIdx out of bounds!" );
 
     // translate from SetAttrMode to InsertMode (for hints with CH_TXTATR)
-    const enum IDocumentContentOperations::InsertFlags nInsertFlags =
+    const enum SwInsertFlags nInsertFlags =
         (nMode & SetAttrMode::FORCEHINTEXPAND)
-        ? static_cast<IDocumentContentOperations::InsertFlags>(
-                IDocumentContentOperations::INS_FORCEHINTEXPAND |
-                IDocumentContentOperations::INS_EMPTYEXPAND)
-        : IDocumentContentOperations::INS_EMPTYEXPAND;
+        ? (SwInsertFlags::FORCEHINTEXPAND | SwInsertFlags::EMPTYEXPAND)
+        : SwInsertFlags::EMPTYEXPAND;
 
     // need this after TryInsertHint, when pAttr may be deleted
     const sal_Int32 nStart( pAttr->GetStart() );
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 2477147..15fe59b 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -803,7 +803,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & 
rContext)
             if( pTxtNd )
             {
                 OUString const ins( pTxtNd->InsertText(*pEndStr, aPos.nContent,
-                        IDocumentContentOperations::INS_NOHINTEXPAND) );
+                        SwInsertFlags::NOHINTEXPAND) );
                 assert(ins.getLength() == pEndStr->getLength()); // must 
succeed
                 (void) ins;
                 // METADATA: restore
@@ -898,7 +898,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & 
rContext)
                 //  -> in StartNode is still the rest of the Join => delete
                 aPos.nContent.Assign( pTxtNd, nSttCntnt );
                 OUString const ins( pTxtNd->InsertText(*pSttStr, aPos.nContent,
-                        IDocumentContentOperations::INS_NOHINTEXPAND) );
+                        SwInsertFlags::NOHINTEXPAND) );
                 assert(ins.getLength() == pSttStr->getLength()); // must 
succeed
                 (void) ins;
                 // METADATA: restore
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 1a68e2a..8889225 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -108,7 +108,7 @@ void SwUndoInsert::Init(const SwNodeIndex & rNd)
 // #111827#
 SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd, sal_Int32 nCnt,
             sal_Int32 nL,
-            const IDocumentContentOperations::InsertFlags nInsertFlags,
+            const SwInsertFlags nInsertFlags,
             bool bWDelim )
     : SwUndo(UNDO_TYPING), pTxt( 0 ), pRedlData( 0 ),
         nNode( rNd.GetIndex() ), nCntnt(nCnt), nLen(nL),
@@ -125,7 +125,7 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd )
         pRedlData( 0 ), nNode( rNd.GetIndex() ), nCntnt(0), nLen(1),
         bIsWordDelim( false ), bIsAppend( true )
     , m_bWithRsid(false)
-    , m_nInsertFlags(IDocumentContentOperations::INS_EMPTYEXPAND)
+    , m_nInsertFlags(SwInsertFlags::EMPTYEXPAND)
 {
     Init(rNd);
 }
diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx
index 898c97d..9ab2aaa 100644
--- a/sw/source/core/undo/unmove.cxx
+++ b/sw/source/core/undo/unmove.cxx
@@ -199,7 +199,7 @@ void SwUndoMove::UndoImpl(::sw::UndoRedoContext & rContext)
             aRg.aEnd = nDestEndNode;
             aIdx = nInsPosNode;
             bool bSuccess = 
pDoc->getIDocumentContentOperations().MoveNodeRange( aRg, aIdx,
-                    IDocumentContentOperations::DOC_MOVEDEFAULT );
+                    SwMoveFlags::DEFAULT );
             if (!bSuccess)
                 break;
         }
@@ -225,8 +225,8 @@ void SwUndoMove::UndoImpl(::sw::UndoRedoContext & rContext)
 
             // first delete all attributes at InsertPos
             const bool bSuccess = 
pDoc->getIDocumentContentOperations().MoveRange( aPam, aPos, (bMoveRedlines)
-                        ? IDocumentContentOperations::DOC_MOVEREDLINES
-                        : IDocumentContentOperations::DOC_MOVEDEFAULT );
+                        ? SwMoveFlags::REDLINES
+                        : SwMoveFlags::DEFAULT );
             if (!bSuccess)
                 break;
 
@@ -289,8 +289,8 @@ void SwUndoMove::RedoImpl(::sw::UndoRedoContext & rContext)
         // only a move with SwRange
         SwNodeRange aRg( rNds, nSttNode, rNds, nEndNode );
         rDoc.getIDocumentContentOperations().MoveNodeRange( aRg, aIdx, 
(bMoveRedlines)
-                ? IDocumentContentOperations::DOC_MOVEREDLINES
-                : IDocumentContentOperations::DOC_MOVEDEFAULT );
+                ? SwMoveFlags::REDLINES
+                : SwMoveFlags::DEFAULT );
     }
     else
     {
@@ -307,7 +307,7 @@ void SwUndoMove::RedoImpl(::sw::UndoRedoContext & rContext)
 
         aIdx--;
         rDoc.getIDocumentContentOperations().MoveRange( aPam, aMvPos,
-            IDocumentContentOperations::DOC_MOVEDEFAULT );
+            SwMoveFlags::DEFAULT );
 
         if( nSttNode != nEndNode && bJoinTxt )
         {
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index abc2966..a851f45 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -78,7 +78,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& 
rPos,
     pTxtNd->SetIgnoreDontExpand( true );
 
     pTxtNd->InsertText( OUString(cIns), rPos.nContent,
-            IDocumentContentOperations::INS_EMPTYEXPAND );
+            SwInsertFlags::EMPTYEXPAND );
     aInsStr += OUString( cIns );
 
     if( !bInsChar )
@@ -155,7 +155,7 @@ bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& 
rPos,
     pDelTxtNd->SetIgnoreDontExpand( true );
 
     OUString const ins( pDelTxtNd->InsertText(OUString(cIns), rPos.nContent,
-            IDocumentContentOperations::INS_EMPTYEXPAND) );
+            SwInsertFlags::EMPTYEXPAND) );
     assert(ins.getLength() == 1); // check in SwDoc::Overwrite => cannot fail
     (void) ins;
     aInsStr += OUString( cIns );
@@ -282,7 +282,7 @@ void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & 
rContext)
         // do it individually, to keep the attributes!
         OUString const ins(
                 pTxtNd->InsertText( OUString(aInsStr[n]), rIdx,
-                IDocumentContentOperations::INS_EMPTYEXPAND) );
+                SwInsertFlags::EMPTYEXPAND) );
         assert(ins.getLength() == 1); // cannot fail
         (void) ins;
         if( n < aDelStr.getLength() )
diff --git a/sw/source/core/undo/unsort.cxx b/sw/source/core/undo/unsort.cxx
index b317a12..c771744 100644
--- a/sw/source/core/undo/unsort.cxx
+++ b/sw/source/core/undo/unsort.cxx
@@ -140,7 +140,7 @@ void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext)
             SwNodeIndex aIdx( rDoc.GetNodes(), nSttNode + i );
             SwNodeRange aRg( *aIdxList[i], 0, *aIdxList[i], 1 );
             rDoc.getIDocumentContentOperations().MoveNodeRange(aRg, aIdx,
-                IDocumentContentOperations::DOC_MOVEDEFAULT);
+                SwMoveFlags::DEFAULT);
         }
         // delete indices
         for(SwUndoSortList::const_iterator it = aIdxList.begin(); it != 
aIdxList.end(); ++it)
@@ -215,7 +215,7 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext)
             SwNodeIndex aIdx( rDoc.GetNodes(), nSttNode + i);
             SwNodeRange aRg( *aIdxList[i], 0, *aIdxList[i], 1 );
             rDoc.getIDocumentContentOperations().MoveNodeRange(aRg, aIdx,
-                IDocumentContentOperations::DOC_MOVEDEFAULT);
+                SwMoveFlags::DEFAULT);
         }
         // delete indices
         for(SwUndoSortList::const_iterator it = aIdxList.begin(); it != 
aIdxList.end(); ++it)
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index ea74663..990418e 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -2094,9 +2094,9 @@ void SwUndoTblMerge::MoveBoxCntnt( SwDoc* pDoc, 
SwNodeRange& rRg, SwNodeIndex& r
     SwNodeIndex aTmp( rRg.aStart, -1 ), aTmp2( rPos, -1 );
     SwUndoMove* pUndo = new SwUndoMove( pDoc, rRg, rPos );
     ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
-    pDoc->getIDocumentContentOperations().MoveNodeRange( rRg, rPos, 
(pSaveTbl->IsNewModel()) ?
-        IDocumentContentOperations::DOC_NO_DELFRMS :
-        IDocumentContentOperations::DOC_MOVEDEFAULT );
+    pDoc->getIDocumentContentOperations().MoveNodeRange( rRg, rPos, 
pSaveTbl->IsNewModel() ?
+        SwMoveFlags::NO_DELFRMS :
+        SwMoveFlags::DEFAULT );
     ++aTmp;
     ++aTmp2;
     pUndo->SetDestRange( aTmp2, rPos, aTmp );
@@ -2249,7 +2249,7 @@ void SwUndoTblNumFmt::UndoImpl(::sw::UndoRedoContext & 
rContext)
         {
             pTxtNd->EraseText( aIdx );
             pTxtNd->InsertText( aStr, aIdx,
-                IDocumentContentOperations::INS_NOHINTEXPAND );
+                SwInsertFlags::NOHINTEXPAND );
         }
     }
 
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx 
b/sw/source/core/unocore/unocrsrhelper.cxx
index 6f65383..3ecac1c 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -1105,12 +1105,10 @@ bool DocInsertStringSplitCR(
 {
     bool bOK = true;
 
-        const enum IDocumentContentOperations::InsertFlags nInsertFlags =
-            (bForceExpandHints)
-            ? static_cast<IDocumentContentOperations::InsertFlags>(
-                    IDocumentContentOperations::INS_FORCEHINTEXPAND |
-                    IDocumentContentOperations::INS_EMPTYEXPAND)
-            : IDocumentContentOperations::INS_EMPTYEXPAND;
+        const enum SwInsertFlags nInsertFlags =
+            bForceExpandHints
+            ? ( SwInsertFlags::FORCEHINTEXPAND | SwInsertFlags::EMPTYEXPAND)
+            : SwInsertFlags::EMPTYEXPAND;
 
     // grouping done in InsertString is intended for typing, not API calls
     ::sw::GroupUndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
diff --git a/sw/source/core/unocore/unotext.cxx 
b/sw/source/core/unocore/unotext.cxx
index a095d9c..25eb61f 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -408,12 +408,10 @@ throw (lang::IllegalArgumentException, 
uno::RuntimeException, std::exception)
     }
     const bool bForceExpandHints(CheckForOwnMemberMeta(aPam, bAbsorb));
 
-    const enum IDocumentContentOperations::InsertFlags nInsertFlags =
-        (bForceExpandHints)
-        ? static_cast<IDocumentContentOperations::InsertFlags>(
-                IDocumentContentOperations::INS_FORCEHINTEXPAND |
-                IDocumentContentOperations::INS_EMPTYEXPAND)
-        : IDocumentContentOperations::INS_EMPTYEXPAND;
+    const enum SwInsertFlags nInsertFlags =
+        bForceExpandHints
+        ? ( SwInsertFlags::FORCEHINTEXPAND | SwInsertFlags::EMPTYEXPAND)
+        : SwInsertFlags::EMPTYEXPAND;
 
     SwPaM aTmp(*aPam.Start());
     if (bAbsorb && aPam.HasMark())
diff --git a/sw/source/filter/html/htmltab.cxx 
b/sw/source/filter/html/htmltab.cxx
index 56a6334..24ff36d 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -5350,7 +5350,7 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust 
eParentAdjust,
                     SwNodeIndex aDstIdx( *pNd, bTop ? 0 : 1 );
 
                     pDoc->getIDocumentContentOperations().MoveNodeRange( 
aSrcRg, aDstIdx,
-                        IDocumentContentOperations::DOC_MOVEDEFAULT );
+                        SwMoveFlags::DEFAULT );
 
                     // Wenn die Caption vor der Tabelle eingefuegt wurde muss
                     // eine an der Tabelle gestzte Seitenvorlage noch in den
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 5aba71d..555413a 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -1052,7 +1052,7 @@ void SwWW8ImplReader::InsertTagField( const sal_uInt16 
nId, const OUString& rTag
     {
         aName += rTagText;      // als Txt taggen
         rDoc.getIDocumentContentOperations().InsertString(*pPaM, aName,
-                IDocumentContentOperations::INS_NOHINTEXPAND);
+                SwInsertFlags::NOHINTEXPAND);
     }
     else
     {                                                   // normal tagggen
commit 68c87b46fd26291463989d5bf751bc4cecf09b28
Author: Noel Grandin <n...@peralex.com>
Date:   Tue Mar 10 15:10:11 2015 +0200

    convert SetAttrMode to enum class
    
    Change-Id: If7dd0c49480756afb7d4eaaba597ecc305c35f64

diff --git a/sw/inc/IDocumentContentOperations.hxx 
b/sw/inc/IDocumentContentOperations.hxx
index 2f956c6..d58121d 100644
--- a/sw/inc/IDocumentContentOperations.hxx
+++ b/sw/inc/IDocumentContentOperations.hxx
@@ -22,6 +22,7 @@
 
 #include <sal/types.h>
 #include <rtl/ustring.hxx>
+#include "swtypes.hxx"
 
 class SwPaM;
 struct SwPosition;
@@ -187,10 +188,10 @@ public:
         false.
     */
     virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&,
-                                const sal_uInt16 nFlags,bool 
bExpandCharToPara=false) = 0;
+                                const SetAttrMode nFlags = 
SetAttrMode::DEFAULT, bool bExpandCharToPara=false) = 0;
 
     virtual bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&,
-        const sal_uInt16 nFlags) = 0;
+        const SetAttrMode nFlags = SetAttrMode::DEFAULT) = 0;
 
     /** Removes any leading white space from the paragraph
     */
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 2beeb3d..8dc3098 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -231,8 +231,8 @@ public:
                      const bool bMergeIndentValuesOfNumRule = false ) const;
     bool GetCurAttr( SfxItemSet& ,
                      const bool bMergeIndentValuesOfNumRule = false ) const;
-    void SetAttrItem( const SfxPoolItem&, sal_uInt16 nFlags = 0 );
-    void SetAttrSet( const SfxItemSet&, sal_uInt16 nFlags = 0, SwPaM* pCrsr = 
NULL );
+    void SetAttrItem( const SfxPoolItem&, SetAttrMode nFlags = 
SetAttrMode::DEFAULT );
+    void SetAttrSet( const SfxItemSet&, SetAttrMode nFlags = 
SetAttrMode::DEFAULT, SwPaM* pCrsr = NULL );
 
     /** Get RES_CHRATR_* items of one type in the current selection.
      * @param nWhich WhichId of the collected items.
diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx
index c80424d..86e7fd4 100644
--- a/sw/inc/ndhints.hxx
+++ b/sw/inc/ndhints.hxx
@@ -218,7 +218,7 @@ public:
     /// try to insert the hint
     /// @return true iff hint successfully inserted
     bool TryInsertHint( SwTxtAttr * const pHint, SwTxtNode & rNode,
-            const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
+            const SetAttrMode nMode = SetAttrMode::DEFAULT );
 
     bool HasFtn() const          { return m_bFootnote; }
     bool IsInSplitNode() const   { return m_bInSplitNode; }
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 45e3107..3e8d5ca 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -287,18 +287,18 @@ public:
 
     /// Insert pAttr into hints array. @return true iff inserted successfully
     bool    InsertHint( SwTxtAttr * const pAttr,
-                  const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
+                  const SetAttrMode nMode = SetAttrMode::DEFAULT );
     /// create new text attribute from rAttr and insert it
     /// @return     inserted hint; 0 if not sure the hint is inserted
     SwTxtAttr* InsertItem( SfxPoolItem& rAttr,
                   const sal_Int32 nStart, const sal_Int32 nEnd,
-                  const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
+                  const SetAttrMode nMode = SetAttrMode::DEFAULT );
 
     /** Set these attributes at TextNode. If the whole range is comprised
        set them only in AutoAttrSet (SwCntntNode::SetAttr). */
     bool SetAttr( const SfxItemSet& rSet,
                   sal_Int32 nStt, sal_Int32 nEnd,
-                  const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
+                  const SetAttrMode nMode = SetAttrMode::DEFAULT );
     /** Query the attributes of textnode over the range.
        Introduce 4th optional parameter <bMergeIndentValuesOfNumRule>.
        If <bMergeIndentValuesOfNumRule> == true, the indent attributes of
diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx
index 24b0ea0..0773da7 100644
--- a/sw/inc/swtypes.hxx
+++ b/sw/inc/swtypes.hxx
@@ -27,6 +27,7 @@
 #include <com/sun/star/uno/Reference.h>
 #include "swdllapi.h"
 #include <i18nlangtag/languagetag.hxx>
+#include <o3tl/typed_flags_set.hxx>
 
 namespace com { namespace sun { namespace star {
     namespace linguistic2{
@@ -172,28 +173,30 @@ const sal_Unicode cSequenceMarkSeparator = '!';
 
 #define DB_DELIM ((sal_Unicode)0xff)        // Database <-> table separator.
 
-typedef sal_uInt16 SetAttrMode;
-
-namespace nsSetAttrMode
+enum class SetAttrMode
 {
-    const SetAttrMode SETATTR_DEFAULT        = 0x0000;  // Default.
+    DEFAULT         = 0x0000,  // Default.
     /// @attention: DONTEXPAND does not work very well for CHARATR
     ///             because it can expand only the whole AUTOFMT or nothing
-    const SetAttrMode SETATTR_DONTEXPAND     = 0x0001;  // Don't expand text 
attribute any further.
-    const SetAttrMode SETATTR_DONTREPLACE    = 0x0002;  // Don't replace 
another text attribute.
+    DONTEXPAND      = 0x0001,  // Don't expand text attribute any further.
+    DONTREPLACE     = 0x0002,  // Don't replace another text attribute.
 
-    const SetAttrMode SETATTR_NOTXTATRCHR    = 0x0004;  // Don't insert 0xFF 
at attributes with no end.
+    NOTXTATRCHR     = 0x0004,  // Don't insert 0xFF at attributes with no end.
     /// attention: NOHINTADJUST prevents MergePortions!
     /// when using this need to pay attention to ignore start/end flags of hint
-    const SetAttrMode SETATTR_NOHINTADJUST   = 0x0008;  // No merging of 
ranges.
-    const SetAttrMode SETATTR_NOFORMATATTR   = 0x0010;  // Do not change into 
format attribute.
-    const SetAttrMode SETATTR_DONTCHGNUMRULE = 0x0020;  // Do not change 
NumRule.
-    const SetAttrMode SETATTR_APICALL        = 0x0040;  // Called from API 
(all UI related
+    NOHINTADJUST    = 0x0008,  // No merging of ranges.
+    NOFORMATATTR    = 0x0010,  // Do not change into format attribute.
+    DONTCHGNUMRULE  = 0x0020,  // Do not change NumRule.
+    APICALL         = 0x0040,  // Called from API (all UI related
                                                         // functionality will 
be disabled).
     /// Force hint expand (only matters for hints with CH_TXTATR).
-    const SetAttrMode SETATTR_FORCEHINTEXPAND= 0x0080;
+    FORCEHINTEXPAND = 0x0080,
     /// The inserted item is a copy -- intended for use in ndtxt.cxx.
-    const SetAttrMode SETATTR_IS_COPY        = 0x0100;
+    IS_COPY         = 0x0100
+};
+namespace o3tl
+{
+    template<> struct typed_flags<SetAttrMode> : is_typed_flags<SetAttrMode, 
0x1ff> {};
 }
 
 #define SW_ISPRINTABLE( c ) ( c >= ' ' && 127 != c )
diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx
index f5949dd..4d14357 100644
--- a/sw/inc/unocrsrhelper.hxx
+++ b/sw/inc/unocrsrhelper.hxx
@@ -156,7 +156,7 @@ namespace SwUnoCursorHelper
             const SfxItemPropertySet & rPropSet,
             const OUString & rPropertyName,
             const ::com::sun::star::uno::Any & rValue,
-            const SetAttrMode nAttrMode = nsSetAttrMode::SETATTR_DEFAULT,
+            const SetAttrMode nAttrMode = SetAttrMode::DEFAULT,
             const bool bTableMode = false)
         throw (::com::sun::star::beans::UnknownPropertyException,
                 ::com::sun::star::beans::PropertyVetoException,
@@ -169,7 +169,7 @@ namespace SwUnoCursorHelper
             const SfxItemPropertySet & rPropSet,
             const ::com::sun::star::uno::Sequence< 
::com::sun::star::beans::PropertyValue > &
             rPropertyValues,
-            const SetAttrMode nAttrMode = nsSetAttrMode::SETATTR_DEFAULT,
+            const SetAttrMode nAttrMode = SetAttrMode::DEFAULT,
             const bool bTableMode = false)
         throw (::com::sun::star::beans::UnknownPropertyException,
                 ::com::sun::star::beans::PropertyVetoException,
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index dcd0023..f1a4793 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -289,7 +289,7 @@ SwTxtNode* getModelToViewTestDocument(SwDoc *pDoc)
     aPaM.GetPoint()->nContent.Assign(aPaM.GetCntntNode(), 14);
     //set character attribute hidden on range
     SvxCharHiddenItem aHidden(true, RES_CHRATR_HIDDEN);
-    pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, aHidden, 0 );
+    pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, aHidden );
     aPaM.DeleteMark();
 
     //turn on red-lining and show changes
@@ -584,8 +584,8 @@ void SwDocTest::testSwScanner()
 
         SvxLanguageItem aCJKLangItem( LANGUAGE_CHINESE_SIMPLIFIED, 
RES_CHRATR_CJK_LANGUAGE );
         SvxLanguageItem aWestLangItem( LANGUAGE_ENGLISH_US, 
RES_CHRATR_LANGUAGE );
-        m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, 
aCJKLangItem, 0 );
-        m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, 
aWestLangItem, 0 );
+        m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, 
aCJKLangItem );
+        m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, 
aWestLangItem );
 
         SwDocStat aDocStat;
         pTxtNode = aPaM.GetNode().GetTxtNode();
@@ -620,8 +620,8 @@ void SwDocTest::testSwScanner()
 
         SvxLanguageItem aCJKLangItem( LANGUAGE_JAPANESE, 
RES_CHRATR_CJK_LANGUAGE );
         SvxLanguageItem aWestLangItem( LANGUAGE_ENGLISH_US, 
RES_CHRATR_LANGUAGE );
-        m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, 
aCJKLangItem, 0 );
-        m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, 
aWestLangItem, 0 );
+        m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, 
aCJKLangItem );
+        m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, 
aWestLangItem );
 
         SwDocStat aDocStat;
         pTxtNode = aPaM.GetNode().GetTxtNode();
@@ -704,7 +704,7 @@ void SwDocTest::testSwScanner()
         SwPostItField aPostIt(
             
static_cast<SwPostItFieldType*>(m_pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_POSTITFLD)),
 OUString("An Author"),
             OUString("Some Text"), OUString("Initials"), OUString("Name"), 
aDate );
-        m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, 
SwFmtFld(aPostIt), 0);
+        m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, 
SwFmtFld(aPostIt));
 
         m_pDoc->getIDocumentContentOperations().InsertString(aPaM, 
OUString("Apple"));
         pTxtNode = aPaM.GetNode().GetTxtNode();
@@ -923,17 +923,17 @@ void SwDocTest::testMergePortionsDeleteNotSorted()
     aPaM.SetMark();
     aPaM.GetPoint()->nContent = 2;
     aPaM.GetMark()->nContent = 4;
-    rIDCO.InsertPoolItem(aPaM, charFmt, 
IDocumentContentOperations::INS_DEFAULT);
+    rIDCO.InsertPoolItem(aPaM, charFmt);
     aPaM.GetPoint()->nContent = 2;
     aPaM.GetMark()->nContent = 5;
-    rIDCO.InsertPoolItem(aPaM, inetFmt, 
IDocumentContentOperations::INS_DEFAULT);
+    rIDCO.InsertPoolItem(aPaM, inetFmt);
     aPaM.GetPoint()->nContent = 6;
     aPaM.GetMark()->nContent = 8;
-    rIDCO.InsertPoolItem(aPaM, charFmt, 
IDocumentContentOperations::INS_DEFAULT);
+    rIDCO.InsertPoolItem(aPaM, charFmt);
     aPaM.GetPoint()->nContent = 4;
     aPaM.GetMark()->nContent = 6;
     // this triggered an STL assert in SwpHints::MergePortions()
-    rIDCO.InsertPoolItem(aPaM, charFmt, 
IDocumentContentOperations::INS_DEFAULT);
+    rIDCO.InsertPoolItem(aPaM, charFmt);
 }
 
 //See https://bugs.libreoffice.org/show_bug.cgi?id=40599
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index e11fdd2..0d05960 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1888,7 +1888,7 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, 
SwFillMode eFillMode )
                 {
                     *m_pCurCrsr->GetPoint() = aPos;
                     GetDoc()->getIDocumentContentOperations().InsertPoolItem( 
*m_pCurCrsr,
-                            SvxFmtBreakItem( SVX_BREAK_COLUMN_BEFORE, 
RES_BREAK ), 0);
+                            SvxFmtBreakItem( SVX_BREAK_COLUMN_BEFORE, 
RES_BREAK ) );
                 }
             }
 
@@ -1913,7 +1913,7 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, 
SwFillMode eFillMode )
                     if( SVX_ADJUST_LEFT != rAdj.GetAdjust() )
                         aSet.Put( SvxAdjustItem( SVX_ADJUST_LEFT, 
RES_PARATR_ADJUST ) );
 
-                    GetDoc()->getIDocumentContentOperations().InsertItemSet( 
*m_pCurCrsr, aSet, 0 );
+                    GetDoc()->getIDocumentContentOperations().InsertItemSet( 
*m_pCurCrsr, aSet );
                 }
                 else {
                     OSL_ENSURE( false, "No CntntNode" );
@@ -1947,7 +1947,7 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, 
SwFillMode eFillMode )
                     default:
                         break;
                     }
-                    GetDoc()->getIDocumentContentOperations().InsertPoolItem( 
*m_pCurCrsr, aAdj, 0 );
+                    GetDoc()->getIDocumentContentOperations().InsertPoolItem( 
*m_pCurCrsr, aAdj );
                 }
                 break;
             }
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 1f23490..cf399d5 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -1181,7 +1181,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, 
const SwPaM* pRegion,
         // they are not in ReplaceSet
         if( !pSet->Count() )
         {
-            pCrsr->GetDoc()->getIDocumentContentOperations().InsertItemSet( 
*pCrsr, *pReplSet, 0 );
+            pCrsr->GetDoc()->getIDocumentContentOperations().InsertItemSet( 
*pCrsr, *pReplSet );
         }
         else
         {
@@ -1202,7 +1202,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, 
const SwPaM* pRegion,
                 pItem = aIter.NextItem();
             }
             aSet.Put( *pReplSet );
-            pCrsr->GetDoc()->getIDocumentContentOperations().InsertItemSet( 
*pCrsr, aSet, 0 );
+            pCrsr->GetDoc()->getIDocumentContentOperations().InsertItemSet( 
*pCrsr, aSet );
         }
 
         return FIND_NO_RING;
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 9c1f701..94a2e77 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -1205,7 +1205,7 @@ namespace //local functions originally from docfmt.cxx
                     SwFmtPageDesc aNew( *pDesc );
 
                     // Tables now also know line breaks
-                    if( 0 == (nFlags & nsSetAttrMode::SETATTR_APICALL) &&
+                    if( !(nFlags & SetAttrMode::APICALL) &&
                         0 != ( pTblNd = pNode->FindTableNode() ) )
                     {
                         SwTableNode* pCurTblNd = pTblNd;
@@ -1241,7 +1241,7 @@ namespace //local functions originally from docfmt.cxx
 
             // Tables now also know line breaks
             const SvxFmtBreakItem* pBreak;
-            if( pNode && 0 == (nFlags & nsSetAttrMode::SETATTR_APICALL) &&
+            if( pNode && !(nFlags & SetAttrMode::APICALL) &&
                 0 != (pTblNd = pNode->FindTableNode() ) &&
                 SfxItemState::SET == pOtherSet->GetItemState( RES_BREAK,
                             false, reinterpret_cast<const 
SfxPoolItem**>(&pBreak) ) )
@@ -1329,7 +1329,7 @@ namespace //local functions originally from docfmt.cxx
                 // if the selection spans across the whole paragraph.
                 // These attributes are inserted as FormatAttributes and
                 // never override the TextAttributes!
-                if( !(nFlags & nsSetAttrMode::SETATTR_DONTREPLACE ) &&
+                if( !(nFlags & SetAttrMode::DONTREPLACE ) &&
                     pTxtNd->HasHints() && !nMkPos && nPtPos == 
rStr.getLength())
                 {
                     SwIndex aSt( pTxtNd );
@@ -1490,7 +1490,7 @@ namespace //local functions originally from docfmt.cxx
 
         /* Edit the fully selected Nodes. */
         // Reset all attributes from the set!
-        if( pCharSet && pCharSet->Count() && !( 
nsSetAttrMode::SETATTR_DONTREPLACE & nFlags ) )
+        if( pCharSet && pCharSet->Count() && !( SetAttrMode::DONTREPLACE & 
nFlags ) )
         {
             ::sw::DocumentContentOperationsManager::ParaRstFmt aPara( pStt, 
pEnd, pHistory, 0, pCharSet );
             pDoc->GetNodes().ForEach( aSt, aEnd, 
::sw::DocumentContentOperationsManager::lcl_RstTxtAttr, &aPara );
@@ -3868,7 +3868,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( 
SwPaM& rPam, const OUSt
                 *aTmpRange.GetMark() = *aDelPam.GetPoint();
 
                 m_rDoc.RstTxtAttrs( aTmpRange );
-                InsertItemSet( aTmpRange, aSet, 0 );
+                InsertItemSet( aTmpRange, aSet );
             }
 
             if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 1a470e0..2af2a44 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -592,7 +592,7 @@ static void lcl_FormatPostIt(
 
     if (bNewPage)
     {
-        pIDCO->InsertPoolItem( aPam, SvxFmtBreakItem( SVX_BREAK_PAGE_AFTER, 
RES_BREAK ), 0 );
+        pIDCO->InsertPoolItem( aPam, SvxFmtBreakItem( SVX_BREAK_PAGE_AFTER, 
RES_BREAK ) );
         pIDCO->SplitNode( *aPam.GetPoint(), false );
     }
     else if (!bIsFirstPostIt)
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index cfa65b8..a5d9138 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -424,7 +424,7 @@ bool SwDoc::UpdateRsid( const SwPaM &rRg, const sal_Int32 
nLen )
     SfxItemSet aSet(GetAttrPool(), RES_CHRATR_RSID, RES_CHRATR_RSID);
     aSet.Put(aRsid);
     bool const bRet(pTxtNode->SetAttr(aSet, nStart,
-        rRg.GetPoint()->nContent.GetIndex(), nsSetAttrMode::SETATTR_DEFAULT));
+        rRg.GetPoint()->nContent.GetIndex(), SetAttrMode::DEFAULT));
 
     if (bRet && GetIDocumentUndoRedo().DoesUndo())
     {
@@ -1784,7 +1784,7 @@ void SwDoc::SetTxtFmtCollByAutoFmt( const SwPosition& 
rPos, sal_uInt16 nPoolId,
     {
         aPam.SetMark();
         aPam.GetMark()->nContent.Assign(pTNd, pTNd->GetTxt().getLength());
-        getIDocumentContentOperations().InsertItemSet( aPam, *pSet, 0 );
+        getIDocumentContentOperations().InsertItemSet( aPam, *pSet );
     }
 }
 
@@ -1831,13 +1831,13 @@ void SwDoc::SetFmtItemByAutoFmt( const SwPaM& rPam, 
const SfxItemSet& rSet )
         currentSet.Put(currentSet.Get(whichIds[i], true));
     }
 
-    getIDocumentContentOperations().InsertItemSet( rPam, rSet, 
nsSetAttrMode::SETATTR_DONTEXPAND );
+    getIDocumentContentOperations().InsertItemSet( rPam, rSet, 
SetAttrMode::DONTEXPAND );
 
     // fdo#62536: DONTEXPAND does not work when there is already an AUTOFMT
     // here, so insert the old attributes as an empty hint to stop expand
     SwPaM endPam(*pTNd, nEnd);
     endPam.SetMark();
-    getIDocumentContentOperations().InsertItemSet(endPam, currentSet, 
nsSetAttrMode::SETATTR_DEFAULT);
+    getIDocumentContentOperations().InsertItemSet(endPam, currentSet, 
SetAttrMode::DEFAULT);
 
     getIDocumentRedlineAccess().SetRedlineMode_intern( eOld );
 }
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 2729862..4071f96 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -920,7 +920,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTxtFmtColls *const 
pTxtFmtCollTbl,
                 {
                     SwFmtCharFmt aCharFmt( pCharFmt );
                     pNew->InsertItem( aCharFmt, 0,
-                        nSepIdx + 1, nsSetAttrMode::SETATTR_DONTEXPAND );
+                        nSepIdx + 1, SetAttrMode::DONTEXPAND );
                 }
             }
         }
@@ -1212,7 +1212,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTxtFmtColls *const 
pTxtFmtCollTbl,
                 {
                     SwFmtCharFmt aCharFmt( pCharFmt );
                     pNew->InsertItem( aCharFmt, 0, nSepIdx + 1,
-                            nsSetAttrMode::SETATTR_DONTEXPAND );
+                            SetAttrMode::DONTEXPAND );
                 }
             }
         }
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 8214379..8f6c0d9 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -880,7 +880,7 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
         }
         if (!sListId.isEmpty())
         {
-            getIDocumentContentOperations().InsertPoolItem( rPam, 
SfxStringItem( RES_PARATR_LIST_ID, sListId ), 0 );
+            getIDocumentContentOperations().InsertPoolItem( rPam, 
SfxStringItem( RES_PARATR_LIST_ID, sListId ) );
         }
     }
 
@@ -920,7 +920,7 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
 
     if ( bSetItem )
     {
-        getIDocumentContentOperations().InsertPoolItem( rPam, SwNumRuleItem( 
pNewOrChangedNumRule->GetName() ), 0 );
+        getIDocumentContentOperations().InsertPoolItem( rPam, SwNumRuleItem( 
pNewOrChangedNumRule->GetName() ) );
     }
 
     if ( bResetIndentAttrs
@@ -946,7 +946,7 @@ void SwDoc::SetCounted(const SwPaM & rPam, bool bCounted)
     }
     else
     {
-        getIDocumentContentOperations().InsertPoolItem( rPam, SfxBoolItem( 
RES_PARATR_LIST_ISCOUNTED, false ), 0 );
+        getIDocumentContentOperations().InsertPoolItem( rPam, SfxBoolItem( 
RES_PARATR_LIST_ISCOUNTED, false ) );
     }
 }
 
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index ec1e7f9..4c49adf 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -651,11 +651,11 @@ void SwRedlineExtraData_FmtColl::Reject( SwPaM& rPam ) 
const
                 // could have changed, but we don't touch these.
                 SfxItemSet aTmp( *pSet );
                 aTmp.Differentiate( *pTNd->GetpSwAttrSet() );
-                pDoc->getIDocumentContentOperations().InsertItemSet( rPam, 
aTmp, 0 );
+                pDoc->getIDocumentContentOperations().InsertItemSet( rPam, 
aTmp );
             }
             else
             {
-                pDoc->getIDocumentContentOperations().InsertItemSet( rPam, 
*pSet, 0 );
+                pDoc->getIDocumentContentOperations().InsertItemSet( rPam, 
*pSet );
             }
         }
         rPam.DeleteMark();
@@ -720,7 +720,7 @@ void SwRedlineExtraData_Format::Reject( SwPaM& rPam ) const
     for( it = aWhichIds.begin(); it != aWhichIds.end(); ++it )
     {
         pDoc->getIDocumentContentOperations().InsertPoolItem( rPam, 
*GetDfltAttr( *it ),
-            nsSetAttrMode::SETATTR_DONTEXPAND );
+            SetAttrMode::DONTEXPAND );
     }
 
     pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld );
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx
index e2e6764..6e3fb3d 100644
--- a/sw/source/core/doc/docruby.cxx
+++ b/sw/source/core/doc/docruby.cxx
@@ -127,7 +127,7 @@ sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const 
SwRubyList& rList,
                         // set/reset the attribute
                         if( !pEntry->GetRubyAttr().GetText().isEmpty() )
                         {
-                            getIDocumentContentOperations().InsertPoolItem( 
aPam, pEntry->GetRubyAttr(), 0 );
+                            getIDocumentContentOperations().InsertPoolItem( 
aPam, pEntry->GetRubyAttr() );
                         }
                         else
                         {
@@ -163,7 +163,7 @@ sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const 
SwRubyList& rList,
                             aPam.SetMark();
                             aPam.GetMark()->nContent -= 
pEntry->GetText().getLength();
                             getIDocumentContentOperations().InsertPoolItem(
-                                aPam, pEntry->GetRubyAttr(), 
nsSetAttrMode::SETATTR_DONTEXPAND );
+                                aPam, pEntry->GetRubyAttr(), 
SetAttrMode::DONTEXPAND );
                         }
                         else
                             break;
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index aa05171..3f3d357 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1804,7 +1804,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
     if(pPageNoCharFmt)
     {
         SwFmtCharFmt aCharFmt( pPageNoCharFmt );
-        pNd->InsertItem(aCharFmt, nStartPos, nStartPos + aNumStr.getLength(), 
nsSetAttrMode::SETATTR_DONTEXPAND);
+        pNd->InsertItem(aCharFmt, nStartPos, nStartPos + aNumStr.getLength(), 
SetAttrMode::DONTEXPAND);
     }
 
     // The main entries should get their character style
@@ -1832,7 +1832,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
         {
             sal_Int32 nStartIdx = (*xCharStyleIdx)[j] + nOffset;
             sal_Int32 nEndIdx   = (*xCharStyleIdx)[j + 1]  + nOffset;
-            pNd->InsertItem(aCharFmt, nStartIdx, nEndIdx, 
nsSetAttrMode::SETATTR_DONTEXPAND);
+            pNd->InsertItem(aCharFmt, nStartIdx, nEndIdx, 
SetAttrMode::DONTEXPAND);
         }
 
     }
diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx
index c3bfa25..ce348ef 100644
--- a/sw/source/core/doc/extinput.cxx
+++ b/sw/source/core/doc/extinput.cxx
@@ -81,7 +81,7 @@ SwExtTextInput::~SwExtTextInput()
                 if ( bLang )
                 {
                     SvxLanguageItem aLangItem( eInputLanguage, nWhich );
-                    
pDoc->getIDocumentContentOperations().InsertPoolItem(*this, aLangItem, 0 );
+                    
pDoc->getIDocumentContentOperations().InsertPoolItem(*this, aLangItem );
                 }
             }
             rIdx = nSttCnt;
diff --git a/sw/source/core/doc/textboxhelper.cxx 
b/sw/source/core/doc/textboxhelper.cxx
index 28471b48..eb9ed84 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -393,7 +393,7 @@ void SwTextBoxHelper::syncProperty(SwFrmFmt* pShape, const 
OUString& rPropertyNa
                         aPaM.GetMark()->nNode = *pMark;
                         aPaM.GetMark()->nContent.Assign(pMark, 
pMark->GetTxt().getLength());
                         SvxCharRotateItem aItem(900, false, RES_CHRATR_ROTATE);
-                        
pFmt->GetDoc()->getIDocumentContentOperations().InsertPoolItem(aPaM, aItem, 0);
+                        
pFmt->GetDoc()->getIDocumentContentOperations().InsertPoolItem(aPaM, aItem);
                     }
                 }
             }
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 622e624..b69d81f 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -575,7 +575,7 @@ bool SwAutoFormat::DoUnderline()
         aBox.SetLine( &aLine, BOX_LINE_BOTTOM );
         aBox.SetDistance( 42 );     // ~0,75 mm
         aSet.Put(aBox);
-        m_pDoc->getIDocumentContentOperations().InsertItemSet( m_aDelPam, 
aSet, 0 );
+        m_pDoc->getIDocumentContentOperations().InsertItemSet( m_aDelPam, aSet 
);
 
         m_aDelPam.DeleteMark();
     }
diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx
index 4b08a62..8a79819 100644
--- a/sw/source/core/edit/edatmisc.cxx
+++ b/sw/source/core/edit/edatmisc.cxx
@@ -95,7 +95,7 @@ const SfxPoolItem& SwEditShell::GetDefault( sal_uInt16 
nFmtHint ) const
     return GetDoc()->GetDefault( nFmtHint );
 }
 
-void SwEditShell::SetAttrItem( const SfxPoolItem& rHint, sal_uInt16 nFlags )
+void SwEditShell::SetAttrItem( const SfxPoolItem& rHint, SetAttrMode nFlags )
 {
     SET_CURR_SHELL( this );
     StartAllAction();
@@ -125,7 +125,7 @@ void SwEditShell::SetAttrItem( const SfxPoolItem& rHint, 
sal_uInt16 nFlags )
     EndAllAction();
 }
 
-void SwEditShell::SetAttrSet( const SfxItemSet& rSet, sal_uInt16 nFlags, 
SwPaM* pPaM )
+void SwEditShell::SetAttrSet( const SfxItemSet& rSet, SetAttrMode nFlags, 
SwPaM* pPaM )
 {
     SET_CURR_SHELL( this );
 
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index 6d83602..6e05a4a 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -201,8 +201,8 @@ void SwEditShell::Insert2(SwField& rFld, const bool 
bForceExpandHints)
     SwFmtFld aFld( rFld );
 
     const SetAttrMode nInsertFlags = (bForceExpandHints)
-        ? nsSetAttrMode::SETATTR_FORCEHINTEXPAND
-        : nsSetAttrMode::SETATTR_DEFAULT;
+        ? SetAttrMode::FORCEHINTEXPAND
+        : SetAttrMode::DEFAULT;
 
     for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) // for each PaM
     {
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 3809289..9263327 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -1172,13 +1172,13 @@ void SwEditShell::ApplyChangedSentence(const 
::svx::SpellPortions& rNewPortions,
                     
mpDoc->getIDocumentContentOperations().DeleteAndJoin(*pCrsr);
                     // ... and apply language if necessary
                     if(aCurrentNewPortion->eLanguage != 
aCurrentOldPortion->eLanguage)
-                        SetAttrItem( 
SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId), nLangWhichId );
+                        SetAttrItem( 
SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId) );
                     
mpDoc->getIDocumentContentOperations().InsertString(*pCrsr, 
aCurrentNewPortion->sText);
                 }
                 else if(aCurrentNewPortion->eLanguage != 
aCurrentOldPortion->eLanguage)
                 {
                     // apply language
-                    SetAttrItem( 
SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId), nLangWhichId );
+                    SetAttrItem( 
SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId) );
                 }
                 else if( aCurrentNewPortion->bIgnoreThisError )
                 {

... etc. - the rest is truncated
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to