summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/editeng/svxrtf.hxx2
-rw-r--r--solenv/clang-format/excludelist2
-rw-r--r--solenv/gdb/libreoffice/sw.py6
-rw-r--r--solenv/vs/LibreOffice.natvis2
-rw-r--r--sw/inc/IDocumentMarkAccess.hxx4
-rw-r--r--sw/inc/contentindex.hxx (renamed from sw/inc/index.hxx)97
-rw-r--r--sw/inc/ndtxt.hxx36
-rw-r--r--sw/inc/node.hxx12
-rw-r--r--sw/inc/pam.hxx8
-rw-r--r--sw/inc/pch/precompiled_msword.hxx2
-rw-r--r--sw/inc/pch/precompiled_swui.hxx2
-rw-r--r--sw/inc/pch/precompiled_vbaswobj.hxx2
-rw-r--r--sw/inc/splargs.hxx26
-rw-r--r--sw/qa/core/unocore/unocore.cxx2
-rw-r--r--sw/qa/extras/mailmerge/mailmerge.cxx2
-rw-r--r--sw/qa/extras/uiwriter/uiwriter7.cxx2
-rw-r--r--sw/source/core/access/parachangetrackinginfo.cxx2
-rw-r--r--sw/source/core/bastyp/index.cxx78
-rw-r--r--sw/source/core/crsr/crsrsh.cxx8
-rw-r--r--sw/source/core/crsr/crstrvl.cxx4
-rw-r--r--sw/source/core/crsr/findattr.cxx2
-rw-r--r--sw/source/core/crsr/findtxt.cxx4
-rw-r--r--sw/source/core/crsr/pam.cxx14
-rw-r--r--sw/source/core/crsr/swcrsr.cxx4
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx40
-rw-r--r--sw/source/core/doc/DocumentLayoutManager.cxx2
-rw-r--r--sw/source/core/doc/DocumentRedlineManager.cxx2
-rw-r--r--sw/source/core/doc/docbm.cxx22
-rw-r--r--sw/source/core/doc/docedt.cxx16
-rw-r--r--sw/source/core/doc/docfld.cxx2
-rw-r--r--sw/source/core/doc/docfmt.cxx2
-rw-r--r--sw/source/core/doc/doclay.cxx4
-rw-r--r--sw/source/core/doc/docnew.cxx4
-rw-r--r--sw/source/core/doc/docredln.cxx4
-rw-r--r--sw/source/core/doc/doctxm.cxx8
-rw-r--r--sw/source/core/doc/extinput.cxx6
-rw-r--r--sw/source/core/docnode/ndcopy.cxx2
-rw-r--r--sw/source/core/docnode/ndtbl.cxx10
-rw-r--r--sw/source/core/docnode/node.cxx4
-rw-r--r--sw/source/core/docnode/nodes.cxx4
-rw-r--r--sw/source/core/docnode/section.cxx2
-rw-r--r--sw/source/core/edit/autofmt.cxx4
-rw-r--r--sw/source/core/edit/edattr.cxx2
-rw-r--r--sw/source/core/edit/edglss.cxx4
-rw-r--r--sw/source/core/edit/editsh.cxx2
-rw-r--r--sw/source/core/edit/edlingu.cxx2
-rw-r--r--sw/source/core/fields/ddetbl.cxx4
-rw-r--r--sw/source/core/frmedt/fecopy.cxx10
-rw-r--r--sw/source/core/inc/MarkManager.hxx2
-rw-r--r--sw/source/core/inc/docfld.hxx4
-rw-r--r--sw/source/core/inc/mvsave.hxx14
-rw-r--r--sw/source/core/inc/pamtyp.hxx8
-rw-r--r--sw/source/core/inc/txmsrt.hxx12
-rw-r--r--sw/source/core/layout/ftnfrm.cxx2
-rw-r--r--sw/source/core/layout/trvlfrm.cxx2
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks.cxx2
-rw-r--r--sw/source/core/table/swtable.cxx8
-rw-r--r--sw/source/core/text/porlay.cxx2
-rw-r--r--sw/source/core/text/porrst.cxx2
-rw-r--r--sw/source/core/tox/ToxTextGenerator.cxx4
-rw-r--r--sw/source/core/tox/txmsrt.cxx10
-rw-r--r--sw/source/core/txtnode/atrfld.cxx2
-rw-r--r--sw/source/core/txtnode/atrflyin.cxx2
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx72
-rw-r--r--sw/source/core/txtnode/thints.cxx40
-rw-r--r--sw/source/core/txtnode/txtedt.cxx8
-rw-r--r--sw/source/core/undo/SwUndoField.cxx2
-rw-r--r--sw/source/core/undo/unattr.cxx4
-rw-r--r--sw/source/core/undo/undel.cxx4
-rw-r--r--sw/source/core/undo/undobj.cxx8
-rw-r--r--sw/source/core/undo/undobj1.cxx4
-rw-r--r--sw/source/core/undo/undraw.cxx2
-rw-r--r--sw/source/core/undo/unins.cxx2
-rw-r--r--sw/source/core/undo/unmove.cxx6
-rw-r--r--sw/source/core/undo/unovwr.cxx8
-rw-r--r--sw/source/core/undo/unsect.cxx4
-rw-r--r--sw/source/core/undo/untbl.cxx10
-rw-r--r--sw/source/core/undo/untblk.cxx4
-rw-r--r--sw/source/core/unocore/unodraw.cxx2
-rw-r--r--sw/source/core/unocore/unoframe.cxx2
-rw-r--r--sw/source/core/unocore/unoportenum.cxx2
-rw-r--r--sw/source/filter/basflt/fltini.cxx2
-rw-r--r--sw/source/filter/basflt/shellio.cxx2
-rw-r--r--sw/source/filter/docx/swdocxreader.cxx2
-rw-r--r--sw/source/filter/html/htmlgrin.cxx2
-rw-r--r--sw/source/filter/html/htmlsect.cxx6
-rw-r--r--sw/source/filter/html/htmltab.cxx2
-rw-r--r--sw/source/filter/html/swhtml.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx10
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx2
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx4
-rw-r--r--sw/source/filter/xml/xmltbli.cxx2
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx2
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx4
-rw-r--r--sw/source/uibase/lingu/hhcwrp.cxx2
-rw-r--r--sw/source/uibase/uno/unoatxt.cxx2
-rw-r--r--sw/source/uibase/wrtsh/wrtsh2.cxx2
-rw-r--r--vcl/ios/DataFlavorMapping.cxx2
99 files changed, 397 insertions, 400 deletions
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
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
- pTextNode->CutText( this, SwIndex(pTextNode), pTextNode->Len() );
+ { // scope for SwContentIndex
+ pTextNode->CutText( this, SwContentIndex(pTextNode), pTextNode->Len() );
}
// move all Bookmarks/TOXMarks
if( !pContentStore->Empty())
@@ -1156,8 +1156,8 @@ void SwTextNode::JoinPrev()
}
}
- { // scope for SwIndex
- pTextNode->CutText( this, SwIndex(this), SwIndex(pTextNode), nLen );
+ { // scope for SwContentIndex
+ pTextNode->CutText( this, SwContentIndex(this), SwContentIndex(pTextNode), nLen );
}
// move all Bookmarks/TOXMarks
if( !pContentStore->Empty() )
@@ -1223,9 +1223,9 @@ public:
};
};
-// override SwIndexReg::Update => text hints do not need SwIndex for start/end!
+// override SwContentIndexReg::Update => text hints do not need SwContentIndex for start/end!
void SwTextNode::Update(
- SwIndex const & rPos,
+ SwContentIndex const & rPos,
const sal_Int32 nChangeLen,
const bool bNegative,
const bool bDelete )
@@ -1422,7 +1422,7 @@ void SwTextNode::Update(
if ( this == &pEnd->nNode.GetNode() &&
*pRedl->GetPoint() != *pRedl->GetMark() )
{
- SwIndex & rIdx = pEnd->nContent;
+ SwContentIndex & rIdx = pEnd->nContent;
if (nChangePos == rIdx.GetIndex())
{
rIdx.Assign( &aTmpIdxReg, rIdx.GetIndex() );
@@ -1431,7 +1431,7 @@ void SwTextNode::Update(
}
else if ( this == &pRedl->GetPoint()->nNode.GetNode() )
{
- SwIndex & rIdx = pRedl->GetPoint()->nContent;
+ SwContentIndex & rIdx = pRedl->GetPoint()->nContent;
if (nChangePos == rIdx.GetIndex())
{
rIdx.Assign( &aTmpIdxReg, rIdx.GetIndex() );
@@ -1449,10 +1449,10 @@ void SwTextNode::Update(
{
bool bAtLeastOneBookmarkMoved = false;
bool bAtLeastOneExpandedBookmarkAtInsertionPosition = false;
- // A text node already knows its marks via its SwIndexes.
+ // A text node already knows its marks via its SwContentIndexes.
o3tl::sorted_vector<const sw::mark::IMark*> aSeenMarks;
- const SwIndex* next;
- for (const SwIndex* pIndex = GetFirstIndex(); pIndex; pIndex = next )
+ const SwContentIndex* next;
+ for (const SwContentIndex* pIndex = GetFirstIndex(); pIndex; pIndex = next )
{
next = pIndex->GetNext();
const sw::mark::IMark* pMark = pIndex->GetMark();
@@ -1462,7 +1462,7 @@ void SwTextNode::Update(
if (!aSeenMarks.insert(pMark).second)
continue;
const SwPosition* pEnd = &pMark->GetMarkEnd();
- SwIndex & rEndIdx = const_cast<SwIndex&>(pEnd->nContent);
+ SwContentIndex & rEndIdx = const_cast<SwContentIndex&>(pEnd->nContent);
if( this == &pEnd->nNode.GetNode() &&
rPos.GetIndex() == rEndIdx.GetIndex() )
{
@@ -1504,7 +1504,7 @@ void SwTextNode::Update(
if (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_CHAR && pContentAnchor)
{
// The fly is at-char anchored and has an anchor position.
- SwIndex& rEndIdx = const_cast<SwIndex&>(pContentAnchor->nContent);
+ SwContentIndex& rEndIdx = const_cast<SwContentIndex&>(pContentAnchor->nContent);
if (&pContentAnchor->nNode.GetNode() == this && rEndIdx.GetIndex() == rPos.GetIndex())
{
// The anchor position is exactly our insert position.
@@ -1529,7 +1529,7 @@ void SwTextNode::Update(
if (!pCursor)
continue;
- SwIndex& rIndex = pCursor->Start()->nContent;
+ SwContentIndex& rIndex = pCursor->Start()->nContent;
if (&pCursor->Start()->nNode.GetNode() == this && rIndex.GetIndex() == rPos.GetIndex())
{
// The cursor position of this other shell is exactly our insert position.
@@ -1541,7 +1541,7 @@ void SwTextNode::Update(
}
// base class
- SwIndexReg::Update( rPos, nChangeLen, bNegative, bDelete );
+ SwContentIndexReg::Update( rPos, nChangeLen, bNegative, bDelete );
if (pCollector)
{
@@ -1633,7 +1633,7 @@ void SwTextNode::ChgTextCollUpdateNum( const SwTextFormatColl *pOldColl,
// If positioned exactly at the end of a CharStyle or Hyperlink,
// set its DontExpand flag.
-bool SwTextNode::DontExpandFormat( const SwIndex& rIdx, bool bFlag,
+bool SwTextNode::DontExpandFormat( const SwContentIndex& rIdx, bool bFlag,
bool bFormatToTextAttributes )
{
const sal_Int32 nIdx = rIdx.GetIndex();
@@ -2020,17 +2020,17 @@ void SwTextNode::CopyAttr( SwTextNode *pDest, const sal_Int32 nTextStartIdx,
/// copy text and attributes to node pDest
void SwTextNode::CopyText( SwTextNode *const pDest,
- const SwIndex &rStart,
+ const SwContentIndex &rStart,
const sal_Int32 nLen,
const bool bForceCopyOfAllAttrs )
{
- SwIndex const aIdx( pDest, pDest->m_Text.getLength() );
+ SwContentIndex const aIdx( pDest, pDest->m_Text.getLength() );
CopyText( pDest, aIdx, rStart, nLen, bForceCopyOfAllAttrs );
}
void SwTextNode::CopyText( SwTextNode *const pDest,
- const SwIndex &rDestStart,
- const SwIndex &rStart,
+ const SwContentIndex &rDestStart,
+ const SwContentIndex &rStart,
sal_Int32 nLen,
const bool bForceCopyOfAllAttrs )
{
@@ -2273,7 +2273,7 @@ void SwTextNode::CopyText( SwTextNode *const pDest,
std::reverse(metaFieldRanges.begin(), metaFieldRanges.end());
for (const auto& pair : metaFieldRanges)
{
- const SwIndex aIdx(pDest, pair.first);
+ const SwContentIndex aIdx(pDest, pair.first);
pDest->EraseText(aIdx, pair.second - pair.first);
}
}
@@ -2295,7 +2295,7 @@ void SwTextNode::CopyText( SwTextNode *const pDest,
}
else
{
- const SwIndex aIdx( pDest, pNewHt->GetStart() );
+ const SwContentIndex aIdx( pDest, pNewHt->GetStart() );
pDest->EraseText( aIdx, 1 );
}
}
@@ -2305,7 +2305,7 @@ void SwTextNode::CopyText( SwTextNode *const pDest,
CHECK_SWPHINTS(pDest);
}
-OUString SwTextNode::InsertText( const OUString & rStr, const SwIndex & rIdx,
+OUString SwTextNode::InsertText( const OUString & rStr, const SwContentIndex & rIdx,
const SwInsertFlags nMode )
{
assert(rIdx <= m_Text.getLength()); // invalid index
@@ -2426,15 +2426,15 @@ OUString SwTextNode::InsertText( const OUString & rStr, const SwIndex & rIdx,
}
void SwTextNode::CutText( SwTextNode * const pDest,
- const SwIndex & rStart, const sal_Int32 nLen )
+ const SwContentIndex & rStart, const sal_Int32 nLen )
{
assert(pDest); // Cut requires a destination
- SwIndex aDestStt(pDest, pDest->GetText().getLength());
+ SwContentIndex aDestStt(pDest, pDest->GetText().getLength());
CutImpl( pDest, aDestStt, rStart, nLen, false );
}
-void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart,
- const SwIndex & rStart, sal_Int32 nLen, const bool bUpdate )
+void SwTextNode::CutImpl( SwTextNode * const pDest, const SwContentIndex & rDestStart,
+ const SwContentIndex & rStart, sal_Int32 nLen, const bool bUpdate )
{
assert(pDest); // Cut requires a destination
@@ -2467,7 +2467,7 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart,
if (bUpdate)
{
- // Update all SwIndex
+ // Update all SwContentIndex
pDest->Update( rDestStart, nLen, false, false/*??? why was it true*/);
}
@@ -2697,7 +2697,7 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart,
TryDeleteSwpHints();
}
-void SwTextNode::EraseText(const SwIndex &rIdx, const sal_Int32 nCount,
+void SwTextNode::EraseText(const SwContentIndex &rIdx, const sal_Int32 nCount,
const SwInsertFlags nMode )
{
assert(rIdx <= m_Text.getLength()); // invalid index
@@ -3474,7 +3474,7 @@ OUString SwTextNode::GetExpandText(SwRootFrame const*const pLayout,
return aText.makeStringAndClear();
}
-bool SwTextNode::CopyExpandText(SwTextNode& rDestNd, const SwIndex* pDestIdx,
+bool SwTextNode::CopyExpandText(SwTextNode& rDestNd, const SwContentIndex* pDestIdx,
sal_Int32 nIdx, sal_Int32 nLen,
SwRootFrame const*const pLayout, bool bWithNum,
bool bWithFootnote, bool bReplaceTabsWithSpaces ) const
@@ -3482,7 +3482,7 @@ bool SwTextNode::CopyExpandText(SwTextNode& rDestNd, const SwIndex* pDestIdx,
if( &rDestNd == this )
return false;
- SwIndex aDestIdx(&rDestNd, rDestNd.GetText().getLength());
+ SwContentIndex aDestIdx(&rDestNd, rDestNd.GetText().getLength());
if( pDestIdx )
aDestIdx = *pDestIdx;
const sal_Int32 nDestStt = aDestIdx.GetIndex();
@@ -3643,7 +3643,7 @@ bool SwTextNode::CopyExpandText(SwTextNode& rDestNd, const SwIndex* pDestIdx,
}
assert(-1 != nStartDelete); // without delete range, would have continued
rDestNd.EraseText(
- SwIndex(&rDestNd, nStartDelete),
+ SwContentIndex(&rDestNd, nStartDelete),
aDestIdx.GetIndex() - nStartDelete);
assert(aDestIdx.GetIndex() == nStartDelete);
nStartDelete = -1; // reset
@@ -3723,7 +3723,7 @@ OUString SwTextNode::GetRedlineText() const
return aText.makeStringAndClear();
}
-void SwTextNode::ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen,
+void SwTextNode::ReplaceText( const SwContentIndex& rStart, const sal_Int32 nDelLen,
const OUString & rStr)
{
assert( rStart.GetIndex() < m_Text.getLength() // index out of bounds
@@ -3770,7 +3770,7 @@ void SwTextNode::ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen,
// This way the attributes of the 1st char are expanded!
m_Text = m_Text.replaceAt(nStartPos, 1, sInserted.subView(0, 1));
- ++const_cast<SwIndex&>(rStart);
+ ++const_cast<SwContentIndex&>(rStart);
m_Text = m_Text.replaceAt(rStart.GetIndex(), nLen - 1, u"");
Update( rStart, nLen - 1, true );
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index e7fb33b8a1c8..9c9c4b047ca2 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1373,7 +1373,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
// have to worry about it.
const SwFormatAnchor* pAnchor = pFormat->GetItemIfSet( RES_ANCHOR, false );
- SwIndex aIdx( this, pAttr->GetStart() );
+ SwContentIndex aIdx( this, pAttr->GetStart() );
const OUString c(GetCharOfTextAttr(*pAttr));
OUString const ins( InsertText(c, aIdx, nInsertFlags) );
if (ins.isEmpty())
@@ -1392,7 +1392,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
pAnchor->GetContentAnchor()->nNode == *this &&
pAnchor->GetContentAnchor()->nContent == aIdx )
{
- --const_cast<SwIndex&>(
+ --const_cast<SwContentIndex&>(
pAnchor->GetContentAnchor()->nContent);
}
}
@@ -1422,7 +1422,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
|| CH_TXTATR_INWORD == m_Text[pAttr->GetStart()]);
m_Text = m_Text.replaceAt(pAttr->GetStart(), 1, u"");
// Update SwIndexes
- SwIndex aTmpIdx( this, pAttr->GetStart() );
+ SwContentIndex aTmpIdx( this, pAttr->GetStart() );
Update( aTmpIdx, 1, true );
}
// do not record deletion of Format!
@@ -1453,7 +1453,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
|| CH_TXTATR_INWORD == m_Text[pAttr->GetStart()]);
m_Text = m_Text.replaceAt(pAttr->GetStart(), 1, u"");
// Update SwIndexes
- SwIndex aTmpIdx( this, pAttr->GetStart() );
+ SwContentIndex aTmpIdx( this, pAttr->GetStart() );
Update( aTmpIdx, 1, true );
}
DestroyAttr( pAttr );
@@ -1494,7 +1494,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
// must insert first, to prevent identical indexes
// that could later prevent insertion into SwDoc's
// footnote array
- SwIndex aNdIdx( this, pAttr->GetStart() );
+ SwContentIndex aNdIdx( this, pAttr->GetStart() );
const OUString c(GetCharOfTextAttr(*pAttr));
OUString const ins( InsertText(c, aNdIdx, nInsertFlags) );
if (ins.isEmpty())
@@ -1561,7 +1561,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
// and SETATTR_NOTXTATRCHR prevents inserting it again here.
if( !(SetAttrMode::NOTXTATRCHR & nInsMode) )
{
- SwIndex aIdx( this, pAttr->GetStart() );
+ SwContentIndex aIdx( this, pAttr->GetStart() );
OUString const ins( InsertText(OUString(GetCharOfTextAttr(*pAttr)),
aIdx, nInsertFlags) );
if (ins.isEmpty())
@@ -1580,7 +1580,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
if (pAttr->Which() == RES_TXTATR_CONTENTCONTROL)
{
// Content controls have a dummy character at their end as well.
- SwIndex aEndIdx(this, *pAttr->GetEnd());
+ SwContentIndex aEndIdx(this, *pAttr->GetEnd());
OUString aEnd
= InsertText(OUString(GetCharOfTextAttr(*pAttr)), aEndIdx, nInsertFlags);
if (aEnd.isEmpty())
@@ -1614,7 +1614,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
{
if( !(SetAttrMode::NOTXTATRCHR & nMode) )
{
- SwIndex aIdx( this, pAttr->GetStart() );
+ SwContentIndex aIdx( this, pAttr->GetStart() );
const OUString aContent = OUStringChar(CH_TXT_ATR_INPUTFIELDSTART)
+ pTextInputField->GetFieldContent() + OUStringChar(CH_TXT_ATR_INPUTFIELDEND);
InsertText( aContent, aIdx, nInsertFlags );
@@ -1629,7 +1629,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
// assure that CH_TXT_ATR_INPUTFIELDSTART and CH_TXT_ATR_INPUTFIELDEND are inserted.
if ( m_Text[ pAttr->GetStart() ] != CH_TXT_ATR_INPUTFIELDSTART )
{
- SwIndex aIdx( this, pAttr->GetStart() );
+ SwContentIndex aIdx( this, pAttr->GetStart() );
InsertText( OUString(CH_TXT_ATR_INPUTFIELDSTART), aIdx, nInsertFlags );
bInputFieldStartCharInserted = true;
const sal_Int32* const pEnd(pAttr->GetEnd());
@@ -1642,7 +1642,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
assert(pEnd != nullptr);
if (m_Text[ *pEnd - 1 ] != CH_TXT_ATR_INPUTFIELDEND)
{
- SwIndex aIdx( this, *pEnd );
+ SwContentIndex aIdx( this, *pEnd );
InsertText( OUString(CH_TXT_ATR_INPUTFIELDEND), aIdx, nInsertFlags );
bInputFieldEndCharInserted = true;
pAttr->SetEnd(*pEnd + 1);
@@ -1724,7 +1724,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
// resulting in infinite recursion
assert((CH_TXTATR_BREAKWORD == m_Text[nStart] ||
CH_TXTATR_INWORD == m_Text[nStart] ));
- SwIndex aIdx( this, nStart );
+ SwContentIndex aIdx( this, nStart );
EraseText( aIdx, 1 );
}
@@ -1733,7 +1733,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
if ( !(SetAttrMode::NOTXTATRCHR & nMode)
&& (nEnd - nStart) > 0 )
{
- SwIndex aIdx( this, nStart );
+ SwContentIndex aIdx( this, nStart );
EraseText( aIdx, (nEnd - nStart) );
}
else
@@ -1741,13 +1741,13 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
if ( bInputFieldEndCharInserted
&& (nEnd - nStart) > 0 )
{
- SwIndex aIdx( this, nEnd - 1 );
+ SwContentIndex aIdx( this, nEnd - 1 );
EraseText( aIdx, 1 );
}
if ( bInputFieldStartCharInserted )
{
- SwIndex aIdx( this, nStart );
+ SwContentIndex aIdx( this, nStart );
EraseText( aIdx, 1 );
}
}
@@ -1773,13 +1773,13 @@ void SwTextNode::DeleteAttribute( SwTextAttr * const pAttr )
if ( pAttr->HasDummyChar() )
{
// copy index!
- const SwIndex aIdx( this, pAttr->GetStart() );
+ const SwContentIndex aIdx( this, pAttr->GetStart() );
// erase the CH_TXTATR, which will also delete pAttr
EraseText( aIdx, 1 );
}
else if ( pAttr->HasContent() )
{
- const SwIndex aIdx( this, pAttr->GetStart() );
+ const SwContentIndex aIdx( this, pAttr->GetStart() );
assert(pAttr->End() != nullptr);
EraseText( aIdx, *pAttr->End() - pAttr->GetStart() );
}
@@ -1846,13 +1846,13 @@ void SwTextNode::DeleteAttributes(
if ( pTextHt->HasDummyChar() )
{
// copy index!
- const SwIndex aIdx( this, nStart );
+ const SwContentIndex aIdx( this, nStart );
// erase the CH_TXTATR, which will also delete pTextHt
EraseText( aIdx, 1 );
}
else if ( pTextHt->HasContent() )
{
- const SwIndex aIdx( this, nStart );
+ const SwContentIndex aIdx( this, nStart );
OSL_ENSURE( pTextHt->End() != nullptr, "<SwTextNode::DeleteAttributes(..)> - missing End() at <SwTextAttr> instance which has content" );
EraseText( aIdx, *pTextHt->End() - nStart );
}
@@ -1886,7 +1886,7 @@ void SwTextNode::DelSoftHyph( const sal_Int32 nStt, const sal_Int32 nEnd )
{
break;
}
- const SwIndex aIdx( this, nFndPos );
+ const SwContentIndex aIdx( this, nFndPos );
EraseText( aIdx, 1 );
--nEndPos;
}
@@ -1984,7 +1984,7 @@ bool SwTextNode::SetAttr(
(GetDoc().GetDfltCharFormat() ==
static_cast<const SwFormatCharFormat*>(pItem)->GetCharFormat()))
{
- SwIndex aIndex( this, nStt );
+ SwContentIndex aIndex( this, nStt );
RstTextAttr( aIndex, nEnd - nStt, RES_TXTATR_CHARFMT );
DontExpandFormat( aIndex );
}
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 20d3e483408e..6d90143f59d4 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -365,7 +365,7 @@ static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess,
*/
void SwTextNode::RstTextAttr(
- const SwIndex &rIdx,
+ const SwContentIndex &rIdx,
const sal_Int32 nLen,
const sal_uInt16 nWhich,
const SfxItemSet* pSet,
@@ -1999,7 +1999,7 @@ void SwTextNode::ReplaceTextOnly( sal_Int32 nPos, sal_Int32 nLen,
while( nI + nCnt < nTLen && nOff == pOffsets[ nI + nCnt ] )
++nCnt;
- Update( SwIndex( this, nMyOff ), nCnt );
+ Update( SwContentIndex( this, nMyOff ), nCnt );
nMyOff = nOff;
//nMyOff -= nCnt;
nI += nCnt - 1;
@@ -2007,14 +2007,14 @@ void SwTextNode::ReplaceTextOnly( sal_Int32 nPos, sal_Int32 nLen,
else if( nOff > nMyOff )
{
// something is deleted
- Update( SwIndex( this, nMyOff+1 ), nOff - nMyOff, true );
+ Update( SwContentIndex( this, nMyOff+1 ), nOff - nMyOff, true );
nMyOff = nOff;
}
++nMyOff;
}
if( nMyOff < nLen )
// something is deleted at the end
- Update( SwIndex( this, nMyOff ), nLen - nMyOff, true );
+ Update( SwContentIndex( this, nMyOff ), nLen - nMyOff, true );
// notify the layout!
SwDelText aDelHint( nPos, nTLen );
diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx
index 353070852588..0be699af645b 100644
--- a/sw/source/core/undo/SwUndoField.cxx
+++ b/sw/source/core/undo/SwUndoField.cxx
@@ -48,7 +48,7 @@ SwPosition SwUndoField::GetPosition()
{
SwNode * pNode = m_pDoc->GetNodes()[m_nNodeIndex];
SwNodeIndex aNodeIndex(*pNode);
- SwIndex aIndex(pNode->GetContentNode(), m_nOffset);
+ SwContentIndex aIndex(pNode->GetContentNode(), m_nOffset);
SwPosition aResult(aNodeIndex, aIndex);
return aResult;
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 6119b49d73d1..69a83488eaa1 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -571,7 +571,7 @@ void SwUndoResetAttr::UndoImpl(::sw::UndoRedoContext & rContext)
(m_nSttNode == m_nEndNode) && (m_nSttContent == m_nEndContent)) {
SwTextNode* pTNd = rDoc.GetNodes()[ m_nSttNode ]->GetTextNode();
if( pTNd ) {
- SwIndex aIdx( pTNd, m_nSttContent );
+ SwContentIndex aIdx( pTNd, m_nSttContent );
pTNd->DontExpandFormat( aIdx, false );
}
}
@@ -600,7 +600,7 @@ void SwUndoResetAttr::RedoImpl(::sw::UndoRedoContext & rContext)
{
SwTOXMarks aArr;
SwNodeIndex aIdx( rDoc.GetNodes(), m_nSttNode );
- SwPosition aPos( aIdx, SwIndex( aIdx.GetNode().GetContentNode(),
+ SwPosition aPos( aIdx, SwContentIndex( aIdx.GetNode().GetContentNode(),
m_nSttContent ));
sal_uInt16 nCnt = SwDoc::GetCurTOXMark( aPos, aArr );
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 95c9d612b46a..d85ea6e83389 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -487,7 +487,7 @@ bool SwUndoDelete::SaveContent( const SwPosition* pStt, const SwPosition* pEnd,
// 2 - copy end into End-String
if( pEndTextNd )
{
- SwIndex aEndIdx( pEndTextNd );
+ SwContentIndex aEndIdx( pEndTextNd );
nNdIdx = pEnd->nNode.GetIndex();
SwRegHistory aRHst( *pEndTextNd, m_pHistory.get() );
@@ -1280,7 +1280,7 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext)
return;
}
- // avoid asserts from ~SwIndexReg for deleted nodes
+ // avoid asserts from ~SwContentIndexReg for deleted nodes
SwPaM aTmp(*rPam.End());
if (!aTmp.Move(fnMoveForward, GoInNode))
{
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 410dacca9037..88600fada374 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -915,7 +915,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
SwTextAttr* const pFootnoteHint =
pTextNd->GetTextAttrForCharAt( nFootnoteSttIdx );
assert(pFootnoteHint);
- SwIndex aIdx( pTextNd, nFootnoteSttIdx );
+ SwContentIndex aIdx( pTextNd, nFootnoteSttIdx );
m_pHistory->Add( pFootnoteHint, pTextNd->GetIndex(), false );
pTextNd->EraseText( aIdx, 1 );
}
@@ -940,7 +940,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
SwTextAttr* const pFootnoteHint =
pTextNd->GetTextAttrForCharAt( nFootnoteSttIdx );
assert(pFootnoteHint);
- SwIndex aIdx( pTextNd, nFootnoteSttIdx );
+ SwContentIndex aIdx( pTextNd, nFootnoteSttIdx );
m_pHistory->Add( pFootnoteHint, pTextNd->GetIndex(), false );
pTextNd->EraseText( aIdx, 1 );
}
@@ -1269,7 +1269,7 @@ void SwUndoSaveSection::SaveSection(
if( nullptr != pCNd )
aPam.GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
- // Keep positions as SwIndex so that this section can be deleted in DTOR
+ // Keep positions as SwContentIndex so that this section can be deleted in DTOR
SwNodeOffset nEnd;
m_pMovedStart.reset(new SwNodeIndex(rRange.aStart));
MoveToUndoNds(aPam, m_pMovedStart.get(), &nEnd);
@@ -1561,7 +1561,7 @@ static bool IsAtEndOfSection(SwPosition const& rAnchorPos)
assert(pNode);
assert(rAnchorPos.nNode <= node); // last valid anchor pos is last content
return node == rAnchorPos.nNode
- // at-para fly has no SwIndex!
+ // at-para fly has no SwContentIndex!
&& (rAnchorPos.nContent == pNode->Len() || rAnchorPos.nContent.GetContentNode() == nullptr);
}
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index 2b989872f93a..acfd5e76b3c3 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -254,7 +254,7 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
{
// Pointer to 0, do not delete
const_cast<SwFormatFlyCnt&>(pAttr->GetFlyCnt()).SetFlyFormat();
- SwIndex aIdx( pPos->nContent );
+ SwContentIndex aIdx( pPos->nContent );
pTextNd->EraseText( aIdx, 1 );
}
}
@@ -314,7 +314,7 @@ void SwUndoInsLayFormat::UndoImpl(::sw::UndoRedoContext & rContext)
rContent.GetContentIdx()->GetIndex() );
SwNodeIndex aEndIdx( rDoc.GetNodes(),
aIdx.GetNode().EndOfSectionIndex() );
- SwIndex aIndex( pNode, mnCursorSaveIndexPos );
+ SwContentIndex aIndex( pNode, mnCursorSaveIndexPos );
SwPosition aPos( *pNode, aIndex );
// don't delete bookmarks here, DelFly() will save them in history
::PaMCorrAbs(SwPaM(aIdx, aEndIdx), aPos);
diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx
index 9eb5502eceaa..a9caa1279b73 100644
--- a/sw/source/core/undo/undraw.cxx
+++ b/sw/source/core/undo/undraw.cxx
@@ -122,7 +122,7 @@ static void lcl_SaveAnchor( SwFrameFormat* pFormat, SwNodeOffset& rNodePos )
{
// just set pointer to 0, don't delete
const_cast<SwFormatFlyCnt&>(pAttr->GetFlyCnt()).SetFlyFormat();
- SwIndex aIdx( pTextNd, nContentPos );
+ SwContentIndex aIdx( pTextNd, nContentPos );
pTextNd->EraseText( aIdx, 1 );
}
}
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 37364401071e..8338bfe44de2 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -165,7 +165,7 @@ bool SwUndoInsert::CanGrouping( const SwPosition& rPos )
const SwContentNode* pIReg = rPos.nContent.GetContentNode();
for(SwRangeRedline* pRedl : rTable)
{
- SwIndex* pIdx = &pRedl->End()->nContent;
+ SwContentIndex* pIdx = &pRedl->End()->nContent;
if( pIReg == pIdx->GetContentNode() &&
m_nContent == pIdx->GetIndex() )
{
diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx
index b727e565d72e..055b56932331 100644
--- a/sw/source/core/undo/unmove.cxx
+++ b/sw/source/core/undo/unmove.cxx
@@ -212,7 +212,7 @@ void SwUndoMove::UndoImpl(::sw::UndoRedoContext & rContext)
{
{
RemoveIdxRel( aIdx.GetIndex() + 1, SwPosition( aIdx,
- SwIndex(pTextNd, pTextNd->GetText().getLength())));
+ SwContentIndex(pTextNd, pTextNd->GetText().getLength())));
}
// Are there any Pams in the next TextNode?
pTextNd->JoinNext();
@@ -255,7 +255,7 @@ void SwUndoMove::RedoImpl(::sw::UndoRedoContext & rContext)
{
SwPaM aPam(*rPam.GetPoint());
SetPaM( aPam );
- SwPosition aMvPos( aIdx, SwIndex( aIdx.GetNode().GetContentNode(),
+ SwPosition aMvPos( aIdx, SwContentIndex( aIdx.GetNode().GetContentNode(),
m_nMoveDestContent ));
DelFootnote( aPam );
@@ -276,7 +276,7 @@ void SwUndoMove::RedoImpl(::sw::UndoRedoContext & rContext)
{
{
RemoveIdxRel( aIdx.GetIndex() + 1, SwPosition( aIdx,
- SwIndex(pTextNd, pTextNd->GetText().getLength())));
+ SwContentIndex(pTextNd, pTextNd->GetText().getLength())));
}
pTextNd->JoinNext();
}
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index 20fa7a5b9a75..60d2c48a522d 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -88,7 +88,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc& rDoc, SwPosition& rPos,
if( !m_bInsChar )
{
- const SwIndex aTmpIndex( rPos.nContent, -2 );
+ const SwContentIndex aTmpIndex( rPos.nContent, -2 );
pTextNd->EraseText( aTmpIndex, 1 );
}
pTextNd->SetIgnoreDontExpand( bOldExpFlg );
@@ -167,7 +167,7 @@ bool SwUndoOverwrite::CanGrouping( SwDoc& rDoc, SwPosition& rPos,
if( !m_bInsChar )
{
- const SwIndex aTmpIndex( rPos.nContent, -2 );
+ const SwContentIndex aTmpIndex( rPos.nContent, -2 );
pDelTextNd->EraseText( aTmpIndex, 1 );
}
pDelTextNd->SetIgnoreDontExpand( bOldExpFlg );
@@ -185,7 +185,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext)
rCurrentPam.GetPoint()->nNode = m_nStartNode;
SwTextNode* pTextNd = rCurrentPam.GetNode().GetTextNode();
assert(pTextNd);
- SwIndex& rIdx = rCurrentPam.GetPoint()->nContent;
+ SwContentIndex& rIdx = rCurrentPam.GetPoint()->nContent;
rIdx.Assign( pTextNd, m_nStartContent );
SwAutoCorrExceptWord* pACEWord = rDoc.GetAutoCorrExceptWord();
@@ -267,7 +267,7 @@ void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & rContext)
rCurrentPam.GetPoint()->nNode = m_nStartNode;
SwTextNode* pTextNd = rCurrentPam.GetNode().GetTextNode();
assert(pTextNd);
- SwIndex& rIdx = rCurrentPam.GetPoint()->nContent;
+ SwContentIndex& rIdx = rCurrentPam.GetPoint()->nContent;
if( m_pRedlSaveData )
{
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index 5ac2e3f0a13d..64fa2d7a2176 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -283,13 +283,13 @@ void SwUndoInsSection::Join( SwDoc& rDoc, SwNodeOffset nNode )
{
RemoveIdxRel(
nNode + 1,
- SwPosition( aIdx, SwIndex( pTextNd, pTextNd->GetText().getLength() ) ) );
+ SwPosition( aIdx, SwContentIndex( pTextNd, pTextNd->GetText().getLength() ) ) );
}
pTextNd->JoinNext();
if (m_pHistory)
{
- SwIndex aCntIdx( pTextNd, 0 );
+ SwContentIndex aCntIdx( pTextNd, 0 );
pTextNd->RstTextAttr( aCntIdx, pTextNd->Len(), 0, nullptr, true );
}
}
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 1d306f5991dc..9bca1f566ddf 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -571,7 +571,7 @@ SwTableNode* SwNodes::UndoTableToText( SwNodeOffset nSttNd, SwNodeOffset nEndNd,
{
// split at ContentPosition, delete previous char (= separator)
OSL_ENSURE( pTextNd, "Where is my TextNode?" );
- SwIndex aCntPos( pTextNd, pSave->m_nContent - 1 );
+ SwContentIndex aCntPos( pTextNd, pSave->m_nContent - 1 );
pTextNd->EraseText( aCntPos, 1 );
@@ -1945,7 +1945,7 @@ void SwUndoTableMerge::UndoImpl(::sw::UndoRedoContext & rContext)
else if( pTextNd )
{
// also delete not needed attributes
- SwIndex aTmpIdx( pTextNd, nDelPos );
+ SwContentIndex aTmpIdx( pTextNd, nDelPos );
if( pTextNd->GetpSwpHints() && pTextNd->GetpSwpHints()->Count() )
pTextNd->RstTextAttr( aTmpIdx, pTextNd->GetText().getLength() - nDelPos + 1 );
// delete separator
@@ -1971,7 +1971,7 @@ void SwUndoTableMerge::UndoImpl(::sw::UndoRedoContext & rContext)
SwNodeIndex aTmpIdx( *pBox->GetSttNd() );
SwDoc::CorrAbs( SwNodeIndex( aTmpIdx, 1 ),
SwNodeIndex( *aTmpIdx.GetNode().EndOfSectionNode() ),
- SwPosition( aTmpIdx, SwIndex( nullptr, 0 )), true );
+ SwPosition( aTmpIdx, SwContentIndex( nullptr, 0 )), true );
}
delete pBox;
@@ -2162,7 +2162,7 @@ void SwUndoTableNumFormat::UndoImpl(::sw::UndoRedoContext & rContext)
{
rDoc.getIDocumentRedlineAccess().DeleteRedline( *( pBox->GetSttNd() ), false, RedlineType::Any );
- SwIndex aIdx( pTextNd, 0 );
+ SwContentIndex aIdx( pTextNd, 0 );
if( !m_aStr.isEmpty() )
{
pTextNd->EraseText( aIdx );
@@ -2866,7 +2866,7 @@ void SwUndoSplitTable::UndoImpl(::sw::UndoRedoContext & rContext)
assert(rIdx.GetNode().GetContentNode()->Len() == 0); // empty para inserted
{
- // avoid asserts from ~SwIndexReg
+ // avoid asserts from ~SwContentIndexReg
SwNodeIndex const idx(pDoc->GetNodes(), m_nTableNode + m_nOffset);
{
SwPaM pam(idx);
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index 2e53ff2d9c20..3898b6bf7652 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -350,12 +350,12 @@ void SwUndoInserts::UndoImpl(::sw::UndoRedoContext & rContext)
{
{
RemoveIdxRel( rIdx.GetIndex()+1, SwPosition( rIdx,
- SwIndex( pTextNode, pTextNode->GetText().getLength() )));
+ SwContentIndex( pTextNode, pTextNode->GetText().getLength() )));
}
pTextNode->JoinNext();
}
// reset all text attributes in the paragraph!
- pTextNode->RstTextAttr( SwIndex(pTextNode, 0), pTextNode->Len(), 0, nullptr, true );
+ pTextNode->RstTextAttr( SwContentIndex(pTextNode, 0), pTextNode->Len(), 0, nullptr, true );
pTextNode->ResetAllAttr();
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 9177075a5f83..1a7b0b5bd730 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -2121,7 +2121,7 @@ uno::Reference< text::XTextRange > SwXShape::getAnchor()
{
const SwPosition &rPos = *(pFormat->GetAnchor().GetContentAnchor());
if (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA)
- { // ensure that SwXTextRange has SwIndex
+ { // ensure that SwXTextRange has SwContentIndex
aRef = SwXTextRange::CreateXTextRange(*pFormat->GetDoc(), SwPosition(rPos.nNode), nullptr);
}
else
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 66598af084dd..e6a3bea3c3fe 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -2702,7 +2702,7 @@ uno::Reference< text::XTextRange > SwXFrame::getAnchor()
{
const SwPosition &rPos = *(rAnchor.GetContentAnchor());
if (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA)
- { // ensure that SwXTextRange has SwIndex
+ { // ensure that SwXTextRange has SwContentIndex
aRef = SwXTextRange::CreateXTextRange(*pFormat->GetDoc(), SwPosition(rPos.nNode), nullptr);
}
else
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index e6fcb06cb8de..1145ed80dfad 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -182,7 +182,7 @@ namespace
assert(pTextNode);
// A text node already knows its marks via its SwIndexes.
o3tl::sorted_vector<const sw::mark::IMark*> aSeenMarks;
- for (const SwIndex* pIndex = pTextNode->GetFirstIndex(); pIndex; pIndex = pIndex->GetNext())
+ for (const SwContentIndex* pIndex = pTextNode->GetFirstIndex(); pIndex; pIndex = pIndex->GetNext())
{
// Need a non-cost mark here, as we'll create a UNO wrapper around it.
sw::mark::IMark* pBkmk = const_cast<sw::mark::IMark*>(pIndex->GetMark());
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index f8c6c320fa0f..05f98efba363 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -322,7 +322,7 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor,
{
// if the first node don't contained any content, then
// insert one char in it calc again and delete once again
- SwIndex aNdIdx( pFirstTextNd );
+ SwContentIndex aNdIdx( pFirstTextNd );
pFirstTextNd->InsertText("MM", aNdIdx);
sal_uLong nAbsMinCnts;
pFirstTextNd->GetMinMaxSize( pFirstTextNd->GetIndex(),
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 2321b6b4e9a7..7f4fc5d57012 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -755,7 +755,7 @@ ErrCode SwWriter::Write( WriterRef const & rxWriter, const OUString* pRealFileNa
SwNodeIndex aIdx( xDoc->GetNodes().GetEndOfExtras(), 2 );
SwContentNode *pNd = aIdx.GetNode().GetContentNode();
OSL_ENSURE( pNd, "Node not found" );
- SwPosition aPos( aIdx, SwIndex( pNd ) );
+ SwPosition aPos( aIdx, SwContentIndex( pNd ) );
pTableNd->GetTable().MakeCopy( *xDoc, aPos, aBoxes );
}
diff --git a/sw/source/filter/docx/swdocxreader.cxx b/sw/source/filter/docx/swdocxreader.cxx
index a24de2416bcb..335a0cd5d983 100644
--- a/sw/source/filter/docx/swdocxreader.cxx
+++ b/sw/source/filter/docx/swdocxreader.cxx
@@ -234,7 +234,7 @@ bool SwDOCXReader::MakeEntries( SwDoc *pD, SwTextBlocks &rBlocks )
SwDoc* pGlDoc = rBlocks.GetDoc();
SwNodeIndex aIdx( pGlDoc->GetNodes().GetEndOfContent(), -1 );
pCNd = aIdx.GetNode().GetContentNode();
- SwPosition aPos( aIdx, SwIndex( pCNd, pCNd ? pCNd->Len() : 0 ) );
+ SwPosition aPos( aIdx, SwContentIndex( pCNd, pCNd ? pCNd->Len() : 0 ) );
pD->getIDocumentContentOperations().CopyRange(aPam, aPos, SwCopyFlags::CheckPosInFly);
rBlocks.PutDoc();
}
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 7d3c24d67021..1040877afe48 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -1449,7 +1449,7 @@ void SwHTMLParser::StripTrailingPara()
SwTextNode *pPrvNd = m_xDoc->GetNodes()[nNodeIdx-1]->GetTextNode();
if( pPrvNd )
{
- SwIndex aSrc( pCNd, 0 );
+ SwContentIndex aSrc( pCNd, 0 );
pCNd->GetTextNode()->CutText( pPrvNd, aSrc, pCNd->Len() );
}
}
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index d5de7077a8bf..a7d624a135cc 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -226,7 +226,7 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken )
}
}
- SwPosition aNewPos( SwNodeIndex( rContentStIdx, 1 ), SwIndex( pCNd, 0 ) );
+ SwPosition aNewPos( SwNodeIndex( rContentStIdx, 1 ), SwContentIndex( pCNd, 0 ) );
SaveDocContext(xCntxt.get(), nFlags, &aNewPos);
}
else if( !bPositioned && aId.getLength() > 9 &&
@@ -246,7 +246,7 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken )
SwContentNode *pCNd =
m_xDoc->GetNodes()[pStartNdIdx->GetIndex()+1]->GetContentNode();
SwNodeIndex aTmpSwNodeIndex(*pCNd);
- SwPosition aNewPos( aTmpSwNodeIndex, SwIndex( pCNd, 0 ) );
+ SwPosition aNewPos( aTmpSwNodeIndex, SwContentIndex( pCNd, 0 ) );
SaveDocContext(xCntxt.get(), HtmlContextFlags::MultiColMask, &aNewPos);
aId.clear();
aPropInfo.m_aId.clear();
@@ -782,7 +782,7 @@ void SwHTMLParser::InsertFlyFrame( const SfxItemSet& rItemSet,
SwContentNode *pCNd = m_xDoc->GetNodes()[rFlyCntIdx.GetIndex()+1]
->GetContentNode();
- SwPosition aNewPos( SwNodeIndex( rFlyCntIdx, 1 ), SwIndex( pCNd, 0 ) );
+ SwPosition aNewPos( SwNodeIndex( rFlyCntIdx, 1 ), SwContentIndex( pCNd, 0 ) );
const HtmlContextFlags nFlags = HtmlContextFlags::ProtectStack|HtmlContextFlags::StripPara;
SaveDocContext( pCntxt, nFlags, &aNewPos );
}
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index d5cde194f99b..6b4157be45fc 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -2694,7 +2694,7 @@ sal_Int32 SwHTMLParser::StripTrailingLF()
}
nPos = nLen - nLFCount;
- SwIndex nIdx( pTextNd, nPos );
+ SwContentIndex nIdx( pTextNd, nPos );
pTextNd->EraseText( nIdx, nLFCount );
nStripped = nLFCount;
}
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 80d466660d83..1092cc9e424f 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -331,7 +331,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn,
m_eScriptLang = HTMLScriptLanguage::Unknown;
rCursor.DeleteMark();
- m_pPam = &rCursor; // re-use existing cursor: avoids spurious ~SwIndexReg assert
+ m_pPam = &rCursor; // re-use existing cursor: avoids spurious ~SwContentIndexReg assert
memset(m_xAttrTab.get(), 0, sizeof(HTMLAttrTable));
// Read the font sizes 1-7 from the INI file
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 4b42fc63e2e3..5490b6b637dd 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -238,7 +238,7 @@ SwWW8AttrIter::SwWW8AttrIter(MSWordExportBase& rWr, const SwTextNode& rTextNd) :
if ( !m_rExport.m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() )
{
- SwPosition aPosition( m_rNode, SwIndex( const_cast<SwTextNode*>(&m_rNode) ) );
+ SwPosition aPosition( m_rNode, SwContentIndex( const_cast<SwTextNode*>(&m_rNode) ) );
m_pCurRedline = m_rExport.m_rDoc.getIDocumentRedlineAccess().GetRedline( aPosition, &m_nCurRedlinePos );
}
@@ -2489,7 +2489,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
IDocumentMarkAccess* const pMarkAccess = m_rDoc.getIDocumentMarkAccess();
if ( ch == CH_TXT_ATR_FIELDSTART )
{
- SwPosition aPosition( rNode, SwIndex( &rNode, nCurrentPos ) );
+ SwPosition aPosition( rNode, SwContentIndex( &rNode, nCurrentPos ) );
::sw::mark::IFieldmark const*const pFieldmark = pMarkAccess->getFieldmarkAt(aPosition);
assert(pFieldmark);
@@ -2541,7 +2541,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
}
else if (ch == CH_TXT_ATR_FIELDSEP)
{
- SwPosition aPosition(rNode, SwIndex(&rNode, nCurrentPos));
+ SwPosition aPosition(rNode, SwContentIndex(&rNode, nCurrentPos));
// the innermost field is the correct one
::sw::mark::IFieldmark const*const pFieldmark = pMarkAccess->getFieldmarkFor(aPosition);
assert(pFieldmark);
@@ -2567,7 +2567,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
}
else if ( ch == CH_TXT_ATR_FIELDEND )
{
- SwPosition aPosition( rNode, SwIndex( &rNode, nCurrentPos ) );
+ SwPosition aPosition( rNode, SwContentIndex( &rNode, nCurrentPos ) );
::sw::mark::IFieldmark const*const pFieldmark = pMarkAccess->getFieldmarkAt(aPosition);
assert(pFieldmark);
@@ -2604,7 +2604,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
}
else if ( ch == CH_TXT_ATR_FORMELEMENT )
{
- SwPosition aPosition( rNode, SwIndex( &rNode, nCurrentPos ) );
+ SwPosition aPosition( rNode, SwContentIndex( &rNode, nCurrentPos ) );
::sw::mark::IFieldmark const*const pFieldmark = pMarkAccess->getFieldmarkAt(aPosition);
assert(pFieldmark);
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index a57ffb9fc093..e8c8ac75e41d 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3393,7 +3393,7 @@ ErrCode MSWordExportBase::ExportDocument( bool bWriteAll )
m_aFrames.clear();
// park m_pCurPam in a "safe place" now that document is fully exported
- // before toggling redline mode to avoid ~SwIndexReg assert e.g. export
+ // before toggling redline mode to avoid ~SwContentIndexReg assert e.g. export
// ooo103014-1.odt to .doc
// park m_pOrigPam as well, as needed for exporting abi9915-1.odt to doc
m_pOrigPam->DeleteMark();
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index 009ca4a79bdb..759e3f5326fb 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -169,7 +169,7 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
SwNodeIndex aIdx( pGlDoc->GetNodes().GetEndOfContent(),
-1 );
pCNd = aIdx.GetNode().GetContentNode();
- SwPosition aPos(aIdx, SwIndex(pCNd, pCNd ? pCNd->Len() : 0));
+ SwPosition aPos(aIdx, SwContentIndex(pCNd, pCNd ? pCNd->Len() : 0));
pD->getIDocumentContentOperations().CopyRange(aPam, aPos, SwCopyFlags::CheckPosInFly);
rBlocks.PutDoc();
}
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 26102fd69724..abc318a8e84c 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2575,7 +2575,7 @@ bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr)
//we are removing the last paragraph of a frame, so there
//cannot be a page break at this point so we can
//safely reset m_pLastAnchorPos to avoid any dangling
- //SwIndex's pointing into the deleted paragraph
+ //SwContentIndex's pointing into the deleted paragraph
SwNodeIndex aLastAnchorPos(m_pLastAnchorPos->nNode);
if (aLastAnchorPos == aToBeJoined)
m_pLastAnchorPos.reset();
@@ -2697,7 +2697,7 @@ void SwWW8ImplReader::StopApo()
//we are removing the last paragraph of a frame, so there
//cannot be a page break at this point so we can
//safely reset m_pLastAnchorPos to avoid any dangling
- //SwIndex's pointing into the deleted paragraph
+ //SwContentIndex's pointing into the deleted paragraph
SwNodeIndex aLastAnchorPos(m_pLastAnchorPos->nNode);
SwNodeIndex aToBeJoined(aPref, 1);
if (aLastAnchorPos == aToBeJoined)
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 34fd86f99959..fd22425306bd 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -1891,7 +1891,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
SAL_WARN_IF(!pTextNode->GetText().isEmpty(), "sw",
"why text here?");
pTextNode->InsertText(*pCell->GetStringValue(),
- SwIndex(pTextNode, 0));
+ SwContentIndex(pTextNode, 0));
}
}
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 5ef544a941fd..918fdd106bd5 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -926,7 +926,7 @@ void SwTransferable::PrepareForCopyTextRange(SwPaM & rPaM)
SwNodeIndex const aIdx(rDest.GetNodes().GetEndOfContent(), -1);
SwContentNode *const pContentNode(aIdx.GetNode().GetContentNode());
SwPosition aPos(aIdx,
- SwIndex(pContentNode, pContentNode ? pContentNode->Len() : 0));
+ SwContentIndex(pContentNode, pContentNode ? pContentNode->Len() : 0));
rSrc.getIDocumentContentOperations().CopyRange(rPaM, aPos, SwCopyFlags::CheckPosInFly);
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index ac331e1cfa36..95ecd3a02aaa 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -5844,7 +5844,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
const SwPosition& rStart = *pInput->Start();
const SwPosition& rEnd = *pInput->End();
int nSize = 0;
- for ( SwIndex nIndex = rStart.nContent; nIndex < rEnd.nContent; ++nIndex )
+ for ( SwContentIndex nIndex = rStart.nContent; nIndex < rEnd.nContent; ++nIndex )
{
++nSize;
}
@@ -5860,7 +5860,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
{
std::unique_ptr<tools::Rectangle[]> aRects(new tools::Rectangle[ nSize ]);
int nRectIndex = 0;
- for ( SwIndex nIndex = rStart.nContent; nIndex < rEnd.nContent; ++nIndex )
+ for ( SwContentIndex nIndex = rStart.nContent; nIndex < rEnd.nContent; ++nIndex )
{
const SwPosition aPos( rStart.nNode, nIndex );
SwRect aRect ( rSh.GetCharRect() );
diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx
index 319a8a620b7f..3ee37fac8397 100644
--- a/sw/source/uibase/lingu/hhcwrp.cxx
+++ b/sw/source/uibase/lingu/hhcwrp.cxx
@@ -35,7 +35,7 @@
#include <docsh.hxx>
#include <mdiexp.hxx>
#include <edtwin.hxx>
-#include <index.hxx>
+#include <contentindex.hxx>
#include <pam.hxx>
#include <swcrsr.hxx>
#include <ndtxt.hxx>
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index e9036718b3c1..046c23afa926 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -281,7 +281,7 @@ static bool lcl_CopySelToDoc(SwDoc& rInsDoc, OTextCursorHelper* pxCursor, SwXTex
SwNodeIndex aIdx( rNds.GetEndOfContent(), -1 );
SwContentNode * pNd = aIdx.GetNode().GetContentNode();
- SwPosition aPos(aIdx, SwIndex(pNd, pNd ? pNd->Len() : 0));
+ SwPosition aPos(aIdx, SwContentIndex(pNd, pNd ? pNd->Len() : 0));
bool bRet = false;
rInsDoc.getIDocumentFieldsAccess().LockExpFields();
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index e9d47e1db0c2..0b6085fc2dcf 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -125,7 +125,7 @@ bool SwWrtShell::InsertField2(SwField const& rField, SwPaM* pAnnotationRange)
// Annotation range was passed in externally, and inserting the postit field shifted
// its start/end positions right by one. Restore the original position for the range
// start. This allows commenting on the placeholder character of the field.
- SwIndex& rRangeStart = pAnnotationTextRange->Start()->nContent;
+ SwContentIndex& rRangeStart = pAnnotationTextRange->Start()->nContent;
if (rRangeStart.GetIndex() > 0)
--rRangeStart;
}
diff --git a/vcl/ios/DataFlavorMapping.cxx b/vcl/ios/DataFlavorMapping.cxx
index 05abf2b8a6f9..14bf0f6f43d7 100644
--- a/vcl/ios/DataFlavorMapping.cxx
+++ b/vcl/ios/DataFlavorMapping.cxx
@@ -412,7 +412,7 @@ NSString* DataFlavorMapper::openOfficeToSystemFlavor(const DataFlavor& oOOFlavor
// apparently is a symptom of something being seriously wrong:
// xmloff/source/transform/OOo2Oasis.cxx:1925: duplicate doc handler
// Because is then followed a bit later by an assertion failure:
- // Assertion failed: (!m_pFirst && !m_pLast && "There are still indices registered"), function ~SwIndexReg, file [...]/sw/source/core/bastyp/index.cxx, line 226
+ // Assertion failed: (!m_pFirst && !m_pLast && "There are still indices registered"), function ~SwContentIndexReg, file [...]/sw/source/core/bastyp/index.cxx, line 226
if (oOOFlavor.MimeType == "text/html")
return nil;