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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu May 23 09:12:15 UTC 2019


 sw/inc/IDocumentRedlineAccess.hxx                       |   62 +++++-------
 sw/inc/docary.hxx                                       |    7 -
 sw/inc/redline.hxx                                      |   24 ++--
 sw/qa/extras/uiwriter/uiwriter.cxx                      |    2 
 sw/qa/extras/uiwriter/uiwriter2.cxx                     |    2 
 sw/source/core/access/accpara.cxx                       |    7 -
 sw/source/core/access/parachangetrackinginfo.cxx        |    8 -
 sw/source/core/crsr/crstrvl.cxx                         |    2 
 sw/source/core/crsr/findtxt.cxx                         |    2 
 sw/source/core/crsr/swcrsr.cxx                          |    4 
 sw/source/core/doc/DocumentContentOperationsManager.cxx |   36 +++----
 sw/source/core/doc/DocumentFieldsManager.cxx            |    2 
 sw/source/core/doc/DocumentRedlineManager.cxx           |   80 ++++++++--------
 sw/source/core/doc/doccomp.cxx                          |   18 +--
 sw/source/core/doc/docfmt.cxx                           |    4 
 sw/source/core/doc/docnum.cxx                           |   14 +-
 sw/source/core/doc/docredln.cxx                         |   66 ++++++-------
 sw/source/core/doc/docsort.cxx                          |   10 +-
 sw/source/core/doc/doctxm.cxx                           |    2 
 sw/source/core/doc/ftnidx.cxx                           |    2 
 sw/source/core/doc/tblrwcl.cxx                          |    6 -
 sw/source/core/docnode/ndsect.cxx                       |    2 
 sw/source/core/docnode/ndtbl.cxx                        |    4 
 sw/source/core/edit/autofmt.cxx                         |    2 
 sw/source/core/edit/edatmisc.cxx                        |    2 
 sw/source/core/edit/edfcol.cxx                          |    2 
 sw/source/core/edit/edlingu.cxx                         |    4 
 sw/source/core/fields/postithelper.cxx                  |    4 
 sw/source/core/inc/DocumentRedlineManager.hxx           |    6 -
 sw/source/core/layout/frmtool.cxx                       |    2 
 sw/source/core/layout/ssfrm.cxx                         |    2 
 sw/source/core/layout/wsfrm.cxx                         |    4 
 sw/source/core/table/swtable.cxx                        |    4 
 sw/source/core/text/frmform.cxx                         |    2 
 sw/source/core/text/frmpaint.cxx                        |    4 
 sw/source/core/text/porlay.cxx                          |    4 
 sw/source/core/text/porrst.cxx                          |    2 
 sw/source/core/text/redlnitr.cxx                        |   28 ++---
 sw/source/core/text/redlnitr.hxx                        |    2 
 sw/source/core/txtnode/ndtxt.cxx                        |    4 
 sw/source/core/txtnode/txtedt.cxx                       |    4 
 sw/source/core/undo/unattr.cxx                          |    8 -
 sw/source/core/undo/undel.cxx                           |    4 
 sw/source/core/undo/undobj.cxx                          |    6 -
 sw/source/core/undo/unins.cxx                           |   10 +-
 sw/source/core/undo/unovwr.cxx                          |    6 -
 sw/source/core/undo/unredln.cxx                         |   18 +--
 sw/source/core/undo/unsect.cxx                          |    4 
 sw/source/core/undo/unspnd.cxx                          |    4 
 sw/source/core/undo/untbl.cxx                           |   12 +-
 sw/source/core/undo/untblk.cxx                          |    4 
 sw/source/core/unocore/unocrsrhelper.cxx                |   26 ++---
 sw/source/core/unocore/unoredline.cxx                   |    6 -
 sw/source/filter/ascii/ascatr.cxx                       |    4 
 sw/source/filter/basflt/shellio.cxx                     |    2 
 sw/source/filter/inc/fltshell.hxx                       |    8 -
 sw/source/filter/inc/msfilter.hxx                       |    4 
 sw/source/filter/ww8/attributeoutputbase.hxx            |    2 
 sw/source/filter/ww8/docxattributeoutput.cxx            |   46 ++++-----
 sw/source/filter/ww8/rtfattributeoutput.cxx             |    4 
 sw/source/filter/ww8/writerhelper.cxx                   |    8 -
 sw/source/filter/ww8/wrtw8nds.cxx                       |   26 ++---
 sw/source/filter/ww8/ww8atr.cxx                         |    2 
 sw/source/filter/ww8/ww8par.hxx                         |    2 
 sw/source/filter/ww8/ww8par2.cxx                        |    2 
 sw/source/filter/ww8/ww8par4.cxx                        |   12 +-
 sw/source/filter/xml/XMLRedlineImportHelper.cxx         |   18 +--
 sw/source/uibase/docvw/edtwin2.cxx                      |   21 ++--
 sw/source/uibase/inc/redlndlg.hxx                       |    2 
 sw/source/uibase/misc/redlndlg.cxx                      |   65 ++++++-------
 sw/source/uibase/shells/textfld.cxx                     |   12 +-
 sw/source/uibase/uno/unotxdoc.cxx                       |    2 
 72 files changed, 400 insertions(+), 398 deletions(-)

New commits:
commit 28bff4bd3947f442c0aebb92217cd0c7b6a53bda
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed May 22 14:36:02 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu May 23 11:11:11 2019 +0200

    convert nsRedlineType_t to scoped enum
    
    and move the auto-format embedded flag to a separate field
    
    Change-Id: I02155702389178fbfdf874f592d47a29f8759974
    Reviewed-on: https://gerrit.libreoffice.org/72771
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/inc/IDocumentRedlineAccess.hxx b/sw/inc/IDocumentRedlineAccess.hxx
index df2091ce6009..7592de03411d 100644
--- a/sw/inc/IDocumentRedlineAccess.hxx
+++ b/sw/inc/IDocumentRedlineAccess.hxx
@@ -60,40 +60,36 @@ namespace o3tl
     template<> struct typed_flags<RedlineFlags> : is_typed_flags<RedlineFlags, 0x533> {};
 }
 
-typedef sal_uInt16 RedlineType_t;
-namespace nsRedlineType_t
+enum class RedlineType : sal_uInt16
 {
     // Range of RedlineTypes is 0 to 127.
-    const RedlineType_t REDLINE_INSERT = 0x0;// Content has been inserted.
-    const RedlineType_t REDLINE_DELETE = 0x1;// Content has been deleted.
-    const RedlineType_t REDLINE_FORMAT = 0x2;// Attributes have been applied.
-    const RedlineType_t REDLINE_TABLE = 0x3;// Table structure has been altered.
-    const RedlineType_t REDLINE_FMTCOLL = 0x4;// Style has been altered (Autoformat!).
-    const RedlineType_t REDLINE_PARAGRAPH_FORMAT = 0x5;// Paragraph attributes have been changed.
-    const RedlineType_t REDLINE_TABLE_ROW_INSERT = 0x6;// Table row has been inserted.
-    const RedlineType_t REDLINE_TABLE_ROW_DELETE = 0x7;// Table row has been deleted.
-    const RedlineType_t REDLINE_TABLE_CELL_INSERT = 0x8;// Table cell has been inserted.
-    const RedlineType_t REDLINE_TABLE_CELL_DELETE = 0x9;// Table cell has been deleted.
-
-    // When larger than 128, flags can be inserted.
-    const RedlineType_t REDLINE_NO_FLAG_MASK = 0x7F;
-    const RedlineType_t REDLINE_FORM_AUTOFMT = 0x80;// Can be a flag in RedlineType.
-
-    inline OUString SwRedlineTypeToOUString(RedlineType_t eType)
+    Insert = 0x0,// Content has been inserted.
+    Delete = 0x1,// Content has been deleted.
+    Format = 0x2,// Attributes have been applied.
+    Table = 0x3,// Table structure has been altered.
+    FmtColl = 0x4,// Style has been altered (Autoformat!).
+    ParagraphFormat = 0x5,// Paragraph attributes have been changed.
+    TableRowInsert = 0x6,// Table row has been inserted.
+    TableRowDelete = 0x7,// Table row has been deleted.
+    TableCellInsert = 0x8,// Table cell has been inserted.
+    TableCellDelete = 0x9,// Table cell has been deleted.
+    Any = USHRT_MAX // special value to indicate any redline type in some method calls
+};
+inline OUString SwRedlineTypeToOUString(RedlineType eType)
+{
+    OUString sRet;
+    switch(eType)
     {
-        OUString sRet;
-        switch(eType & nsRedlineType_t::REDLINE_NO_FLAG_MASK)
-        {
-            case nsRedlineType_t::REDLINE_INSERT: sRet = "Insert"; break;
-            case nsRedlineType_t::REDLINE_DELETE: sRet = "Delete"; break;
-            case nsRedlineType_t::REDLINE_FORMAT: sRet = "Format"; break;
-            case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT: sRet = "ParagraphFormat"; break;
-            case nsRedlineType_t::REDLINE_TABLE:  sRet = "TextTable"; break;
-            case nsRedlineType_t::REDLINE_FMTCOLL:sRet = "Style"; break;
-        }
-        return sRet;
+        case RedlineType::Insert: sRet = "Insert"; break;
+        case RedlineType::Delete: sRet = "Delete"; break;
+        case RedlineType::Format: sRet = "Format"; break;
+        case RedlineType::ParagraphFormat: sRet = "ParagraphFormat"; break;
+        case RedlineType::Table:  sRet = "TextTable"; break;
+        case RedlineType::FmtColl:sRet = "Style"; break;
+        default: break;
     }
-}
+    return sRet;
+};
 
 class IDocumentRedlineAccess
 {
@@ -177,16 +173,16 @@ public:
     virtual bool DeleteRedline(
         /*[in]*/const SwPaM& rPam,
         /*[in]*/bool bSaveInUndo,
-        /*[in]*/sal_uInt16 nDelType) = 0;
+        /*[in]*/RedlineType nDelType) = 0;
 
     virtual bool DeleteRedline(
         /*[in]*/const SwStartNode& rSection,
         /*[in]*/bool bSaveInUndo,
-        /*[in]*/sal_uInt16 nDelType) = 0;
+        /*[in]*/RedlineType nDelType) = 0;
 
     virtual SwRedlineTable::size_type GetRedlinePos(
         /*[in]*/const SwNode& rNode,
-        /*[in]*/sal_uInt16 nType) const = 0;
+        /*[in]*/RedlineType nType) const = 0;
 
     virtual void CompressRedlines() = 0;
 
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index d0fda5beefa8..6eaaf14b3941 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -44,6 +44,7 @@ class SwTable;
 class SwTableLine;
 class SwTableBox;
 struct SwPosition;
+enum class RedlineType : sal_uInt16;
 
 /** provides some methods for generic operations on lists that contain SwFormat* subclasses. */
 class SwFormatsBase
@@ -396,9 +397,9 @@ public:
     sal_uInt16 GetSize() const                              {     return m_aExtraRedlines.size();                }
     SwExtraRedline* GetRedline( sal_uInt16 uIndex ) const   {     return m_aExtraRedlines.operator[]( uIndex );  }
 
-    SW_DLLPUBLIC bool DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rTable, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete );
-    bool DeleteTableRowRedline ( SwDoc* pDoc, const SwTableLine& rTableLine, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete );
-    bool DeleteTableCellRedline( SwDoc* pDoc, const SwTableBox& rTableBox, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete );
+    SW_DLLPUBLIC bool DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rTable, bool bSaveInUndo, RedlineType nRedlineTypeToDelete );
+    bool DeleteTableRowRedline ( SwDoc* pDoc, const SwTableLine& rTableLine, bool bSaveInUndo, RedlineType nRedlineTypeToDelete );
+    bool DeleteTableCellRedline( SwDoc* pDoc, const SwTableBox& rTableBox, bool bSaveInUndo, RedlineType nRedlineTypeToDelete );
 };
 
 typedef std::vector<SwOLENode*> SwOLENodes;
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index 030e160c6dfe..5cf4cba8dd08 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -111,16 +111,17 @@ class SW_DLLPUBLIC SwRedlineData
 
     OUString m_sComment;
     DateTime m_aStamp;
-    RedlineType_t m_eType;
+    RedlineType m_eType;
+    bool m_bAutoFormat;
     std::size_t const m_nAuthor;
     sal_uInt16 m_nSeqNo;
 
 public:
-    SwRedlineData( RedlineType_t eT, std::size_t nAut );
+    SwRedlineData( RedlineType eT, std::size_t nAut );
     SwRedlineData( const SwRedlineData& rCpy, bool bCpyNext = true );
 
     // For sw3io: pNext/pExtraData are taken over.
-    SwRedlineData( RedlineType_t eT, std::size_t nAut, const DateTime& rDT,
+    SwRedlineData( RedlineType eT, std::size_t nAut, const DateTime& rDT,
                    const OUString& rCmnt, SwRedlineData* pNxt );
 
     ~SwRedlineData();
@@ -129,6 +130,7 @@ public:
         {
             return m_nAuthor == rCmp.m_nAuthor &&
                     m_eType == rCmp.m_eType &&
+                    m_bAutoFormat == rCmp.m_bAutoFormat &&
                     m_sComment == rCmp.m_sComment &&
                     (( !m_pNext && !rCmp.m_pNext ) ||
                         ( m_pNext && rCmp.m_pNext && *m_pNext == *rCmp.m_pNext )) &&
@@ -139,8 +141,7 @@ public:
     bool operator!=( const SwRedlineData& rCmp ) const
         {   return !operator==( rCmp ); }
 
-    RedlineType_t GetType() const
-        { return static_cast<RedlineType_t>(m_eType & nsRedlineType_t::REDLINE_NO_FLAG_MASK); }
+    RedlineType GetType() const { return m_eType; }
 
     std::size_t GetAuthor() const                { return m_nAuthor; }
     const OUString& GetComment() const        { return m_sComment; }
@@ -150,8 +151,8 @@ public:
     void SetComment( const OUString& rS )     { m_sComment = rS; }
     void SetTimeStamp( const DateTime& rDT ) { m_aStamp = rDT; }
 
-    void SetAutoFormatFlag()
-        { m_eType = static_cast<RedlineType_t>(m_eType | nsRedlineType_t::REDLINE_FORM_AUTOFMT); }
+    void SetAutoFormat() { m_bAutoFormat = true; }
+    bool IsAutoFormat() const { return m_bAutoFormat; }
     bool CanCombine( const SwRedlineData& rCmp ) const;
 
     // ExtraData gets copied, the pointer is therefore not taken over by
@@ -186,7 +187,7 @@ class SW_DLLPUBLIC SwRangeRedline : public SwPaM
 public:
     static sal_uInt32 m_nLastId;
 
-    SwRangeRedline( RedlineType_t eType, const SwPaM& rPam );
+    SwRangeRedline( RedlineType eType, const SwPaM& rPam );
     SwRangeRedline( const SwRedlineData& rData, const SwPaM& rPam );
     SwRangeRedline( const SwRedlineData& rData, const SwPosition& rPos );
     // For sw3io: pData is taken over!
@@ -215,15 +216,14 @@ public:
     const SwRedlineData& GetRedlineData(sal_uInt16 nPos = 0) const;
     bool operator!=( const SwRedlineData& rCmp ) const
         { return *m_pRedlineData != rCmp; }
-    void SetAutoFormatFlag()               { m_pRedlineData->SetAutoFormatFlag(); }
+    void SetAutoFormat() { m_pRedlineData->SetAutoFormat(); }
+    bool IsAutoFormat() const { return m_pRedlineData->IsAutoFormat(); }
 
     sal_uInt16 GetStackCount() const;
     std::size_t GetAuthor( sal_uInt16 nPos = 0) const;
     OUString const & GetAuthorString( sal_uInt16 nPos = 0 ) const;
     const DateTime& GetTimeStamp( sal_uInt16 nPos = 0) const;
-    RedlineType_t GetRealType( sal_uInt16 nPos = 0 ) const;
-    RedlineType_t GetType( sal_uInt16 nPos = 0) const
-        { return static_cast<RedlineType_t>(GetRealType( nPos ) & nsRedlineType_t::REDLINE_NO_FLAG_MASK); }
+    RedlineType GetType( sal_uInt16 nPos = 0 ) const;
     const OUString& GetComment( sal_uInt16 nPos = 0 ) const;
 
     void SetComment( const OUString& rS ) { m_pRedlineData->SetComment( rS ); }
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index a5f874f8b964..1e117ce3996d 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -1952,7 +1952,7 @@ void SwUiWriterTest::testDeleteTableRedlines()
     SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTable.GetTableBox("C1"))), "TableCellInsert", aDescriptor);
     IDocumentRedlineAccess& rIDRA = pDoc->getIDocumentRedlineAccess();
     SwExtraRedlineTable& rExtras = rIDRA.GetExtraRedlineTable();
-    rExtras.DeleteAllTableRedlines(pDoc, rTable, false, sal_uInt16(USHRT_MAX));
+    rExtras.DeleteAllTableRedlines(pDoc, rTable, false, RedlineType::Any);
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(0), rExtras.GetSize());
 }
 
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 4df901c34608..7bf5df086ab5 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -314,7 +314,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf109376_redline)
 
     IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
     rIDRA.SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowInsert | RedlineFlags::ShowDelete);
-    rIDRA.AppendRedline(new SwRangeRedline(nsRedlineType_t::REDLINE_DELETE, pam), true);
+    rIDRA.AppendRedline(new SwRangeRedline(RedlineType::Delete, pam), true);
     // this used to assert/crash with m_pAnchoredFlys mismatch because the
     // fly was not deleted but its anchor was moved to the SwTableNode
     rIDRA.AcceptAllRedline(true);
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 32bf6cb8b6dc..dc87d1ebe943 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1863,15 +1863,16 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex,
         {
             switch( pRedline->GetType())
             {
-            case nsRedlineType_t::REDLINE_INSERT:
+            case RedlineType::Insert:
                 aChangeAttr = pOpt->GetInsertAuthorAttr();
                 break;
-            case nsRedlineType_t::REDLINE_DELETE:
+            case RedlineType::Delete:
                 aChangeAttr = pOpt->GetDeletedAuthorAttr();
                 break;
-            case nsRedlineType_t::REDLINE_FORMAT:
+            case RedlineType::Format:
                 aChangeAttr = pOpt->GetFormatAuthorAttr();
                 break;
+            default: break;
             }
         }
         switch( aChangeAttr.m_nItemId )
diff --git a/sw/source/core/access/parachangetrackinginfo.cxx b/sw/source/core/access/parachangetrackinginfo.cxx
index b8544b891f78..8ddeee61a344 100644
--- a/sw/source/core/access/parachangetrackinginfo.cxx
+++ b/sw/source/core/access/parachangetrackinginfo.cxx
@@ -61,7 +61,7 @@ namespace {
         }
 
         const SwRedlineTable::size_type nIdxOfFirstRedlineForTextNode =
-                    rIDocChangeTrack.GetRedlinePos( rTextNode, USHRT_MAX );
+                    rIDocChangeTrack.GetRedlinePos( rTextNode, RedlineType::Any );
         if ( nIdxOfFirstRedlineForTextNode == SwRedlineTable::npos )
         {
             // nothing to do --> empty change track text markup lists.
@@ -105,17 +105,17 @@ namespace {
             SwWrongList* pMarkupList( nullptr );
             switch ( pActRedline->GetType() )
             {
-                case nsRedlineType_t::REDLINE_INSERT:
+                case RedlineType::Insert:
                 {
                     pMarkupList = opChangeTrackInsertionTextMarkupList.get();
                 }
                 break;
-                case nsRedlineType_t::REDLINE_DELETE:
+                case RedlineType::Delete:
                 {
                     pMarkupList = opChangeTrackDeletionTextMarkupList.get();
                 }
                 break;
-                case nsRedlineType_t::REDLINE_FORMAT:
+                case RedlineType::Format:
                 {
                     pMarkupList = opChangeTrackFormatChangeTextMarkupList.get();
                 }
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index a593db4de4bd..9c0d9c130150 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -2250,7 +2250,7 @@ const SwRangeRedline* SwCursorShell::GotoRedline_( SwRedlineTable::size_type nAr
         if( pFnd && bSelect )
         {
             m_pCurrentCursor->SetMark();
-            if( nsRedlineType_t::REDLINE_FMTCOLL == pFnd->GetType() )
+            if( RedlineType::FmtColl == pFnd->GetType() )
             {
                 pCNd = pIdx->GetNode().GetContentNode();
                 m_pCurrentCursor->GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 8503a98c17c2..def2a7529d72 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -1069,7 +1069,7 @@ bool ReplaceImpl(
                 ++tmp;
                 continue;
             }
-            if (pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE)
+            if (pRedline->GetType() == RedlineType::Delete)
             {
                 assert(*pRedline->Start() != *pRedline->End());
                 // search in hidden layout can't overlap redlines
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index cd58106998bc..5509b9f33027 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1504,14 +1504,14 @@ static OUString lcl_MaskDeletedRedlines( const SwTextNode* pTextNd )
         const bool bShowChg = IDocumentRedlineAccess::IsShowChanges( rDoc.getIDocumentRedlineAccess().GetRedlineFlags() );
         if ( bShowChg )
         {
-            SwRedlineTable::size_type nAct = rDoc.getIDocumentRedlineAccess().GetRedlinePos( *pTextNd, USHRT_MAX );
+            SwRedlineTable::size_type nAct = rDoc.getIDocumentRedlineAccess().GetRedlinePos( *pTextNd, RedlineType::Any );
             for ( ; nAct < rDoc.getIDocumentRedlineAccess().GetRedlineTable().size(); nAct++ )
             {
                 const SwRangeRedline* pRed = rDoc.getIDocumentRedlineAccess().GetRedlineTable()[ nAct ];
                 if ( pRed->Start()->nNode > pTextNd->GetIndex() )
                     break;
 
-                if( nsRedlineType_t::REDLINE_DELETE == pRed->GetType() )
+                if( RedlineType::Delete == pRed->GetType() )
                 {
                     sal_Int32 nStart, nEnd;
                     pRed->CalcStartEnd( pTextNd->GetIndex(), nStart, nEnd );
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 1fe99be1dd2a..7e2d3e415148 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -336,7 +336,7 @@ namespace
             for( ; n < rTable.size(); ++n )
             {
                 const SwRangeRedline* pRedl = rTable[ n ];
-                if( nsRedlineType_t::REDLINE_DELETE == pRedl->GetType() && pRedl->IsVisible() )
+                if( RedlineType::Delete == pRedl->GetType() && pRedl->IsVisible() )
                 {
                     const SwPosition *pRStt = pRedl->Start(), *pREnd = pRedl->End();
 
@@ -823,7 +823,7 @@ namespace
         {
             rSvRedLine.SetPos( nInsPos );
             pDoc->getIDocumentRedlineAccess().AppendRedline( rSvRedLine.pRedl, true );
-            if (rSvRedLine.pRedl->GetType() == nsRedlineType_t::REDLINE_DELETE)
+            if (rSvRedLine.pRedl->GetType() == RedlineType::Delete)
             {
                 UpdateFramesForAddDeleteRedline(*pDoc, *rSvRedLine.pRedl);
             }
@@ -1245,7 +1245,7 @@ namespace //local functions originally from docfmt.cxx
                             pUndo->SaveRedlineData( aPam, true );
 
                         if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
-                            pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
+                            pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, aPam ), true);
                         else
                             pDoc->getIDocumentRedlineAccess().SplitRedline( aPam );
                     }
@@ -1289,7 +1289,7 @@ namespace //local functions originally from docfmt.cxx
                         if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
                             pDoc->getIDocumentRedlineAccess().AppendRedline(
                                 new SwRangeRedline(
-                                    bTextIns ? nsRedlineType_t::REDLINE_INSERT : nsRedlineType_t::REDLINE_FORMAT, aPam ),
+                                    bTextIns ? RedlineType::Insert : RedlineType::Format, aPam ),
                                     true);
                         else if( bTextIns )
                             pDoc->getIDocumentRedlineAccess().SplitRedline( aPam );
@@ -1483,7 +1483,7 @@ namespace //local functions originally from docfmt.cxx
 
                     if( pUndo )
                         pUndo->SaveRedlineData( aPam, false );
-                    pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_FORMAT, aPam ), true);
+                    pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Format, aPam ), true);
                 }
             }
             if( pOtherSet && pOtherSet->Count() )
@@ -1505,7 +1505,7 @@ namespace //local functions originally from docfmt.cxx
         {
             if( pUndo )
                 pUndo->SaveRedlineData( rRg, false );
-            pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_FORMAT, rRg ), true);
+            pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Format, rRg ), true);
         }
 
         /* now if range */
@@ -1841,7 +1841,7 @@ DocumentContentOperationsManager::CopyRange( SwPaM& rPam, SwPosition& rPos, cons
     if( pRedlineRange )
     {
         if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
-            pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, *pRedlineRange ), true);
+            pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, *pRedlineRange ), true);
         else
             pDoc->getIDocumentRedlineAccess().SplitRedline( *pRedlineRange );
         delete pRedlineRange;
@@ -1862,7 +1862,7 @@ void DocumentContentOperationsManager::DeleteSection( SwNode *pNode )
 
     // delete all Flys, Bookmarks, ...
     DelFlyInRange( aSttIdx, aEndIdx );
-    m_rDoc.getIDocumentRedlineAccess().DeleteRedline( *pSttNd, true, USHRT_MAX );
+    m_rDoc.getIDocumentRedlineAccess().DeleteRedline( *pSttNd, true, RedlineType::Any );
     DelBookmarks(aSttIdx, aEndIdx);
 
     {
@@ -2340,7 +2340,7 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod
 
         // Find all RedLines that end at the InsPos.
         // These have to be moved back to the "old" position after the Move.
-        SwRedlineTable::size_type nRedlPos = m_rDoc.getIDocumentRedlineAccess().GetRedlinePos( rPos.GetNode(), USHRT_MAX );
+        SwRedlineTable::size_type nRedlPos = m_rDoc.getIDocumentRedlineAccess().GetRedlinePos( rPos.GetNode(), RedlineType::Any );
         if( SwRedlineTable::npos != nRedlPos )
         {
             const SwPosition *pRStt, *pREnd;
@@ -2554,14 +2554,14 @@ bool DocumentContentOperationsManager::Overwrite( const SwPaM &rRg, const OUStri
         !m_rDoc.getIDocumentRedlineAccess().IsIgnoreRedline() && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty())
     {
         SwPaM aPam(rPt.nNode, nActualStart, rPt.nNode, rPt.nContent.GetIndex());
-        m_rDoc.getIDocumentRedlineAccess().DeleteRedline( aPam, true, USHRT_MAX );
+        m_rDoc.getIDocumentRedlineAccess().DeleteRedline( aPam, true, RedlineType::Any );
     }
     else if( m_rDoc.getIDocumentRedlineAccess().IsRedlineOn() )
     {
         // FIXME: this redline is WRONG: there is no DELETE, and the skipped
         // characters are also included in aPam
         SwPaM aPam(rPt.nNode, nActualStart, rPt.nNode, rPt.nContent.GetIndex());
-        m_rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
+        m_rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, aPam ), true);
     }
 
     m_rDoc.getIDocumentState().SetModified();
@@ -2661,7 +2661,7 @@ bool DocumentContentOperationsManager::InsertString( const SwPaM &rRg, const OUS
         if( m_rDoc.getIDocumentRedlineAccess().IsRedlineOn() )
         {
             m_rDoc.getIDocumentRedlineAccess().AppendRedline(
-                new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
+                new SwRangeRedline( RedlineType::Insert, aPam ), true);
         }
         else
         {
@@ -3079,7 +3079,7 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b
                     if (m_rDoc.getIDocumentRedlineAccess().IsRedlineOn())
                     {
                         m_rDoc.getIDocumentRedlineAccess().AppendRedline(
-                            new SwRangeRedline(nsRedlineType_t::REDLINE_INSERT, aPam), true);
+                            new SwRangeRedline(RedlineType::Insert, aPam), true);
                     }
                     else
                     {
@@ -3123,7 +3123,7 @@ bool DocumentContentOperationsManager::AppendTextNode( SwPosition& rPos )
         aPam.SetMark();
         aPam.Move( fnMoveBackward );
         if( m_rDoc.getIDocumentRedlineAccess().IsRedlineOn() )
-            m_rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
+            m_rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, aPam ), true);
         else
             m_rDoc.getIDocumentRedlineAccess().SplitRedline( aPam );
     }
@@ -3697,7 +3697,7 @@ bool DocumentContentOperationsManager::DeleteAndJoinWithRedlineImpl( SwPaM & rPa
 
     std::vector<SwRangeRedline*> redlines;
     {
-        auto pRedline(std::make_unique<SwRangeRedline>(nsRedlineType_t::REDLINE_DELETE, rPam));
+        auto pRedline(std::make_unique<SwRangeRedline>(RedlineType::Delete, rPam));
         if (pRedline->HasValidRange())
         {
             redlines.push_back(pRedline.release());
@@ -3934,7 +3934,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam)
     }
 
     if( !m_rDoc.getIDocumentRedlineAccess().IsIgnoreRedline() && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() )
-        m_rDoc.getIDocumentRedlineAccess().DeleteRedline( rPam, true, USHRT_MAX );
+        m_rDoc.getIDocumentRedlineAccess().DeleteRedline( rPam, true, RedlineType::Any );
 
     // Delete and move all "Flys at the paragraph", which are within the Selection
     DelFlyInRange(rPam.GetMark()->nNode, rPam.GetPoint()->nNode);
@@ -4166,7 +4166,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
                 m_rDoc.GetIDocumentUndoRedo().AppendUndo(
                     std::make_unique<SwUndoRedlineDelete>( aDelPam, SwUndoId::REPLACE ));
             }
-            m_rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_DELETE, aDelPam ), true);
+            m_rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Delete, aDelPam ), true);
 
             *rPam.GetMark() = *aDelPam.GetMark();
             if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
@@ -4203,7 +4203,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
                     "invalid range: Point and Mark on different nodes" );
 
             if( !m_rDoc.getIDocumentRedlineAccess().IsIgnoreRedline() && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() )
-                m_rDoc.getIDocumentRedlineAccess().DeleteRedline( aDelPam, true, USHRT_MAX );
+                m_rDoc.getIDocumentRedlineAccess().DeleteRedline( aDelPam, true, RedlineType::Any );
 
             SwUndoReplace* pUndoRpl = nullptr;
             bool const bDoesUndo = m_rDoc.GetIDocumentUndoRedo().DoesUndo();
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx
index c9c1d34157b8..c66b4ddd22a1 100644
--- a/sw/source/core/doc/DocumentFieldsManager.cxx
+++ b/sw/source/core/doc/DocumentFieldsManager.cxx
@@ -70,7 +70,7 @@ namespace sw
                 rTextField.GetStart());
         SwRangeRedline const*const pRedline(rIDRA.GetRedline(pos, &tmp));
         return (pRedline
-            && pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE
+            && pRedline->GetType() == RedlineType::Delete
             && *pRedline->GetPoint() != *pRedline->GetMark());
     }
 }
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index ed2ac2d9cbe3..47fc8db4db05 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -313,8 +313,8 @@ namespace
 
         switch( pRedl->GetType() )
         {
-        case nsRedlineType_t::REDLINE_INSERT:
-        case nsRedlineType_t::REDLINE_FORMAT:
+        case RedlineType::Insert:
+        case RedlineType::Format:
             {
                 bool bCheck = false, bReplace = false;
                 switch( eCmp )
@@ -363,7 +363,7 @@ namespace
                 }
             }
             break;
-        case nsRedlineType_t::REDLINE_DELETE:
+        case RedlineType::Delete:
             {
                 SwDoc& rDoc = *pRedl->GetDoc();
                 const SwPosition *pDelStt = nullptr, *pDelEnd = nullptr;
@@ -440,11 +440,11 @@ namespace
             }
             break;
 
-        case nsRedlineType_t::REDLINE_FMTCOLL:
+        case RedlineType::FmtColl:
             rArr.DeleteAndDestroy( rPos-- );
             break;
 
-        case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT:
+        case RedlineType::ParagraphFormat:
             rArr.DeleteAndDestroy( rPos-- );
             break;
 
@@ -475,7 +475,7 @@ namespace
 
         switch( pRedl->GetType() )
         {
-        case nsRedlineType_t::REDLINE_INSERT:
+        case RedlineType::Insert:
             {
                 const SwPosition *pDelStt = nullptr, *pDelEnd = nullptr;
                 bool bDelRedl = false;
@@ -551,7 +551,7 @@ namespace
                     delete pRedl;
             }
             break;
-        case nsRedlineType_t::REDLINE_DELETE:
+        case RedlineType::Delete:
             {
                 SwRangeRedline* pNew = nullptr;
                 bool bCheck = false, bReplace = false;
@@ -645,8 +645,8 @@ namespace
             }
             break;
 
-        case nsRedlineType_t::REDLINE_FORMAT:
-        case nsRedlineType_t::REDLINE_FMTCOLL:
+        case RedlineType::Format:
+        case RedlineType::FmtColl:
             {
                 if( pRedl->GetExtraData() )
                     pRedl->GetExtraData()->Reject( *pRedl );
@@ -656,7 +656,7 @@ namespace
                 // original state of the text (FIXME if the original text
                 // has already contained direct text formatting: unfortunately
                 // ODF 1.2 doesn't support rejection of format-only changes)
-                if ( pRedl->GetType() == nsRedlineType_t::REDLINE_FORMAT )
+                if ( pRedl->GetType() == RedlineType::Format )
                 {
                     SwPaM aPam( *(pRedl->Start()), *(pRedl->End()) );
                     rArr.DeleteAndDestroy( rPos-- );
@@ -710,7 +710,7 @@ namespace
                 {
                     if( *pTmp->End() <= *pEnd )
                     {
-                        if( (m > 0 || nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT == pTmp->GetType()) &&
+                        if( (m > 0 || RedlineType::ParagraphFormat == pTmp->GetType()) &&
                             (*fn_AcceptReject)( rArr, o, bCallDelete, nullptr, nullptr ))
                         {
                             bHasParagraphFormatChange = true;
@@ -722,7 +722,7 @@ namespace
                         if( *pTmp->Start() < *pEnd )
                         {
                             // Only revoke the partial selection
-                            if( (m > 0 || nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT == pTmp->GetType()) &&
+                            if( (m > 0 || RedlineType::ParagraphFormat == pTmp->GetType()) &&
                                 (*fn_AcceptReject)( rArr, o, bCallDelete, pStt, pEnd ))
                             {
                                 bHasParagraphFormatChange = true;
@@ -1001,7 +1001,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
 
         if( m_rDoc.IsAutoFormatRedline() )
         {
-            pNewRedl->SetAutoFormatFlag();
+            pNewRedl->SetAutoFormat();
             if( mpAutoFormatRedlnComment && !mpAutoFormatRedlnComment->isEmpty() )
             {
                 pNewRedl->SetComment( *mpAutoFormatRedlnComment );
@@ -1082,10 +1082,10 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
 
             switch( pNewRedl->GetType() )
             {
-            case nsRedlineType_t::REDLINE_INSERT:
+            case RedlineType::Insert:
                 switch( pRedl->GetType() )
                 {
-                case nsRedlineType_t::REDLINE_INSERT:
+                case RedlineType::Insert:
                     if( pRedl->IsOwnRedline( *pNewRedl ) )
                     {
                         bool bDelete = false;
@@ -1222,7 +1222,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
                         }
                     }
                     break;
-                case nsRedlineType_t::REDLINE_DELETE:
+                case RedlineType::Delete:
                     if( SwComparePosition::Inside == eCmpPos )
                     {
                         // split up
@@ -1276,7 +1276,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
                         pNewRedl->SetStart( *pREnd );
                     }
                     break;
-                case nsRedlineType_t::REDLINE_FORMAT:
+                case RedlineType::Format:
                     switch( eCmpPos )
                     {
                     case SwComparePosition::OverlapBefore:
@@ -1333,10 +1333,10 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
                 }
                 break;
 
-            case nsRedlineType_t::REDLINE_DELETE:
+            case RedlineType::Delete:
                 switch( pRedl->GetType() )
                 {
-                case nsRedlineType_t::REDLINE_DELETE:
+                case RedlineType::Delete:
                     switch( eCmpPos )
                     {
                     case SwComparePosition::Outside:
@@ -1436,7 +1436,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
                     }
                     break;
 
-                case nsRedlineType_t::REDLINE_INSERT:
+                case RedlineType::Insert:
                 {
                     // b62341295: Do not throw away redlines
                     // even if they are not allowed to be combined
@@ -1709,7 +1709,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
                 }
                 break;
 
-                case nsRedlineType_t::REDLINE_FORMAT:
+                case RedlineType::Format:
                     switch( eCmpPos )
                     {
                     case SwComparePosition::OverlapBefore:
@@ -1762,11 +1762,11 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
                 }
                 break;
 
-            case nsRedlineType_t::REDLINE_FORMAT:
+            case RedlineType::Format:
                 switch( pRedl->GetType() )
                 {
-                case nsRedlineType_t::REDLINE_INSERT:
-                case nsRedlineType_t::REDLINE_DELETE:
+                case RedlineType::Insert:
+                case RedlineType::Delete:
                     switch( eCmpPos )
                     {
                     case SwComparePosition::OverlapBefore:
@@ -1805,7 +1805,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
                         break;
                     }
                     break;
-                case nsRedlineType_t::REDLINE_FORMAT:
+                case RedlineType::Format:
                     switch( eCmpPos )
                     {
                     case SwComparePosition::Outside:
@@ -1905,7 +1905,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
                 }
                 break;
 
-            case nsRedlineType_t::REDLINE_FMTCOLL:
+            case RedlineType::FmtColl:
                 // How should we behave here?
                 // insert as is
                 break;
@@ -1924,7 +1924,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
             }
             else
             {
-                if ( bCallDelete && nsRedlineType_t::REDLINE_DELETE == pNewRedl->GetType() )
+                if ( bCallDelete && RedlineType::Delete == pNewRedl->GetType() )
                 {
                     if ( pStt->nContent == 0 )
                     {
@@ -1974,7 +1974,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
     }
     else
     {
-        if( bCallDelete && nsRedlineType_t::REDLINE_DELETE == pNewRedl->GetType() )
+        if( bCallDelete && RedlineType::Delete == pNewRedl->GetType() )
         {
             RedlineFlags eOld = meRedlineFlags;
             // Set to NONE, so that the Delete::Redo merges the Redline data correctly!
@@ -2015,7 +2015,7 @@ bool DocumentRedlineManager::AppendTableRowRedline( SwTableRowRedline* pNewRedl,
     {
         // TO DO - equivalent for 'SwTableRowRedline'
         /*
-        if( bCallDelete && nsRedlineType_t::REDLINE_DELETE == pNewRedl->GetType() )
+        if( bCallDelete && RedlineType::Delete == pNewRedl->GetType() )
         {
             RedlineFlags eOld = meRedlineFlags;
             // Set to NONE, so that the Delete::Redo merges the Redline data correctly!
@@ -2057,7 +2057,7 @@ bool DocumentRedlineManager::AppendTableCellRedline( SwTableCellRedline* pNewRed
     {
         // TO DO - equivalent for 'SwTableCellRedline'
         /*
-        if( bCallDelete && nsRedlineType_t::REDLINE_DELETE == pNewRedl->GetType() )
+        if( bCallDelete && RedlineType::Delete == pNewRedl->GetType() )
         {
             RedlineFlags eOld = meRedlineFlags;
             // Set to NONE, so that the Delete::Redo merges the Redline data correctly!
@@ -2184,7 +2184,7 @@ bool DocumentRedlineManager::SplitRedline( const SwPaM& rRange )
 }
 
 bool DocumentRedlineManager::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
-                            sal_uInt16 nDelType )
+                            RedlineType nDelType )
 {
     if( !rRange.HasMark() || *rRange.GetMark() == *rRange.GetPoint() )
         return false;
@@ -2208,7 +2208,7 @@ bool DocumentRedlineManager::DeleteRedline( const SwPaM& rRange, bool bSaveInUnd
     for( ; n < mpRedlineTable->size() ; ++n )
     {
         SwRangeRedline* pRedl = (*mpRedlineTable)[ n ];
-        if( USHRT_MAX != nDelType && nDelType != pRedl->GetType() )
+        if( RedlineType::Any != nDelType && nDelType != pRedl->GetType() )
             continue;
 
         SwPosition* pRStt = pRedl->Start(),
@@ -2303,13 +2303,13 @@ bool DocumentRedlineManager::DeleteRedline( const SwPaM& rRange, bool bSaveInUnd
 }
 
 bool DocumentRedlineManager::DeleteRedline( const SwStartNode& rNode, bool bSaveInUndo,
-                            sal_uInt16 nDelType )
+                            RedlineType nDelType )
 {
     SwPaM aTemp(*rNode.EndOfSectionNode(), rNode);
     return DeleteRedline(aTemp, bSaveInUndo, nDelType);
 }
 
-SwRedlineTable::size_type DocumentRedlineManager::GetRedlinePos( const SwNode& rNd, sal_uInt16 nType ) const
+SwRedlineTable::size_type DocumentRedlineManager::GetRedlinePos( const SwNode& rNd, RedlineType nType ) const
 {
     const sal_uLong nNdIdx = rNd.GetIndex();
     for( SwRedlineTable::size_type n = 0; n < mpRedlineTable->size() ; ++n )
@@ -2319,7 +2319,7 @@ SwRedlineTable::size_type DocumentRedlineManager::GetRedlinePos( const SwNode& r
               nMk = pTmp->GetMark()->nNode.GetIndex();
         if( nPt < nMk ) { long nTmp = nMk; nMk = nPt; nPt = nTmp; }
 
-        if( ( USHRT_MAX == nType || nType == pTmp->GetType()) &&
+        if( ( RedlineType::Any == nType || nType == pTmp->GetType()) &&
             nMk <= nNdIdx && nNdIdx <= nPt )
             return n;
 
@@ -2360,18 +2360,18 @@ const SwRangeRedline* DocumentRedlineManager::GetRedline( const SwPosition& rPos
                 // show insert change first.
                 // since the redlines are sorted by position, only check the redline
                 // before and after the current redline
-                if( nsRedlineType_t::REDLINE_FORMAT == pRedl->GetType() )
+                if( RedlineType::Format == pRedl->GetType() )
                 {
                     if( nM && rPos >= *(*mpRedlineTable)[ nM - 1 ]->Start() &&
                         rPos <= *(*mpRedlineTable)[ nM - 1 ]->End() &&
-                        ( nsRedlineType_t::REDLINE_INSERT == (*mpRedlineTable)[ nM - 1 ]->GetType() ) )
+                        ( RedlineType::Insert == (*mpRedlineTable)[ nM - 1 ]->GetType() ) )
                     {
                         --nM;
                         pRedl = (*mpRedlineTable)[ nM ];
                     }
                     else if( ( nM + 1 ) <= nO && rPos >= *(*mpRedlineTable)[ nM + 1 ]->Start() &&
                         rPos <= *(*mpRedlineTable)[ nM + 1 ]->End() &&
-                        ( nsRedlineType_t::REDLINE_INSERT == (*mpRedlineTable)[ nM + 1 ]->GetType() ) )
+                        ( RedlineType::Insert == (*mpRedlineTable)[ nM + 1 ]->GetType() ) )
                     {
                         ++nM;
                         pRedl = (*mpRedlineTable)[ nM ];
@@ -2534,7 +2534,7 @@ void DocumentRedlineManager::AcceptRedlineParagraphFormatting( const SwPaM &rPam
               nMk = pTmp->GetMark()->nNode.GetIndex();
         if( nPt < nMk ) { long nTmp = nMk; nMk = nPt; nPt = nTmp; }
 
-        if( nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT == pTmp->GetType() &&
+        if( RedlineType::ParagraphFormat == pTmp->GetType() &&
             ( (nSttIdx <= nMk && nMk <= nEndIdx) || (nSttIdx <= nPt && nPt <= nEndIdx) ) )
                 AcceptRedline( n, false );
 
@@ -3025,7 +3025,7 @@ void DocumentRedlineManager::FinalizeImport()
     for( SwRedlineTable::size_type n = 0; n < mpRedlineTable->size(); ++n )
     {
         SwRangeRedline* pRedl = (*mpRedlineTable)[ n ];
-        if ( nsRedlineType_t::REDLINE_DELETE == pRedl->GetType() )
+        if ( RedlineType::Delete == pRedl->GetType() )
         {
             const SwPosition* pStt = pRedl->Start(),
                             * pEnd = pStt == pRedl->GetPoint()
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index e46f0d9aa5f7..4d40ae43ae33 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -1643,7 +1643,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo )
 
     if( pTmp )
     {
-        SwRedlineData aRedlnData( nsRedlineType_t::REDLINE_DELETE, nAuthor, aTimeStamp,
+        SwRedlineData aRedlnData( RedlineType::Delete, nAuthor, aTimeStamp,
                                     OUString(), nullptr );
         do {
             // #i65201#: Expand again, see comment above.
@@ -1674,7 +1674,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo )
                 }
             }
 
-            rDoc.getIDocumentRedlineAccess().DeleteRedline( *pTmp, false, USHRT_MAX );
+            rDoc.getIDocumentRedlineAccess().DeleteRedline( *pTmp, false, RedlineType::Any );
 
             if (rDoc.GetIDocumentUndoRedo().DoesUndo())
             {
@@ -1717,7 +1717,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo )
                 }
             }
         } while( pInsRing.get() != ( pTmp = pTmp->GetNext()) );
-        SwRedlineData aRedlnData( nsRedlineType_t::REDLINE_INSERT, nAuthor, aTimeStamp,
+        SwRedlineData aRedlnData( RedlineType::Insert, nAuthor, aTimeStamp,
                                     OUString(), nullptr );
 
         // combine consecutive
@@ -1903,7 +1903,7 @@ SaveMergeRedline::SaveMergeRedline( const SwNode& rDstNd,
         aPos.nContent.Assign( const_cast<SwContentNode*>(static_cast<const SwContentNode*>(&rDstNd)), pStt->nContent.GetIndex() );
     pDestRedl = new SwRangeRedline( rSrcRedl.GetRedlineData(), aPos );
 
-    if( nsRedlineType_t::REDLINE_DELETE == pDestRedl->GetType() )
+    if( RedlineType::Delete == pDestRedl->GetType() )
     {
         // mark the area as deleted
         const SwPosition* pEnd = pStt == rSrcRedl.GetPoint()
@@ -1923,7 +1923,7 @@ sal_uInt16 SaveMergeRedline::InsertRedline(SwPaM* pLastDestRedline)
     sal_uInt16 nIns = 0;
     SwDoc* pDoc = pDestRedl->GetDoc();
 
-    if( nsRedlineType_t::REDLINE_INSERT == pDestRedl->GetType() )
+    if( RedlineType::Insert == pDestRedl->GetType() )
     {
         // the part was inserted so copy it from the SourceDoc
         ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
@@ -1968,8 +1968,8 @@ sal_uInt16 SaveMergeRedline::InsertRedline(SwPaM* pLastDestRedline)
             SwPosition* pRStt = pRedl->Start(),
                       * pREnd = pRStt == pRedl->GetPoint() ? pRedl->GetMark()
                                                            : pRedl->GetPoint();
-            if( nsRedlineType_t::REDLINE_DELETE == pRedl->GetType() ||
-                nsRedlineType_t::REDLINE_INSERT == pRedl->GetType() )
+            if( RedlineType::Delete == pRedl->GetType() ||
+                RedlineType::Insert == pRedl->GetType() )
             {
                 SwComparePosition eCmpPos = ComparePosition( *pDStt, *pDEnd, *pRStt, *pREnd );
                 switch( eCmpPos )
@@ -2087,9 +2087,9 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
         for(const SwRangeRedline* pRedl : rSrcRedlTable)
         {
             sal_uLong nNd = pRedl->GetPoint()->nNode.GetIndex();
-            RedlineType_t eType = pRedl->GetType();
+            RedlineType eType = pRedl->GetType();
             if( nEndOfExtra < nNd &&
-                ( nsRedlineType_t::REDLINE_INSERT == eType || nsRedlineType_t::REDLINE_DELETE == eType ))
+                ( RedlineType::Insert == eType || RedlineType::Delete == eType ))
             {
                 const SwNode* pDstNd = GetNodes()[
                                         nMyEndOfExtra + nNd - nEndOfExtra ];
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 392bb4fc5008..5bd36426a600 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1781,7 +1781,7 @@ void SwDoc::SetTextFormatCollByAutoFormat( const SwPosition& rPos, sal_uInt16 nP
     {
         // create the redline object
         const SwTextFormatColl& rColl = *pTNd->GetTextColl();
-        SwRangeRedline* pRedl = new SwRangeRedline( nsRedlineType_t::REDLINE_FMTCOLL, aPam );
+        SwRangeRedline* pRedl = new SwRangeRedline( RedlineType::FmtColl, aPam );
         pRedl->SetMark();
 
         // Only those items that are not set by the Set again in the Node
@@ -1828,7 +1828,7 @@ void SwDoc::SetFormatItemByAutoFormat( const SwPaM& rPam, const SfxItemSet& rSet
     if (mbIsAutoFormatRedline)
     {
         // create the redline object
-        SwRangeRedline* pRedl = new SwRangeRedline( nsRedlineType_t::REDLINE_FORMAT, rPam );
+        SwRangeRedline* pRedl = new SwRangeRedline( RedlineType::Format, rPam );
         if( !pRedl->HasMark() )
             pRedl->SetMark();
 
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index ad013e8c5744..8138a5197bdd 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -2044,7 +2044,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, long const nOffset,
     // Test for Redlining - Can the Selection be moved at all, actually?
     if( !getIDocumentRedlineAccess().IsIgnoreRedline() )
     {
-        SwRedlineTable::size_type nRedlPos = getIDocumentRedlineAccess().GetRedlinePos( pStt->nNode.GetNode(), nsRedlineType_t::REDLINE_DELETE );
+        SwRedlineTable::size_type nRedlPos = getIDocumentRedlineAccess().GetRedlinePos( pStt->nNode.GetNode(), RedlineType::Delete );
         if( SwRedlineTable::npos != nRedlPos )
         {
             SwPosition aStPos( *pStt ), aEndPos( *pEnd );
@@ -2057,7 +2057,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, long const nOffset,
             for( ; nRedlPos < getIDocumentRedlineAccess().GetRedlineTable().size(); ++nRedlPos )
             {
                 const SwRangeRedline* pTmp = getIDocumentRedlineAccess().GetRedlineTable()[ nRedlPos ];
-                if( !bCheckDel || nsRedlineType_t::REDLINE_DELETE == pTmp->GetType() )
+                if( !bCheckDel || RedlineType::Delete == pTmp->GetType() )
                 {
                     const SwPosition *pRStt = pTmp->Start(), *pREnd = pTmp->End();
                     switch( ComparePosition( *pRStt, *pREnd, aStPos, aEndPos ))
@@ -2101,12 +2101,12 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, long const nOffset,
     if( getIDocumentRedlineAccess().IsRedlineOn() )
     {
         // If the range is completely in the own Redline, we can move it!
-        SwRedlineTable::size_type nRedlPos = getIDocumentRedlineAccess().GetRedlinePos( pStt->nNode.GetNode(), nsRedlineType_t::REDLINE_INSERT );
+        SwRedlineTable::size_type nRedlPos = getIDocumentRedlineAccess().GetRedlinePos( pStt->nNode.GetNode(), RedlineType::Insert );
         if( SwRedlineTable::npos != nRedlPos )
         {
             SwRangeRedline* pTmp = getIDocumentRedlineAccess().GetRedlineTable()[ nRedlPos ];
             const SwPosition *pRStt = pTmp->Start(), *pREnd = pTmp->End();
-            SwRangeRedline aTmpRedl( nsRedlineType_t::REDLINE_INSERT, rPam );
+            SwRangeRedline aTmpRedl( RedlineType::Insert, rPam );
             const SwContentNode* pCEndNd = pEnd->nNode.GetNode().GetContentNode();
             // Is completely in the range and is the own Redline too?
             if( aTmpRedl.IsOwnRedline( *pTmp ) &&
@@ -2198,7 +2198,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, long const nOffset,
                 {
                     break;
                 }
-                if (pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE)
+                if (pRedline->GetType() == RedlineType::Delete)
                 {
                     assert(*aPam.Start() <= *pRedline->Start()); // caller's fault
                     SwRangeRedline* pNewRedline;
@@ -2211,7 +2211,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, long const nOffset,
                         pam.GetMark()->nNode += nCurrentOffset;
                         pam.GetMark()->nContent.Assign(pam.GetMark()->nNode.GetNode().GetContentNode(), pam.GetMark()->nContent.GetIndex());
 
-                        pNewRedline = new SwRangeRedline( nsRedlineType_t::REDLINE_DELETE, pam );
+                        pNewRedline = new SwRangeRedline( RedlineType::Delete, pam );
                     }
                     // note: effectively this will DeleteAndJoin the pam!
                     getIDocumentRedlineAccess().AppendRedline(pNewRedline, true);
@@ -2272,7 +2272,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, long const nOffset,
                     std::make_unique<SwUndoRedlineDelete>(aPam, SwUndoId::DELETE));
             }
 
-            SwRangeRedline* pNewRedline = new SwRangeRedline( nsRedlineType_t::REDLINE_DELETE, aPam );
+            SwRangeRedline* pNewRedline = new SwRangeRedline( RedlineType::Delete, aPam );
 
             // prevent assertion from aPam's target being deleted
             // (Alternatively, one could just let aPam go out of scope, but
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 986b48e48de2..6a1183a832cc 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -134,7 +134,7 @@ static bool CheckPosition( const SwPosition* pStt, const SwPosition* pEnd )
 }
 #endif
 
-bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rTable, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete )
+bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rTable, bool bSaveInUndo, RedlineType nRedlineTypeToDelete )
 {
     bool bChg = false;
 
@@ -164,10 +164,10 @@ bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rT
             {
                 // Redline for this table
                 const SwRedlineData& aRedlineData = pTableCellRedline->GetRedlineData();
-                const RedlineType_t nRedlineType = aRedlineData.GetType();
+                const RedlineType nRedlineType = aRedlineData.GetType();
 
                 // Check if this redline object type should be deleted
-                if (USHRT_MAX == nRedlineTypeToDelete || nRedlineTypeToDelete == nRedlineType)
+                if (RedlineType::Any == nRedlineTypeToDelete || nRedlineTypeToDelete == nRedlineType)
                 {
 
                     DeleteAndDestroy( nCurRedlinePos );
@@ -188,10 +188,10 @@ bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rT
                 {
                     // Redline for this table
                     const SwRedlineData& aRedlineData = pTableRowRedline->GetRedlineData();
-                    const RedlineType_t nRedlineType = aRedlineData.GetType();
+                    const RedlineType nRedlineType = aRedlineData.GetType();
 
                     // Check if this redline object type should be deleted
-                    if (USHRT_MAX == nRedlineTypeToDelete || nRedlineTypeToDelete == nRedlineType)
+                    if (RedlineType::Any == nRedlineTypeToDelete || nRedlineTypeToDelete == nRedlineType)
 
                     {
                         DeleteAndDestroy( nCurRedlinePos );
@@ -210,7 +210,7 @@ bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rT
     return bChg;
 }
 
-bool SwExtraRedlineTable::DeleteTableRowRedline( SwDoc* pDoc, const SwTableLine& rTableLine, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete )
+bool SwExtraRedlineTable::DeleteTableRowRedline( SwDoc* pDoc, const SwTableLine& rTableLine, bool bSaveInUndo, RedlineType nRedlineTypeToDelete )
 {
     bool bChg = false;
 
@@ -237,10 +237,10 @@ bool SwExtraRedlineTable::DeleteTableRowRedline( SwDoc* pDoc, const SwTableLine&
         {
             // Redline for this table row
             const SwRedlineData& aRedlineData = pTableRowRedline->GetRedlineData();
-            const RedlineType_t nRedlineType = aRedlineData.GetType();
+            const RedlineType nRedlineType = aRedlineData.GetType();
 
             // Check if this redline object type should be deleted
-            if( USHRT_MAX != nRedlineTypeToDelete && nRedlineTypeToDelete != nRedlineType )
+            if( RedlineType::Any != nRedlineTypeToDelete && nRedlineTypeToDelete != nRedlineType )
                 continue;
 
             DeleteAndDestroy( nCurRedlinePos );
@@ -254,7 +254,7 @@ bool SwExtraRedlineTable::DeleteTableRowRedline( SwDoc* pDoc, const SwTableLine&
     return bChg;
 }
 
-bool SwExtraRedlineTable::DeleteTableCellRedline( SwDoc* pDoc, const SwTableBox& rTableBox, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete )
+bool SwExtraRedlineTable::DeleteTableCellRedline( SwDoc* pDoc, const SwTableBox& rTableBox, bool bSaveInUndo, RedlineType nRedlineTypeToDelete )
 {
     bool bChg = false;
 
@@ -281,10 +281,10 @@ bool SwExtraRedlineTable::DeleteTableCellRedline( SwDoc* pDoc, const SwTableBox&
         {
             // Redline for this table cell
             const SwRedlineData& aRedlineData = pTableCellRedline->GetRedlineData();
-            const RedlineType_t nRedlineType = aRedlineData.GetType();
+            const RedlineType nRedlineType = aRedlineData.GetType();
 
             // Check if this redline object type should be deleted
-            if( USHRT_MAX != nRedlineTypeToDelete && nRedlineTypeToDelete != nRedlineType )
+            if( RedlineType::Any != nRedlineTypeToDelete && nRedlineTypeToDelete != nRedlineType )
                 continue;
 
             DeleteAndDestroy( nCurRedlinePos );
@@ -362,7 +362,7 @@ void SwRedlineTable::LOKRedlineNotification(RedlineNotification nType, SwRangeRe
                              (nType == RedlineNotification::Modify ? "Modify" : "???"))));
     aRedline.put("index", pRedline->GetId());
     aRedline.put("author", pRedline->GetAuthorString(1).toUtf8().getStr());
-    aRedline.put("type", nsRedlineType_t::SwRedlineTypeToOUString(pRedline->GetRedlineData().GetType()).toUtf8().getStr());
+    aRedline.put("type", SwRedlineTypeToOUString(pRedline->GetRedlineData().GetType()).toUtf8().getStr());
     aRedline.put("comment", pRedline->GetRedlineData().GetComment().toUtf8().getStr());
     aRedline.put("description", pRedline->GetDescr().toUtf8().getStr());
     OUString sDateTime = utl::toISO8601(pRedline->GetRedlineData().GetTimeStamp().GetUNODateTime());
@@ -935,7 +935,7 @@ bool SwRedlineExtraData_FormattingChanges::operator == ( const SwRedlineExtraDat
     return false;
 }
 
-SwRedlineData::SwRedlineData( RedlineType_t eT, std::size_t nAut )
+SwRedlineData::SwRedlineData( RedlineType eT, std::size_t nAut )
     : m_pNext( nullptr ), m_pExtraData( nullptr ),
     m_aStamp( DateTime::SYSTEM ),
     m_eType( eT ), m_nAuthor( nAut ), m_nSeqNo( 0 )
@@ -957,7 +957,7 @@ SwRedlineData::SwRedlineData(
 }
 
 // For sw3io: We now own pNext!
-SwRedlineData::SwRedlineData(RedlineType_t eT, std::size_t nAut, const DateTime& rDT,
+SwRedlineData::SwRedlineData(RedlineType eT, std::size_t nAut, const DateTime& rDT,
     const OUString& rCmnt, SwRedlineData *pNxt)
     : m_pNext(pNxt), m_pExtraData(nullptr), m_sComment(rCmnt), m_aStamp(rDT),
     m_eType(eT), m_nAuthor(nAut), m_nSeqNo(0)
@@ -1017,12 +1017,12 @@ static const char* STR_REDLINE_ARY[] =
 
 OUString SwRedlineData::GetDescr() const
 {
-    return SwResId(STR_REDLINE_ARY[GetType()]);
+    return SwResId(STR_REDLINE_ARY[static_cast<int>(GetType())]);
 }
 
 sal_uInt32 SwRangeRedline::m_nLastId = 1;
 
-SwRangeRedline::SwRangeRedline(RedlineType_t eTyp, const SwPaM& rPam )
+SwRangeRedline::SwRangeRedline(RedlineType eTyp, const SwPaM& rPam )
     : SwPaM( *rPam.GetMark(), *rPam.GetPoint() ),
     m_pRedlineData( new SwRedlineData( eTyp, GetDoc()->getIDocumentRedlineAccess().GetRedlineAuthor() ) ),
     m_pContentSect( nullptr ),
@@ -1162,18 +1162,18 @@ void SwRangeRedline::Show(sal_uInt16 nLoop, size_t nMyPos)
 
         switch( GetType() )
         {
-        case nsRedlineType_t::REDLINE_INSERT:           // Content has been inserted
+        case RedlineType::Insert:           // Content has been inserted
             m_bIsVisible = true;
             MoveFromSection(nMyPos);
             break;
 
-        case nsRedlineType_t::REDLINE_DELETE:           // Content has been deleted
+        case RedlineType::Delete:           // Content has been deleted
             m_bIsVisible = true;
             MoveFromSection(nMyPos);
             break;
 
-        case nsRedlineType_t::REDLINE_FORMAT:           // Attributes have been applied
-        case nsRedlineType_t::REDLINE_TABLE:            // Table structure has been modified
+        case RedlineType::Format:           // Attributes have been applied
+        case RedlineType::Table:            // Table structure has been modified
             InvalidateRange(Invalidation::Add);
             break;
         default:
@@ -1192,13 +1192,13 @@ void SwRangeRedline::Hide(sal_uInt16 nLoop, size_t nMyPos)
 
     switch( GetType() )
     {
-    case nsRedlineType_t::REDLINE_INSERT:           // Content has been inserted
+    case RedlineType::Insert:           // Content has been inserted
         m_bIsVisible = true;
         if( 1 <= nLoop )
             MoveFromSection(nMyPos);
         break;
 
-    case nsRedlineType_t::REDLINE_DELETE:           // Content has been deleted
+    case RedlineType::Delete:           // Content has been deleted
         m_bIsVisible = false;
         switch( nLoop )
         {
@@ -1208,8 +1208,8 @@ void SwRangeRedline::Hide(sal_uInt16 nLoop, size_t nMyPos)
         }
         break;
 
-    case nsRedlineType_t::REDLINE_FORMAT:           // Attributes have been applied
-    case nsRedlineType_t::REDLINE_TABLE:            // Table structure has been modified
+    case RedlineType::Format:           // Attributes have been applied
+    case RedlineType::Table:            // Table structure has been modified
         if( 1 <= nLoop )
             InvalidateRange(Invalidation::Remove);
         break;
@@ -1234,7 +1234,7 @@ void SwRangeRedline::ShowOriginal(sal_uInt16 nLoop, size_t nMyPos)
 
     switch( pCur->m_eType )
     {
-    case nsRedlineType_t::REDLINE_INSERT:           // Content has been inserted
+    case RedlineType::Insert:           // Content has been inserted
         m_bIsVisible = false;
         switch( nLoop )
         {
@@ -1244,14 +1244,14 @@ void SwRangeRedline::ShowOriginal(sal_uInt16 nLoop, size_t nMyPos)
         }
         break;
 
-    case nsRedlineType_t::REDLINE_DELETE:           // Content has been deleted
+    case RedlineType::Delete:           // Content has been deleted
         m_bIsVisible = true;
         if( 1 <= nLoop )
             MoveFromSection(nMyPos);
         break;
 
-    case nsRedlineType_t::REDLINE_FORMAT:           // Attributes have been applied
-    case nsRedlineType_t::REDLINE_TABLE:            // Table structure has been modified
+    case RedlineType::Format:           // Attributes have been applied
+    case RedlineType::Table:            // Table structure has been modified
         if( 1 <= nLoop )
             InvalidateRange(Invalidation::Remove);
         break;
@@ -1292,7 +1292,7 @@ void SwRangeRedline::InvalidateRange(Invalidation const eWhy)
             pNd->ModifyNotification(&aHt, &aHt);
 
             // SwUpdateAttr must be handled first, otherwise indexes are off
-            if (GetType() == nsRedlineType_t::REDLINE_DELETE)
+            if (GetType() == RedlineType::Delete)
             {
                 sal_Int32 const nStart(n == nSttNd ? nSttCnt : 0);
                 sal_Int32 const nLen((n == nEndNd ? nEndCnt : pNd->GetText().getLength()) - nStart);
@@ -1776,7 +1776,7 @@ const DateTime& SwRangeRedline::GetTimeStamp( sal_uInt16 nPos ) const
     return GetRedlineData(nPos).m_aStamp;
 }
 
-RedlineType_t SwRangeRedline::GetRealType( sal_uInt16 nPos ) const
+RedlineType SwRangeRedline::GetType( sal_uInt16 nPos ) const
 {
     return GetRedlineData(nPos).m_eType;
 }
@@ -1870,13 +1870,13 @@ void SwRangeRedline::dumpAsXml(xmlTextWriterPtr pWriter) const
     OString sRedlineType;
     switch (GetType())
     {
-        case nsRedlineType_t::REDLINE_INSERT:
+        case RedlineType::Insert:
             sRedlineType = "REDLINE_INSERT";
             break;
-        case nsRedlineType_t::REDLINE_DELETE:
+        case RedlineType::Delete:
             sRedlineType = "REDLINE_DELETE";
             break;
-        case nsRedlineType_t::REDLINE_FORMAT:
+        case RedlineType::Format:
             sRedlineType = "REDLINE_FORMAT";
             break;
         default:
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 1be8ffa88358..20e956187aed 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -346,7 +346,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
             GetNodes().Copy_( aRg, aEndIdx );
 
             // range is new from pEnd->nNode+1 to aEndIdx
-            getIDocumentRedlineAccess().DeleteRedline( *pRedlPam, true, USHRT_MAX );
+            getIDocumentRedlineAccess().DeleteRedline( *pRedlPam, true, RedlineType::Any );
 
             pRedlPam->GetMark()->nNode.Assign( pEnd->nNode.GetNode(), 1 );
             pCNd = pRedlPam->GetContentNode( false );
@@ -368,7 +368,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
         }
         else
         {
-            getIDocumentRedlineAccess().DeleteRedline( *pRedlPam, true, USHRT_MAX );
+            getIDocumentRedlineAccess().DeleteRedline( *pRedlPam, true, RedlineType::Any );
             delete pRedlPam;
             pRedlPam = nullptr;
         }
@@ -434,7 +434,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
 
         // the copied range is deleted
         SwRangeRedline *const pDeleteRedline(
-            new SwRangeRedline( nsRedlineType_t::REDLINE_DELETE, *pRedlPam ));
+            new SwRangeRedline( RedlineType::Delete, *pRedlPam ));
 
         // pRedlPam points to nodes that may be deleted (hidden) by
         // AppendRedline, so adjust it beforehand to prevent ASSERT
@@ -445,7 +445,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
         getIDocumentRedlineAccess().AppendRedline(pDeleteRedline, true);
 
         // the sorted range is inserted
-        getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, *pRedlPam ), true);
+        getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, *pRedlPam ), true);
 
         if( pRedlUndo )
         {
@@ -491,7 +491,7 @@ bool SwDoc::SortTable(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
         return false;
 
     if( !getIDocumentRedlineAccess().IsIgnoreRedline() && !getIDocumentRedlineAccess().GetRedlineTable().empty() )
-        getIDocumentRedlineAccess().DeleteRedline( *pTableNd, true, USHRT_MAX );
+        getIDocumentRedlineAccess().DeleteRedline( *pTableNd, true, RedlineType::Any );
 
     FndLines_t::size_type nStart = 0;
     if( pTableNd->GetTable().GetRowsToRepeat() > 0 && rOpt.eDirection == SRT_ROWS )
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 13ca079c2804..9a01f4da776c 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -916,7 +916,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
 
     SwUndoUpdateIndex * pUndo(nullptr);
     {
-        pDoc->getIDocumentRedlineAccess().DeleteRedline( *pSectNd, true, USHRT_MAX );
+        pDoc->getIDocumentRedlineAccess().DeleteRedline( *pSectNd, true, RedlineType::Any );
 
         SwNodeIndex aSttIdx( *pSectNd, +1 );
         SwNodeIndex aEndIdx( *pSectNd->EndOfSectionNode() );
diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx
index 41831272a534..37ac0e0286d5 100644
--- a/sw/source/core/doc/ftnidx.cxx
+++ b/sw/source/core/doc/ftnidx.cxx
@@ -42,7 +42,7 @@ bool IsFootnoteDeleted(IDocumentRedlineAccess const& rIDRA,
             rTextFootnote.GetStart());
     SwRangeRedline const*const pRedline(rIDRA.GetRedline(pos, &tmp));
     return (pRedline
-        && pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE
+        && pRedline->GetType() == RedlineType::Delete
         && *pRedline->GetPoint() != *pRedline->GetMark());
 }
 
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index b414d65847f7..1084e4c77475 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -718,7 +718,7 @@ void DeleteBox_( SwTable& rTable, SwTableBox* pBox, SwUndo* pUndo,
 
         // Before deleting the 'Table Box' from memory - delete any redlines attached to it
         if ( rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().HasExtraRedlineTable() )
-            rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableCellRedline( rTable.GetFrameFormat()->GetDoc(), *(rTableBoxes[nDelPos]), true, USHRT_MAX );
+            rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableCellRedline( rTable.GetFrameFormat()->GetDoc(), *(rTableBoxes[nDelPos]), true, RedlineType::Any );
         delete rTableBoxes[nDelPos];
         rTableBoxes.erase( rTableBoxes.begin() + nDelPos );
 
@@ -771,7 +771,7 @@ void DeleteBox_( SwTable& rTable, SwTableBox* pBox, SwUndo* pUndo,
             SwTableLine* pTabLineToDelete = rTable.GetTabLines()[ nDelPos ];
             // Before deleting the 'Table Line' from memory - delete any redlines attached to it
             if ( rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().HasExtraRedlineTable() )
-                rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableRowRedline( rTable.GetFrameFormat()->GetDoc(), *pTabLineToDelete, true, USHRT_MAX );
+                rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableRowRedline( rTable.GetFrameFormat()->GetDoc(), *pTabLineToDelete, true, RedlineType::Any );
             delete pTabLineToDelete;
             rTable.GetTabLines().erase( rTable.GetTabLines().begin() + nDelPos );
             break;      // we cannot delete more
@@ -786,7 +786,7 @@ void DeleteBox_( SwTable& rTable, SwTableBox* pBox, SwUndo* pUndo,
         SwTableLine* pTabLineToDelete = pBox->GetTabLines()[ nDelPos ];
         // Before deleting the 'Table Line' from memory - delete any redlines attached to it
         if ( rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().HasExtraRedlineTable() )
-            rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableRowRedline( rTable.GetFrameFormat()->GetDoc(), *pTabLineToDelete, true, USHRT_MAX );
+            rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableRowRedline( rTable.GetFrameFormat()->GetDoc(), *pTabLineToDelete, true, RedlineType::Any );
         delete pTabLineToDelete;
         pBox->GetTabLines().erase( pBox->GetTabLines().begin() + nDelPos );
     } while( pBox->GetTabLines().empty() );
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 16c26f4befa1..641c074c618c 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -329,7 +329,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
         SwPaM aPam( *pNewSectNode->EndOfSectionNode(), *pNewSectNode, 1 );
         if( getIDocumentRedlineAccess().IsRedlineOn() )
         {
-            getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
+            getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, aPam ), true);
         }
         else
         {
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index b86b2f52d9f2..e71fb003bf9f 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -547,7 +547,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts,
     {
         SwPaM aPam( *pTableNd->EndOfSectionNode(), *pTableNd, 1 );
         if( getIDocumentRedlineAccess().IsRedlineOn() )
-            getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
+            getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, aPam ), true);
         else
             getIDocumentRedlineAccess().SplitRedline( aPam );
     }
@@ -2472,7 +2472,7 @@ void SwTableNode::RemoveRedlines()
     {
         SwTable& rTable = GetTable();
         if ( pDoc->getIDocumentRedlineAccess().HasExtraRedlineTable() )
-            pDoc->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteAllTableRedlines( pDoc, rTable, true, USHRT_MAX );
+            pDoc->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteAllTableRedlines( pDoc, rTable, true, RedlineType::Any );
     }
 }
 
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index f39616624c36..c2fbfef86d82 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -1147,7 +1147,7 @@ bool GetRanges(std::vector<std::shared_ptr<SwUnoCursor>> & rRanges,
         {
             continue;
         }
-        if (pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE)
+        if (pRedline->GetType() == RedlineType::Delete)
         {
             assert(*pRedline->Start() != *pRedline->End());
             isNoRedline = false;
diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx
index 41ea8139b11a..8375bddaf445 100644
--- a/sw/source/core/edit/edatmisc.cxx
+++ b/sw/source/core/edit/edatmisc.cxx
@@ -102,7 +102,7 @@ static void lcl_disableShowChangesIfNeeded( SwDoc *const pDoc, const SwNode& rNo
 {
     if ( IDocumentRedlineAccess::IsShowChanges(eRedlMode) &&
         // is there redlining at beginning of the position (possible redline block before the modified node)
-        pDoc->getIDocumentRedlineAccess().GetRedlinePos( rNode, USHRT_MAX ) <
+        pDoc->getIDocumentRedlineAccess().GetRedlinePos( rNode, RedlineType::Any ) <
                    pDoc->getIDocumentRedlineAccess().GetRedlineTable().size() )
     {
         eRedlMode = RedlineFlags::ShowInsert | RedlineFlags::Ignore;
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index ab31bef2be55..4df464ee49ed 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -2206,7 +2206,7 @@ void SwEditShell::SetTextFormatColl(SwTextFormatColl *pFormat,
             // ie. in all directly preceding deleted paragraphs at the actual cursor positions
             if ( IDocumentRedlineAccess::IsShowChanges(eRedlMode) &&
                // is there redlining at beginning of the position (possible redline block before the modified node)
-               GetDoc()->getIDocumentRedlineAccess().GetRedlinePos( (*rPaM.Start()).nNode.GetNode(), USHRT_MAX ) <
+               GetDoc()->getIDocumentRedlineAccess().GetRedlinePos( (*rPaM.Start()).nNode.GetNode(), RedlineType::Any ) <
                    GetDoc()->getIDocumentRedlineAccess().GetRedlineTable().size() )
             {
                 eRedlMode = RedlineFlags::ShowInsert | RedlineFlags::Ignore;
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index c533e8013575..335041745d0b 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -1228,7 +1228,7 @@ static SpellContentPositions lcl_CollectDeletedRedlines(SwEditShell const * pSh)
         const SwPosition* pStartPos = pCursor->Start();
         const SwTextNode* pTextNode = pCursor->GetNode().GetTextNode();
 
-        SwRedlineTable::size_type nAct = pDoc->getIDocumentRedlineAccess().GetRedlinePos( *pTextNode, USHRT_MAX );
+        SwRedlineTable::size_type nAct = pDoc->getIDocumentRedlineAccess().GetRedlinePos( *pTextNode, RedlineType::Any );
         const sal_Int32 nStartIndex = pStartPos->nContent.GetIndex();
         for ( ; nAct < pDoc->getIDocumentRedlineAccess().GetRedlineTable().size(); nAct++ )
         {
@@ -1237,7 +1237,7 @@ static SpellContentPositions lcl_CollectDeletedRedlines(SwEditShell const * pSh)
             if ( pRed->Start()->nNode > pTextNode->GetIndex() )
                 break;
 
-            if( nsRedlineType_t::REDLINE_DELETE == pRed->GetType() )
+            if( RedlineType::Delete == pRed->GetType() )
             {
                 sal_Int32 nStart_, nEnd_;
                 pRed->CalcStartEnd( pTextNode->GetIndex(), nStart_, nEnd_ );
diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx
index 8b276678a3d7..dde8d8dcaecf 100644
--- a/sw/source/core/fields/postithelper.cxx
+++ b/sw/source/core/fields/postithelper.cxx
@@ -89,9 +89,9 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos(
                     const SwRangeRedline* pRedline = rIDRA.GetRedline( rAnchorPos, nullptr );
                     if( pRedline )
                     {
-                        if( nsRedlineType_t::REDLINE_INSERT == pRedline->GetType() )
+                        if( RedlineType::Insert == pRedline->GetType() )
                             aRet = INSERTED;
-                        else if( nsRedlineType_t::REDLINE_DELETE == pRedline->GetType() )
+                        else if( RedlineType::Delete == pRedline->GetType() )
                             aRet = DELETED;
                         o_rInfo.mRedlineAuthor = pRedline->GetAuthor();
                     }
diff --git a/sw/source/core/inc/DocumentRedlineManager.hxx b/sw/source/core/inc/DocumentRedlineManager.hxx
index 56ff92942de9..dd64f5511d12 100644
--- a/sw/source/core/inc/DocumentRedlineManager.hxx
+++ b/sw/source/core/inc/DocumentRedlineManager.hxx
@@ -65,16 +65,16 @@ public:
     virtual bool DeleteRedline(
         /*[in]*/const SwPaM& rPam,
         /*[in]*/bool bSaveInUndo,
-        /*[in]*/sal_uInt16 nDelType) override;
+        /*[in]*/RedlineType nDelType) override;
 
     virtual bool DeleteRedline(
         /*[in]*/const SwStartNode& rSection,
         /*[in]*/bool bSaveInUndo,
-        /*[in]*/sal_uInt16 nDelType) override;
+        /*[in]*/RedlineType nDelType) override;
 
     virtual SwRedlineTable::size_type GetRedlinePos(
         /*[in]*/const SwNode& rNode,
-        /*[in]*/sal_uInt16 nType) const override;
+        /*[in]*/RedlineType nType) const override;
 
     virtual void CompressRedlines() override;
 
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 2cfab46f988a..0526dfe5b2bd 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1465,7 +1465,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc,
                 // pathology: redline that starts on a TableNode; cannot
                 // be created in UI but by import filters...
                 if (pRedline
-                    && pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE
+                    && pRedline->GetType() == RedlineType::Delete
                     && &pRedline->Start()->nNode.GetNode() == pNd)
                 {
                     SAL_WARN("sw.pageframe", "skipping table frame creation on bizarre redline");
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 4e80de512c8b..55b9dfe32e4e 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -451,7 +451,7 @@ void SwTextFrame::RegisterToNode(SwTextNode & rNode, bool const isForceNodeAsFir
     {   // nothing registered here, in particular no redlines
         assert(m_pMergedPara->pFirstNode->GetIndex() + 1 == rNode.GetIndex());
         assert(rNode.GetDoc()->getIDocumentRedlineAccess().GetRedlinePos(
-                *m_pMergedPara->pFirstNode, USHRT_MAX) == SwRedlineTable::npos);
+                *m_pMergedPara->pFirstNode, RedlineType::Any) == SwRedlineTable::npos);
     }
     assert(&rNode != GetDep());
     assert(!m_pMergedPara
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index b6014ddbd18c..c3e751f3b6f2 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -4395,7 +4395,7 @@ static void UnHideRedlines(SwRootFrame & rLayout,
             // pathology: redline that starts on a TableNode; cannot
             // be created in UI but by import filters...
             if (pRedline
-                && pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE
+                && pRedline->GetType() == RedlineType::Delete
                 && &pRedline->Start()->nNode.GetNode() == &rNode)
             {
                 for (sal_uLong j = rNode.GetIndex(); j <= rNode.EndOfSectionIndex(); ++j)
@@ -4544,7 +4544,7 @@ void SwRootFrame::SetHideRedlines(bool const bHideRedlines)
     for (auto const pRedline : rDoc.getIDocumentRedlineAccess().GetRedlineTable())
     {   // DELETE are handled by the code above; for other types, need to
         // trigger repaint of text frames to add/remove the redline color font
-        if (pRedline->GetType() != nsRedlineType_t::REDLINE_DELETE)
+        if (pRedline->GetType() != RedlineType::Delete)
         {
             pRedline->InvalidateRange(SwRangeRedline::Invalidation::Add);
         }
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 337d712d95db..f550aed40da8 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2036,7 +2036,7 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& rText, const Color* pCol,
         if( !pDoc->getIDocumentRedlineAccess().IsIgnoreRedline() && !pDoc->getIDocumentRedlineAccess().GetRedlineTable().empty() )
         {
             SwPaM aTemp(*pTNd, 0, *pTNd, rOrig.getLength());
-            pDoc->getIDocumentRedlineAccess().DeleteRedline(aTemp, true, USHRT_MAX);
+            pDoc->getIDocumentRedlineAccess().DeleteRedline(aTemp, true, RedlineType::Any);
         }
 
         // preserve comments inside of the number by deleting number portions starting from the back
@@ -2061,7 +2061,7 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& rText, const Color* pCol,
         if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
         {
             SwPaM aTemp(*pTNd, 0, *pTNd, rText.getLength());
-            pDoc->getIDocumentRedlineAccess().AppendRedline(new SwRangeRedline(nsRedlineType_t::REDLINE_INSERT, aTemp), true);
+            pDoc->getIDocumentRedlineAccess().AppendRedline(new SwRangeRedline(RedlineType::Insert, aTemp), true);
         }
     }
 
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 70db09b052bb..3c018f0a702c 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -355,7 +355,7 @@ void SwTextFrame::MakePos()
             {
                 pRedln->MaybeNotifyRedlinePositionModification(getFrameArea().Top());
                 if (GetMergedPara()
-                    && pRedln->GetType() == nsRedlineType_t::REDLINE_DELETE
+                    && pRedln->GetType() == RedlineType::Delete
                     && pRedln->GetPoint()->nNode != pRedln->GetMark()->nNode)
                 {
                     pTextNode = pRedln->End()->nNode.GetNode().GetTextNode();
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 99e34f9673a6..e52f220ffbf2 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -389,7 +389,7 @@ void SwTextFrame::PaintExtraData( const SwRect &rRect ) const
     else
     {
         if (!GetMergedPara() &&
-            SwRedlineTable::npos == rIDRA.GetRedlinePos(*GetTextNodeFirst(), USHRT_MAX))
+            SwRedlineTable::npos == rIDRA.GetRedlinePos(*GetTextNodeFirst(), RedlineType::Any))
         {
             bRedLine = false;
         }
@@ -484,7 +484,7 @@ bool SwTextFrame::PaintEmpty( const SwRect &rRect, bool bCheck ) const
             if (IDocumentRedlineAccess::IsShowChanges(rIDRA.GetRedlineFlags())
                 && !getRootFrame()->IsHideRedlines())
             {
-                const SwRedlineTable::size_type nRedlPos = rIDRA.GetRedlinePos( rTextNode, USHRT_MAX );
+                const SwRedlineTable::size_type nRedlPos = rIDRA.GetRedlinePos( rTextNode, RedlineType::Any );
                 if( SwRedlineTable::npos != nRedlPos )
                 {
                     SwAttrHandler aAttrHandler;
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 46b3c60c8aa1..eea5dbd4a622 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -2306,7 +2306,7 @@ void SwScriptInfo::selectRedLineDeleted(const SwTextNode& rNode, MultiSelection
     const IDocumentRedlineAccess& rIDRA = rNode.getIDocumentRedlineAccess();
     if ( IDocumentRedlineAccess::IsShowChanges( rIDRA.GetRedlineFlags() ) )
     {
-        SwRedlineTable::size_type nAct = rIDRA.GetRedlinePos( rNode, USHRT_MAX );
+        SwRedlineTable::size_type nAct = rIDRA.GetRedlinePos( rNode, RedlineType::Any );
 
         for ( ; nAct < rIDRA.GetRedlineTable().size(); nAct++ )
         {
@@ -2315,7 +2315,7 @@ void SwScriptInfo::selectRedLineDeleted(const SwTextNode& rNode, MultiSelection
             if (pRed->Start()->nNode > rNode.GetIndex())
                 break;
 
-            if (pRed->GetType() != nsRedlineType_t::REDLINE_DELETE)
+            if (pRed->GetType() != RedlineType::Delete)
                 continue;
 
             sal_Int32 nRedlStart;
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 8ea644532112..3ae4b9623978 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -252,7 +252,7 @@ SwTwips SwTextFrame::EmptyHeight() const
     if (IDocumentRedlineAccess::IsShowChanges(rIDRA.GetRedlineFlags())
         && !getRootFrame()->IsHideRedlines())
     {
-        const SwRedlineTable::size_type nRedlPos = rIDRA.GetRedlinePos( rTextNode, USHRT_MAX );
+        const SwRedlineTable::size_type nRedlPos = rIDRA.GetRedlinePos( rTextNode, RedlineType::Any );
         if( SwRedlineTable::npos != nRedlPos )
         {
             SwAttrHandler aAttrHandler;
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index e98240098786..6133b08ce1bb 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -68,7 +68,7 @@ CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & rTextNode,
     SwTextNode * pParaPropsNode(nullptr);
     SwTextNode * pNode(&rTextNode);
     sal_Int32 nLastEnd(0);
-    for (auto i = rIDRA.GetRedlinePos(rTextNode, USHRT_MAX);
+    for (auto i = rIDRA.GetRedlinePos(rTextNode, RedlineType::Any);
          i < rIDRA.GetRedlineTable().size(); ++i)
     {
         SwRangeRedline const*const pRed = rIDRA.GetRedlineTable()[i];
@@ -76,7 +76,7 @@ CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & rTextNode,
         if (pNode->GetIndex() < pRed->Start()->nNode.GetIndex())
             break;
 
-        if (pRed->GetType() != nsRedlineType_t::REDLINE_DELETE)
+        if (pRed->GetType() != RedlineType::Delete)
             continue;
 
         SwPosition const*const pStart(pRed->Start());
@@ -445,7 +445,7 @@ void SwAttrIter::CtorInitAttrIter(SwTextNode & rTextNode,
         && pRootFrame && !pRootFrame->IsHideRedlines();
     if (pExtInp || m_pMergedPara || bShow)
     {
-        SwRedlineTable::size_type nRedlPos = rIDRA.GetRedlinePos( rTextNode, USHRT_MAX );
+        SwRedlineTable::size_type nRedlPos = rIDRA.GetRedlinePos( rTextNode, RedlineType::Any );
         if (SwRedlineTable::npos == nRedlPos && m_pMergedPara)
         {
             SwTextNode const* pNode(&rTextNode);
@@ -454,7 +454,7 @@ void SwAttrIter::CtorInitAttrIter(SwTextNode & rTextNode,
                 if (rExtent.pNode != pNode)
                 {
                     pNode = rExtent.pNode;
-                    nRedlPos = rIDRA.GetRedlinePos(*pNode, USHRT_MAX);
+                    nRedlPos = rIDRA.GetRedlinePos(*pNode, RedlineType::Any);
                     if (SwRedlineTable::npos != nRedlPos)
                         break;
                 }
@@ -635,7 +635,7 @@ short SwRedlineItr::Seek(SwFont& rFnt,
             SwRangeRedline const*const pRedline(
                 m_rDoc.getIDocumentRedlineAccess().GetRedlineTable()[m_nAct]);
             SwPosition const*const pStart(pRedline->Start());
-            if (pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE
+            if (pRedline->GetType() == RedlineType::Delete
                 && (nNode < pStart->nNode.GetIndex()
                     || (nNode == pStart->nNode.GetIndex()
                         && nNew <= pStart->nContent.GetIndex())))
@@ -650,18 +650,18 @@ short SwRedlineItr::Seek(SwFont& rFnt,
     return nRet + EnterExtend(rFnt, nNode, nNew);
 }
 
-void SwRedlineItr::FillHints( std::size_t nAuthor, RedlineType_t eType )
+void SwRedlineItr::FillHints( std::size_t nAuthor, RedlineType eType )
 {
     switch ( eType )
     {
-        case nsRedlineType_t::REDLINE_INSERT:
+        case RedlineType::Insert:
             SW_MOD()->GetInsertAuthorAttr(nAuthor, *m_pSet);
             break;
-        case nsRedlineType_t::REDLINE_DELETE:
+        case RedlineType::Delete:
             SW_MOD()->GetDeletedAuthorAttr(nAuthor, *m_pSet);
             break;
-        case nsRedlineType_t::REDLINE_FORMAT:
-        case nsRedlineType_t::REDLINE_FMTCOLL:
+        case RedlineType::Format:
+        case RedlineType::FmtColl:
             SW_MOD()->GetFormatAuthorAttr(nAuthor, *m_pSet);
             break;
         default:
@@ -730,7 +730,7 @@ SwRedlineItr::GetNextRedln(sal_Int32 nNext, SwTextNode const*const pNode,
                     m_rDoc.getIDocumentRedlineAccess().GetRedlineTable()[rAct]);
             pRedline->CalcStartEnd(pNode->GetIndex(), nStart, nEnd);
             if (m_eMode != Mode::Hide
-                || pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE)
+                || pRedline->GetType() == RedlineType::Delete)
             {
                 break;
             }
@@ -757,8 +757,8 @@ SwRedlineItr::GetNextRedln(sal_Int32 nNext, SwTextNode const*const pNode,
             assert(m_eMode == Mode::Hide);
             SwRangeRedline const* pRedline(
                     m_rDoc.getIDocumentRedlineAccess().GetRedlineTable()[rAct]);
-            assert(pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE); //?
-            if (pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE)
+            assert(pRedline->GetType() == RedlineType::Delete); //?
+            if (pRedline->GetType() == RedlineType::Delete)
             {
                 nNext = nStart;
                 size_t nSkipped(1); // (consecutive) candidates to be skipped
@@ -772,7 +772,7 @@ SwRedlineItr::GetNextRedln(sal_Int32 nNext, SwTextNode const*const pNode,
                         break; // done for now
                     }
                     else if (*pNext->Start() == *pRedline->End() &&
-                            pNext->GetType() == nsRedlineType_t::REDLINE_DELETE)
+                            pNext->GetType() == RedlineType::Delete)
                     {
                         // consecutive delete - continue
                         pRedline = pNext;
diff --git a/sw/source/core/text/redlnitr.hxx b/sw/source/core/text/redlnitr.hxx
index 0d6d365e9637..6fc39e14f240 100644
--- a/sw/source/core/text/redlnitr.hxx
+++ b/sw/source/core/text/redlnitr.hxx
@@ -89,7 +89,7 @@ private:
 
     void Clear_( SwFont* pFnt );
     bool ChkSpecialUnderline_() const;
-    void FillHints( std::size_t nAuthor, RedlineType_t eType );
+    void FillHints( std::size_t nAuthor, RedlineType eType );
     short EnterExtend(SwFont& rFnt, sal_uLong const nNode, sal_Int32 const nNew)
     {
         if (m_pExt) return m_pExt->Enter(rFnt, nNode, nNew);
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index ff94c1848b1b..532dec392920 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -3614,7 +3614,7 @@ OUString SwTextNode::GetRedlineText() const
 {
     std::vector<sal_Int32> aRedlArr;
     const SwDoc* pDoc = GetDoc();
-    SwRedlineTable::size_type nRedlPos = pDoc->getIDocumentRedlineAccess().GetRedlinePos( *this, nsRedlineType_t::REDLINE_DELETE );
+    SwRedlineTable::size_type nRedlPos = pDoc->getIDocumentRedlineAccess().GetRedlinePos( *this, RedlineType::Delete );
     if( SwRedlineTable::npos != nRedlPos )
     {
         // some redline-delete object exists for the node
@@ -3622,7 +3622,7 @@ OUString SwTextNode::GetRedlineText() const
         for( ; nRedlPos < pDoc->getIDocumentRedlineAccess().GetRedlineTable().size() ; ++nRedlPos )
         {
             const SwRangeRedline* pTmp = pDoc->getIDocumentRedlineAccess().GetRedlineTable()[ nRedlPos ];
-            if( nsRedlineType_t::REDLINE_DELETE == pTmp->GetType() )
+            if( RedlineType::Delete == pTmp->GetType() )
             {
                 const SwPosition *pRStt = pTmp->Start(), *pREnd = pTmp->End();
                 if( pRStt->nNode < nNdIdx )
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index c4dd0d09805c..d00dbf9c5358 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -149,14 +149,14 @@ lcl_MaskRedlines( const SwTextNode& rNode, OUStringBuffer& rText,
 
     const SwDoc& rDoc = *rNode.GetDoc();
 
-    for ( SwRedlineTable::size_type nAct = rDoc.getIDocumentRedlineAccess().GetRedlinePos( rNode, USHRT_MAX ); nAct < rDoc.getIDocumentRedlineAccess().GetRedlineTable().size(); ++nAct )
+    for ( SwRedlineTable::size_type nAct = rDoc.getIDocumentRedlineAccess().GetRedlinePos( rNode, RedlineType::Any ); nAct < rDoc.getIDocumentRedlineAccess().GetRedlineTable().size(); ++nAct )
     {
         const SwRangeRedline* pRed = rDoc.getIDocumentRedlineAccess().GetRedlineTable()[ nAct ];
 
         if ( pRed->Start()->nNode > rNode.GetIndex() )
             break;
 
-        if( nsRedlineType_t::REDLINE_DELETE == pRed->GetType() )
+        if( RedlineType::Delete == pRed->GetType() )
         {
             sal_Int32 nRedlineEnd;
             sal_Int32 nRedlineStart;
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 86cf73bef4c3..ff54f61ca06c 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -693,8 +693,8 @@ void SwUndoAttr::SaveRedlineData( const SwPaM& rPam, bool bIsContent )
     SwDoc* pDoc = rPam.GetDoc();
     if ( pDoc->getIDocumentRedlineAccess().IsRedlineOn() ) {
         m_pRedlineData.reset( new SwRedlineData( bIsContent
-                              ? nsRedlineType_t::REDLINE_INSERT
-                              : nsRedlineType_t::REDLINE_FORMAT,
+                              ? RedlineType::Insert
+                              : RedlineType::Format,
                               pDoc->getIDocumentRedlineAccess().GetRedlineAuthor() ) );
     }
 
@@ -722,11 +722,11 @@ void SwUndoAttr::UndoImpl(::sw::UndoRedoContext & rContext)
             aPam.GetPoint()->nContent.Assign( aPam.GetContentNode(), nSttContent );
             aPam.SetMark();
             ++aPam.GetPoint()->nContent;
-            pDoc->getIDocumentRedlineAccess().DeleteRedline(aPam, false, USHRT_MAX);
+            pDoc->getIDocumentRedlineAccess().DeleteRedline(aPam, false, RedlineType::Any);
         } else {
             // remove all format redlines, will be recreated if needed
             SetPaM(aPam);
-            pDoc->getIDocumentRedlineAccess().DeleteRedline(aPam, false, nsRedlineType_t::REDLINE_FORMAT);
+            pDoc->getIDocumentRedlineAccess().DeleteRedline(aPam, false, RedlineType::Format);
             if (m_pRedlineSaveData)
             {
                 SetSaveData( *pDoc, *m_pRedlineSaveData );
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index daa062536d88..a53458952594 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -80,7 +80,7 @@ static SwTextNode * FindFirstAndNextNode(SwDoc & rDoc, SwUndRng const& rRange,
         if (rRedline.nSttNode <= rRange.nSttNode
             && rRedline.nSttNode < rRange.nEndNode
             && rRange.nEndNode <= rRedline.nEndNode
-            && rRedline.GetType() == nsRedlineType_t::REDLINE_DELETE)
+            && rRedline.GetType() == RedlineType::Delete)
         {
             nEndOfRedline = rRedline.nEndNode;
             o_rpFirstMergedDeletedTextNode = rDoc.GetNodes()[rRedline.nSttNode]->GetTextNode();
@@ -573,7 +573,7 @@ bool SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
         if( !bOk )
             return false;
 
-        pDoc->getIDocumentRedlineAccess().DeleteRedline( rDelPam, false, USHRT_MAX );
+        pDoc->getIDocumentRedlineAccess().DeleteRedline( rDelPam, false, RedlineType::Any );
     }
 
     // Both 'deletes' can be consolidated, so 'move' the related character
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 7e9c54ae2bc5..1d9facd95822 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -1364,7 +1364,7 @@ void SwRedlineSaveData::RedlineToDoc( SwPaM const & rPam )
     // First, delete the "old" so that in an Append no unexpected things will
     // happen, e.g. a delete in an insert. In the latter case the just restored
     // content will be deleted and not the one you originally wanted.
-    rDoc.getIDocumentRedlineAccess().DeleteRedline( *pRedl, false, USHRT_MAX );
+    rDoc.getIDocumentRedlineAccess().DeleteRedline( *pRedl, false, RedlineType::Any );
 
     RedlineFlags eOld = rDoc.getIDocumentRedlineAccess().GetRedlineFlags();
     rDoc.getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld | RedlineFlags::DontCombineRedlines );
@@ -1408,7 +1408,7 @@ bool SwUndo::FillSaveData(
     }
     if( !rSData.empty() && bDelRange )
     {
-        rRange.GetDoc()->getIDocumentRedlineAccess().DeleteRedline( rRange, false, USHRT_MAX );
+        rRange.GetDoc()->getIDocumentRedlineAccess().DeleteRedline( rRange, false, RedlineType::Any );
     }
     return !rSData.empty();
 }
@@ -1426,7 +1426,7 @@ bool SwUndo::FillSaveDataForFormat(
     for ( ; n < rTable.size(); ++n )
     {
         SwRangeRedline* pRedl = rTable[n];
-        if ( nsRedlineType_t::REDLINE_FORMAT == pRedl->GetType() )
+        if ( RedlineType::Format == pRedl->GetType() )
         {
             const SwComparePosition eCmpPos = ComparePosition( *pStt, *pEnd, *pRedl->Start(), *pRedl->End() );
             if ( eCmpPos != SwComparePosition::Before
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 5b429992bbb5..63ed58035aac 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -93,7 +93,7 @@ void SwUndoInsert::Init(const SwNodeIndex & rNd)
     pDoc = rNd.GetNode().GetDoc();
     if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
     {
-        pRedlData.reset( new SwRedlineData( nsRedlineType_t::REDLINE_INSERT,
+        pRedlData.reset( new SwRedlineData( RedlineType::Insert,
                                        pDoc->getIDocumentRedlineAccess().GetRedlineAuthor() ) );
         SetRedlineFlags( pDoc->getIDocumentRedlineAccess().GetRedlineFlags() );
     }
@@ -165,7 +165,7 @@ bool SwUndoInsert::CanGrouping( const SwPosition& rPos )
             const SwRedlineTable& rTable = rDoc.getIDocumentRedlineAccess().GetRedlineTable();
             if( !rTable.empty() )
             {
-                SwRedlineData aRData( nsRedlineType_t::REDLINE_INSERT, rDoc.getIDocumentRedlineAccess().GetRedlineAuthor() );
+                SwRedlineData aRData( RedlineType::Insert, rDoc.getIDocumentRedlineAccess().GetRedlineAuthor() );
                 const SwIndexReg* pIReg = rPos.nContent.GetIdxReg();
                 for(SwRangeRedline* pRedl : rTable)
                 {
@@ -219,7 +219,7 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext)
             pPam->SetMark();
             pPam->Move( fnMoveBackward );
             pPam->Exchange();
-            pTmpDoc->getIDocumentRedlineAccess().DeleteRedline( *pPam, true, USHRT_MAX );
+            pTmpDoc->getIDocumentRedlineAccess().DeleteRedline( *pPam, true, RedlineType::Any );
         }
         pPam->DeleteMark();
         pTmpDoc->getIDocumentContentOperations().DelFullPara( *pPam );
@@ -242,7 +242,7 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext)
             {
                 aPaM.GetPoint()->nContent -= nLen;
                 if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() ))
-                    pTmpDoc->getIDocumentRedlineAccess().DeleteRedline( aPaM, true, USHRT_MAX );
+                    pTmpDoc->getIDocumentRedlineAccess().DeleteRedline( aPaM, true, RedlineType::Any );
                 if (m_bWithRsid)
                 {
                     // RSID was added: remove any CHARFMT/AUTOFMT that may be
@@ -263,7 +263,7 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext)
             {
                 aPaM.Move(fnMoveBackward);
                 if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() ))
-                    pTmpDoc->getIDocumentRedlineAccess().DeleteRedline( aPaM, true, USHRT_MAX );
+                    pTmpDoc->getIDocumentRedlineAccess().DeleteRedline( aPaM, true, RedlineType::Any );
                 RemoveIdxFromRange( aPaM, false );
             }
 
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index c19b6cf0242d..bf64fc3fca5f 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -61,7 +61,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
         }
         if (nSttContent < nTextNdLen)
         {
-            pDoc->getIDocumentRedlineAccess().DeleteRedline(aPam, false, USHRT_MAX);
+            pDoc->getIDocumentRedlineAccess().DeleteRedline(aPam, false, RedlineType::Any);
         }
     }
 
@@ -140,7 +140,7 @@ bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
         if( !bOk )
             return false;
 
-        pDoc->getIDocumentRedlineAccess().DeleteRedline( aPam, false, USHRT_MAX );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list