include/editeng/svxrtf.hxx                              |    2 
 solenv/clang-format/excludelist                         |    2 
 solenv/gdb/libreoffice/sw.py                            |    6 
 solenv/vs/LibreOffice.natvis                            |    2 
 sw/inc/IDocumentMarkAccess.hxx                          |    4 
 sw/inc/contentindex.hxx                                 |   97 +++++++---------
 sw/inc/ndtxt.hxx                                        |   36 ++---
 sw/inc/node.hxx                                         |   12 -
 sw/inc/pam.hxx                                          |    8 -
 sw/inc/pch/precompiled_msword.hxx                       |    2 
 sw/inc/pch/precompiled_swui.hxx                         |    2 
 sw/inc/pch/precompiled_vbaswobj.hxx                     |    2 
 sw/inc/splargs.hxx                                      |   26 ++--
 sw/qa/core/unocore/unocore.cxx                          |    2 
 sw/qa/extras/mailmerge/mailmerge.cxx                    |    2 
 sw/qa/extras/uiwriter/uiwriter7.cxx                     |    2 
 sw/source/core/access/parachangetrackinginfo.cxx        |    2 
 sw/source/core/bastyp/index.cxx                         |   78 ++++++------
 sw/source/core/crsr/crsrsh.cxx                          |    8 -
 sw/source/core/crsr/crstrvl.cxx                         |    4 
 sw/source/core/crsr/findattr.cxx                        |    2 
 sw/source/core/crsr/findtxt.cxx                         |    4 
 sw/source/core/crsr/pam.cxx                             |   14 +-
 sw/source/core/crsr/swcrsr.cxx                          |    4 
 sw/source/core/doc/DocumentContentOperationsManager.cxx |   40 +++---
 sw/source/core/doc/DocumentLayoutManager.cxx            |    2 
 sw/source/core/doc/DocumentRedlineManager.cxx           |    2 
 sw/source/core/doc/docbm.cxx                            |   22 +--
 sw/source/core/doc/docedt.cxx                           |   16 +-
 sw/source/core/doc/docfld.cxx                           |    2 
 sw/source/core/doc/docfmt.cxx                           |    2 
 sw/source/core/doc/doclay.cxx                           |    4 
 sw/source/core/doc/docnew.cxx                           |    4 
 sw/source/core/doc/docredln.cxx                         |    4 
 sw/source/core/doc/doctxm.cxx                           |    8 -
 sw/source/core/doc/extinput.cxx                         |    6 
 sw/source/core/docnode/ndcopy.cxx                       |    2 
 sw/source/core/docnode/ndtbl.cxx                        |   10 -
 sw/source/core/docnode/node.cxx                         |    4 
 sw/source/core/docnode/nodes.cxx                        |    4 
 sw/source/core/docnode/section.cxx                      |    2 
 sw/source/core/edit/autofmt.cxx                         |    4 
 sw/source/core/edit/edattr.cxx                          |    2 
 sw/source/core/edit/edglss.cxx                          |    4 
 sw/source/core/edit/editsh.cxx                          |    2 
 sw/source/core/edit/edlingu.cxx                         |    2 
 sw/source/core/fields/ddetbl.cxx                        |    4 
 sw/source/core/frmedt/fecopy.cxx                        |   10 -
 sw/source/core/inc/MarkManager.hxx                      |    2 
 sw/source/core/inc/docfld.hxx                           |    4 
 sw/source/core/inc/mvsave.hxx                           |   14 +-
 sw/source/core/inc/pamtyp.hxx                           |    8 -
 sw/source/core/inc/txmsrt.hxx                           |   12 -
 sw/source/core/layout/ftnfrm.cxx                        |    2 
 sw/source/core/layout/trvlfrm.cxx                       |    2 
 sw/source/core/swg/SwXMLTextBlocks.cxx                  |    2 
 sw/source/core/table/swtable.cxx                        |    8 -
 sw/source/core/text/porlay.cxx                          |    2 
 sw/source/core/text/porrst.cxx                          |    2 
 sw/source/core/tox/ToxTextGenerator.cxx                 |    4 
 sw/source/core/tox/txmsrt.cxx                           |   10 -
 sw/source/core/txtnode/atrfld.cxx                       |    2 
 sw/source/core/txtnode/atrflyin.cxx                     |    2 
 sw/source/core/txtnode/ndtxt.cxx                        |   72 +++++------
 sw/source/core/txtnode/thints.cxx                       |   40 +++---
 sw/source/core/txtnode/txtedt.cxx                       |    8 -
 sw/source/core/undo/SwUndoField.cxx                     |    2 
 sw/source/core/undo/unattr.cxx                          |    4 
 sw/source/core/undo/undel.cxx                           |    4 
 sw/source/core/undo/undobj.cxx                          |    8 -
 sw/source/core/undo/undobj1.cxx                         |    4 
 sw/source/core/undo/undraw.cxx                          |    2 
 sw/source/core/undo/unins.cxx                           |    2 
 sw/source/core/undo/unmove.cxx                          |    6 
 sw/source/core/undo/unovwr.cxx                          |    8 -
 sw/source/core/undo/unsect.cxx                          |    4 
 sw/source/core/undo/untbl.cxx                           |   10 -
 sw/source/core/undo/untblk.cxx                          |    4 
 sw/source/core/unocore/unodraw.cxx                      |    2 
 sw/source/core/unocore/unoframe.cxx                     |    2 
 sw/source/core/unocore/unoportenum.cxx                  |    2 
 sw/source/filter/basflt/fltini.cxx                      |    2 
 sw/source/filter/basflt/shellio.cxx                     |    2 
 sw/source/filter/docx/swdocxreader.cxx                  |    2 
 sw/source/filter/html/htmlgrin.cxx                      |    2 
 sw/source/filter/html/htmlsect.cxx                      |    6 
 sw/source/filter/html/htmltab.cxx                       |    2 
 sw/source/filter/html/swhtml.cxx                        |    2 
 sw/source/filter/ww8/wrtw8nds.cxx                       |   10 -
 sw/source/filter/ww8/wrtww8.cxx                         |    2 
 sw/source/filter/ww8/ww8glsy.cxx                        |    2 
 sw/source/filter/ww8/ww8par6.cxx                        |    4 
 sw/source/filter/xml/xmltbli.cxx                        |    2 
 sw/source/uibase/dochdl/swdtflvr.cxx                    |    2 
 sw/source/uibase/docvw/edtwin.cxx                       |    4 
 sw/source/uibase/lingu/hhcwrp.cxx                       |    2 
 sw/source/uibase/uno/unoatxt.cxx                        |    2 
 sw/source/uibase/wrtsh/wrtsh2.cxx                       |    2 
 vcl/ios/DataFlavorMapping.cxx                           |    2 
 99 files changed, 397 insertions(+), 400 deletions(-)

New commits:
commit 9fdb06d65a8f2c3401392bffee9c4639e178aada
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Jul 25 12:05:23 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Jul 25 15:28:39 2022 +0200

    rename SwIndex->SwContentIndex
    
    to help my poor brain with the different kinds of index we have floating
    around
    
    Change-Id: I47ed223922170687d7e07812445aed66b3218230
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137404
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/include/editeng/svxrtf.hxx b/include/editeng/svxrtf.hxx
index e5ed1949bbb4..b75df2d6ed27 100644
--- a/include/editeng/svxrtf.hxx
+++ b/include/editeng/svxrtf.hxx
@@ -38,7 +38,7 @@ class SvxRTFItemStackType;
 class SvxRTFItemStackList : public 
std::vector<std::unique_ptr<SvxRTFItemStackType>> {};
 
 // Mapper-Classes for the various requirements on Document positions
-//        Swg - NodePosition is a SwIndex, which is used internally
+//        Swg - NodePosition is a SwContentIndex, which is used internally
 // EditEngine - ULONG to list of paragraphs
 
 class EditEngine;
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index b3ccb4fb5e05..3c012f9318e7 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -12070,6 +12070,7 @@ sw/inc/charfmt.hxx
 sw/inc/chpfld.hxx
 sw/inc/cmdid.h
 sw/inc/comcore.hxx
+sw/inc/contentindex.hxx
 sw/inc/crsrsh.hxx
 sw/inc/crstate.hxx
 sw/inc/cshtyp.hxx
@@ -12139,7 +12140,6 @@ sw/inc/hfspacingitem.hxx
 sw/inc/hhcwrp.hxx
 sw/inc/hints.hxx
 sw/inc/htmltbl.hxx
-sw/inc/index.hxx
 sw/inc/init.hxx
 sw/inc/iodetect.hxx
 sw/inc/istyleaccess.hxx
diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py
index 707d0a425518..e669320fb41a 100644
--- a/solenv/gdb/libreoffice/sw.py
+++ b/solenv/gdb/libreoffice/sw.py
@@ -38,8 +38,8 @@ class SwNodeIndexPrinter(object):
         nodeindex = block['nStart'] + node['m_nOffset']
         return "%s (node %d)" % (self.typename, nodeindex)
 
-class SwIndexPrinter(object):
-    '''Prints SwIndex.'''
+class SwContentIndexPrinter(object):
+    '''Prints SwContentIndex.'''
 
     def __init__(self, typename, value):
         self.typename = typename
@@ -284,7 +284,7 @@ def build_pretty_printers():
     printer.add('BigPtrArray', BigPtrArrayPrinter)
     printer.add('SwPosition', SwPositionPrinter)
     printer.add('SwNodeIndex', SwNodeIndexPrinter)
-    printer.add('SwIndex', SwIndexPrinter)
+    printer.add('SwContentIndex', SwContentIndexPrinter)
     printer.add('SwPaM', SwPaMPrinter)
     printer.add('SwUnoCursor', SwUnoCursorPrinter)
     printer.add('SwRect', SwRectPrinter)
diff --git a/solenv/vs/LibreOffice.natvis b/solenv/vs/LibreOffice.natvis
index cca25a146212..23445345a631 100644
--- a/solenv/vs/LibreOffice.natvis
+++ b/solenv/vs/LibreOffice.natvis
@@ -235,7 +235,7 @@
   <Type Name="SwNodeIndex">
     <DisplayString>{{{*m_pNode}}}</DisplayString>
   </Type>
-  <Type Name="SwIndex">
+  <Type Name="SwContentIndex">
     <DisplayString>{{{m_nIndex}}}</DisplayString>
   </Type>
   <Type Name="SwPosition">
diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx
index 1243f5853e0b..0790a27ef1ea 100644
--- a/sw/inc/IDocumentMarkAccess.hxx
+++ b/sw/inc/IDocumentMarkAccess.hxx
@@ -228,8 +228,8 @@ class IDocumentMarkAccess
             const SwNodeIndex& rStt,
             const SwNodeIndex& rEnd,
             std::vector< ::sw::mark::SaveBookmark>* pSaveBkmk, // Ugly: 
SaveBookmark is core-internal
-            const SwIndex* pSttIdx,
-            const SwIndex* pEndIdx) =0;
+            const SwContentIndex* pSttIdx,
+            const SwContentIndex* pEndIdx) =0;
 
         /** Deletes a mark.
 
diff --git a/sw/inc/index.hxx b/sw/inc/contentindex.hxx
similarity index 58%
rename from sw/inc/index.hxx
rename to sw/inc/contentindex.hxx
index 22b9edf14e9d..4721abd56583 100644
--- a/sw/inc/index.hxx
+++ b/sw/inc/contentindex.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_INC_INDEX_HXX
-#define INCLUDED_SW_INC_INDEX_HXX
+#pragma once
 
 #include <sal/types.h>
 #include "swdllapi.h"
@@ -25,38 +24,38 @@
 #include <iostream>
 
 class SwContentNode;
-class SwIndexReg;
+class SwContentIndexReg;
 struct SwPosition;
 
 namespace sw::mark { class IMark; }
 
 /// Marks a character position inside a document model content node 
(SwContentNode)
-class SAL_WARN_UNUSED SW_DLLPUBLIC SwIndex
+class SAL_WARN_UNUSED SW_DLLPUBLIC SwContentIndex
 {
 private:
-    friend class SwIndexReg;
+    friend class SwContentIndexReg;
 
     sal_Int32 m_nIndex;
     SwContentNode * m_pContentNode;
     // doubly linked list of Indexes registered at m_pIndexReg
-    SwIndex * m_pNext;
-    SwIndex * m_pPrev;
+    SwContentIndex * m_pNext;
+    SwContentIndex * m_pPrev;
 
-    /// Pointer to a mark that owns this position to allow fast lookup of 
marks of an SwIndexReg.
+    /// Pointer to a mark that owns this position to allow fast lookup of 
marks of an SwContentIndexReg.
     const sw::mark::IMark* m_pMark;
 
-    SwIndex& ChgValue( const SwIndex& rIdx, sal_Int32 nNewValue );
+    SwContentIndex& ChgValue( const SwContentIndex& rIdx, sal_Int32 nNewValue 
);
     void Init(sal_Int32 const nIdx);
     void Remove();
 
 public:
-    explicit SwIndex(SwContentNode *const pContentNode, sal_Int32 const nIdx = 
0);
-    SwIndex( const SwIndex & );
-    SwIndex( const SwIndex &, short nDiff );
-    ~SwIndex() { Remove(); }
+    explicit SwContentIndex(SwContentNode *const pContentNode, sal_Int32 const 
nIdx = 0);
+    SwContentIndex( const SwContentIndex & );
+    SwContentIndex( const SwContentIndex &, short nDiff );
+    ~SwContentIndex() { Remove(); }
 
-    SwIndex& operator=( sal_Int32 const );
-    SwIndex& operator=( const SwIndex & );
+    SwContentIndex& operator=( sal_Int32 const );
+    SwContentIndex& operator=( const SwContentIndex & );
 
     sal_Int32 operator++();
     sal_Int32 operator--();
@@ -65,10 +64,10 @@ public:
     sal_Int32 operator+=( sal_Int32 const );
     sal_Int32 operator-=( sal_Int32 const );
 
-    bool operator< ( const SwIndex& ) const;
-    bool operator<=( const SwIndex& ) const;
-    bool operator> ( const SwIndex& ) const;
-    bool operator>=( const SwIndex& ) const;
+    bool operator< ( const SwContentIndex& ) const;
+    bool operator<=( const SwContentIndex& ) const;
+    bool operator> ( const SwContentIndex& ) const;
+    bool operator>=( const SwContentIndex& ) const;
 
     bool operator< ( sal_Int32 const nVal ) const { return m_nIndex <  nVal; }
     bool operator<=( sal_Int32 const nVal ) const { return m_nIndex <= nVal; }
@@ -77,106 +76,106 @@ public:
     bool operator==( sal_Int32 const nVal ) const { return m_nIndex == nVal; }
     bool operator!=( sal_Int32 const nVal ) const { return m_nIndex != nVal; }
 
-    bool operator==( const SwIndex& rSwIndex ) const
+    bool operator==( const SwContentIndex& rSwContentIndex ) const
     {
-        return (m_nIndex    == rSwIndex.m_nIndex)
-            && (m_pContentNode == rSwIndex.m_pContentNode);
+        return (m_nIndex    == rSwContentIndex.m_nIndex)
+            && (m_pContentNode == rSwContentIndex.m_pContentNode);
     }
 
-    bool operator!=( const SwIndex& rSwIndex ) const
+    bool operator!=( const SwContentIndex& rSwContentIndex ) const
     {
-        return (m_nIndex    != rSwIndex.m_nIndex)
-            || (m_pContentNode != rSwIndex.m_pContentNode);
+        return (m_nIndex    != rSwContentIndex.m_nIndex)
+            || (m_pContentNode != rSwContentIndex.m_pContentNode);
     }
 
     sal_Int32 GetIndex() const { return m_nIndex; }
 
     // Assignments without creating a temporary object.
-    SwIndex &Assign(SwContentNode *, sal_Int32);
+    SwContentIndex &Assign(SwContentNode *, sal_Int32);
 
-    // Returns pointer to SwContentNode (for RTTI at SwIndexReg).
+    // Returns pointer to SwContentNode (for RTTI at SwContentIndexReg).
     const SwContentNode* GetContentNode() const { return m_pContentNode; }
-    const SwIndex* GetNext() const { return m_pNext; }
+    const SwContentIndex* GetNext() const { return m_pNext; }
 
     const sw::mark::IMark* GetMark() const { return m_pMark; }
     void SetMark(const sw::mark::IMark* pMark);
 };
 
-SW_DLLPUBLIC std::ostream& operator <<(std::ostream& s, const SwIndex& index);
+SW_DLLPUBLIC std::ostream& operator <<(std::ostream& s, const SwContentIndex& 
index);
 
-/// Helper base class for SwContentNode to manage the list of attached SwIndex
-class SAL_WARN_UNUSED SwIndexReg
+/// Helper base class for SwContentNode to manage the list of attached 
SwContentIndex
+class SAL_WARN_UNUSED SwContentIndexReg
 {
-    friend class SwIndex;
+    friend class SwContentIndex;
     friend bool sw_PosOk(const SwPosition & aPos);
 
-    const SwIndex * m_pFirst;
-    const SwIndex * m_pLast;
+    const SwContentIndex * m_pFirst;
+    const SwContentIndex * m_pLast;
 
 protected:
-    virtual void Update( SwIndex const & rPos, const sal_Int32 nChangeLen,
+    virtual void Update( SwContentIndex const & rPos, const sal_Int32 
nChangeLen,
                  const bool bNegative = false, const bool bDelete = false );
 
     bool HasAnyIndex() const { return nullptr != m_pFirst; }
 
-    SwIndexReg();
+    SwContentIndexReg();
 public:
-    virtual ~SwIndexReg();
+    virtual ~SwContentIndexReg();
 
     void MoveTo( SwContentNode& rArr );
-    const SwIndex* GetFirstIndex() const { return m_pFirst; }
+    const SwContentIndex* GetFirstIndex() const { return m_pFirst; }
 };
 
 #ifndef DBG_UTIL
 
-inline sal_Int32 SwIndex::operator++()
+inline sal_Int32 SwContentIndex::operator++()
 {
     return ChgValue( *this, m_nIndex+1 ).m_nIndex;
 }
 
-inline sal_Int32 SwIndex::operator--()
+inline sal_Int32 SwContentIndex::operator--()
 {
     return ChgValue( *this, m_nIndex-1 ).m_nIndex;
 }
 
-inline sal_Int32 SwIndex::operator--(int)
+inline sal_Int32 SwContentIndex::operator--(int)
 {
     sal_Int32 const nOldIndex = m_nIndex;
     ChgValue( *this, m_nIndex-1 );
     return nOldIndex;
 }
 
-inline sal_Int32 SwIndex::operator+=( sal_Int32 const nVal )
+inline sal_Int32 SwContentIndex::operator+=( sal_Int32 const nVal )
 {
     return ChgValue( *this, m_nIndex + nVal ).m_nIndex;
 }
 
-inline sal_Int32 SwIndex::operator-=( sal_Int32 const nVal )
+inline sal_Int32 SwContentIndex::operator-=( sal_Int32 const nVal )
 {
     return ChgValue( *this, m_nIndex - nVal ).m_nIndex;
 }
 
-inline bool SwIndex::operator< ( const SwIndex& rIndex ) const
+inline bool SwContentIndex::operator< ( const SwContentIndex& rIndex ) const
 {
     return m_nIndex <  rIndex.m_nIndex;
 }
 
-inline bool SwIndex::operator<=( const SwIndex& rIndex ) const
+inline bool SwContentIndex::operator<=( const SwContentIndex& rIndex ) const
 {
     return m_nIndex <= rIndex.m_nIndex;
 }
 
-inline bool SwIndex::operator> ( const SwIndex& rIndex ) const
+inline bool SwContentIndex::operator> ( const SwContentIndex& rIndex ) const
 {
     return m_nIndex >  rIndex.m_nIndex;
 }
 
-inline bool SwIndex::operator>=( const SwIndex& rIndex ) const
+inline bool SwContentIndex::operator>=( const SwContentIndex& rIndex ) const
 {
     return m_nIndex >= rIndex.m_nIndex;
 }
 
-inline SwIndex& SwIndex::operator= ( sal_Int32 const nVal )
+inline SwContentIndex& SwContentIndex::operator= ( sal_Int32 const nVal )
 {
     if (m_nIndex != nVal)
     {
@@ -187,6 +186,4 @@ inline SwIndex& SwIndex::operator= ( sal_Int32 const nVal )
 
 #endif // ifndef DBG_UTIL
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index c80174918b71..5b71bfd3d593 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -141,8 +141,8 @@ class SW_DLLPUBLIC SwTextNode final
                                 bool bChgFollow = true );
 
     SAL_DLLPRIVATE void CutImpl(
-          SwTextNode * const pDest, const SwIndex & rDestStart,
-          const SwIndex & rStart, /*const*/ sal_Int32 nLen,
+          SwTextNode * const pDest, const SwContentIndex & rDestStart,
+          const SwContentIndex & rStart, /*const*/ sal_Int32 nLen,
           const bool bUpdate = true );
 
     /// Move all comprising hard attributes to the AttrSet of the paragraph.
@@ -250,7 +250,7 @@ public:
     /// @param rStr text to insert; in case it does not fit into the capacity
     ///             of the node, the longest prefix that fits is inserted
     /// @return the prefix of rStr that was actually inserted
-    OUString InsertText( const OUString & rStr, const SwIndex & rIdx,
+    OUString InsertText( const OUString & rStr, const SwContentIndex & rIdx,
                      const SwInsertFlags nMode
                          = SwInsertFlags::DEFAULT );
 
@@ -258,7 +258,7 @@ public:
         ATTENTION: must not be called with a range that overlaps the start of
                    an attribute with both extent and dummy char
      */
-    void EraseText ( const SwIndex &rIdx, const sal_Int32 nCount = 
SAL_MAX_INT32,
+    void EraseText ( const SwContentIndex &rIdx, const sal_Int32 nCount = 
SAL_MAX_INT32,
                      const SwInsertFlags nMode = SwInsertFlags::DEFAULT );
 
     /** delete all attributes.
@@ -276,7 +276,7 @@ public:
         which are simply included in the range.
      */
     void RstTextAttr(
-        const SwIndex &rIdx,
+        const SwContentIndex &rIdx,
         const sal_Int32 nLen,
         const sal_uInt16 nWhich = 0,
         const SfxItemSet* pSet = nullptr,
@@ -333,24 +333,24 @@ public:
     /** Actions on text and attributes.
        introduce optional parameter to control, if all attributes have to be 
copied. */
     void CopyText( SwTextNode * const pDest,
-               const SwIndex &rStart,
+               const SwContentIndex &rStart,
                const sal_Int32 nLen,
                const bool bForceCopyOfAllAttrs );
     void CopyText( SwTextNode * const pDest,
-               const SwIndex &rDestStart,
-               const SwIndex &rStart,
+               const SwContentIndex &rDestStart,
+               const SwContentIndex &rStart,
                sal_Int32 nLen,
                const bool bForceCopyOfAllAttrs = false );
 
     void        CutText(SwTextNode * const pDest,
-                    const SwIndex & rStart, const sal_Int32 nLen);
-    inline void CutText(SwTextNode * const pDest, const SwIndex &rDestStart,
-                    const SwIndex & rStart, const sal_Int32 nLen);
+                    const SwContentIndex & rStart, const sal_Int32 nLen);
+    inline void CutText(SwTextNode * const pDest, const SwContentIndex 
&rDestStart,
+                    const SwContentIndex & rStart, const sal_Int32 nLen);
 
     /// replace nDelLen characters at rStart with rText
     /// in case the replacement does not fit, it is partially inserted up to
     /// the capacity of the node
-    void ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen,
+    void ReplaceText( const SwContentIndex& rStart, const sal_Int32 nDelLen,
             const OUString & rText );
     void ReplaceTextOnly( sal_Int32 nPos, sal_Int32 nLen,
             const OUString& rText,
@@ -366,7 +366,7 @@ public:
     SwContentNode *AppendNode( const SwPosition & );
 
     /// When appropriate set DontExpand-flag at INet or character styles 
respectively.
-    bool DontExpandFormat( const SwIndex& rIdx, bool bFlag = true,
+    bool DontExpandFormat( const SwContentIndex& rIdx, bool bFlag = true,
                         bool bFormatToTextAttributes = true );
 
     enum GetTextAttrMode {
@@ -713,7 +713,7 @@ public:
                             const bool bAddSpaceAfterListLabelStr = false,
                             const bool bWithSpacesForLevel = false,
                             const ExpandMode eAdditionalMode = 
ExpandMode::ExpandFootnote | ExpandMode::HideFieldmarkCommands) const;
-    bool CopyExpandText( SwTextNode& rDestNd, const SwIndex* pDestIdx,
+    bool CopyExpandText( SwTextNode& rDestNd, const SwContentIndex* pDestIdx,
                            sal_Int32 nIdx, sal_Int32 nLen,
                            SwRootFrame const* pLayout,
                            bool bWithNum = false, bool bWithFootnote = true,
@@ -759,9 +759,9 @@ public:
     bool IsHidden() const;
 
 
-    /// override SwIndexReg
+    /// override SwContentIndexReg
     virtual void Update(
-        SwIndex const & rPos,
+        SwContentIndex const & rPos,
         const sal_Int32 nChangeLen,
         const bool bNegative = false,
         const bool bDelete = false ) override;
@@ -880,8 +880,8 @@ inline const SwTextNode *SwNode::GetTextNode() const
 }
 
 inline void
-SwTextNode::CutText(SwTextNode * const pDest, const SwIndex & rDestStart,
-                    const SwIndex & rStart, const sal_Int32 nLen)
+SwTextNode::CutText(SwTextNode * const pDest, const SwContentIndex & 
rDestStart,
+                    const SwContentIndex & rStart, const sal_Int32 nLen)
 {
     CutImpl( pDest, rDestStart, rStart, nLen );
 }
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index e447c9132d99..9dc0df197fc3 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -26,7 +26,7 @@
 #include "BorderCacheOwner.hxx"
 #include "ndarr.hxx"
 #include "ndtyp.hxx"
-#include "index.hxx"
+#include "contentindex.hxx"
 #include "fmtcol.hxx"
 #include "nodeoffset.hxx"
 
@@ -360,7 +360,7 @@ class SwEndNode final : public SwNode
 
 // SwContentNode
 
-class SW_DLLPUBLIC SwContentNode: public sw::BroadcastingModify, public 
SwNode, public SwIndexReg
+class SW_DLLPUBLIC SwContentNode: public sw::BroadcastingModify, public 
SwNode, public SwContentIndexReg
 {
 
     sw::WriterMultiListener m_aCondCollListener;
@@ -402,11 +402,11 @@ public:
     bool CanJoinNext( SwNodeIndex* pIdx =nullptr ) const;
     bool CanJoinPrev( SwNodeIndex* pIdx =nullptr ) const;
 
-    void MakeStartIndex( SwIndex * pIdx )   { pIdx->Assign( this, 0 ); }
-    void MakeEndIndex( SwIndex * pIdx )     { pIdx->Assign( this, Len() ); }
+    void MakeStartIndex( SwContentIndex * pIdx )   { pIdx->Assign( this, 0 ); }
+    void MakeEndIndex( SwContentIndex * pIdx )     { pIdx->Assign( this, Len() 
); }
 
-    bool GoNext(SwIndex *, sal_uInt16 nMode ) const;
-    bool GoPrevious(SwIndex *, sal_uInt16 nMode ) const;
+    bool GoNext(SwContentIndex *, sal_uInt16 nMode ) const;
+    bool GoPrevious(SwContentIndex *, sal_uInt16 nMode ) const;
 
     /// @see GetFrameOfModify
     SwContentFrame *getLayoutFrame( const SwRootFrame*,
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
index 4e8d9619dc7f..49b1aa582c4e 100644
--- a/sw/inc/pam.hxx
+++ b/sw/inc/pam.hxx
@@ -21,7 +21,7 @@
 
 #include <sal/types.h>
 #include "ring.hxx"
-#include "index.hxx"
+#include "contentindex.hxx"
 #include "ndindex.hxx"
 #include "swdllapi.h"
 #include "nodeoffset.hxx"
@@ -36,9 +36,9 @@ class Point;
 struct SAL_WARN_UNUSED SW_DLLPUBLIC SwPosition
 {
     SwNodeIndex nNode;
-    SwIndex nContent;
+    SwContentIndex nContent;
 
-    SwPosition( const SwNodeIndex &rNode, const SwIndex &rContent );
+    SwPosition( const SwNodeIndex &rNode, const SwContentIndex &rContent );
     explicit SwPosition( const SwNodeIndex &rNode );
     explicit SwPosition( const SwNode& rNode );
     explicit SwPosition( SwContentNode& rNode, const sal_Int32 nOffset = 0 );
@@ -179,7 +179,7 @@ public:
     {
         if (m_pMark != m_pPoint)
         {
-            /** clear the mark position; this helps if mark's SwIndex is
+            /** clear the mark position; this helps if mark's SwContentIndex is
                registered at some node, and that node is then deleted */
             *m_pMark = SwPosition( SwNodeIndex( GetNode().GetNodes() ) );
             m_pMark = m_pPoint;
diff --git a/sw/inc/pch/precompiled_msword.hxx 
b/sw/inc/pch/precompiled_msword.hxx
index 4cef754130eb..256ae4d2a05a 100644
--- a/sw/inc/pch/precompiled_msword.hxx
+++ b/sw/inc/pch/precompiled_msword.hxx
@@ -582,7 +582,7 @@
 #include <ftninfo.hxx>
 #include <grfatr.hxx>
 #include <hintids.hxx>
-#include <index.hxx>
+#include <contentindex.hxx>
 #include <lineinfo.hxx>
 #include <mdiexp.hxx>
 #include <msfilter.hxx>
diff --git a/sw/inc/pch/precompiled_swui.hxx b/sw/inc/pch/precompiled_swui.hxx
index 34a6e54ec8c1..0b44d6a7af9b 100644
--- a/sw/inc/pch/precompiled_swui.hxx
+++ b/sw/inc/pch/precompiled_swui.hxx
@@ -565,7 +565,7 @@
 #include <frmpage.hxx>
 #include <glossary.hxx>
 #include <hintids.hxx>
-#include <index.hxx>
+#include <contentindex.hxx>
 #include <label.hxx>
 #include <labimg.hxx>
 #include <macassgn.hxx>
diff --git a/sw/inc/pch/precompiled_vbaswobj.hxx 
b/sw/inc/pch/precompiled_vbaswobj.hxx
index a7bfad5dbf54..a4439f274f64 100644
--- a/sw/inc/pch/precompiled_vbaswobj.hxx
+++ b/sw/inc/pch/precompiled_vbaswobj.hxx
@@ -415,7 +415,7 @@
 #include <format.hxx>
 #include <frmfmt.hxx>
 #include <hintids.hxx>
-#include <index.hxx>
+#include <contentindex.hxx>
 #include <ndarr.hxx>
 #include <ndindex.hxx>
 #include <ndtyp.hxx>
diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx
index 37d7baa3016c..7f0c4795a031 100644
--- a/sw/inc/splargs.hxx
+++ b/sw/inc/splargs.hxx
@@ -29,30 +29,30 @@
 
 class SwTextFrame;
 class SwTextNode;
-class SwIndex;
+class SwContentIndex;
 namespace vcl { class Font; }
 namespace com::sun::star::linguistic2 { class XHyphenatedWord; }
 
 struct SwArgsBase     // used for text conversion (Hangul/Hanja, ...)
 {
-    SwTextNode  *pStartNode;
-    SwIndex    *pStartIdx;
-    SwTextNode  *pEndNode;
-    SwIndex    *pEndIdx;
+    SwTextNode     *pStartNode;
+    SwContentIndex *pStartIdx;
+    SwTextNode     *pEndNode;
+    SwContentIndex *pEndIdx;
 
     SwArgsBase(
-            SwTextNode* pStart, SwIndex& rStart,
-            SwTextNode* pEnd, SwIndex& rEnd )
+            SwTextNode* pStart, SwContentIndex& rStart,
+            SwTextNode* pEnd, SwContentIndex& rEnd )
         : pStartNode( pStart ), pStartIdx( &rStart ),
           pEndNode( pEnd ), pEndIdx( &rEnd )
         {}
 
-    void SetStart(SwTextNode* pStart, SwIndex& rStart )
+    void SetStart(SwTextNode* pStart, SwContentIndex& rStart )
     {
         pStartNode = pStart;    pStartIdx = &rStart ;
     }
 
-    void SetEnd( SwTextNode* pEnd, SwIndex& rEnd  )
+    void SetEnd( SwTextNode* pEnd, SwContentIndex& rEnd  )
     {
         pEndNode = pEnd;        pEndIdx = &rEnd ;
     }
@@ -72,8 +72,8 @@ struct SwConversionArgs : SwArgsBase
     bool            bAllowImplicitChangesForNotConvertibleText;
 
     SwConversionArgs( LanguageType nLang,
-            SwTextNode* pStart, SwIndex& rStart,
-            SwTextNode* pEnd, SwIndex& rEnd )
+            SwTextNode* pStart, SwContentIndex& rStart,
+            SwTextNode* pEnd, SwContentIndex& rEnd )
         : SwArgsBase( pStart, rStart, pEnd, rEnd ),
           nConvSrcLang( nLang ),
           nConvTextLang( LANGUAGE_NONE ),
@@ -93,8 +93,8 @@ struct SwSpellArgs : SwArgsBase
 
     SwSpellArgs(css::uno::Reference<
             css::linguistic2::XSpellChecker1 > const &rxSplChk,
-            SwTextNode* pStart, SwIndex& rStart,
-            SwTextNode* pEnd, SwIndex& rEnd,
+            SwTextNode* pStart, SwContentIndex& rStart,
+            SwTextNode* pEnd, SwContentIndex& rEnd,
             bool bGrammar )
         :   SwArgsBase( pStart, rStart, pEnd, rEnd ),
             xSpeller( rxSplChk ),
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index f588821181c0..a9381d014791 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -89,7 +89,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, flyAtParaAnchor)
     auto const xAnchor = xTextFrame->getAnchor();
     uno::Reference<text::XTextContent> const xFieldmark(
         xMSF->createInstance("com.sun.star.text.Fieldmark"), 
uno::UNO_QUERY_THROW);
-    // this crashed because the anchor didn't have SwIndex
+    // this crashed because the anchor didn't have SwContentIndex
     xText->insertTextContent(xAnchor, xFieldmark, false);
 }
 
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx 
b/sw/qa/extras/mailmerge/mailmerge.cxx
index a9e2c829c93d..7f09778e141f 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -539,7 +539,7 @@ DECLARE_SHELL_MAILMERGE_TEST(testTdf89214, "tdf89214.odt", 
"10-testing-addresses
 
 DECLARE_SHELL_MAILMERGE_TEST(testTdf90230, "empty.odt", 
"10-testing-addresses.ods", "testing-addresses")
 {
-    // MM of an empty document caused an assertion in the SwIndexReg dtor.
+    // MM of an empty document caused an assertion in the SwContentIndexReg 
dtor.
     executeMailMerge();
 }
 
diff --git a/sw/qa/extras/uiwriter/uiwriter7.cxx 
b/sw/qa/extras/uiwriter/uiwriter7.cxx
index 0ac6b0183068..fd63b94dcfb5 100644
--- a/sw/qa/extras/uiwriter/uiwriter7.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter7.cxx
@@ -594,7 +594,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf72788)
     }
     //Clear all the Direct Formatting ( Ctrl + M )
     SwTextNode* pTextNode = pCursor->GetNode().GetTextNode();
-    SwIndex aSt(pTextNode, 0);
+    SwContentIndex aSt(pTextNode, 0);
     sal_Int32 nEnd = pTextNode->Len();
     pTextNode->RstTextAttr(aSt, nEnd - aSt.GetIndex());
     //In case of Regression RstTextAttr() call will result to infinite 
recursion
diff --git a/sw/source/core/access/parachangetrackinginfo.cxx 
b/sw/source/core/access/parachangetrackinginfo.cxx
index 0943dc15ea25..41f697af60bf 100644
--- a/sw/source/core/access/parachangetrackinginfo.cxx
+++ b/sw/source/core/access/parachangetrackinginfo.cxx
@@ -70,7 +70,7 @@ namespace {
         }
 
         // sw_redlinehide: rely on the Hide early return above & cast
-        // TextFrameIndex to SwIndex directly
+        // TextFrameIndex to SwContentIndex directly
         const sal_Int32 nTextFrameTextStartPos = rTextFrame.IsFollow()
             ? sal_Int32(rTextFrame.GetOffset())
             : 0;
diff --git a/sw/source/core/bastyp/index.cxx b/sw/source/core/bastyp/index.cxx
index 828e658dd6d7..b508fc78009a 100644
--- a/sw/source/core/bastyp/index.cxx
+++ b/sw/source/core/bastyp/index.cxx
@@ -17,14 +17,14 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <index.hxx>
+#include <contentindex.hxx>
 
 #include <assert.h>
 #include <sal/log.hxx>
 
 #include <crossrefbookmark.hxx>
 
-SwIndex::SwIndex(SwContentNode *const pContentNode, sal_Int32 const nIdx)
+SwContentIndex::SwContentIndex(SwContentNode *const pContentNode, sal_Int32 
const nIdx)
     : m_nIndex( nIdx )
     , m_pContentNode( pContentNode )
     , m_pNext( nullptr )
@@ -34,7 +34,7 @@ SwIndex::SwIndex(SwContentNode *const pContentNode, sal_Int32 
const nIdx)
     Init(m_nIndex);
 }
 
-SwIndex::SwIndex( const SwIndex& rIdx, short nDiff )
+SwContentIndex::SwContentIndex( const SwContentIndex& rIdx, short nDiff )
     : m_pContentNode( rIdx.m_pContentNode )
     , m_pNext( nullptr )
     , m_pPrev( nullptr )
@@ -43,7 +43,7 @@ SwIndex::SwIndex( const SwIndex& rIdx, short nDiff )
     ChgValue( rIdx, rIdx.m_nIndex + nDiff );
 }
 
-SwIndex::SwIndex( const SwIndex& rIdx )
+SwContentIndex::SwContentIndex( const SwContentIndex& rIdx )
     : m_nIndex( rIdx.m_nIndex )
     , m_pContentNode( rIdx.m_pContentNode )
     , m_pNext( nullptr )
@@ -53,7 +53,7 @@ SwIndex::SwIndex( const SwIndex& rIdx )
     ChgValue( rIdx, rIdx.m_nIndex );
 }
 
-void SwIndex::Init(sal_Int32 const nIdx)
+void SwContentIndex::Init(sal_Int32 const nIdx)
 {
     if (!m_pContentNode)
     {
@@ -76,7 +76,7 @@ void SwIndex::Init(sal_Int32 const nIdx)
     }
 }
 
-SwIndex& SwIndex::ChgValue( const SwIndex& rIdx, sal_Int32 nNewValue )
+SwContentIndex& SwContentIndex::ChgValue( const SwContentIndex& rIdx, 
sal_Int32 nNewValue )
 {
     assert(m_pContentNode == rIdx.m_pContentNode);
     if (!m_pContentNode)
@@ -84,12 +84,12 @@ SwIndex& SwIndex::ChgValue( const SwIndex& rIdx, sal_Int32 
nNewValue )
         m_nIndex = 0;
         return *this; // no IndexReg => no list to sort into; m_nIndex is 0
     }
-    SwIndex* pFnd = const_cast<SwIndex*>(&rIdx);
+    SwContentIndex* pFnd = const_cast<SwContentIndex*>(&rIdx);
     if (rIdx.m_nIndex > nNewValue) // move forwards
     {
         for (;;)
         {
-            SwIndex* pPrv = pFnd->m_pPrev;
+            SwContentIndex* pPrv = pFnd->m_pPrev;
             if (!pPrv || pPrv->m_nIndex <= nNewValue)
                 break;
             pFnd = pPrv;
@@ -113,7 +113,7 @@ SwIndex& SwIndex::ChgValue( const SwIndex& rIdx, sal_Int32 
nNewValue )
     {
         for (;;)
         {
-            SwIndex* pNxt = pFnd->m_pNext;
+            SwContentIndex* pNxt = pFnd->m_pNext;
             if (!pNxt || pNxt->m_nIndex >= nNewValue)
                 break;
             pFnd = pNxt;
@@ -158,7 +158,7 @@ SwIndex& SwIndex::ChgValue( const SwIndex& rIdx, sal_Int32 
nNewValue )
     return *this;
 }
 
-void SwIndex::Remove()
+void SwContentIndex::Remove()
 {
     if (!m_pContentNode)
     {
@@ -185,7 +185,7 @@ void SwIndex::Remove()
     }
 }
 
-SwIndex& SwIndex::operator=( const SwIndex& rIdx )
+SwContentIndex& SwContentIndex::operator=( const SwContentIndex& rIdx )
 {
     bool bEqual;
     if (rIdx.m_pContentNode != m_pContentNode) // unregister!
@@ -203,7 +203,7 @@ SwIndex& SwIndex::operator=( const SwIndex& rIdx )
     return *this;
 }
 
-SwIndex& SwIndex::Assign( SwContentNode* pArr, sal_Int32 nIdx )
+SwContentIndex& SwContentIndex::Assign( SwContentNode* pArr, sal_Int32 nIdx )
 {
     if (pArr != m_pContentNode) // unregister!
     {
@@ -219,28 +219,28 @@ SwIndex& SwIndex::Assign( SwContentNode* pArr, sal_Int32 
nIdx )
     return *this;
 }
 
-void SwIndex::SetMark(const sw::mark::IMark* pMark)
+void SwContentIndex::SetMark(const sw::mark::IMark* pMark)
 {
     m_pMark = pMark;
 }
 
-SwIndexReg::SwIndexReg()
+SwContentIndexReg::SwContentIndexReg()
     : m_pFirst( nullptr ), m_pLast( nullptr )
 {
 }
 
-SwIndexReg::~SwIndexReg()
+SwContentIndexReg::~SwContentIndexReg()
 {
     assert(!m_pFirst && !m_pLast && "There are still indices registered");
 }
 
-void SwIndexReg::Update(
-    SwIndex const & rIdx,
+void SwContentIndexReg::Update(
+    SwContentIndex const & rIdx,
     const sal_Int32 nDiff,
     const bool bNeg,
     const bool /* argument is only used in derived class*/ )
 {
-    SwIndex* pStt = const_cast<SwIndex*>(&rIdx);
+    SwContentIndex* pStt = const_cast<SwContentIndex*>(&rIdx);
     const sal_Int32 nNewVal = rIdx.m_nIndex;
     if( bNeg )
     {
@@ -284,13 +284,13 @@ void SwIndexReg::Update(
     }
 }
 
-void SwIndexReg::MoveTo( SwContentNode& rArr )
+void SwContentIndexReg::MoveTo( SwContentNode& rArr )
 {
     if (!(this != &rArr && m_pFirst))
         return;
 
-    SwIndex * pIdx = const_cast<SwIndex*>(m_pFirst);
-    SwIndex * pNext;
+    SwContentIndex * pIdx = const_cast<SwContentIndex*>(m_pFirst);
+    SwContentIndex * pNext;
     while( pIdx )
     {
         pNext = pIdx->m_pNext;
@@ -303,77 +303,77 @@ void SwIndexReg::MoveTo( SwContentNode& rArr )
 
 #ifdef DBG_UTIL
 
-// SwIndex
+// SwContentIndex
 
-sal_Int32 SwIndex::operator++()
+sal_Int32 SwContentIndex::operator++()
 {
     SAL_WARN_IF( !(m_nIndex < SAL_MAX_INT32), "sw.core",
-                 "SwIndex::operator++() wraps around" );
+                 "SwContentIndex::operator++() wraps around" );
 
     ChgValue( *this, m_nIndex+1 );
     return m_nIndex;
 }
 
-sal_Int32 SwIndex::operator--(int)
+sal_Int32 SwContentIndex::operator--(int)
 {
     SAL_WARN_IF( !(m_nIndex > 0), "sw.core",
-                 "SwIndex::operator--(int) wraps around" );
+                 "SwContentIndex::operator--(int) wraps around" );
 
     const sal_Int32 nOldIndex = m_nIndex;
     ChgValue( *this, m_nIndex-1 );
     return nOldIndex;
 }
 
-sal_Int32 SwIndex::operator--()
+sal_Int32 SwContentIndex::operator--()
 {
     SAL_WARN_IF( !( m_nIndex > 0), "sw.core",
-                 "SwIndex::operator--() wraps around" );
+                 "SwContentIndex::operator--() wraps around" );
     return ChgValue( *this, m_nIndex-1 ).m_nIndex;
 }
 
-sal_Int32 SwIndex::operator+=( sal_Int32 const nVal )
+sal_Int32 SwContentIndex::operator+=( sal_Int32 const nVal )
 {
     SAL_WARN_IF( !(m_nIndex <= SAL_MAX_INT32 - nVal), "sw.core",
-                 "SwIndex SwIndex::operator+=(sal_Int32) wraps around" );
+                 "SwContentIndex SwContentIndex::operator+=(sal_Int32) wraps 
around" );
     return ChgValue( *this, m_nIndex + nVal ).m_nIndex;
 }
 
-sal_Int32 SwIndex::operator-=( sal_Int32 const nVal )
+sal_Int32 SwContentIndex::operator-=( sal_Int32 const nVal )
 {
     SAL_WARN_IF( !(m_nIndex >= nVal), "sw.core",
-                 "SwIndex::operator-=(sal_Int32) wraps around" );
+                 "SwContentIndex::operator-=(sal_Int32) wraps around" );
     return ChgValue( *this, m_nIndex - nVal ).m_nIndex;
 }
 
-bool SwIndex::operator< ( const SwIndex & rIndex ) const
+bool SwContentIndex::operator< ( const SwContentIndex & rIndex ) const
 {
     // Attempt to compare indices into different arrays
     assert(m_pContentNode == rIndex.m_pContentNode);
     return m_nIndex < rIndex.m_nIndex;
 }
 
-bool SwIndex::operator<=( const SwIndex & rIndex ) const
+bool SwContentIndex::operator<=( const SwContentIndex & rIndex ) const
 {
     // Attempt to compare indices into different arrays
     assert(m_pContentNode == rIndex.m_pContentNode);
     return m_nIndex <= rIndex.m_nIndex;
 }
 
-bool SwIndex::operator> ( const SwIndex & rIndex ) const
+bool SwContentIndex::operator> ( const SwContentIndex & rIndex ) const
 {
     // Attempt to compare indices into different arrays
     assert(m_pContentNode == rIndex.m_pContentNode);
     return m_nIndex > rIndex.m_nIndex;
 }
 
-bool SwIndex::operator>=( const SwIndex & rIndex ) const
+bool SwContentIndex::operator>=( const SwContentIndex & rIndex ) const
 {
     // Attempt to compare indices into different arrays
     assert(m_pContentNode == rIndex.m_pContentNode);
     return m_nIndex >= rIndex.m_nIndex;
 }
 
-SwIndex& SwIndex::operator= ( sal_Int32 const nVal )
+SwContentIndex& SwContentIndex::operator= ( sal_Int32 const nVal )
 {
     if (m_nIndex != nVal)
         ChgValue( *this, nVal );
@@ -383,9 +383,9 @@ SwIndex& SwIndex::operator= ( sal_Int32 const nVal )
 
 #endif
 
-std::ostream& operator <<(std::ostream& s, const SwIndex& index)
+std::ostream& operator <<(std::ostream& s, const SwContentIndex& index)
 {
-    return s << "SwIndex offset (" << index.GetIndex() << ")";
+    return s << "SwContentIndex offset (" << index.GetIndex() << ")";
 }
 
 std::ostream& operator <<(std::ostream& s, const SwNodeOffset& index)
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 3c008b87dea5..15f6484e5dac 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1543,7 +1543,7 @@ static void lcl_CheckHiddenPara( SwPosition& rPos )
     }
 
     if ( pTextNd )
-        rPos = SwPosition( aTmp, SwIndex( pTextNd, 0 ) );
+        rPos = SwPosition( aTmp, SwContentIndex( pTextNd, 0 ) );
 }
 
 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
@@ -2998,7 +2998,7 @@ SwCursorShell::SwCursorShell( SwDoc& rDoc, vcl::Window 
*pInitWin,
     SwNodeIndex aNodeIdx( *rNds.GetEndOfContent().StartOfSectionNode() );
     SwContentNode* pCNd = rNds.GoNext( &aNodeIdx ); // go to the first 
ContentNode
 
-    m_pCurrentCursor = new SwShellCursor( *this, SwPosition( aNodeIdx, 
SwIndex( pCNd, 0 )));
+    m_pCurrentCursor = new SwShellCursor( *this, SwPosition( aNodeIdx, 
SwContentIndex( pCNd, 0 )));
 
     // Register shell as dependent at current node. As a result all attribute
     // changes can be forwarded via the Link.
@@ -3729,7 +3729,7 @@ static void lcl_FillTextRange( 
uno::Reference<text::XTextRange>& rRange,
                    SwTextNode& rNode, sal_Int32 nBegin, sal_Int32 nLen )
 {
     // create SwPosition for nStartIndex
-    SwIndex aIndex( &rNode, nBegin );
+    SwContentIndex aIndex( &rNode, nBegin );
     SwPosition aStartPos( rNode, aIndex );
 
     // create SwPosition for nEndIndex
@@ -3843,7 +3843,7 @@ void SwCursorShell::GetSmartTagRect( const Point& rPt, 
SwRect& rSelectRect )
     const sal_Int32 nWordEnd = std::min(nBegin + nLen - nLeft - nRight, 
nLineEnd);
     Push();
     pCursor->DeleteMark();
-    SwIndex& rContent = GetCursor()->GetPoint()->nContent;
+    SwContentIndex& rContent = GetCursor()->GetPoint()->nContent;
     rContent = nWordStart;
     SwRect aStartRect;
     SwCursorMoveState aState;
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index d636cd27165e..6fe04b9022ee 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -667,14 +667,14 @@ lcl_FindField(bool & o_rFound, SetGetExpFields const& 
rSrtLst,
         sal_Int32 const nContentOffset)
 {
     std::unique_ptr<SetGetExpField> pSrch;
-    std::unique_ptr<SwIndex> pIndex;
+    std::unique_ptr<SwContentIndex> pIndex;
     if (-1 == nContentOffset)
     {
         pSrch.reset(new SetGetExpField(rPos.nNode, pTextField, 
&rPos.nContent));
     }
     else
     {
-        pIndex.reset(new SwIndex(rPos.nNode.GetNode().GetContentNode(), 
nContentOffset));
+        pIndex.reset(new SwContentIndex(rPos.nNode.GetNode().GetContentNode(), 
nContentOffset));
         pSrch.reset(new SetGetExpField(rPos.nNode, pTextField, pIndex.get()));
     }
 
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 51728f49b071..efd72c3c92d6 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -1327,7 +1327,7 @@ int SwFindParaAttr::DoFind(SwPaM & rCursor, 
SwMoveFnCollection const & fnMove,
     {
         const bool bRegExp(
                 SearchAlgorithms2::REGEXP == pSearchOpt->AlgorithmType2);
-        SwIndex& rSttCntIdx = rCursor.Start()->nContent;
+        SwContentIndex& rSttCntIdx = rCursor.Start()->nContent;
         const sal_Int32 nSttCnt = rSttCntIdx.GetIndex();
 
         // add to shell-cursor-ring so that the regions will be moved 
eventually
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 6e29c3614e55..8ef922d70c0c 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -379,7 +379,7 @@ bool FindTextImpl(SwPaM & rSearchPam,
     std::unique_ptr<SwPaM> pPam = sw::MakeRegion(fnMove, rRegion);
     const bool bSrchForward = &fnMove == &fnMoveForward;
     SwNodeIndex& rNdIdx = pPam->GetPoint()->nNode;
-    SwIndex& rContentIdx = pPam->GetPoint()->nContent;
+    SwContentIndex& rContentIdx = pPam->GetPoint()->nContent;
 
     // If bFound is true then the string was found and is between nStart and 
nEnd
     bool bFound = false;
@@ -957,7 +957,7 @@ int SwFindParaText::DoFind(SwPaM & rCursor, 
SwMoveFnCollection const & fnMove,
     {
         // use replace method in SwDoc
         const bool bRegExp(SearchAlgorithms2::REGEXP == 
m_rSearchOpt.AlgorithmType2);
-        SwIndex& rSttCntIdx = rCursor.Start()->nContent;
+        SwContentIndex& rSttCntIdx = rCursor.Start()->nContent;
         const sal_Int32 nSttCnt = rSttCntIdx.GetIndex();
         // add to shell-cursor-ring so that the regions will be moved 
eventually
         SwPaM* pPrev(nullptr);
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index cc21c71618c7..7fc9d34258a5 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -57,7 +57,7 @@ static sal_Int32 GetSttOrEnd( bool bCondition, const 
SwContentNode& rNd )
     return bCondition ? 0 : rNd.Len();
 }
 
-SwPosition::SwPosition( const SwNodeIndex & rNodeIndex, const SwIndex & 
rContent )
+SwPosition::SwPosition( const SwNodeIndex & rNodeIndex, const SwContentIndex & 
rContent )
     : nNode( rNodeIndex ), nContent( rContent )
 {
 }
@@ -82,7 +82,7 @@ bool SwPosition::operator<(const SwPosition &rPos) const
     // cheaper to check for == first
     if( nNode == rPos.nNode )
     {
-        // note that positions with text node but no SwIndex registered are
+        // note that positions with text node but no SwContentIndex registered 
are
         // created for text frames anchored at para (see SwXFrame::getAnchor())
         SwContentNode const*const pThisReg(nContent.GetContentNode());
         SwContentNode const*const pOtherReg(rPos.nContent.GetContentNode());
@@ -103,7 +103,7 @@ bool SwPosition::operator>(const SwPosition &rPos) const
     // cheaper to check for == first
     if( nNode == rPos.nNode )
     {
-        // note that positions with text node but no SwIndex registered are
+        // note that positions with text node but no SwContentIndex registered 
are
         // created for text frames anchored at para (see SwXFrame::getAnchor())
         SwContentNode const*const pThisReg(nContent.GetContentNode());
         SwContentNode const*const pOtherReg(rPos.nContent.GetContentNode());
@@ -124,7 +124,7 @@ bool SwPosition::operator<=(const SwPosition &rPos) const
     // cheaper to check for == first
     if( nNode == rPos.nNode )
     {
-        // note that positions with text node but no SwIndex registered are
+        // note that positions with text node but no SwContentIndex registered 
are
         // created for text frames anchored at para (see SwXFrame::getAnchor())
         SwContentNode const*const pThisReg(nContent.GetContentNode());
         SwContentNode const*const pOtherReg(rPos.nContent.GetContentNode());
@@ -145,7 +145,7 @@ bool SwPosition::operator>=(const SwPosition &rPos) const
     // cheaper to check for == first
     if( nNode == rPos.nNode )
     {
-        // note that positions with text node but no SwIndex registered are
+        // note that positions with text node but no SwContentIndex registered 
are
         // created for text frames anchored at para (see SwXFrame::getAnchor())
         SwContentNode const*const pThisReg(nContent.GetContentNode());
         SwContentNode const*const pOtherReg(rPos.nContent.GetContentNode());
@@ -283,14 +283,14 @@ bool CheckNodesRange( const SwNodeIndex& rStt,
     return false; // somewhere in between => error
 }
 
-bool GoNext(SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode )
+bool GoNext(SwNode* pNd, SwContentIndex * pIdx, sal_uInt16 nMode )
 {
     if( pNd->IsContentNode() )
         return static_cast<SwContentNode*>(pNd)->GoNext( pIdx, nMode );
     return false;
 }
 
-bool GoPrevious( SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode )
+bool GoPrevious( SwNode* pNd, SwContentIndex * pIdx, sal_uInt16 nMode )
 {
     if( pNd->IsContentNode() )
         return static_cast<SwContentNode*>(pNd)->GoPrevious( pIdx, nMode );
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index da1f1f5046f6..e9fd48b65fc4 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1690,7 +1690,7 @@ SwCursor::DoSetBidiLevelLeftRight(
     if( rNode.IsTextNode() )
     {
         const SwTextNode& rTNd = *rNode.GetTextNode();
-        SwIndex& rIdx = GetPoint()->nContent;
+        SwContentIndex& rIdx = GetPoint()->nContent;
         sal_Int32 nPos = rIdx.GetIndex();
 
         const SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions();
@@ -1975,7 +1975,7 @@ void SwCursor::DoSetBidiLevelUpDown()
     if ( !pSI )
         return;
 
-    SwIndex& rIdx = GetPoint()->nContent;
+    SwContentIndex& rIdx = GetPoint()->nContent;
     const sal_Int32 nPos = rIdx.GetIndex();
 
     if (!(nPos && nPos < rNode.GetTextNode()->GetText().getLength()))
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 5e23a6dc81f0..6820a0c4621c 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -981,7 +981,7 @@ namespace
     bool lcl_SaveFootnote( const SwNodeIndex& rSttNd, const SwNodeIndex& 
rEndNd,
                      const SwNodeIndex& rInsPos,
                      SwFootnoteIdxs& rFootnoteArr, SwFootnoteIdxs& rSaveArr,
-                     const SwIndex* pSttCnt = nullptr, const SwIndex* pEndCnt 
= nullptr )
+                     const SwContentIndex* pSttCnt = nullptr, const 
SwContentIndex* pEndCnt = nullptr )
     {
         bool bUpdateFootnote = false;
         const SwNodes& rNds = rInsPos.GetNodes();
@@ -1018,7 +1018,7 @@ namespace
                     if( bDelFootnote )
                     {
                         SwTextNode& rTextNd = 
const_cast<SwTextNode&>(pSrch->GetTextNode());
-                        SwIndex aIdx( &rTextNd, nFootnoteSttIdx );
+                        SwContentIndex aIdx( &rTextNd, nFootnoteSttIdx );
                         rTextNd.EraseText( aIdx, 1 );
                     }
                     else
@@ -1046,7 +1046,7 @@ namespace
                     {
                         // delete it
                         SwTextNode& rTextNd = 
const_cast<SwTextNode&>(pSrch->GetTextNode());
-                        SwIndex aIdx( &rTextNd, nFootnoteSttIdx );
+                        SwContentIndex aIdx( &rTextNd, nFootnoteSttIdx );
                         rTextNd.EraseText( aIdx, 1 );
                     }
                     else
@@ -1112,7 +1112,7 @@ namespace
         }
     }
 
-    void lcl_SkipAttr( const SwTextNode *pNode, SwIndex &rIdx, sal_Int32 
&rStart )
+    void lcl_SkipAttr( const SwTextNode *pNode, SwContentIndex &rIdx, 
sal_Int32 &rStart )
     {
         if( !lcl_MayOverwrite( pNode, rStart ) )
         {
@@ -1487,7 +1487,7 @@ namespace //local functions originally from docfmt.cxx
                     {
                         pCurrentNode->ResetAttr(RES_PARATR_LIST_AUTOFMT);
                         // reset also paragraph marker
-                        SwIndex nIdx( pCurrentNode, pCurrentNode->Len() );
+                        SwContentIndex nIdx( pCurrentNode, pCurrentNode->Len() 
);
                         pCurrentNode->GetTextNode()->RstTextAttr(nIdx, 1);
                     }
                     pCurrentNode = SwNodes::GoPrevious( &aIdx );
@@ -1535,7 +1535,7 @@ namespace //local functions originally from docfmt.cxx
                 return true;
             }
 
-            const SwIndex& rSt = pStt->nContent;
+            const SwContentIndex& rSt = pStt->nContent;
 
             // Attributes without an end do not have a range
             if ( !bCharAttr && !bOtherAttr )
@@ -1730,7 +1730,7 @@ namespace //local functions originally from docfmt.cxx
             if( pNode->IsTextNode() && pCharSet && pCharSet->Count() )
             {
                 SwTextNode* pTextNd = pNode->GetTextNode();
-                const SwIndex& rSt = pStt->nContent;
+                const SwContentIndex& rSt = pStt->nContent;
                 sal_Int32 nMkPos, nPtPos = rSt.GetIndex();
                 const OUString& rStr = pTextNd->GetText();
 
@@ -1767,7 +1767,7 @@ namespace //local functions originally from docfmt.cxx
                 if( !(nFlags & SetAttrMode::DONTREPLACE ) &&
                     pTextNd->HasHints() && !nMkPos && nPtPos == 
rStr.getLength())
                 {
-                    SwIndex aSt( pTextNd );
+                    SwContentIndex aSt( pTextNd );
                     if( pHistory )
                     {
                         // Save all attributes for the Undo.
@@ -1826,7 +1826,7 @@ namespace //local functions originally from docfmt.cxx
 
         SwNodeIndex aSt( rDoc.GetNodes() );
         SwNodeIndex aEnd( rDoc.GetNodes() );
-        SwIndex aCntEnd( pEnd->nContent );
+        SwContentIndex aCntEnd( pEnd->nContent );
 
         if( pNode )
         {
@@ -2724,8 +2724,8 @@ void DocumentContentOperationsManager::MoveAndJoin( 
SwPaM& rPaM, SwPosition& rPo
     SwNodeIndex aNxtIdx( aIdx );
     if( pTextNd && pTextNd->CanJoinNext( &aNxtIdx ) )
     {
-        {   // Block so SwIndex into node is deleted before Join
-            m_rDoc.CorrRel( aNxtIdx, SwPosition( aIdx, SwIndex(pTextNd,
+        {   // Block so SwContentIndex into node is deleted before Join
+            m_rDoc.CorrRel( aNxtIdx, SwPosition( aIdx, SwContentIndex(pTextNd,
                         pTextNd->GetText().getLength()) ), 0, true );
         }
         pTextNd->JoinNext();
@@ -2760,7 +2760,7 @@ bool DocumentContentOperationsManager::Overwrite( const 
SwPaM &rRg, const OUStri
     const size_t nOldAttrCnt = pNode->GetpSwpHints()
                                 ? pNode->GetpSwpHints()->Count() : 0;
     SwDataChanged aTmp( rRg );
-    SwIndex& rIdx = rPt.nContent;
+    SwContentIndex& rIdx = rPt.nContent;
     sal_Int32 const nActualStart(rIdx.GetIndex());
     sal_Int32 nStart = 0;
 
@@ -4070,7 +4070,7 @@ bool DocumentContentOperationsManager::lcl_RstTextAttr( 
SwNode* pNd, void* pArgs
     SwTextNode * pTextNode = pNd->GetTextNode();
     if( pTextNode && pTextNode->GetpSwpHints() )
     {
-        SwIndex aSt( pTextNode, 0 );
+        SwContentIndex aSt( pTextNode, 0 );
         sal_Int32 nEnd = pTextNode->Len();
 
         if( &pPara->pSttNd->nNode.GetNode() == pTextNode &&
@@ -4421,7 +4421,7 @@ bool 
DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam, SwDelet
                 // if already empty, don't call again
                 if( pEnd->nContent.GetIndex() )
                 {
-                    SwIndex aIdx( pCNd, 0 );
+                    SwContentIndex aIdx( pCNd, 0 );
                     pEndTextNode->EraseText( aIdx, pEnd->nContent.GetIndex() );
 
                     if( !pEndTextNode->Len() )
@@ -4634,7 +4634,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( 
SwPaM& rPam, const OUSt
                         OUString(), 
IDocumentMarkAccess::MarkType::UNO_BOOKMARK,
                         ::sw::mark::InsertMode::New);
 
-                SwIndex& rIdx = aDelPam.GetPoint()->nContent;
+                SwContentIndex& rIdx = aDelPam.GetPoint()->nContent;
                 rIdx.Assign( nullptr, 0 );
                 aDelPam.GetMark()->nContent = rIdx;
                 rPam.GetPoint()->nNode = SwNodeOffset(0);
@@ -5005,7 +5005,7 @@ bool 
DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
             // Don't copy the beginning completely?
             if( !bCopyCollFormat || bColumnSel || pStt->nContent.GetIndex() )
             {
-                SwIndex aDestIdx( rPos.nContent );
+                SwContentIndex aDestIdx( rPos.nContent );
                 bool bCopyOk = false;
                 if( !pDestTextNd )
                 {
@@ -5155,7 +5155,7 @@ bool 
DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
         pDestTextNd = aInsPos.GetNode().GetTextNode();
         if (pEndTextNd)
         {
-            SwIndex aDestIdx( rPos.nContent );
+            SwContentIndex aDestIdx( rPos.nContent );
             if( !pDestTextNd )
             {
                 pDestTextNd = rDoc.GetNodes().MakeTextNode( aInsPos,
@@ -5178,7 +5178,7 @@ bool 
DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
                 PUSH_NUMRULE_STATE
             }
 
-            pEndTextNd->CopyText( pDestTextNd, aDestIdx, SwIndex( pEndTextNd ),
+            pEndTextNd->CopyText( pDestTextNd, aDestIdx, SwContentIndex( 
pEndTextNd ),
                             pEnd->nContent.GetIndex() );
 
             // Also copy all format templates
@@ -5208,7 +5208,7 @@ bool 
DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
 
         {
             SwPosition startPos(SwNodeIndex(pCopyPam->GetPoint()->nNode, +1),
-                SwIndex(SwNodeIndex(pCopyPam->GetPoint()->nNode, 
+1).GetNode().GetContentNode()));
+                SwContentIndex(SwNodeIndex(pCopyPam->GetPoint()->nNode, 
+1).GetNode().GetContentNode()));
             if (bCanMoveBack)
             {   // pCopyPam is actually 1 before the copy range so move it fwd
                 SwPaM temp(*pCopyPam->GetPoint());
@@ -5241,7 +5241,7 @@ bool 
DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
         {
             // init *again* - because CopyWithFlyInFly moved startPos
             SwPosition startPos(SwNodeIndex(pCopyPam->GetPoint()->nNode, +1),
-                SwIndex(SwNodeIndex(pCopyPam->GetPoint()->nNode, 
+1).GetNode().GetContentNode()));
+                SwContentIndex(SwNodeIndex(pCopyPam->GetPoint()->nNode, 
+1).GetNode().GetContentNode()));
             if (bCanMoveBack)
             {   // pCopyPam is actually 1 before the copy range so move it fwd
                 SwPaM temp(*pCopyPam->GetPoint());
diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx 
b/sw/source/core/doc/DocumentLayoutManager.cxx
index a03d5dc1d60d..5f097deadb42 100644
--- a/sw/source/core/doc/DocumentLayoutManager.cxx
+++ b/sw/source/core/doc/DocumentLayoutManager.cxx
@@ -302,7 +302,7 @@ void DocumentLayoutManager::DelLayoutFormat( SwFrameFormat 
*pFormat )
                 {
                     // don't delete, set pointer to 0
                     
const_cast<SwFormatFlyCnt&>(pAttr->GetFlyCnt()).SetFlyFormat();
-                    SwIndex aIdx( pPos->nContent );
+                    SwContentIndex aIdx( pPos->nContent );
                     pTextNd->EraseText( aIdx, 1 );
                 }
             }
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx 
b/sw/source/core/doc/DocumentRedlineManager.cxx
index 4a4a43088f0b..3f25007c66e5 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -53,7 +53,7 @@ using namespace com::sun::star;
         // 2. check that position is valid and doesn't point after text
         void lcl_CheckPosition( const SwPosition* pPos )
         {
-            assert(dynamic_cast<SwIndexReg*>(&pPos->nNode.GetNode())
+            assert(dynamic_cast<SwContentIndexReg*>(&pPos->nNode.GetNode())
                     == pPos->nContent.GetContentNode());
 
             SwTextNode* pTextNode = pPos->nNode.GetNode().GetTextNode();
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index a59bb372487f..bcb81c2e4211 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -185,7 +185,7 @@ bool IDocumentMarkAccess::iterator::operator>=(iterator 
const& rOther) const
 
 namespace
 {
-    bool lcl_GreaterThan( const SwPosition& rPos, const SwNodeIndex& rNdIdx, 
const SwIndex* pIdx )
+    bool lcl_GreaterThan( const SwPosition& rPos, const SwNodeIndex& rNdIdx, 
const SwContentIndex* pIdx )
     {
         return pIdx != nullptr
                ? ( rPos.nNode > rNdIdx
@@ -194,7 +194,7 @@ namespace
                : rPos.nNode >= rNdIdx;
     }
 
-    bool lcl_Lower( const SwPosition& rPos, const SwNodeIndex& rNdIdx, const 
SwIndex* pIdx )
+    bool lcl_Lower( const SwPosition& rPos, const SwNodeIndex& rNdIdx, const 
SwContentIndex* pIdx )
     {
         return rPos.nNode < rNdIdx
                || ( pIdx != nullptr
@@ -974,8 +974,8 @@ namespace sw::mark
             ::sw::mark::MarkBase const*const pMark,
             SwNodeIndex const& rStt,
             SwNodeIndex const& rEnd,
-            SwIndex const*const pSttIdx,
-            SwIndex const*const pEndIdx,
+            SwContentIndex const*const pSttIdx,
+            SwContentIndex const*const pEndIdx,
             bool & rbIsPosInRange,
             bool & rbIsOtherPosInRange)
     {
@@ -1066,8 +1066,8 @@ namespace sw::mark
             const SwNodeIndex& rStt,
             const SwNodeIndex& rEnd,
             std::vector<SaveBookmark>* pSaveBkmk,
-            const SwIndex* pSttIdx,
-            const SwIndex* pEndIdx )
+            const SwContentIndex* pSttIdx,
+            const SwContentIndex* pEndIdx )
     {
         std::vector<const_iterator_t> vMarksToDelete;
         bool bIsSortingNeeded = false;
@@ -1782,7 +1782,7 @@ void MarkManager::dumpAsXml(xmlTextWriterPtr pWriter) 
const
 
 namespace
 {
-    bool lcl_Greater( const SwPosition& rPos, const SwNodeIndex& rNdIdx, const 
SwIndex* pIdx )
+    bool lcl_Greater( const SwPosition& rPos, const SwNodeIndex& rNdIdx, const 
SwContentIndex* pIdx )
     {
         return rPos.nNode > rNdIdx || ( pIdx && rPos.nNode == rNdIdx && 
rPos.nContent > pIdx->GetIndex() );
     }
@@ -1798,7 +1798,7 @@ const IDocumentMarkAccess* 
SwDoc::getIDocumentMarkAccess() const
 SaveBookmark::SaveBookmark(
     const IMark& rBkmk,
     const SwNodeIndex & rMvPos,
-    const SwIndex* pIdx)
+    const SwContentIndex* pIdx)
     : m_aName(rBkmk.GetName())
     , m_bHidden(false)
     , m_eOrigBkmType(IDocumentMarkAccess::GetType(rBkmk))
@@ -1844,7 +1844,7 @@ SaveBookmark::SaveBookmark(
 void SaveBookmark::SetInDoc(
     SwDoc* pDoc,
     const SwNodeIndex& rNewPos,
-    const SwIndex* pIdx)
+    const SwContentIndex* pIdx)
 {
     SwPaM aPam(rNewPos.GetNode());
     if(pIdx)
@@ -1901,8 +1901,8 @@ void DelBookmarks(
     const SwNodeIndex& rStt,
     const SwNodeIndex& rEnd,
     std::vector<SaveBookmark> * pSaveBkmk,
-    const SwIndex* pSttIdx,
-    const SwIndex* pEndIdx)
+    const SwContentIndex* pSttIdx,
+    const SwContentIndex* pEndIdx)
 {
     // illegal range ??
     if(rStt.GetIndex() > rEnd.GetIndex()
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index d5b0703cc44b..6923cb9ab555 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -210,7 +210,7 @@ void SaveFlyInRange( const SwPaM& rPam, const SwPosition& 
rInsPos,
 /// If there is a Fly at the SPoint, it is moved onto the Mark.
 void DelFlyInRange( const SwNodeIndex& rMkNdIdx,
                     const SwNodeIndex& rPtNdIdx,
-                    SwIndex const*const pMkIdx, SwIndex const*const pPtIdx)
+                    SwContentIndex const*const pMkIdx, SwContentIndex 
const*const pPtIdx)
 {
     assert((pMkIdx == nullptr) == (pPtIdx == nullptr));
     SwPosition const point(pPtIdx
@@ -277,7 +277,7 @@ SaveRedlEndPosForRestore::SaveRedlEndPosForRestore( const 
SwNodeIndex& rInsIdx,
 
     SwRedlineTable::size_type nFndPos;
     const SwPosition* pEnd;
-    SwPosition aSrcPos( rInsIdx, SwIndex( rNd.GetContentNode(), nCnt ));
+    SwPosition aSrcPos( rInsIdx, SwContentIndex( rNd.GetContentNode(), nCnt ));
     rDest.getIDocumentRedlineAccess().GetRedline( aSrcPos, &nFndPos );
     const SwRangeRedline* pRedl;
     while( nFndPos--
@@ -307,7 +307,7 @@ void SaveRedlEndPosForRestore::Restore()
     // This may happen if a table (or section?) will be inserted.
     if( pNode )
     {
-        SwPosition aPos( *mpSaveIndex, SwIndex( pNode, mnSaveContent ));
+        SwPosition aPos( *mpSaveIndex, SwContentIndex( pNode, mnSaveContent ));
         for( auto n = mvSavArr.size(); n; )
             *mvSavArr[ --n ] = aPos;
     }
@@ -414,8 +414,8 @@ bool sw_JoinText( SwPaM& rPam, bool bJoinPrev )
                 const std::shared_ptr< sw::mark::ContentIdxStore> 
pContentStore(sw::mark::ContentIdxStore::Create());
                 pContentStore->Save(rDoc, aOldIdx.GetIndex(), SAL_MAX_INT32);
 
-                SwIndex aAlphaIdx(pTextNd);
-                pOldTextNd->CutText( pTextNd, aAlphaIdx, SwIndex(pOldTextNd),
+                SwContentIndex aAlphaIdx(pTextNd);
+                pOldTextNd->CutText( pTextNd, aAlphaIdx, 
SwContentIndex(pOldTextNd),
                                     pOldTextNd->Len() );
                 SwPosition aAlphaPos( aIdx, aAlphaIdx );
                 rDoc.CorrRel( rPam.GetPoint()->nNode, aAlphaPos, 0, true );
@@ -479,11 +479,11 @@ bool sw_JoinText( SwPaM& rPam, bool bJoinPrev )
             // #i100466# adjust given <rPam>, if it does not belong to the 
cursors
             if ( pDelNd == rPam.GetBound().nContent.GetContentNode() )
             {
-                rPam.GetBound() = SwPosition( SwNodeIndex( *pTextNd ), 
SwIndex( pTextNd ) );
+                rPam.GetBound() = SwPosition( SwNodeIndex( *pTextNd ), 
SwContentIndex( pTextNd ) );
             }
             if( pDelNd == rPam.GetBound( false ).nContent.GetContentNode() )
             {
-                rPam.GetBound( false ) = SwPosition( SwNodeIndex( *pTextNd ), 
SwIndex( pTextNd ) );
+                rPam.GetBound( false ) = SwPosition( SwNodeIndex( *pTextNd ), 
SwContentIndex( pTextNd ) );
             }
             pTextNd->JoinNext();
         }
@@ -586,7 +586,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
                             // if grammar checking starts inside of a sentence 
the start position has to be adjusted
                             if( nBeginGrammarCheck )
                             {
-                                SwIndex aStartIndex( dynamic_cast< SwTextNode* 
>( pNd ), nBeginGrammarCheck );
+                                SwContentIndex aStartIndex( dynamic_cast< 
SwTextNode* >( pNd ), nBeginGrammarCheck );
                                 SwPosition aStart( *pNd, aStartIndex );
                                 SwCursor aCursor(aStart, nullptr);
                                 SwPosition aOrigPos = *aCursor.GetPoint();
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 9dd9102b54c5..294be63631e4 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -66,7 +66,7 @@ using namespace ::com::sun::star::uno;
 SetGetExpField::SetGetExpField(
     const SwNodeIndex& rNdIdx,
     const SwTextField* pField,
-    const SwIndex* pIdx,
+    const SwContentIndex* pIdx,
     sal_uInt16 const nPageNumber)
     : m_nPageNumber(nPageNumber)
 {
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index dbf8fefeda4a..fc6317e65984 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -257,7 +257,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
 
         pPam = new SwPaM( *rRg.GetPoint() );
 
-        SwIndex& rSt = pPam->GetPoint()->nContent;
+        SwContentIndex& rSt = pPam->GetPoint()->nContent;
         sal_Int32 nMkPos, nPtPos = rSt.GetIndex();
 
         // Special case: if the Cursor is located within a URL attribute, we 
take over it's area
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 7859d73fb844..6f0d81067955 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -904,7 +904,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const 
pTextFormatCollTable,
         aText += rText;
 
         // Insert string
-        SwIndex aIdx( pNew, 0 );
+        SwContentIndex aIdx( pNew, 0 );
         pNew->InsertText( aText, aIdx );
 
         // Insert field
@@ -1198,7 +1198,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls 
*const pTextFormatCollTable
         aText += rText;
 
         // insert text
-        SwIndex aIdx( pNew, 0 );
+        SwContentIndex aIdx( pNew, 0 );
         pNew->InsertText( aText, aIdx );
 
         // insert field
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 576dde4c7a89..462fba9d9979 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -684,7 +684,7 @@ void SwDoc::ClearDoc()
         // set the layout to the dummy pagedesc
         pFirstNd->SetAttr( SwFormatPageDesc( pDummyPgDsc ));
 
-        SwPosition aPos( *pFirstNd, SwIndex( pFirstNd ));
+        SwPosition aPos( *pFirstNd, SwContentIndex( pFirstNd ));
         SwPaM const tmpPaM(aSttIdx, SwNodeIndex(GetNodes().GetEndOfContent()));
         ::PaMCorrAbs(tmpPaM, aPos);
     }
@@ -1119,7 +1119,7 @@ SwNodeIndex SwDoc::AppendDoc(const SwDoc& rSource, 
sal_uInt16 const nStartPageNu
                 // Collect the marks starting or ending at this text node.
                 o3tl::sorted_vector<sw::mark::IMark*> aSeenMarks;
                 IDocumentMarkAccess* pMarkAccess = getIDocumentMarkAccess();
-                for (const SwIndex* pIndex = pTextNode->GetFirstIndex(); 
pIndex; pIndex = pIndex->GetNext())
+                for (const SwContentIndex* pIndex = 
pTextNode->GetFirstIndex(); pIndex; pIndex = pIndex->GetNext())
                 {
                     sw::mark::IMark* pMark = 
const_cast<sw::mark::IMark*>(pIndex->GetMark());
                     if (!pMark)
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 8c82eaba9948..e460c0ce3a68 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -1532,7 +1532,7 @@ void SwRangeRedline::MoveToSection()
             SwTextNode* pTextNd = rNds[ pSttNd->GetIndex() + 1 
]->GetTextNode();
 
             SwNodeIndex aNdIdx( *pTextNd );
-            SwPosition aPos( aNdIdx, SwIndex( pTextNd ));
+            SwPosition aPos( aNdIdx, SwContentIndex( pTextNd ));
             if( pCSttNd && pCEndNd )
             {
                 // tdf#140982 keep annotation ranges in deletions in margin 
mode
@@ -1601,7 +1601,7 @@ void SwRangeRedline::CopyToSection()
 
         SwNodeIndex aNdIdx( *pSttNd, 1 );
         SwTextNode* pTextNd = aNdIdx.GetNode().GetTextNode();
-        SwPosition aPos( aNdIdx, SwIndex( pTextNd ));
+        SwPosition aPos( aNdIdx, SwContentIndex( pTextNd ));
 
         // tdf#115815 keep original start position of collapsed annotation 
ranges
         // as temporary bookmarks (removed after file saving and file loading)
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 83310172e852..c34bdea2233a 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -175,7 +175,7 @@ void SwDoc::DeleteTOXMark( const SwTOXMark* pTOXMark )
         {
             // save attributes for Undo
             SwUndoResetAttr* pUndo = new SwUndoResetAttr(
-                SwPosition( rTextNd, SwIndex( &rTextNd, 
pTextTOXMark->GetStart() ) ),
+                SwPosition( rTextNd, SwContentIndex( &rTextNd, 
pTextTOXMark->GetStart() ) ),
                 RES_TXTATR_TOXMARK );
             GetIDocumentUndoRedo().AppendUndo( std::unique_ptr<SwUndo>(pUndo) 
);
 
@@ -1024,7 +1024,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
         else
         {
             --aEndIdx;
-            SwPosition aPos( aEndIdx, SwIndex( pFirstEmptyNd, 0 ));
+            SwPosition aPos( aEndIdx, SwContentIndex( pFirstEmptyNd, 0 ));
             SwDoc::CorrAbs( aSttIdx, aEndIdx, aPos, true );
 
             // delete flys in whole range including start node which requires
@@ -1044,7 +1044,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
 
         SwTextNode* pHeadNd = rDoc.GetNodes().MakeTextNode( aIdx,
                                 GetTextFormatColl( FORM_TITLE ) );
-        pHeadNd->InsertText( GetTitle(), SwIndex( pHeadNd ) );
+        pHeadNd->InsertText( GetTitle(), SwContentIndex( pHeadNd ) );
 
         SwSectionData headerData( SectionType::ToxHeader, GetTOXName()+"_Head" 
);
 
@@ -1820,7 +1820,7 @@ void SwTOXBaseSection::UpdatePageNum_( SwTextNode* pNd,
     }
 
     // Delete place holder
-    SwIndex aPos(pNd, nStartPos);
+    SwContentIndex aPos(pNd, nStartPos);
     SwCharFormat* pPageNoCharFormat = nullptr;
     SwpHints* pHints = pNd->GetpSwpHints();
     if(pHints)
diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx
index 305dddcd4caa..1cff3b1dc9aa 100644
--- a/sw/source/core/doc/extinput.cxx
+++ b/sw/source/core/doc/extinput.cxx
@@ -30,7 +30,7 @@
 #include <extinput.hxx>
 #include <doc.hxx>
 #include <IDocumentUndoRedo.hxx>
-#include <index.hxx>
+#include <contentindex.hxx>
 #include <ndtxt.hxx>
 #include <swundo.hxx>
 
@@ -53,7 +53,7 @@ SwExtTextInput::~SwExtTextInput()
     if( !pTNd )
         return;
 
-    SwIndex& rIdx = GetPoint()->nContent;
+    SwContentIndex& rIdx = GetPoint()->nContent;
     sal_Int32 nSttCnt = rIdx.GetIndex();
     sal_Int32 nEndCnt = GetMark()->nContent.GetIndex();
     if( nEndCnt == nSttCnt )
@@ -156,7 +156,7 @@ void SwExtTextInput::SetInputData( const 
CommandExtTextInputData& rData )
     sal_Int32 nSttCnt = Start()->nContent.GetIndex();
     sal_Int32 nEndCnt = End()->nContent.GetIndex();
 
-    SwIndex aIdx( pTNd, nSttCnt );
+    SwContentIndex aIdx( pTNd, nSttCnt );
     const OUString& rNewStr = rData.GetText();
 
     if( m_bIsOverwriteCursor && !m_sOverwriteText.isEmpty() )
diff --git a/sw/source/core/docnode/ndcopy.cxx 
b/sw/source/core/docnode/ndcopy.cxx
index 4b26acc0ea86..68fe6564faec 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -106,7 +106,7 @@ SwContentNode* SwTextNode::MakeCopy(SwDoc& rDoc, const 
SwNodeIndex& rIdx, bool c
 
     // Is that enough? What about PostIts/Fields/FieldTypes?
     // #i96213# - force copy of all attributes
-    pCpyTextNd->CopyText( pTextNd, SwIndex( pCpyTextNd ),
+    pCpyTextNd->CopyText( pTextNd, SwContentIndex( pCpyTextNd ),
         pCpyTextNd->GetText().getLength(), true );
 
     if( RES_CONDTXTFMTCOLL == pColl->Which() )
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 38f8034d0681..935896331d74 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -676,7 +676,7 @@ const SwTable* SwDoc::TextToTable( const 
SwInsertTableOptions& rInsTableOpts,
         {
             getIDocumentContentOperations().SplitNode( *pEnd, false );
             --const_cast<SwNodeIndex&>(pEnd->nNode);
-            const_cast<SwIndex&>(pEnd->nContent).Assign(
+            const_cast<SwContentIndex&>(pEnd->nContent).Assign(
                                 pEnd->nNode.GetNode().GetContentNode(), 0 );
             // A Node and at the End?
             if( pStt->nNode.GetIndex() >= pEnd->nNode.GetIndex() )
@@ -1061,7 +1061,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& 
rRange, sal_Unicode cCh,
         rTable.GetTabLines().insert(rTable.GetTabLines().begin() + nLines, 
pLine);
 
         SwStartNode* pSttNd;
-        SwPosition aCntPos( aSttIdx, SwIndex( pTextNd ));
+        SwPosition aCntPos( aSttIdx, SwContentIndex( pTextNd ));
 
         const std::shared_ptr< sw::mark::ContentIdxStore> 
pContentStore(sw::mark::ContentIdxStore::Create());
         pContentStore->Save(rDoc, aSttIdx.GetIndex(), SAL_MAX_INT32);
@@ -1178,7 +1178,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< 
std::vector<SwNodeRange> >
         {
             getIDocumentContentOperations().SplitNode( *pEnd, false );
             --const_cast<SwNodeIndex&>(pEnd->nNode);
-            const_cast<SwIndex&>(pEnd->nContent).Assign(
+            const_cast<SwContentIndex&>(pEnd->nContent).Assign(
                                 pEnd->nNode.GetNode().GetContentNode(), 0 );
             // A Node and at the End?
             if( pStt->nNode.GetIndex() >= pEnd->nNode.GetIndex() )
@@ -1550,8 +1550,8 @@ static void lcl_DelBox( SwTableBox* pBox, DelTabPara* 
pDelPara )
             if( pDelPara->pLastNd == &aDelRg.aStart.GetNode() )
             {
                 // Inserting the separator
-                SwIndex aCntIdx( pDelPara->pLastNd,
-                        pDelPara->pLastNd->GetText().getLength());
+                SwContentIndex aCntIdx( pDelPara->pLastNd,
+                                 pDelPara->pLastNd->GetText().getLength());
                 pDelPara->pLastNd->InsertText( OUString(pDelPara->cCh), 
aCntIdx,
                     SwInsertFlags::EMPTYEXPAND );
                 if( pDelPara->pUndo )
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 589fd75f456f..3bd176e3d219 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1284,7 +1284,7 @@ SwFormatColl *SwContentNode::ChgFormatColl( SwFormatColl 
*pNewColl )
     return pOldColl;
 }
 
-bool SwContentNode::GoNext(SwIndex * pIdx, sal_uInt16 nMode ) const
+bool SwContentNode::GoNext(SwContentIndex * pIdx, sal_uInt16 nMode ) const
 {
     bool bRet = true;
     if( pIdx->GetIndex() < Len() )
@@ -1325,7 +1325,7 @@ bool SwContentNode::GoNext(SwIndex * pIdx, sal_uInt16 
nMode ) const
     return bRet;
 }
 
-bool SwContentNode::GoPrevious(SwIndex * pIdx, sal_uInt16 nMode ) const
+bool SwContentNode::GoPrevious(SwContentIndex * pIdx, sal_uInt16 nMode ) const
 {
     bool bRet = true;
     if( pIdx->GetIndex() > 0 )
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 85f01cea7e1c..399ea39a35ad 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -1512,7 +1512,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, 
SwNodes& rNodes )
             pDestNd = rNodes[ rPos.nNode.GetIndex() - 1 ]->GetTextNode();
             if( nLen )
             {
-                pSrcNd->CutText( pDestNd, SwIndex( pDestNd, pDestNd->Len()),
+                pSrcNd->CutText( pDestNd, SwContentIndex( pDestNd, 
pDestNd->Len()),
                             pStt->nContent, nLen );
             }
         }
@@ -1601,7 +1601,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, 
SwNodes& rNodes )
         if (pDestNd && pEnd->nContent.GetIndex())
         {
             // move the content into the new node
-            SwIndex aIdx( pEndSrcNd, 0 );
+            SwContentIndex aIdx( pEndSrcNd, 0 );
             pEndSrcNd->CutText( pDestNd, rPos.nContent, aIdx,
                             pEnd->nContent.GetIndex());
         }
diff --git a/sw/source/core/docnode/section.cxx 
b/sw/source/core/docnode/section.cxx
index 7510bd886604..0ed682c5f91d 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -1131,7 +1131,7 @@ static void lcl_UpdateLinksInSect( const SwBaseLink& 
rUpdLnk, SwSectionNode& rSe
         else if( pVSh )
             pVSh->StartAction();
 
-        SwPosition aPos( aIdx, SwIndex( pNewNd, 0 ));
+        SwPosition aPos( aIdx, SwContentIndex( pNewNd, 0 ));
         --aPos.nNode;
         SwDoc::CorrAbs( aIdx, aEndIdx, aPos, true );
 
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index a4e0260f3741..a1b1bc887192 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -42,7 +42,7 @@
 #include <unocrsr.hxx>
 #include <docary.hxx>
 #include <editsh.hxx>
-#include <index.hxx>
+#include <contentindex.hxx>
 #include <pam.hxx>
 #include <swundo.hxx>
 #include <poolfmt.hxx>
@@ -2749,7 +2749,7 @@ void SwEditShell::AutoFormatBySplitNode()
 
     bool bRange = false;
     pCursor->SetMark();
-    SwIndex* pContent = &pCursor->GetMark()->nContent;
+    SwContentIndex* pContent = &pCursor->GetMark()->nContent;
     if( pContent->GetIndex() )
     {
         *pContent = 0;
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 956110c00c72..41a885c855ce 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -683,7 +683,7 @@ SvtScriptType SwEditShell::GetScriptType() const
                     //              position, if no selection exist!
                     if( nPos )
                     {
-                        SwIndex aIdx( pStt->nContent );
+                        SwContentIndex aIdx( pStt->nContent );
                         if( pTNd->GoPrevious( &aIdx, CRSR_SKIP_CHARS ) )
                             nPos = aIdx.GetIndex();
                     }
diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx
index 47791dc69a49..752c7e17365a 100644
--- a/sw/source/core/edit/edglss.cxx
+++ b/sw/source/core/edit/edglss.cxx
@@ -140,7 +140,7 @@ sal_uInt16 SwEditShell::SaveGlossaryDoc( SwTextBlocks& 
rBlock,
 
             aStt = pGDoc->GetNodes().GetEndOfExtras();
             pContentNd = pGDoc->GetNodes().GoNext( &aStt );
-            SwPosition aInsPos( aStt, SwIndex( pContentNd ));
+            SwPosition aInsPos( aStt, SwContentIndex( pContentNd ));
             pMyDoc->getIDocumentContentOperations().CopyRange(aCpyPam, 
aInsPos, SwCopyFlags::CheckPosInFly);
 
             nRet = rBlock.PutDoc();
@@ -158,7 +158,7 @@ bool SwEditShell::CopySelToDoc( SwDoc& rInsDoc )
     SwNodeIndex aIdx( rNds.GetEndOfContent(), -1 );
     SwContentNode *const pContentNode = aIdx.GetNode().GetContentNode();
     SwPosition aPos( aIdx,
-        SwIndex(pContentNode, pContentNode ? pContentNode->Len() : 0));
+        SwContentIndex(pContentNode, pContentNode ? pContentNode->Len() : 0));
 
     bool bRet = false;
     CurrShell aCurr( this );
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 060c6417137e..852202b8035d 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -119,7 +119,7 @@ void SwEditShell::Insert2(const OUString &rStr, const bool 
bForceExpandHints )
         SwNode& rNode = pTmpCursor->GetPoint()->nNode.GetNode();
         if ( rNode.IsTextNode() )
         {
-            SwIndex& rIdx = pTmpCursor->GetPoint()->nContent;
+            SwContentIndex& rIdx = pTmpCursor->GetPoint()->nContent;
             sal_Int32 nPrevPos = rIdx.GetIndex();
             if ( nPrevPos )
                 --nPrevPos;
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 3e3fe0a63d89..e9465eed91d8 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -876,7 +876,7 @@ void SwEditShell::HandleCorrectionError(const OUString& 
aText, SwPosition aPos,
                             ? nLineEnd : (nBegin + nLen - nLeft - nRight);
     Push();
     pCursor->DeleteMark();
-    SwIndex& rContent = GetCursor()->GetPoint()->nContent;
+    SwContentIndex& rContent = GetCursor()->GetPoint()->nContent;
     rContent = nWordStart;
     SwRect aStartRect;
     SwCursorMoveState aState;
diff --git a/sw/source/core/fields/ddetbl.cxx b/sw/source/core/fields/ddetbl.cxx
index 31f46e08fe36..01bfa5209dd6 100644
--- a/sw/source/core/fields/ddetbl.cxx
+++ b/sw/source/core/fields/ddetbl.cxx
@@ -21,7 +21,7 @@
 #include <IDocumentSettingAccess.hxx>
 #include <IDocumentFieldsAccess.hxx>
 #include <IDocumentLayoutAccess.hxx>
-#include <index.hxx>
+#include <contentindex.hxx>
 #include <ndtxt.hxx>
 #include <swtable.hxx>
 #include <swddetbl.hxx>
@@ -159,7 +159,7 @@ void SwDDETable::ChangeContent()
             SwNodeIndex aNdIdx( *pBox->GetSttNd(), 1 );
             SwTextNode* pTextNode = aNdIdx.GetNode().GetTextNode();
             OSL_ENSURE( pTextNode, "No Node" );
-            SwIndex aCntIdx( pTextNode, 0 );
+            SwContentIndex aCntIdx( pTextNode, 0 );
             pTextNode->EraseText( aCntIdx );
             pTextNode->InsertText( aLine.getToken( 0, '\t', nLineTokenPos ), 
aCntIdx );
 
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 5914514808d2..895f5812d15a 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -113,7 +113,7 @@ void SwFEShell::Copy( SwDoc& rClpDoc, const OUString* 
pNewClpText )
     // clipboard
     if( pNewClpText )
     {
-        pTextNd->InsertText( *pNewClpText, SwIndex( pTextNd ) );
+        pTextNd->InsertText( *pNewClpText, SwContentIndex( pTextNd ) );
         return;                // that's it
     }
 
@@ -160,7 +160,7 @@ void SwFEShell::Copy( SwDoc& rClpDoc, const OUString* 
pNewClpText )
             //              clipboard, it should be found at pasting. Therefore
             //              the copied TextAttribut should be removed in the 
node
             //              otherwise it will be recognised as TextSelektion
-            const SwIndex& rIdx = 
pFlyFormat->GetAnchor().GetContentAnchor()->nContent;
+            const SwContentIndex& rIdx = 
pFlyFormat->GetAnchor().GetContentAnchor()->nContent;
             SwTextFlyCnt *const pTextFly = static_cast<SwTextFlyCnt *>(
                 pTextNd->GetTextAttrForCharAt(
                     rIdx.GetIndex(), RES_TXTATR_FLYCNT));
@@ -173,7 +173,7 @@ void SwFEShell::Copy( SwDoc& rClpDoc, const OUString* 
pNewClpText )
     }
     else if ( IsObjSelected() )
     {
-        SwPosition aPos( aSttIdx, SwIndex( pTextNd, 0 ));
+        SwPosition aPos( aSttIdx, SwContentIndex( pTextNd, 0 ));
         const SdrMarkList &rMrkList = 
Imp()->GetDrawView()->GetMarkedObjectList();
         for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i )
         {
@@ -1011,7 +1011,7 @@ bool SwFEShell::Paste(SwDoc& rClpDoc, bool bNestedTable)
                     // exit first the complete table
                     // ???? what about only table in a frame ?????
                     SwContentNode* pCNd = GetDoc()->GetNodes().GoNext( &aNdIdx 
);
-                    SwPosition aPos( aNdIdx, SwIndex( pCNd, 0 ));
+                    SwPosition aPos( aNdIdx, SwContentIndex( pCNd, 0 ));
                     // #i59539: Don't remove all redline
                     SwPaM const tmpPaM(*pDestNd, *pDestNd->EndOfSectionNode());
                     ::PaMCorrAbs(tmpPaM, aPos);
@@ -1026,7 +1026,7 @@ bool SwFEShell::Paste(SwDoc& rClpDoc, bool bNestedTable)
                     // return to the box
                     aNdIdx = *pSttNd;
                     SwContentNode* pCNd = GetDoc()->GetNodes().GoNext( &aNdIdx 
);
-                    SwPosition aPos( aNdIdx, SwIndex( pCNd, 0 ));
+                    SwPosition aPos( aNdIdx, SwContentIndex( pCNd, 0 ));
                     // #i59539: Don't remove all redline
                     SwNode & rNode(rPaM.GetPoint()->nNode.GetNode());
                     SwContentNode *const pContentNode( rNode.GetContentNode() 
);
diff --git a/sw/source/core/inc/MarkManager.hxx 
b/sw/source/core/inc/MarkManager.hxx
index 0cf40191e3d1..44f1b1deb389 100644
--- a/sw/source/core/inc/MarkManager.hxx
+++ b/sw/source/core/inc/MarkManager.hxx
@@ -63,7 +63,7 @@ namespace sw::mark {
             virtual void correctMarksAbsolute(const SwNodeIndex& rOldNode, 
const SwPosition& rNewPos, const sal_Int32 nOffset) override;
             virtual void correctMarksRelative(const SwNodeIndex& rOldNode, 
const SwPosition& rNewPos, const sal_Int32 nOffset) override;
 
-            virtual void deleteMarks(const SwNodeIndex& rStt, const 
SwNodeIndex& rEnd, std::vector< ::sw::mark::SaveBookmark>* pSaveBkmk, const 
SwIndex* pSttIdx, const SwIndex* pEndIdx) override;
+            virtual void deleteMarks(const SwNodeIndex& rStt, const 
SwNodeIndex& rEnd, std::vector< ::sw::mark::SaveBookmark>* pSaveBkmk, const 
SwContentIndex* pSttIdx, const SwContentIndex* pEndIdx) override;
 
             // deleters
             virtual std::unique_ptr<ILazyDeleter>
diff --git a/sw/source/core/inc/docfld.hxx b/sw/source/core/inc/docfld.hxx
index 08fb08e33eca..dcc87cce6de8 100644
--- a/sw/source/core/inc/docfld.hxx
+++ b/sw/source/core/inc/docfld.hxx
@@ -28,7 +28,7 @@
 #include <memory>
 
 class SwTextField;
-class SwIndex;
+class SwContentIndex;
 class SwNodeIndex;
 class SwContentFrame;
 class SwSectionNode;
@@ -66,7 +66,7 @@ class SetGetExpField
 
 public:
     SetGetExpField( const SwNodeIndex& rNdIdx, const SwTextField* pField = 
nullptr,
-                    const SwIndex* pIdx = nullptr,
+                    const SwContentIndex* pIdx = nullptr,
                     sal_uInt16 nPageNumber = 0);
 
     SetGetExpField( const SwNodeIndex& rNdIdx, const SwTextINetFormat& rINet );
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index 2e0511a16c69..641e65342bef 100644
--- a/sw/source/core/inc/mvsave.hxx
+++ b/sw/source/core/inc/mvsave.hxx
@@ -33,7 +33,7 @@ class SvNumberFormatter;
 class SwDoc;
 class SwFormatAnchor;
 class SwFrameFormat;
-class SwIndex;
+class SwContentIndex;
 class SwNodeIndex;
 class SwNodeRange;
 class SwPaM;
@@ -50,10 +50,10 @@ namespace sw::mark
             SaveBookmark(
                 const ::sw::mark::IMark& rBkmk,
                 const SwNodeIndex& rMvPos,
-                const SwIndex* pIdx);
+                const SwContentIndex* pIdx);
             void SetInDoc(SwDoc* pDoc,
                 const SwNodeIndex&,
-                const SwIndex* pIdx =nullptr);
+                const SwContentIndex* pIdx =nullptr);
 
     private:
             OUString m_aName;
@@ -93,8 +93,8 @@ namespace o3tl {
 void DelBookmarks(const SwNodeIndex& rStt,
     const SwNodeIndex& rEnd,
     std::vector< ::sw::mark::SaveBookmark> * SaveBkmk =nullptr,
-    const SwIndex* pSttIdx =nullptr,
-    const SwIndex* pEndIdx =nullptr);
+    const SwContentIndex* pSttIdx =nullptr,
+    const SwContentIndex* pEndIdx =nullptr);
 
 /** data structure to temporarily hold fly anchor positions relative to some
  *  location. */
@@ -123,8 +123,8 @@ void SaveFlyInRange( const SwPaM& rPam, const SwPosition& 
rInsPos,
 
 void DelFlyInRange( const SwNodeIndex& rMkNdIdx,
                     const SwNodeIndex& rPtNdIdx,
-                    SwIndex const* pMkIdx = nullptr,
-                    SwIndex const* pPtIdx = nullptr);
+                    SwContentIndex const* pMkIdx = nullptr,
+                    SwContentIndex const* pPtIdx = nullptr);
 
 class SwDataChanged
 {
diff --git a/sw/source/core/inc/pamtyp.hxx b/sw/source/core/inc/pamtyp.hxx
index 3e99dd8787cf..636ce8c3b76b 100644
--- a/sw/source/core/inc/pamtyp.hxx
+++ b/sw/source/core/inc/pamtyp.hxx
@@ -34,7 +34,7 @@ class SwRootFrame;
 class SwNode;
 class SwNodeIndex;
 class SwContentNode;
-class SwIndex;
+class SwContentIndex;
 class SvxSearchItem;
 
 namespace i18nutil {
@@ -50,13 +50,13 @@ void GoEndSection( SwPosition*);
 const SwTextAttr* GetFrwrdTextHint( const SwpHints&, size_t&, sal_Int32 );
 const SwTextAttr* GetBkwrdTextHint( const SwpHints&, size_t&, sal_Int32 );
 
-bool GoNext(SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode );
-bool GoPrevious(SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode );
+bool GoNext(SwNode* pNd, SwContentIndex * pIdx, sal_uInt16 nMode );
+bool GoPrevious(SwNode* pNd, SwContentIndex * pIdx, sal_uInt16 nMode );
 SwContentNode* GoNextNds( SwNodeIndex * pIdx, bool );
 SwContentNode* GoPreviousNds( SwNodeIndex * pIdx, bool );
 
 // type definitions of functions
-typedef bool (*GoNd)( SwNode*, SwIndex*, sal_uInt16 );
+typedef bool (*GoNd)( SwNode*, SwContentIndex*, sal_uInt16 );
 typedef SwContentNode* (*GoNds)( SwNodeIndex*, bool );
 typedef void (*GoDoc)( SwPosition* );
 typedef void (*GoSection)( SwPosition* );
diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx
index bd968f87f7d8..fe8125942f0f 100644
--- a/sw/source/core/inc/txmsrt.hxx
+++ b/sw/source/core/inc/txmsrt.hxx
@@ -29,7 +29,7 @@ class CharClass;
 class SwContentNode;
 class SwTextNode;
 class SwTextTOXMark;
-class SwIndex;
+class SwContentIndex;
 class SwFormatField;
 class SwRootFrame;
 class IndexEntrySupplierWrapper;
@@ -143,7 +143,7 @@ struct SwTOXSortTabBase
     sal_uInt16  GetType() const         { return nType; }
     static SwTOIOptions  GetOptions()   { return nOpt; }
 
-    virtual void    FillText(SwTextNode& rNd, const SwIndex& rInsPos,
+    virtual void    FillText(SwTextNode& rNd, const SwContentIndex& rInsPos,
             sal_uInt16 nAuthField, SwRootFrame const* pLayout) const;
     virtual sal_uInt16  GetLevel()  const = 0;
     virtual bool    equivalent( const SwTOXSortTabBase& );
@@ -194,7 +194,7 @@ struct SwTOXIndex final : public SwTOXSortTabBase
                 const SwTOXInternational& rIntl,
                 const css::lang::Locale& rLocale );
 
-    virtual void    FillText(SwTextNode& rNd, const SwIndex& rInsPos,
+    virtual void    FillText(SwTextNode& rNd, const SwContentIndex& rInsPos,
             sal_uInt16 nAuthField, SwRootFrame const* pLayout) const override;
     virtual sal_uInt16  GetLevel() const override;
     virtual bool    equivalent( const SwTOXSortTabBase& ) override;
@@ -231,7 +231,7 @@ struct SwTOXContent final : public SwTOXSortTabBase
     SwTOXContent( const SwTextNode&, const SwTextTOXMark*,
                 const SwTOXInternational& rIntl );
 
-    virtual void    FillText(SwTextNode& rNd, const SwIndex& rInsPos,
+    virtual void    FillText(SwTextNode& rNd, const SwContentIndex& rInsPos,
             sal_uInt16 nAuthField, SwRootFrame const* pLayout) const override;
     virtual sal_uInt16  GetLevel() const override;
 private:
@@ -248,7 +248,7 @@ struct SwTOXPara final : public SwTOXSortTabBase
     void    SetStartIndex(sal_Int32 nSet)    { nStartIndex = nSet; }
     void    SetEndIndex(sal_Int32 nSet)      { nEndIndex = nSet; }
 
-    virtual void    FillText(SwTextNode& rNd, const SwIndex& rInsPos,
+    virtual void    FillText(SwTextNode& rNd, const SwContentIndex& rInsPos,
             sal_uInt16 nAuthField, SwRootFrame const* pLayout) const override;
     virtual sal_uInt16  GetLevel() const override;
 
@@ -285,7 +285,7 @@ struct SwTOXAuthority final : public SwTOXSortTabBase
 {
 private:
     SwFormatField& m_rField;
-    virtual void    FillText(SwTextNode& rNd, const SwIndex& rInsPos,
+    virtual void    FillText(SwTextNode& rNd, const SwContentIndex& rInsPos,
             sal_uInt16 nAuthField, SwRootFrame const* pLayout) const override;
     virtual TextAndReading GetText_Impl(SwRootFrame const* pLayout) const 
override;
 
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index db4c4f9213d9..55b0beab6794 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -2934,7 +2934,7 @@ SwContentFrame* SwFootnoteFrame::GetRefFromAttr()
 {
     assert(mpAttribute && "invalid Attribute");
     SwTextNode& rTNd = const_cast<SwTextNode&>(mpAttribute->GetTextNode());
-    SwPosition aPos( rTNd, SwIndex( &rTNd, mpAttribute->GetStart() ));
+    SwPosition aPos( rTNd, SwContentIndex( &rTNd, mpAttribute->GetStart() ));
     SwContentFrame* pCFrame = rTNd.getLayoutFrame(getRootFrame(), &aPos);
     return pCFrame;
 }
diff --git a/sw/source/core/layout/trvlfrm.cxx 
b/sw/source/core/layout/trvlfrm.cxx
index 375b9fe34fd6..4f060f005f16 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -305,7 +305,7 @@ bool SwPageFrame::GetModelPositionForViewPoint( SwPosition 
*pPos, Point &rPoint,
                         // lcl_getDistance, extend that to a rectangle over
                         // the entire character.
                         SwPosition const nextTextPos(prevTextPos.nNode,
-                                SwIndex(prevTextPos.nContent, +1));
+                                             
SwContentIndex(prevTextPos.nContent, +1));
                         SwRect nextTextRect;
                         pTextFrame->GetCharRect(nextTextRect, nextTextPos);
                         SwRectFnSet aRectFnSet(pTextFrame);
diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx 
b/sw/source/core/swg/SwXMLTextBlocks.cxx
index defed7eba5f1..60ff59f1ebe2 100644
--- a/sw/source/core/swg/SwXMLTextBlocks.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks.cxx
@@ -511,7 +511,7 @@ void SwXMLTextBlocks::MakeBlockText( std::u16string_view 
rText )
         {
             pTextNode = static_cast<SwTextNode*>(pTextNode->AppendNode( 
SwPosition( *pTextNode ) ));
         }
-        SwIndex aIdx( pTextNode );
+        SwContentIndex aIdx( pTextNode );
         pTextNode->InsertText( OUString(o3tl::getToken(rText, 0, '\015', nPos 
)), aIdx );
     } while ( -1 != nPos );
 }
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index c2ff14822a8e..e3efd0416d6c 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2209,7 +2209,7 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& 
rText, const Color* pCol,
             ;
         for( ; n < rOrig.getLength() && '\x01' == rOrig[n]; ++n )
             ;
-        SwIndex aIdx( pTNd, n );
+        SwContentIndex aIdx( pTNd, n );
         for( n = rOrig.getLength(); n && ('\x9' == rOrig[--n] || 
CH_TXTATR_INWORD == rOrig[n]); )
             ;
         sal_Int32 nEndPos = n;
@@ -2217,7 +2217,7 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& 
rText, const Color* pCol,
 
         // Reset DontExpand-Flags before exchange, to retrigger expansion
         {
-            SwIndex aResetIdx( aIdx, n );
+            SwContentIndex aResetIdx( aIdx, n );
             pTNd->DontExpandFormat( aResetIdx, false, false );
         }
 
@@ -2231,7 +2231,7 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& 
rText, const Color* pCol,
         sal_Int32 nCommentPos = pTNd->GetText().lastIndexOf( CH_TXTATR_INWORD, 
nEndPos );
         while( nCommentPos > aIdx.GetIndex() )
         {
-            pTNd->EraseText( SwIndex(pTNd, nCommentPos+1), nEndPos - 
nCommentPos, SwInsertFlags::EMPTYEXPAND );
+            pTNd->EraseText( SwContentIndex(pTNd, nCommentPos+1), nEndPos - 
nCommentPos, SwInsertFlags::EMPTYEXPAND );
             // find the next non-sequential comment anchor
             do
             {
@@ -2284,7 +2284,7 @@ static void ChgNumToText( SwTableBox& rBox, sal_uLong 
nFormat )
         if( sText != sTmp )
         {
             // exchange text
-            SwIndex aIdx( pTNd, sText.getLength() );
+            SwContentIndex aIdx( pTNd, sText.getLength() );
             // Reset DontExpand-Flags before exchange, to retrigger expansion
             pTNd->DontExpandFormat( aIdx, false, false );
             aIdx = 0;
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 8e61614a6ef1..eac8be79ada4 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -2688,7 +2688,7 @@ void SwScriptInfo::selectHiddenTextProperty(const 
SwTextNode& rNode,
         }
     }
 
-    for (const SwIndex* pIndex = rNode.GetFirstIndex(); pIndex; pIndex = 
pIndex->GetNext())
+    for (const SwContentIndex* pIndex = rNode.GetFirstIndex(); pIndex; pIndex 
= pIndex->GetNext())
     {
         const sw::mark::IMark* pMark = pIndex->GetMark();
         const sw::mark::IBookmark* pBookmark = dynamic_cast<const 
sw::mark::IBookmark*>(pMark);
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 5e3d6921292d..256a43367070 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -413,7 +413,7 @@ bool SwTextFrame::FormatEmpty()
         return false;
 
     // only need to check one node because of early return on GetMerged()
-    for (SwIndex const* pIndex = GetTextNodeFirst()->GetFirstIndex();
+    for (SwContentIndex const* pIndex = GetTextNodeFirst()->GetFirstIndex();
          pIndex; pIndex = pIndex->GetNext())
     {
         sw::mark::IMark const*const pMark = pIndex->GetMark();
diff --git a/sw/source/core/tox/ToxTextGenerator.cxx 
b/sw/source/core/tox/ToxTextGenerator.cxx
index 82adcbca628e..12cb91c50b0c 100644
--- a/sw/source/core/tox/ToxTextGenerator.cxx
+++ b/sw/source/core/tox/ToxTextGenerator.cxx
@@ -258,7 +258,7 @@ ToxTextGenerator::GenerateText(SwDoc* pDoc,
             case TOKEN_AUTHORITY:
                 {
                     ToxAuthorityField eField = 
static_cast<ToxAuthorityField>(aToken.nAuthorityField);
-                    SwIndex aIdx( pTOXNd, rText.getLength() );
+                    SwContentIndex aIdx( pTOXNd, rText.getLength() );
                     if (eField == ToxAuthorityField::AUTH_FIELD_URL)
                     {
                         aCharStyleName = SwResId(STR_POOLCHR_INET_NORMAL);
@@ -423,7 +423,7 @@ ToxTextGenerator::HandleTextToken(const SwTOXSortTabBase& 
source,
 ToxTextGenerator::ApplyHandledTextToken(const HandledTextToken& htt, 
SwTextNode& targetNode)
 {
     sal_Int32 offset = targetNode.GetText().getLength();
-    SwIndex aIdx(&targetNode, offset);
+    SwContentIndex aIdx(&targetNode, offset);
     targetNode.InsertText(htt.text, aIdx);
     for (size_t i=0; i < htt.autoFormats.size(); ++i) {
         targetNode.InsertItem(*htt.autoFormats.at(i),
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 8e2272b1ff8a..6ad808d224f4 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -217,7 +217,7 @@ bool SwTOXSortTabBase::IsFullPara() const
     return false;
 }
 
-void SwTOXSortTabBase::FillText( SwTextNode& rNd, const SwIndex& rInsPos,
+void SwTOXSortTabBase::FillText( SwTextNode& rNd, const SwContentIndex& 
rInsPos,
                                     sal_uInt16, SwRootFrame const*const) const
 {
     rNd.InsertText( GetText().sText, rInsPos );
@@ -394,7 +394,7 @@ TextAndReading SwTOXIndex::GetText_Impl(SwRootFrame 
const*const pLayout) const
     return aRet;
 }
 
-void SwTOXIndex::FillText( SwTextNode& rNd, const SwIndex& rInsPos, sal_uInt16,
+void SwTOXIndex::FillText( SwTextNode& rNd, const SwContentIndex& rInsPos, 
sal_uInt16,
         SwRootFrame const*const pLayout) const
 {
     assert(!"sw_redlinehide: this is dead code, Bibliography only has 
SwTOXAuthority");
@@ -504,7 +504,7 @@ TextAndReading SwTOXContent::GetText_Impl(SwRootFrame 
const*const pLayout) const
     return TextAndReading(pTextMark->GetTOXMark().GetAlternativeText(), 
OUString());
 }
 
-void SwTOXContent::FillText(SwTextNode& rNd, const SwIndex& rInsPos, 
sal_uInt16,
+void SwTOXContent::FillText(SwTextNode& rNd, const SwContentIndex& rInsPos, 
sal_uInt16,
         SwRootFrame const*const pLayout) const
 {
     assert(!"sw_redlinehide: this is dead code, Bibliography only has 
SwTOXAuthority");
@@ -607,7 +607,7 @@ TextAndReading SwTOXPara::GetText_Impl(SwRootFrame 
const*const pLayout) const
     return TextAndReading();
 }
 
-void SwTOXPara::FillText( SwTextNode& rNd, const SwIndex& rInsPos, sal_uInt16,
+void SwTOXPara::FillText( SwTextNode& rNd, const SwContentIndex& rInsPos, 
sal_uInt16,
         SwRootFrame const*const pLayout) const
 {
     assert(!"sw_redlinehide: this is dead code, Bibliography only has 
SwTOXAuthority");
@@ -872,7 +872,7 @@ OUString SwTOXAuthority::GetSourceURL(const OUString& rText)
     return aText;
 }
 
-void SwTOXAuthority::FillText(SwTextNode& rNd, const SwIndex& rInsPos, 
sal_uInt16 nAuthField,
+void SwTOXAuthority::FillText(SwTextNode& rNd, const SwContentIndex& rInsPos, 
sal_uInt16 nAuthField,
                               SwRootFrame const* const pLayout) const
 {
     OUString aText = GetText(nAuthField, pLayout);
diff --git a/sw/source/core/txtnode/atrfld.cxx 
b/sw/source/core/txtnode/atrfld.cxx
index 15de4fdcb9aa..de7047d19049 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -736,7 +736,7 @@ void SwTextInputField::UpdateTextNodeContent( const 
OUString& rNewContent )
     const sal_Int32 nIdx = GetStart() + 1;
     // skip CH_TXT_ATR_INPUTFIELDEND character
     const sal_Int32 nDelLen = std::max<sal_Int32>( 0, ( (*End()) - 1 - nIdx ) 
);
-    SwIndex aIdx( &GetTextNode(), nIdx );
+    SwContentIndex aIdx( &GetTextNode(), nIdx );
     GetTextNode().ReplaceText( aIdx, nDelLen, rNewContent );
 }
 
diff --git a/sw/source/core/txtnode/atrflyin.cxx 
b/sw/source/core/txtnode/atrflyin.cxx
index bb42a0853cba..044bbd8c0c1c 100644
--- a/sw/source/core/txtnode/atrflyin.cxx
+++ b/sw/source/core/txtnode/atrflyin.cxx
@@ -139,7 +139,7 @@ void SwTextFlyCnt::SetAnchor( const SwTextNode *pNode )
 
     SwDoc& rDoc = const_cast<SwDoc&>(pNode->GetDoc());
 
-    SwIndex aIdx( const_cast<SwTextNode*>(pNode), GetStart() );
+    SwContentIndex aIdx( const_cast<SwTextNode*>(pNode), GetStart() );
     SwPosition aPos( *pNode->StartOfSectionNode(), aIdx );
     SwFrameFormat* pFormat = GetFlyCnt().GetFrameFormat();
     SwFormatAnchor aAnchor( pFormat->GetAnchor() );
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 414438b62b58..1be670c590a7 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -459,7 +459,7 @@ SwTextNode *SwTextNode::SplitContentNode(const SwPosition & 
rPos,
 
         // Move the first part of the content to the new node and delete
         // it in the old node.
-        SwIndex aIdx( this );
+        SwContentIndex aIdx( this );
         CutText( pNode, aIdx, nSplitPos );
 
         if( GetWrong() )
@@ -581,7 +581,7 @@ SwTextNode *SwTextNode::SplitContentNode(const SwPosition & 
rPos,
         std::unique_ptr<SwWrongList> pList2 = ReleaseSmartTags();
         SetSmartTagDirty( true );
 
-        SwIndex aIdx( this );
+        SwContentIndex aIdx( this );
         CutText( pNode, aIdx, nSplitPos );
 
         // JP 01.10.96: delete all empty and not-to-be-expanded attributes
@@ -1041,8 +1041,8 @@ SwContentNode *SwTextNode::JoinNext()
             }
         }
 
-        { // scope for SwIndex

... etc. - the rest is truncated

Reply via email to