summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-01 10:23:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-02 15:10:43 +0200
commit961d42e1ca1da7f3199d46445b3766d9c6a6c938 (patch)
tree1797e56bac0bb438f4d3d27a7fb09d82fdafe827 /sw/source
parent21ed46f683dd9d838371cdba02593f3e64a5124c (diff)
introduce SwPosition::GetNodeIndex
as part of the process of hiding the internals of SwPosition largely done by doing: git grep -lF 'nNode.GetIndex' | xargs perl -pi -e 's/\bnNode\.GetIndex/GetNodeIndex/g' Change-Id: I3616cea4c47595afe74f1aa8e3be553279f25d44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/access/accframebase.cxx4
-rw-r--r--sw/source/core/access/accmap.cxx10
-rw-r--r--sw/source/core/access/accpara.cxx18
-rw-r--r--sw/source/core/crsr/bookmark.cxx10
-rw-r--r--sw/source/core/crsr/callnk.cxx2
-rw-r--r--sw/source/core/crsr/crsrsh.cxx26
-rw-r--r--sw/source/core/crsr/crstrvl.cxx6
-rw-r--r--sw/source/core/crsr/findattr.cxx16
-rw-r--r--sw/source/core/crsr/findtxt.cxx12
-rw-r--r--sw/source/core/crsr/pam.cxx8
-rw-r--r--sw/source/core/crsr/swcrsr.cxx44
-rw-r--r--sw/source/core/crsr/trvlfnfl.cxx4
-rw-r--r--sw/source/core/crsr/trvlreg.cxx2
-rw-r--r--sw/source/core/crsr/trvltbl.cxx6
-rw-r--r--sw/source/core/crsr/viscrs.cxx4
-rw-r--r--sw/source/core/doc/CntntIdxStore.cxx10
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx100
-rw-r--r--sw/source/core/doc/DocumentLayoutManager.cxx2
-rw-r--r--sw/source/core/doc/DocumentRedlineManager.cxx36
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx2
-rw-r--r--sw/source/core/doc/docbm.cxx12
-rw-r--r--sw/source/core/doc/doccomp.cxx8
-rw-r--r--sw/source/core/doc/docedt.cxx16
-rw-r--r--sw/source/core/doc/docfld.cxx12
-rw-r--r--sw/source/core/doc/docfly.cxx4
-rw-r--r--sw/source/core/doc/docfmt.cxx4
-rw-r--r--sw/source/core/doc/docftn.cxx4
-rw-r--r--sw/source/core/doc/doclay.cxx8
-rw-r--r--sw/source/core/doc/docnew.cxx4
-rw-r--r--sw/source/core/doc/docnum.cxx56
-rw-r--r--sw/source/core/doc/docredln.cxx12
-rw-r--r--sw/source/core/doc/docsort.cxx6
-rw-r--r--sw/source/core/doc/extinput.cxx4
-rw-r--r--sw/source/core/doc/swserv.cxx10
-rw-r--r--sw/source/core/docnode/ndsect.cxx10
-rw-r--r--sw/source/core/docnode/ndtbl.cxx22
-rw-r--r--sw/source/core/docnode/nodes.cxx8
-rw-r--r--sw/source/core/edit/acorrect.cxx6
-rw-r--r--sw/source/core/edit/edattr.cxx24
-rw-r--r--sw/source/core/edit/eddel.cxx4
-rw-r--r--sw/source/core/edit/edglbldc.cxx2
-rw-r--r--sw/source/core/edit/editsh.cxx10
-rw-r--r--sw/source/core/edit/ednumber.cxx16
-rw-r--r--sw/source/core/edit/edtab.cxx4
-rw-r--r--sw/source/core/fields/postithelper.cxx2
-rw-r--r--sw/source/core/frmedt/fecopy.cxx10
-rw-r--r--sw/source/core/frmedt/fetab.cxx4
-rw-r--r--sw/source/core/frmedt/fews.cxx2
-rw-r--r--sw/source/core/frmedt/tblsel.cxx6
-rw-r--r--sw/source/core/layout/atrfrm.cxx4
-rw-r--r--sw/source/core/layout/flowfrm.cxx2
-rw-r--r--sw/source/core/layout/flycnt.cxx2
-rw-r--r--sw/source/core/layout/frmtool.cxx8
-rw-r--r--sw/source/core/text/frmcrsr.cxx8
-rw-r--r--sw/source/core/text/frmpaint.cxx4
-rw-r--r--sw/source/core/text/itratr.cxx4
-rw-r--r--sw/source/core/text/porlay.cxx8
-rw-r--r--sw/source/core/text/redlnitr.cxx12
-rw-r--r--sw/source/core/text/txtfld.cxx4
-rw-r--r--sw/source/core/text/txtfly.cxx2
-rw-r--r--sw/source/core/tox/txmsrt.cxx2
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx2
-rw-r--r--sw/source/core/undo/SwUndoField.cxx2
-rw-r--r--sw/source/core/undo/rolbck.cxx16
-rw-r--r--sw/source/core/undo/unattr.cxx8
-rw-r--r--sw/source/core/undo/undel.cxx28
-rw-r--r--sw/source/core/undo/undobj.cxx28
-rw-r--r--sw/source/core/undo/undobj1.cxx14
-rw-r--r--sw/source/core/undo/undraw.cxx2
-rw-r--r--sw/source/core/undo/unins.cxx18
-rw-r--r--sw/source/core/undo/unmove.cxx4
-rw-r--r--sw/source/core/undo/unnum.cxx6
-rw-r--r--sw/source/core/undo/unovwr.cxx2
-rw-r--r--sw/source/core/undo/unredln.cxx6
-rw-r--r--sw/source/core/undo/unspnd.cxx2
-rw-r--r--sw/source/core/undo/untbl.cxx8
-rw-r--r--sw/source/core/undo/untblk.cxx20
-rw-r--r--sw/source/core/unocore/unocrsr.cxx2
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx2
-rw-r--r--sw/source/core/unocore/unoobj.cxx6
-rw-r--r--sw/source/core/unocore/unoobj2.cxx18
-rw-r--r--sw/source/core/unocore/unotext.cxx10
-rw-r--r--sw/source/filter/ascii/ascatr.cxx10
-rw-r--r--sw/source/filter/ascii/wrtasc.cxx8
-rw-r--r--sw/source/filter/basflt/fltshell.cxx2
-rw-r--r--sw/source/filter/basflt/shellio.cxx4
-rw-r--r--sw/source/filter/html/css1atr.cxx2
-rw-r--r--sw/source/filter/html/htmlatr.cxx18
-rw-r--r--sw/source/filter/html/htmlctxt.cxx2
-rw-r--r--sw/source/filter/html/htmlfld.cxx2
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx2
-rw-r--r--sw/source/filter/html/htmlforw.cxx6
-rw-r--r--sw/source/filter/html/htmlgrin.cxx8
-rw-r--r--sw/source/filter/html/htmlnumwriter.cxx8
-rw-r--r--sw/source/filter/html/htmlsect.cxx10
-rw-r--r--sw/source/filter/html/htmltab.cxx6
-rw-r--r--sw/source/filter/html/swhtml.cxx32
-rw-r--r--sw/source/filter/html/wrthtml.cxx22
-rw-r--r--sw/source/filter/inc/fltshell.hxx2
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx4
-rw-r--r--sw/source/filter/writer/writer.cxx6
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx4
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx4
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx14
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx4
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx10
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx2
-rw-r--r--sw/source/filter/xml/xmlimp.cxx12
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx4
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx4
112 files changed, 546 insertions, 546 deletions
diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx
index 540bfdc55ec3..58c093f05441 100644
--- a/sw/source/core/access/accframebase.cxx
+++ b/sw/source/core/access/accframebase.cxx
@@ -303,9 +303,9 @@ bool SwAccessibleFrameBase::GetSelectedState( )
{
// check whether nHere is 'inside' pCursor
SwPosition* pStart = pCursor->Start();
- SwNodeOffset nStartIndex = pStart->nNode.GetIndex();
+ SwNodeOffset nStartIndex = pStart->GetNodeIndex();
SwPosition* pEnd = pCursor->End();
- SwNodeOffset nEndIndex = pEnd->nNode.GetIndex();
+ SwNodeOffset nEndIndex = pEnd->GetNodeIndex();
if( ( nHere >= nStartIndex ) && (nHere <= nEndIndex) )
{
if( rAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR )
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 16c50deb2cb8..b522d00ad282 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -1222,9 +1222,9 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
bMarked = true;
// check whether nHere is 'inside' pCursor
SwPosition* pStart = rTmpCursor.Start();
- SwNodeOffset nStartIndex = pStart->nNode.GetIndex();
+ SwNodeOffset nStartIndex = pStart->GetNodeIndex();
SwPosition* pEnd = rTmpCursor.End();
- SwNodeOffset nEndIndex = pEnd->nNode.GetIndex();
+ SwNodeOffset nEndIndex = pEnd->GetNodeIndex();
if ((nStartIndex <= nLastNode) && (nFirstNode <= nEndIndex))
{
if( rAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR )
@@ -3280,7 +3280,7 @@ std::unique_ptr<SwAccessibleSelectedParas_Impl> SwAccessibleMap::BuildSelectedPa
auto [pStartPos, pEndPos] = pCursor->StartEnd(); // SwPosition*
// loop on all text nodes inside the selection
SwNodeIndex aIdx( pStartPos->nNode );
- for ( ; aIdx.GetIndex() <= pEndPos->nNode.GetIndex(); ++aIdx )
+ for ( ; aIdx.GetIndex() <= pEndPos->GetNodeIndex(); ++aIdx )
{
SwTextNode* pTextNode( aIdx.GetNode().GetTextNode() );
if ( pTextNode )
@@ -3296,11 +3296,11 @@ std::unique_ptr<SwAccessibleSelectedParas_Impl> SwAccessibleMap::BuildSelectedPa
{
xWeakAcc = (*aMapIter).second;
SwAccessibleParaSelection aDataEntry(
- sw::FrameContainsNode(*pTextFrame, pStartPos->nNode.GetIndex())
+ sw::FrameContainsNode(*pTextFrame, pStartPos->GetNodeIndex())
? pTextFrame->MapModelToViewPos(*pStartPos)
: TextFrameIndex(0),
- sw::FrameContainsNode(*pTextFrame, pEndPos->nNode.GetIndex())
+ sw::FrameContainsNode(*pTextFrame, pEndPos->GetNodeIndex())
? pTextFrame->MapModelToViewPos(*pEndPos)
: TextFrameIndex(COMPLETE_STRING));
if ( !pRetSelectedParas )
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 8ffde591db74..b9ac98bb9dc0 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -140,7 +140,7 @@ sal_Int32 SwAccessibleParagraph::GetCaretPos()
// check whether the point points into 'our' node
SwPosition* pPoint = pCaret->GetPoint();
- if (sw::FrameContainsNode(*pTextFrame, pPoint->nNode.GetIndex()))
+ if (sw::FrameContainsNode(*pTextFrame, pPoint->GetNodeIndex()))
{
// same node? Then check whether it's also within 'our' part
// of the paragraph
@@ -233,7 +233,7 @@ void SwAccessibleParagraph::GetStates( sal_Int64& rStateSet )
SwTextFrame const*const pFrame(static_cast<SwTextFrame const*>(GetFrame()));
assert(pFrame);
if (pCaret != nullptr &&
- sw::FrameContainsNode(*pFrame, pCaret->GetPoint()->nNode.GetIndex()) &&
+ sw::FrameContainsNode(*pFrame, pCaret->GetPoint()->GetNodeIndex()) &&
m_nOldCaretPos != -1)
{
vcl::Window *pWin = GetWindow();
@@ -774,7 +774,7 @@ void SAL_CALL SwAccessibleParagraph::grabFocus()
if (pCursorSh != nullptr &&
( pCursor == nullptr ||
- !sw::FrameContainsNode(*pTextFrame, pCursor->GetPoint()->nNode.GetIndex()) ||
+ !sw::FrameContainsNode(*pTextFrame, pCursor->GetPoint()->GetNodeIndex()) ||
!pTextFrame->IsInside(pTextFrame->MapModelToViewPos(*pCursor->GetPoint()))))
{
// create pam for selection
@@ -2981,9 +2981,9 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getSelectedPortionCount( )
{
// check whether frame's node(s) are 'inside' pCursor
SwPosition* pStart = rTmpCursor.Start();
- SwNodeOffset nStartIndex = pStart->nNode.GetIndex();
+ SwNodeOffset nStartIndex = pStart->GetNodeIndex();
SwPosition* pEnd = rTmpCursor.End();
- SwNodeOffset nEndIndex = pEnd->nNode.GetIndex();
+ SwNodeOffset nEndIndex = pEnd->GetNodeIndex();
if ((nStartIndex <= nLastNode) && (nFirstNode <= nEndIndex))
{
nSelected++;
@@ -3056,9 +3056,9 @@ sal_Bool SAL_CALL SwAccessibleParagraph::removeSelection( sal_Int32 selectionInd
{
// check whether frame's node(s) are 'inside' pCursor
SwPosition* pStart = pCursor->Start();
- SwNodeOffset nStartIndex = pStart->nNode.GetIndex();
+ SwNodeOffset nStartIndex = pStart->GetNodeIndex();
SwPosition* pEnd = pCursor->End();
- SwNodeOffset nEndIndex = pEnd->nNode.GetIndex();
+ SwNodeOffset nEndIndex = pEnd->GetNodeIndex();
if ((nStartIndex <= nLastNode) && (nFirstNode <= nEndIndex))
{
if( nSelected == 0 )
@@ -3361,9 +3361,9 @@ bool SwAccessibleParagraph::GetSelectionAtIndex(
{
// check whether frame's node(s) are 'inside' pCursor
SwPosition* pStart = rTmpCursor.Start();
- SwNodeOffset nStartIndex = pStart->nNode.GetIndex();
+ SwNodeOffset nStartIndex = pStart->GetNodeIndex();
SwPosition* pEnd = rTmpCursor.End();
- SwNodeOffset nEndIndex = pEnd->nNode.GetIndex();
+ SwNodeOffset nEndIndex = pEnd->GetNodeIndex();
if ((nStartIndex <= nLastNode) && (nFirstNode <= nEndIndex))
{
if (!pSelection || *pSelection == 0)
diff --git a/sw/source/core/crsr/bookmark.cxx b/sw/source/core/crsr/bookmark.cxx
index 6f4d249dd22b..682519a6e041 100644
--- a/sw/source/core/crsr/bookmark.cxx
+++ b/sw/source/core/crsr/bookmark.cxx
@@ -59,8 +59,8 @@ namespace sw::mark
SwPosition const& rStartPos(rMark.GetMarkStart());
SwPosition const& rEndPos(rMark.GetMarkEnd());
SwNodes const& rNodes(rStartPos.GetNodes());
- SwNodeOffset const nStartNode(rStartPos.nNode.GetIndex());
- SwNodeOffset const nEndNode(rEndPos.nNode.GetIndex());
+ SwNodeOffset const nStartNode(rStartPos.GetNodeIndex());
+ SwNodeOffset const nEndNode(rEndPos.GetNodeIndex());
int nFields(0);
std::optional<SwPosition> ret;
for (SwNodeOffset n = nEndNode; nStartNode <= n; --n)
@@ -306,7 +306,7 @@ namespace sw::mark
OUString MarkBase::ToString( ) const
{
return "Mark: ( Name, [ Node1, Index1 ] ): ( " + m_aName + ", [ "
- + OUString::number( sal_Int32(GetMarkPos().nNode.GetIndex()) ) + ", "
+ + OUString::number( sal_Int32(GetMarkPos().GetNodeIndex()) ) + ", "
+ OUString::number( GetMarkPos().nContent.GetIndex( ) ) + " ] )";
}
@@ -519,9 +519,9 @@ namespace sw::mark
OUString Fieldmark::ToString( ) const
{
return "Fieldmark: ( Name, Type, [ Nd1, Id1 ], [ Nd2, Id2 ] ): ( " + m_aName + ", "
- + m_aFieldname + ", [ " + OUString::number( sal_Int32(GetMarkPos().nNode.GetIndex( )) )
+ + m_aFieldname + ", [ " + OUString::number( sal_Int32(GetMarkPos().GetNodeIndex( )) )
+ ", " + OUString::number( GetMarkPos( ).nContent.GetIndex( ) ) + " ], ["
- + OUString::number( sal_Int32(GetOtherMarkPos().nNode.GetIndex( )) ) + ", "
+ + OUString::number( sal_Int32(GetOtherMarkPos().GetNodeIndex( )) ) + ", "
+ OUString::number( GetOtherMarkPos( ).nContent.GetIndex( ) ) + " ] ) ";
}
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index ce1f89e47ad0..cd8f4d8283c3 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -132,7 +132,7 @@ SwCallLink::~SwCallLink() COVERITY_NOEXCEPT_FALSE
sal_Int32 nCmp, nCurrentContent = pCurrentCursor->GetPoint()->nContent.GetIndex();
SwNodeType nNdWhich = pCNd->GetNodeType();
- SwNodeOffset nCurrentNode = pCurrentCursor->GetPoint()->nNode.GetIndex();
+ SwNodeOffset nCurrentNode = pCurrentCursor->GetPoint()->GetNodeIndex();
// Register the Shell as dependent at the current Node. By doing this all
// attribute changes can be signaled over the link.
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 7a6a905278b7..0fb667ce0578 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -197,8 +197,8 @@ SwCursor* SwCursorShell::GetCursor( bool bMakeTableCursor ) const
if( bMakeTableCursor && m_pTableCursor->IsCursorMovedUpdate() )
{
//don't re-create 'parked' cursors
- if( m_pTableCursor->GetPoint()->nNode.GetIndex() &&
- m_pTableCursor->GetMark()->nNode.GetIndex() )
+ if( m_pTableCursor->GetPoint()->GetNodeIndex() &&
+ m_pTableCursor->GetMark()->GetNodeIndex() )
{
const SwContentNode* pCNd = m_pTableCursor->GetContentNode();
if( pCNd && pCNd->getLayoutFrame( GetLayout() ) )
@@ -1084,7 +1084,7 @@ bool SwCursorShell::IsSelOnePara() const
if (GetLayout()->HasMergedParas())
{
SwContentFrame const*const pFrame(GetCurrFrame(false));
- auto const n(m_pCurrentCursor->GetMark()->nNode.GetIndex());
+ auto const n(m_pCurrentCursor->GetMark()->GetNodeIndex());
return FrameContainsNode(*pFrame, n);
}
return false;
@@ -2553,12 +2553,12 @@ OUString SwCursorShell::GetSelText() const
if (GetLayout()->HasMergedParas())
{
SwContentFrame const*const pFrame(GetCurrFrame(false));
- if (FrameContainsNode(*pFrame, m_pCurrentCursor->GetMark()->nNode.GetIndex()))
+ if (FrameContainsNode(*pFrame, m_pCurrentCursor->GetMark()->GetNodeIndex()))
{
OUStringBuffer buf;
SwPosition const*const pStart(m_pCurrentCursor->Start());
SwPosition const*const pEnd(m_pCurrentCursor->End());
- for (SwNodeOffset i = pStart->nNode.GetIndex(); i <= pEnd->nNode.GetIndex(); ++i)
+ for (SwNodeOffset i = pStart->GetNodeIndex(); i <= pEnd->GetNodeIndex(); ++i)
{
SwNode const& rNode(*pStart->GetNodes()[i]);
assert(!rNode.IsEndNode());
@@ -2568,10 +2568,10 @@ OUString SwCursorShell::GetSelText() const
}
else if (rNode.IsTextNode())
{
- sal_Int32 const nStart(i == pStart->nNode.GetIndex()
+ sal_Int32 const nStart(i == pStart->GetNodeIndex()
? pStart->nContent.GetIndex()
: 0);
- sal_Int32 const nEnd(i == pEnd->nNode.GetIndex()
+ sal_Int32 const nEnd(i == pEnd->GetNodeIndex()
? pEnd->nContent.GetIndex()
: rNode.GetTextNode()->Len());
buf.append(rNode.GetTextNode()->GetExpandText(
@@ -2584,8 +2584,8 @@ OUString SwCursorShell::GetSelText() const
aText = buf.makeStringAndClear();
}
}
- else if( m_pCurrentCursor->GetPoint()->nNode.GetIndex() ==
- m_pCurrentCursor->GetMark()->nNode.GetIndex() )
+ else if( m_pCurrentCursor->GetPoint()->GetNodeIndex() ==
+ m_pCurrentCursor->GetMark()->GetNodeIndex() )
{
SwTextNode* pTextNd = m_pCurrentCursor->GetNode().GetTextNode();
if( pTextNd )
@@ -3063,8 +3063,8 @@ bool SwCursorShell::ShouldWait() const
return true;
SwPaM* pPam = GetCursor();
- return pPam->Start()->nNode.GetIndex() + SwNodeOffset(10) <
- pPam->End()->nNode.GetIndex();
+ return pPam->Start()->GetNodeIndex() + SwNodeOffset(10) <
+ pPam->End()->GetNodeIndex();
}
size_t SwCursorShell::UpdateTableSelBoxes()
@@ -3406,8 +3406,8 @@ bool SwCursorShell::IsSelFullPara() const
{
bool bRet = false;
- if( m_pCurrentCursor->GetPoint()->nNode.GetIndex() ==
- m_pCurrentCursor->GetMark()->nNode.GetIndex() && !m_pCurrentCursor->IsMultiSelection() )
+ if( m_pCurrentCursor->GetPoint()->GetNodeIndex() ==
+ m_pCurrentCursor->GetMark()->GetNodeIndex() && !m_pCurrentCursor->IsMultiSelection() )
{
sal_Int32 nStt = m_pCurrentCursor->GetPoint()->nContent.GetIndex();
sal_Int32 nEnd = m_pCurrentCursor->GetMark()->nContent.GetIndex();
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 2de83faccc67..114dccd12d93 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -522,7 +522,7 @@ bool SwCursorShell::GotoNxtPrvTOXMark( bool bNext )
aFndPos.nNode = SwNodeOffset(0);
SetGetExpField aFndGEF( aFndPos ), aCurGEF( rPos );
- if( rPos.nNode.GetIndex() < GetDoc()->GetNodes().GetEndOfExtras().GetIndex() )
+ if( rPos.GetNodeIndex() < GetDoc()->GetNodes().GetEndOfExtras().GetIndex() )
{
// also at collection use only the first frame
std::pair<Point, bool> const tmp(aPt, false);
@@ -678,7 +678,7 @@ lcl_FindField(bool & o_rFound, SetGetExpFields const& rSrtLst,
pSrch.reset(new SetGetExpField(rPos.nNode, pTextField, pIndex.get()));
}
- if (rPos.nNode.GetIndex() < pTextNode->GetNodes().GetEndOfExtras().GetIndex())
+ if (rPos.GetNodeIndex() < pTextNode->GetNodes().GetEndOfExtras().GetIndex())
{
// also at collection use only the first frame
Point aPt;
@@ -1930,7 +1930,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
pTextNd->SwContentNode::GetAttr( aSet );
rContentAtPos.sStr = "Pos: (";
- rContentAtPos.sStr += OUString::number( sal_Int32(aPos.nNode.GetIndex()));
+ rContentAtPos.sStr += OUString::number( sal_Int32(aPos.GetNodeIndex()));
rContentAtPos.sStr += ":";
rContentAtPos.sStr += OUString::number( aPos.nContent.GetIndex());
rContentAtPos.sStr += ")";
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 6342416972ad..56ded25b8e62 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -960,8 +960,8 @@ bool FindAttrImpl(SwPaM & rSearchPam,
pAttr = iter.NextAttr(&pAttrNode);
}
while (pAttr
- && (pAttrNode->GetIndex() < pPam->GetPoint()->nNode.GetIndex()
- || (pAttrNode->GetIndex() == pPam->GetPoint()->nNode.GetIndex()
+ && (pAttrNode->GetIndex() < pPam->GetPoint()->GetNodeIndex()
+ || (pAttrNode->GetIndex() == pPam->GetPoint()->GetNodeIndex()
&& pAttr->GetStart() < pPam->GetPoint()->nContent.GetIndex())
|| pAttr->Which() != nWhich));
}
@@ -973,8 +973,8 @@ bool FindAttrImpl(SwPaM & rSearchPam,
pAttr = iter.PrevAttr(&pAttrNode);
}
while (pAttr
- && (pPam->GetPoint()->nNode.GetIndex() < pAttrNode->GetIndex()
- || (pPam->GetPoint()->nNode.GetIndex() == pAttrNode->GetIndex()
+ && (pPam->GetPoint()->GetNodeIndex() < pAttrNode->GetIndex()
+ || (pPam->GetPoint()->GetNodeIndex() == pAttrNode->GetIndex()
&& pPam->GetPoint()->nContent.GetIndex() <= pAttr->GetStart())
|| pAttr->Which() != nWhich));
}
@@ -1106,8 +1106,8 @@ static bool FindAttrsImpl(SwPaM & rSearchPam,
// to find its node items
if (pMergedPara->extents.empty())
{
- if (rStart.nNode.GetIndex() <= rPropsNode.GetIndex()
- && rPropsNode.GetIndex() <= rEnd.nNode.GetIndex())
+ if (rStart.GetNodeIndex() <= rPropsNode.GetIndex()
+ && rPropsNode.GetIndex() <= rEnd.GetNodeIndex())
{
SwPaM tmp(rPropsNode, 0, rPropsNode, 0);
bFound = (*fnSearch)(*pNode->GetTextNode(), aCmpArr, tmp);
@@ -1127,8 +1127,8 @@ static bool FindAttrsImpl(SwPaM & rSearchPam,
auto const rExtent(pMergedPara->extents[bSrchForward
? i
: pMergedPara->extents.size() - i - 1]);
- if (rExtent.pNode->GetIndex() < rStart.nNode.GetIndex()
- || rEnd.nNode.GetIndex() < rExtent.pNode->GetIndex())
+ if (rExtent.pNode->GetIndex() < rStart.GetNodeIndex()
+ || rEnd.GetNodeIndex() < rExtent.pNode->GetIndex())
{
continue;
}
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 8f16efc9ed8f..dbe856ec37cf 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -421,7 +421,7 @@ bool FindTextImpl(SwPaM & rSearchPam,
}
AmbiguousIndex nEnd;
if (pLayout
- ? FrameContainsNode(*pFrame, pPam->GetMark()->nNode.GetIndex())
+ ? FrameContainsNode(*pFrame, pPam->GetMark()->GetNodeIndex())
: rNdIdx == pPam->GetMark()->nNode)
{
if (pLayout)
@@ -518,8 +518,8 @@ bool FindTextImpl(SwPaM & rSearchPam,
{
const SwPosition* pPosition = pFrameFormat->GetAnchor().GetContentAnchor();
if (!pPosition || (pLayout
- ? !FrameContainsNode(*pFrame, pPosition->nNode.GetIndex())
- : pPosition->nNode.GetIndex() != pNode->GetIndex()))
+ ? !FrameContainsNode(*pFrame, pPosition->GetNodeIndex())
+ : pPosition->GetNodeIndex() != pNode->GetIndex()))
pObject = nullptr;
}
}
@@ -899,8 +899,8 @@ bool DoSearch(SwPaM & rSearchPam,
if( (bSrchForward || pSttNd != &rNdIdx.GetNode()) &&
rSearchPam.Move(fnMoveForward, GoInContent) &&
(!bSrchForward || pSttNd != &rSearchPam.GetPoint()->GetNode()) &&
- SwNodeOffset(1) == abs(rSearchPam.GetPoint()->nNode.GetIndex() -
- rSearchPam.GetMark()->nNode.GetIndex()))
+ SwNodeOffset(1) == abs(rSearchPam.GetPoint()->GetNodeIndex() -
+ rSearchPam.GetMark()->GetNodeIndex()))
{
// if backward search, switch point and mark
if( !bSrchForward )
@@ -1129,7 +1129,7 @@ std::optional<OUString> ReplaceBackReferences(const i18nutil::SearchOptions2& rS
: nullptr);
const bool bParaEnd = rSearchOpt.searchString == "$" || rSearchOpt.searchString == "^$" || rSearchOpt.searchString == "$^";
if (bParaEnd || (pLayout
- ? sw::FrameContainsNode(*pFrame, pPam->GetMark()->nNode.GetIndex())
+ ? sw::FrameContainsNode(*pFrame, pPam->GetMark()->GetNodeIndex())
: pTextNode == pMarkTextNode))
{
utl::TextSearch aSText( utl::TextSearch::UpgradeToSearchOptions2( rSearchOpt) );
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index efef4aa2dcec..3f42c4c60dc6 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -203,14 +203,14 @@ SwDoc& SwPosition::GetDoc() const
void SwPosition::dumpAsXml(xmlTextWriterPtr pWriter) const
{
(void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwPosition"));
- (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nNode"), BAD_CAST(OString::number(sal_Int32(nNode.GetIndex())).getStr()));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nNode"), BAD_CAST(OString::number(sal_Int32(GetNodeIndex())).getStr()));
(void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nContent"), BAD_CAST(OString::number(nContent.GetIndex()).getStr()));
(void)xmlTextWriterEndElement(pWriter);
}
std::ostream &operator <<(std::ostream& s, const SwPosition& position)
{
- return s << "SwPosition (node " << position.nNode.GetIndex() << ", offset " << position.nContent.GetIndex() << ")";
+ return s << "SwPosition (node " << position.GetNodeIndex() << ", offset " << position.nContent.GetIndex() << ")";
}
namespace {
@@ -704,8 +704,8 @@ bool SwPaM::HasReadonlySel( bool bFormView ) const
// check for protected section inside the selection
if( !bRet )
{
- SwNodeOffset nSttIdx = GetMark()->nNode.GetIndex(),
- nEndIdx = GetPoint()->nNode.GetIndex();
+ SwNodeOffset nSttIdx = GetMark()->GetNodeIndex(),
+ nEndIdx = GetPoint()->GetNodeIndex();
if( nEndIdx <= nSttIdx )
{
SwNodeOffset nTmp = nSttIdx;
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 2d9cafd2005f..d6ef76de8c61 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -95,8 +95,8 @@ struct PercentHdl
else
{
bNodeIdx = true;
- nStt = sal_Int32(rPam.GetMark()->nNode.GetIndex());
- nEnd = sal_Int32(rPam.GetPoint()->nNode.GetIndex());
+ nStt = sal_Int32(rPam.GetMark()->GetNodeIndex());
+ nEnd = sal_Int32(rPam.GetPoint()->GetNodeIndex());
}
nActPos = nStt;
bBack = (nStt > nEnd );
@@ -116,7 +116,7 @@ struct PercentHdl
{
sal_Int32 nPos;
if( bNodeIdx )
- nPos = sal_Int32(rPos.nNode.GetIndex());
+ nPos = sal_Int32(rPos.GetNodeIndex());
else
nPos = rPos.nContent.GetIndex();
::SetProgressState( bBack ? nActPos - nPos : nPos, pDSh );
@@ -184,7 +184,7 @@ void SwCursor::RestoreState()
/// determine if point is outside of the node-array's content area
bool SwCursor::IsNoContent() const
{
- return GetPoint()->nNode.GetIndex() <
+ return GetPoint()->GetNodeIndex() <
GetDoc().GetNodes().GetEndOfExtras().GetIndex();
}
@@ -236,7 +236,7 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags )
return true;
}
- if (m_vSavePos.back().nNode != GetPoint()->nNode.GetIndex() &&
+ if (m_vSavePos.back().nNode != GetPoint()->GetNodeIndex() &&
// (1997) in UI-ReadOnly everything is allowed
( !rDoc.GetDocShell() || !rDoc.GetDocShell()->IsReadOnlyUI() ))
{
@@ -301,8 +301,8 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags )
// is there a protected section in the section?
if( HasMark() && bSkipOverProtectSections)
{
- SwNodeOffset nSttIdx = GetMark()->nNode.GetIndex(),
- nEndIdx = GetPoint()->nNode.GetIndex();
+ SwNodeOffset nSttIdx = GetMark()->GetNodeIndex(),
+ nEndIdx = GetPoint()->GetNodeIndex();
if( nEndIdx <= nSttIdx )
{
SwNodeOffset nTmp = nSttIdx;
@@ -454,14 +454,14 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags )
const SwNodeOffset nRefNodeIdx =
( SwCursorSelOverFlags::Toggle & eFlags )
? m_vSavePos.back().nNode
- : GetMark()->nNode.GetIndex();
+ : GetMark()->GetNodeIndex();
const sal_Int32 nRefContentIdx =
( SwCursorSelOverFlags::Toggle & eFlags )
? m_vSavePos.back().nContent
: GetMark()->nContent.GetIndex();
const bool bIsForwardSelection =
- nRefNodeIdx < GetPoint()->nNode.GetIndex()
- || ( nRefNodeIdx == GetPoint()->nNode.GetIndex()
+ nRefNodeIdx < GetPoint()->GetNodeIndex()
+ || ( nRefNodeIdx == GetPoint()->GetNodeIndex()
&& nRefContentIdx < GetPoint()->nContent.GetIndex() );
if ( pInputFieldTextAttrAtPoint != nullptr )
@@ -501,9 +501,9 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags )
// Only Point in Table then go behind/in front of table
if (SwCursorSelOverFlags::ChangePos & eFlags)
{
- bool bSelTop = GetPoint()->nNode.GetIndex() <
+ bool bSelTop = GetPoint()->GetNodeIndex() <
((SwCursorSelOverFlags::Toggle & eFlags)
- ? m_vSavePos.back().nNode : GetMark()->nNode.GetIndex());
+ ? m_vSavePos.back().nNode : GetMark()->GetNodeIndex());
do { // loop for table after table
SwNodeOffset nSEIdx = pPtNd->EndOfSectionIndex();
@@ -577,7 +577,7 @@ bool SwCursor::IsInProtectTable( bool bMove, bool bChgCursor )
return false;
// Current position == last save position?
- if (m_vSavePos.back().nNode == GetPoint()->nNode.GetIndex())
+ if (m_vSavePos.back().nNode == GetPoint()->GetNodeIndex())
return false;
// Check for covered cell:
@@ -612,7 +612,7 @@ bool SwCursor::IsInProtectTable( bool bMove, bool bChgCursor )
}
// We are in a protected table cell. Traverse top to bottom?
- if (m_vSavePos.back().nNode < GetPoint()->nNode.GetIndex())
+ if (m_vSavePos.back().nNode < GetPoint()->GetNodeIndex())
{
// search next valid box
// if there is another StartNode after the EndNode of a cell then
@@ -903,8 +903,8 @@ static bool lcl_MakeSelFwrd( const SwNode& rSttNd, const SwNode& rEndNd,
return false;
pCNd->MakeStartIndex( &rPam.GetPoint()->nContent );
}
- else if( rSttNd.GetIndex() > rPam.GetPoint()->nNode.GetIndex() ||
- rPam.GetPoint()->nNode.GetIndex() >= rEndNd.GetIndex() )
+ else if( rSttNd.GetIndex() > rPam.GetPoint()->GetNodeIndex() ||
+ rPam.GetPoint()->GetNodeIndex() >= rEndNd.GetIndex() )
// not in this section
return false;
@@ -935,8 +935,8 @@ static bool lcl_MakeSelBkwrd( const SwNode& rSttNd, const SwNode& rEndNd,
return false;
pCNd->MakeEndIndex( &rPam.GetPoint()->nContent );
}
- else if( rEndNd.GetIndex() > rPam.GetPoint()->nNode.GetIndex() ||
- rPam.GetPoint()->nNode.GetIndex() >= rSttNd.GetIndex() )
+ else if( rEndNd.GetIndex() > rPam.GetPoint()->GetNodeIndex() ||
+ rPam.GetPoint()->GetNodeIndex() >= rSttNd.GetIndex() )
return false; // not in this section
rPam.SetMark();
@@ -1003,11 +1003,11 @@ sal_Int32 SwCursor::FindAll( SwFindParas& rParas,
? lcl_MakeSelBkwrd( rNds.GetEndOfExtras(),
*rNds.GetEndOfPostIts().StartOfSectionNode(),
*this, rNds.GetEndOfExtras().GetIndex() >=
- GetPoint()->nNode.GetIndex() )
+ GetPoint()->GetNodeIndex() )
: lcl_MakeSelFwrd( *rNds.GetEndOfPostIts().StartOfSectionNode(),
rNds.GetEndOfExtras(), *this,
rNds.GetEndOfExtras().GetIndex() >=
- GetPoint()->nNode.GetIndex() ))
+ GetPoint()->GetNodeIndex() ))
{
nFound = lcl_FindSelection( rParas, this, fnMove, pFndRing,
aRegion, eFndRngs, bInReadOnly, bCancel );
@@ -2588,8 +2588,8 @@ bool SwTableCursor::IsCursorMovedUpdate()
if( !IsCursorMoved() )
return false;
- m_nTableMkNd = GetMark()->nNode.GetIndex();
- m_nTablePtNd = GetPoint()->nNode.GetIndex();
+ m_nTableMkNd = GetMark()->GetNodeIndex();
+ m_nTablePtNd = GetPoint()->GetNodeIndex();
m_nTableMkCnt = GetMark()->nContent.GetIndex();
m_nTablePtCnt = GetPoint()->nContent.GetIndex();
return true;
diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx
index 47bcf5b903e0..d1fa10b9efa4 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -213,7 +213,7 @@ bool SwCursor::GotoNextFootnoteAnchor()
// there is a footnote with this index, so search also for the next one
if( nPos < rFootnoteArr.size() )
{
- SwNodeOffset nNdPos = GetPoint()->nNode.GetIndex();
+ SwNodeOffset nNdPos = GetPoint()->GetNodeIndex();
const sal_Int32 nCntPos = GetPoint()->nContent.GetIndex();
pTextFootnote = rFootnoteArr[ nPos ];
@@ -284,7 +284,7 @@ bool SwCursor::GotoPrevFootnoteAnchor()
if( rFootnoteArr.SeekEntry( GetPoint()->nNode, &nPos ) )
{
// there is a footnote with this index, so search also for the next one
- SwNodeOffset nNdPos = GetPoint()->nNode.GetIndex();
+ SwNodeOffset nNdPos = GetPoint()->GetNodeIndex();
const sal_Int32 nCntPos = GetPoint()->nContent.GetIndex();
pTextFootnote = rFootnoteArr[ nPos ];
diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx
index 7de5695869d7..d87ee41454c0 100644
--- a/sw/source/core/crsr/trvlreg.cxx
+++ b/sw/source/core/crsr/trvlreg.cxx
@@ -229,7 +229,7 @@ bool SwCursor::MoveRegion( SwWhichRegion fnWhichRegion, SwMoveFnCollection const
return !dynamic_cast<SwTableCursor*>(this) &&
(*fnWhichRegion)( *this, fnPosRegion, IsReadOnlyAvailable() ) &&
!IsSelOvr() &&
- (GetPoint()->nNode.GetIndex() != m_vSavePos.back().nNode ||
+ (GetPoint()->GetNodeIndex() != m_vSavePos.back().nNode ||
GetPoint()->nContent.GetIndex() != m_vSavePos.back().nContent);
}
diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx
index abe4a09f55d8..96615c9e115b 100644
--- a/sw/source/core/crsr/trvltbl.cxx
+++ b/sw/source/core/crsr/trvltbl.cxx
@@ -702,7 +702,7 @@ bool SwCursorShell::MoveTable( SwWhichTable fnWhichTable, SwMoveFnCollection con
else
{
bCheckPos = true;
- nPtNd = pCursor->GetPoint()->nNode.GetIndex();
+ nPtNd = pCursor->GetPoint()->GetNodeIndex();
nPtCnt = pCursor->GetPoint()->nContent.GetIndex();
}
@@ -716,7 +716,7 @@ bool SwCursorShell::MoveTable( SwWhichTable fnWhichTable, SwMoveFnCollection con
UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY);
if( bCheckPos &&
- pCursor->GetPoint()->nNode.GetIndex() == nPtNd &&
+ pCursor->GetPoint()->GetNodeIndex() == nPtNd &&
pCursor->GetPoint()->nContent.GetIndex() == nPtCnt )
bRet = false;
}
@@ -839,7 +839,7 @@ bool SwCursorShell::CheckTableBoxContent( const SwPosition* pPos )
// cursor not anymore in this section?
if( pChkBox && !pPos &&
( m_pCurrentCursor->HasMark() || m_pCurrentCursor->GetNext() != m_pCurrentCursor ||
- pSttNd->GetIndex() + 1 == m_pCurrentCursor->GetPoint()->nNode.GetIndex() ))
+ pSttNd->GetIndex() + 1 == m_pCurrentCursor->GetPoint()->GetNodeIndex() ))
pChkBox = nullptr;
// Did the content of a box change at all? This is important if e.g. Undo
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index cb9db2a4364d..a0c2fe47ad03 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -1083,7 +1083,7 @@ void SwShellTableCursor::SaveTableBoxContent( const SwPosition* pPos )
void SwShellTableCursor::FillRects()
{
// Calculate the new rectangles. If the cursor is still "parked" do nothing
- if (m_SelectedBoxes.empty() || m_bParked || !GetPoint()->nNode.GetIndex())
+ if (m_SelectedBoxes.empty() || m_bParked || !GetPoint()->GetNodeIndex())
return;
bool bStart = true;
@@ -1153,7 +1153,7 @@ void SwShellTableCursor::FillStartEnd(SwRect& rStart, SwRect& rEnd) const
bool SwShellTableCursor::Contains( const Point& rPt ) const
{
// Calculate the new rectangles. If the cursor is still "parked" do nothing
- if (m_SelectedBoxes.empty() || m_bParked || !GetPoint()->nNode.GetIndex())
+ if (m_SelectedBoxes.empty() || m_bParked || !GetPoint()->GetNodeIndex())
return false;
SwNodes& rNds = GetDoc().GetNodes();
diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx
index 84225d8a5f76..9e54fe4610ad 100644
--- a/sw/source/core/doc/CntntIdxStore.cxx
+++ b/sw/source/core/doc/CntntIdxStore.cxx
@@ -53,7 +53,7 @@ namespace
int lcl_RelativePosition( const SwPosition& rPos, SwNodeOffset nNode, sal_Int32 nContent )
{
- SwNodeOffset nIndex = rPos.nNode.GetIndex();
+ SwNodeOffset nIndex = rPos.GetNodeIndex();
int nReturn = BEFORE_NODE;
if( nIndex == nNode )
{
@@ -201,7 +201,7 @@ namespace
void lcl_ChkPaM( std::vector<PaMEntry>& rPaMEntries, const SwNodeOffset nNode, const sal_Int32 nContent, SwPaM& rPaM, const bool bGetPoint, bool bSetMark)
{
const SwPosition* pPos = &rPaM.GetBound(bGetPoint);
- if( pPos->nNode.GetIndex() == nNode && pPos->nContent.GetIndex() < nContent )
+ if( pPos->GetNodeIndex() == nNode && pPos->nContent.GetIndex() < nContent )
{
const PaMEntry aEntry = { &rPaM, bSetMark, pPos->nContent.GetIndex() };
rPaMEntries.push_back(aEntry);
@@ -238,7 +238,7 @@ void ContentIdxStoreImpl::SaveBkmks(SwDoc& rDoc, SwNodeOffset nNode, sal_Int32 n
{
const ::sw::mark::IMark* pBkmk = *ppBkmk;
bool bMarkPosEqual = false;
- if(pBkmk->GetMarkPos().nNode.GetIndex() == nNode
+ if(pBkmk->GetMarkPos().GetNodeIndex() == nNode
&& pBkmk->GetMarkPos().nContent.GetIndex() <= nContent)
{
if(pBkmk->GetMarkPos().nContent.GetIndex() < nContent)
@@ -250,7 +250,7 @@ void ContentIdxStoreImpl::SaveBkmks(SwDoc& rDoc, SwNodeOffset nNode, sal_Int32 n
bMarkPosEqual = true; // has to decide if it is added to the array
}
if(pBkmk->IsExpanded()
- && pBkmk->GetOtherMarkPos().nNode.GetIndex() == nNode
+ && pBkmk->GetOtherMarkPos().GetNodeIndex() == nNode
&& pBkmk->GetOtherMarkPos().nContent.GetIndex() <= nContent)
{
if(bMarkPosEqual)
@@ -344,7 +344,7 @@ void ContentIdxStoreImpl::SaveFlys(SwDoc& rDoc, SwNodeOffset nNode, sal_Int32 nC
{
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
SwPosition const*const pAPos = rAnchor.GetContentAnchor();
- if ( pAPos && ( nNode == pAPos->nNode.GetIndex() ) &&
+ if ( pAPos && ( nNode == pAPos->GetNodeIndex() ) &&
( RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId() ||
RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId() ) )
{
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 05487f9a63fc..3eb119a177ec 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -113,8 +113,8 @@ namespace
(RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId()) ||
(RndStdIds::FLY_AT_FLY == pAnchor->GetAnchorId()) ||
(RndStdIds::FLY_AT_PARA == pAnchor->GetAnchorId())) &&
- nSttNd <= pAPos->nNode.GetIndex() &&
- pAPos->nNode.GetIndex() < nEndNd )
+ nSttNd <= pAPos->GetNodeIndex() &&
+ pAPos->GetNodeIndex() < nEndNd )
{
const SwFormatContent& rContent = pFormat->GetContent();
SwStartNode* pSNd;
@@ -167,8 +167,8 @@ namespace
*/
void lcl_NonCopyCount( const SwPaM& rPam, SwNodeIndex& rLastIdx, const SwNodeOffset nNewIdx, SwNodeOffset& rDelCount )
{
- SwNodeOffset nStart = rPam.Start()->nNode.GetIndex();
- SwNodeOffset nEnd = rPam.End()->nNode.GetIndex();
+ SwNodeOffset nStart = rPam.Start()->GetNodeIndex();
+ SwNodeOffset nEnd = rPam.End()->GetNodeIndex();
if( rLastIdx.GetIndex() < nNewIdx ) // Moving forward?
{
// We never copy the StartOfContent node
@@ -206,13 +206,13 @@ namespace
SwPosition& rChgPos,
SwNodeOffset nDelCount )
{
- SwNodeOffset nNdOff = rOrigPos.nNode.GetIndex();
- nNdOff -= rOrigStt.nNode.GetIndex();
+ SwNodeOffset nNdOff = rOrigPos.GetNodeIndex();
+ nNdOff -= rOrigStt.GetNodeIndex();
nNdOff -= nDelCount;
sal_Int32 nContentPos = rOrigPos.nContent.GetIndex();
// Always adjust <nNode> at to be changed <SwPosition> instance <rChgPos>
- rChgPos.nNode = nNdOff + rCpyStt.nNode.GetIndex();
+ rChgPos.nNode = nNdOff + rCpyStt.GetNodeIndex();
if( !nNdOff )
{
// just adapt the content index
@@ -284,12 +284,12 @@ namespace sw
for(const sw::mark::IMark* const pMark : vMarksToCopy)
{
SwPaM aTmpPam(*pCpyStt);
- lcl_NonCopyCount(rPam, aCorrIdx, pMark->GetMarkPos().nNode.GetIndex(), nDelCount);
+ lcl_NonCopyCount(rPam, aCorrIdx, pMark->GetMarkPos().GetNodeIndex(), nDelCount);
lcl_SetCpyPos( pMark->GetMarkPos(), rStt, *pCpyStt, *aTmpPam.GetPoint(), nDelCount);
if(pMark->IsExpanded())
{
aTmpPam.SetMark();
- lcl_NonCopyCount(rPam, aCorrIdx, pMark->GetOtherMarkPos().nNode.GetIndex(), nDelCount);
+ lcl_NonCopyCount(rPam, aCorrIdx, pMark->GetOtherMarkPos().GetNodeIndex(), nDelCount);
lcl_SetCpyPos(pMark->GetOtherMarkPos(), rStt, *pCpyStt, *aTmpPam.GetMark(), nDelCount);
}
@@ -393,7 +393,7 @@ namespace
pDelPam.reset(new SwPaM( *pCpyStt, pDelPam.release() ));
if( *pStt < *pRStt )
{
- lcl_NonCopyCount( rPam, aCorrIdx, pRStt->nNode.GetIndex(), nDelCount );
+ lcl_NonCopyCount( rPam, aCorrIdx, pRStt->GetNodeIndex(), nDelCount );
lcl_SetCpyPos( *pRStt, *pStt, *pCpyStt,
*pDelPam->GetPoint(), nDelCount );
}
@@ -403,7 +403,7 @@ namespace
*pDelPam->GetPoint() = *pCpyEnd;
else
{
- lcl_NonCopyCount( rPam, aCorrIdx, pREnd->nNode.GetIndex(), nDelCount );
+ lcl_NonCopyCount( rPam, aCorrIdx, pREnd->GetNodeIndex(), nDelCount );
lcl_SetCpyPos( *pREnd, *pStt, *pCpyStt,
*pDelPam->GetPoint(), nDelCount );
}
@@ -521,8 +521,8 @@ namespace sw
void CalcBreaks(std::vector<std::pair<SwNodeOffset, sal_Int32>> & rBreaks,
SwPaM const & rPam, bool const isOnlyFieldmarks)
{
- SwNodeOffset const nStartNode(rPam.Start()->nNode.GetIndex());
- SwNodeOffset const nEndNode(rPam.End()->nNode.GetIndex());
+ SwNodeOffset const nStartNode(rPam.Start()->GetNodeIndex());
+ SwNodeOffset const nEndNode(rPam.End()->GetNodeIndex());
SwNodes const& rNodes(rPam.GetPoint()->GetNodes());
IDocumentMarkAccess const& rIDMA(*rPam.GetDoc().getIDocumentMarkAccess());
@@ -626,7 +626,7 @@ namespace sw
{
SwPosition const& rStart(std::get<0>(startedFields.top())->GetMarkStart());
std::pair<SwNodeOffset, sal_Int32> const pos(
- rStart.nNode.GetIndex(), rStart.nContent.GetIndex());
+ rStart.GetNodeIndex(), rStart.nContent.GetIndex());
auto it = std::lower_bound(rBreaks.begin(), rBreaks.end(), pos);
assert(it == rBreaks.end() || *it != pos);
rBreaks.insert(it, pos);
@@ -682,7 +682,7 @@ namespace
if (rStart < rEnd) // check if part is empty
{
bRet &= (rDocumentContentOperations.*pFunc)(aPam, flags);
- nOffset = iter->first - rStart.nNode.GetIndex(); // deleted fly nodes...
+ nOffset = iter->first - rStart.GetNodeIndex(); // deleted fly nodes...
}
rEnd = SwPosition(*rNodes[iter->first - nOffset]->GetTextNode(), iter->second);
++iter;
@@ -729,11 +729,11 @@ namespace
{
auto [pStt, pEnd] = pR->StartEnd(); // SwPosition*
SwNodeOffset nSttIdx = rSttIdx.GetIndex();
- nStt = pStt->nNode.GetIndex() - nSttIdx;
+ nStt = pStt->GetNodeIndex() - nSttIdx;
nSttCnt = pStt->nContent.GetIndex();
if( pR->HasMark() )
{
- nEnd = pEnd->nNode.GetIndex() - nSttIdx;
+ nEnd = pEnd->GetNodeIndex() - nSttIdx;
nEndCnt = pEnd->nContent.GetIndex();
}
@@ -749,14 +749,14 @@ namespace
, nEndCnt(0)
{
auto [pStt, pEnd] = pR->StartEnd(); // SwPosition*
- SwNodeOffset nSttIdx = rPos.nNode.GetIndex();
- nStt = pStt->nNode.GetIndex() - nSttIdx;
+ SwNodeOffset nSttIdx = rPos.GetNodeIndex();
+ nStt = pStt->GetNodeIndex() - nSttIdx;
nSttCnt = pStt->nContent.GetIndex();
if( nStt == SwNodeOffset(0) )
nSttCnt = nSttCnt - rPos.nContent.GetIndex();
if( pR->HasMark() )
{
- nEnd = pEnd->nNode.GetIndex() - nSttIdx;
+ nEnd = pEnd->GetNodeIndex() - nSttIdx;
nEndCnt = pEnd->nContent.GetIndex();
if( nEnd == SwNodeOffset(0) )
nEndCnt = nEndCnt - rPos.nContent.GetIndex();
@@ -781,11 +781,11 @@ namespace
void SetPos( const SwPosition& aPos )
{
- pRedl->GetPoint()->nNode = aPos.nNode.GetIndex() + nStt;
+ pRedl->GetPoint()->nNode = aPos.GetNodeIndex() + nStt;
pRedl->GetPoint()->nContent.Assign( pRedl->GetContentNode(), nSttCnt + ( nStt == SwNodeOffset(0) ? aPos.nContent.GetIndex() : 0 ) );
if( pRedl->HasMark() )
{
- pRedl->GetMark()->nNode = aPos.nNode.GetIndex() + nEnd;
+ pRedl->GetMark()->nNode = aPos.GetNodeIndex() + nEnd;
pRedl->GetMark()->nContent.Assign( pRedl->GetContentNode(false), nEndCnt + ( nEnd == SwNodeOffset(0) ? aPos.nContent.GetIndex() : 0 ) );
}
}
@@ -2027,8 +2027,8 @@ DocumentContentOperationsManager::CopyRange( SwPaM& rPam, SwPosition& rPos,
if (&rDoc == &m_rDoc && (flags & SwCopyFlags::CheckPosInFly))
{
// Correct the Start-/EndNode
- SwNodeOffset nStt = pStt->nNode.GetIndex(),
- nEnd = pEnd->nNode.GetIndex(),
+ SwNodeOffset nStt = pStt->GetNodeIndex(),
+ nEnd = pEnd->GetNodeIndex(),
nDiff = nEnd - nStt +1;
SwNode* pNd = m_rDoc.GetNodes()[ nStt ];
if( pNd->IsContentNode() && pStt->nContent.GetIndex() )
@@ -2043,7 +2043,7 @@ DocumentContentOperationsManager::CopyRange( SwPaM& rPam, SwPosition& rPos,
--nDiff;
}
if( nDiff &&
- lcl_ChkFlyFly( rDoc, nStt, nEnd, rPos.nNode.GetIndex() ) )
+ lcl_ChkFlyFly( rDoc, nStt, nEnd, rPos.GetNodeIndex() ) )
{
return false;
}
@@ -2147,11 +2147,11 @@ bool DocumentContentOperationsManager::DelFullPara( SwPaM& rPam )
const SwNode* pNd = &rStt.GetNode();
SwNodeOffset nSectDiff = pNd->StartOfSectionNode()->EndOfSectionIndex() -
pNd->StartOfSectionIndex();
- SwNodeOffset nNodeDiff = rEnd.nNode.GetIndex() - rStt.nNode.GetIndex();
+ SwNodeOffset nNodeDiff = rEnd.GetNodeIndex() - rStt.GetNodeIndex();
if ( nSectDiff-SwNodeOffset(2) <= nNodeDiff || m_rDoc.getIDocumentRedlineAccess().IsRedlineOn() ||
/* #i9185# Prevent getting the node after the end node (see below) */
- rEnd.nNode.GetIndex() + 1 == m_rDoc.GetNodes().Count() )
+ rEnd.GetNodeIndex() + 1 == m_rDoc.GetNodes().Count() )
{
return false;
}
@@ -2181,7 +2181,7 @@ bool DocumentContentOperationsManager::DelFullPara( SwPaM& rPam )
bool bSavePageBreak = false, bSavePageDesc = false;
/* #i9185# This would lead to a segmentation fault if not caught above. */
- SwNodeOffset nNextNd = rEnd.nNode.GetIndex() + 1;
+ SwNodeOffset nNextNd = rEnd.GetNodeIndex() + 1;
SwTableNode *const pTableNd = m_rDoc.GetNodes()[ nNextNd ]->GetTableNode();
if( pTableNd && pNd->IsContentNode() )
@@ -2415,14 +2415,14 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos,
const sal_Int32 nMkContent = rPaM.GetMark()->nContent.GetIndex();
const std::shared_ptr<sw::mark::ContentIdxStore> pContentStore(sw::mark::ContentIdxStore::Create());
- pContentStore->Save( m_rDoc, rPos.nNode.GetIndex(), rPos.nContent.GetIndex(), true );
+ pContentStore->Save( m_rDoc, rPos.GetNodeIndex(), rPos.nContent.GetIndex(), true );
SwTextNode * pOrigNode = pTNd;
assert(*aSavePam.GetPoint() == *aSavePam.GetMark() &&
*aSavePam.GetPoint() == rPos);
assert(aSavePam.GetPoint()->nContent.GetContentNode() == pOrigNode);
- assert(aSavePam.GetPoint()->nNode == rPos.nNode.GetIndex());
- assert(rPos.nNode.GetIndex() == pOrigNode->GetIndex());
+ assert(aSavePam.GetPoint()->nNode == rPos.GetNodeIndex());
+ assert(rPos.GetNodeIndex() == pOrigNode->GetIndex());
std::function<void (SwTextNode *, sw::mark::RestoreMode, bool)> restoreFunc(
[&](SwTextNode *const, sw::mark::RestoreMode const eMode, bool)
@@ -2447,15 +2447,15 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos,
assert(*aSavePam.GetPoint() == *aSavePam.GetMark() &&
*aSavePam.GetPoint() == rPos);
assert(aSavePam.GetPoint()->nContent.GetContentNode() == pOrigNode);
- assert(aSavePam.GetPoint()->nNode == rPos.nNode.GetIndex());
- assert(rPos.nNode.GetIndex() == pOrigNode->GetIndex());
+ assert(aSavePam.GetPoint()->nNode == rPos.GetNodeIndex());
+ assert(rPos.GetNodeIndex() == pOrigNode->GetIndex());
aSavePam.GetPoint()->nContent.Assign(pOrigNode, 0);
rPos = *aSavePam.GetMark() = *aSavePam.GetPoint();
// correct the PaM!
if( rPos.nNode == rPaM.GetMark()->nNode )
{
- rPaM.GetMark()->nNode = rPos.nNode.GetIndex()-SwNodeOffset(1);
+ rPaM.GetMark()->nNode = rPos.GetNodeIndex()-SwNodeOffset(1);
rPaM.GetMark()->nContent.Assign( pTNd, nMkContent );
}
}
@@ -2958,8 +2958,8 @@ void DocumentContentOperationsManager::TransliterateText(
pUndo.reset(new SwUndoTransliterate( rPaM, rTrans ));
auto [pStt, pEnd] = rPaM.StartEnd(); // SwPosition*
- SwNodeOffset nSttNd = pStt->nNode.GetIndex(),
- nEndNd = pEnd->nNode.GetIndex();
+ SwNodeOffset nSttNd = pStt->GetNodeIndex(),
+ nEndNd = pEnd->GetNodeIndex();
sal_Int32 nSttCnt = pStt->nContent.GetIndex();
sal_Int32 nEndCnt = pEnd->nContent.GetIndex();
@@ -3157,7 +3157,7 @@ void DocumentContentOperationsManager::ReRead( SwPaM& rPam, const OUString& rGrf
{
SwGrfNode *pGrfNd;
if( !(( !rPam.HasMark()
- || rPam.GetPoint()->nNode.GetIndex() == rPam.GetMark()->nNode.GetIndex() )
+ || rPam.GetPoint()->GetNodeIndex() == rPam.GetMark()->GetNodeIndex() )
&& nullptr != ( pGrfNd = rPam.GetPoint()->GetNode().GetGrfNode() )) )
return;
@@ -3325,7 +3325,7 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b
// then insert a paragraph before it.
if( bChkTableStart && !rPos.nContent.GetIndex() && pNode->IsTextNode() )
{
- SwNodeOffset nPrevPos = rPos.nNode.GetIndex() - 1;
+ SwNodeOffset nPrevPos = rPos.GetNodeIndex() - 1;
const SwTableNode* pTableNd;
const SwNode* pNd = m_rDoc.GetNodes()[ nPrevPos ];
if( pNd->IsStartNode() &&
@@ -3392,14 +3392,14 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b
}
const std::shared_ptr<sw::mark::ContentIdxStore> pContentStore(sw::mark::ContentIdxStore::Create());
- pContentStore->Save( m_rDoc, rPos.nNode.GetIndex(), rPos.nContent.GetIndex(), true );
+ pContentStore->Save( m_rDoc, rPos.GetNodeIndex(), rPos.nContent.GetIndex(), true );
assert(pNode->IsTextNode());
std::function<void (SwTextNode *, sw::mark::RestoreMode, bool bAtStart)> restoreFunc(
[&](SwTextNode *const, sw::mark::RestoreMode const eMode, bool const bAtStart)
{
if (!pContentStore->Empty())
{ // move all bookmarks, TOXMarks, FlyAtCnt
- pContentStore->Restore(m_rDoc, rPos.nNode.GetIndex()-SwNodeOffset(1), 0, true, bAtStart && (eMode & sw::mark::RestoreMode::Flys), eMode);
+ pContentStore->Restore(m_rDoc, rPos.GetNodeIndex()-SwNodeOffset(1), 0, true, bAtStart && (eMode & sw::mark::RestoreMode::Flys), eMode);
}
if (eMode & sw::mark::RestoreMode::NonFlys)
{
@@ -3486,7 +3486,7 @@ bool DocumentContentOperationsManager::ReplaceRange( SwPaM& rPam, const OUString
sw::CalcBreaks(Breaks, aPam);
while (!Breaks.empty() // skip over prefix of dummy chars
- && (aPam.GetMark()->nNode.GetIndex() == Breaks.begin()->first)
+ && (aPam.GetMark()->GetNodeIndex() == Breaks.begin()->first)
&& (aPam.GetMark()->nContent.GetIndex() == Breaks.begin()->second))
{
// skip!
@@ -3529,7 +3529,7 @@ bool DocumentContentOperationsManager::ReplaceRange( SwPaM& rPam, const OUString
bRet &= (m_rDoc.getIDocumentRedlineAccess().IsRedlineOn())
? DeleteAndJoinWithRedlineImpl(aPam, SwDeleteFlags::Default)
: DeleteAndJoinImpl(aPam, SwDeleteFlags::Default);
- nOffset = iter->first - rStart.nNode.GetIndex(); // deleted fly nodes...
+ nOffset = iter->first - rStart.GetNodeIndex(); // deleted fly nodes...
}
rEnd = SwPosition(*rNodes[iter->first - nOffset]->GetTextNode(), iter->second);
++iter;
@@ -3821,7 +3821,7 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl(
if ( !pAPos )
continue;
bool bAdd = false;
- SwNodeOffset nSkipAfter = pAPos->nNode.GetIndex();
+ SwNodeOffset nSkipAfter = pAPos->GetNodeIndex();
SwNodeOffset nStart = rRg.aStart.GetIndex();
switch ( pAnchor->GetAnchorId() )
{
@@ -3963,7 +3963,7 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl(
}
else
{
- SwNodeOffset nOffset = newPos.nNode.GetIndex() - rRg.aStart.GetIndex();
+ SwNodeOffset nOffset = newPos.GetNodeIndex() - rRg.aStart.GetIndex();
SwNodeIndex aIdx( rStartIdx, nOffset );
newPos.nNode = aIdx;
}
@@ -4434,7 +4434,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam, SwDelet
}
// if the end is not a content node, delete it as well
- SwNodeOffset nEnd = pEnd->nNode.GetIndex();
+ SwNodeOffset nEnd = pEnd->GetNodeIndex();
if( pCNd == nullptr )
nEnd++;
@@ -4645,7 +4645,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
else
{
assert((pStt->nNode == pEnd->nNode ||
- ( pStt->nNode.GetIndex() + 1 == pEnd->nNode.GetIndex() &&
+ ( pStt->GetNodeIndex() + 1 == pEnd->GetNodeIndex() &&
!pEnd->nContent.GetIndex() )) &&
"invalid range: Point and Mark on different nodes" );
@@ -4846,7 +4846,7 @@ bool DocumentContentOperationsManager::CopyImpl(SwPaM& rPam, SwPosition& rPos,
{
// pass in copyRange member as rPos; should work ...
bRet &= CopyImplImpl(aPam, *copyRange.Start(), flags & ~SwCopyFlags::IsMoveToFly, &copyRange);
- nOffset = iter->first - rStart.nNode.GetIndex(); // fly nodes...
+ nOffset = iter->first - rStart.GetNodeIndex(); // fly nodes...
if (pCopyRange)
{
if (bFirst)
@@ -4917,7 +4917,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
}
else
{
- pFlys = sw::GetFlysAnchoredAt(rDoc, rPos.nNode.GetIndex());
+ pFlys = sw::GetFlysAnchoredAt(rDoc, rPos.GetNodeIndex());
pFlysAtInsPos = pFlys ? &*pFlys : nullptr;
}
@@ -4930,7 +4930,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
bool bCanMoveBack = pCopyPam->Move(fnMoveBackward, GoInContent);
// If the position was shifted from more than one node, an end node has been skipped
bool bAfterTable = false;
- if ((rPos.nNode.GetIndex() - pCopyPam->GetPoint()->nNode.GetIndex()) > SwNodeOffset(1))
+ if ((rPos.GetNodeIndex() - pCopyPam->GetPoint()->GetNodeIndex()) > SwNodeOffset(1))
{
// First go back to the original place
pCopyPam->GetPoint()->nNode = rPos.nNode;
@@ -5264,7 +5264,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
{
// Put the breaks back into the first node
if( aBrkSet.Count() && nullptr != ( pDestTextNd = rDoc.GetNodes()[
- pCopyPam->GetPoint()->nNode.GetIndex()+1 ]->GetTextNode()))
+ pCopyPam->GetPoint()->GetNodeIndex()+1 ]->GetTextNode()))
{
pDestTextNd->SetAttr( aBrkSet );
bCopyPageSource = true;
diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx
index f2d936f4b094..f045f014273a 100644
--- a/sw/source/core/doc/DocumentLayoutManager.cxx
+++ b/sw/source/core/doc/DocumentLayoutManager.cxx
@@ -259,7 +259,7 @@ void DocumentLayoutManager::DelLayoutFormat( SwFrameFormat *pFormat )
SwFrameFormat* pTmpFormat = (*pTable)[i];
const SwFormatAnchor &rAnch = pTmpFormat->GetAnchor();
if ( rAnch.GetAnchorId() == RndStdIds::FLY_AT_FLY &&
- rAnch.GetContentAnchor()->nNode.GetIndex() == nNodeIdxOfFlyFormat )
+ rAnch.GetContentAnchor()->GetNodeIndex() == nNodeIdxOfFlyFormat )
{
aToDeleteFrameFormats.push_back( pTmpFormat );
}
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index d5c3f70114b6..6eb566b78e95 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -240,7 +240,7 @@ void UpdateFramesForAddDeleteRedline(SwDoc & rDoc, SwPaM const& rPam)
// skip over hidden sections!
pNode = static_cast<SwTextNode*>(pLast->GetNodes().GoNextSection(&tmp, /*bSkipHidden=*/true, /*bSkipProtect=*/false));
}
- while (pNode && pNode->GetIndex() <= rPam.End()->nNode.GetIndex());
+ while (pNode && pNode->GetIndex() <= rPam.End()->GetNodeIndex());
}
// fields last - SwGetRefField::UpdateField requires up-to-date frames
UpdateFieldsForRedline(rDoc.getIDocumentFieldsAccess()); // after footnotes
@@ -368,7 +368,7 @@ void UpdateFramesForRemoveDeleteRedline(SwDoc & rDoc, SwPaM const& rPam)
// skip over hidden sections!
pNode = static_cast<SwTextNode*>(pLast->GetNodes().GoNextSection(&tmp, /*bSkipHidden=*/true, /*bSkipProtect=*/false));
}
- while (pNode && pNode->GetIndex() <= rPam.End()->nNode.GetIndex());
+ while (pNode && pNode->GetIndex() <= rPam.End()->GetNodeIndex());
}
if (!isAppendObjsCalled)
@@ -399,7 +399,7 @@ namespace
const SwContentNode* pCNd;
if( 0 != rPos2.nContent.GetIndex() )
return false;
- if( rPos2.nNode.GetIndex() - 1 != rPos1.nNode.GetIndex() )
+ if( rPos2.GetNodeIndex() - 1 != rPos1.GetNodeIndex() )
return false;
pCNd = rPos1.GetNode().GetContentNode();
return pCNd && rPos1.nContent.GetIndex() == pCNd->Len();
@@ -1026,27 +1026,27 @@ namespace
auto [pStt, pEnd] = rPam.StartEnd(); // SwPosition*
SwDoc& rDoc = rPam.GetDoc();
if( !pStt->nContent.GetIndex() &&
- !rDoc.GetNodes()[ pStt->nNode.GetIndex() - 1 ]->IsContentNode() )
+ !rDoc.GetNodes()[ pStt->GetNodeIndex() - 1 ]->IsContentNode() )
{
const SwRangeRedline* pRedl = rDoc.getIDocumentRedlineAccess().GetRedline( *pStt, nullptr );
if( pRedl )
{
const SwPosition* pRStt = pRedl->Start();
- if( !pRStt->nContent.GetIndex() && pRStt->nNode.GetIndex() ==
- pStt->nNode.GetIndex() - 1 )
+ if( !pRStt->nContent.GetIndex() && pRStt->GetNodeIndex() ==
+ pStt->GetNodeIndex() - 1 )
*pStt = *pRStt;
}
}
if( pEnd->GetNode().IsContentNode() &&
- !rDoc.GetNodes()[ pEnd->nNode.GetIndex() + 1 ]->IsContentNode() &&
+ !rDoc.GetNodes()[ pEnd->GetNodeIndex() + 1 ]->IsContentNode() &&
pEnd->nContent.GetIndex() == pEnd->GetNode().GetContentNode()->Len() )
{
const SwRangeRedline* pRedl = rDoc.getIDocumentRedlineAccess().GetRedline( *pEnd, nullptr );
if( pRedl )
{
const SwPosition* pREnd = pRedl->End();
- if( !pREnd->nContent.GetIndex() && pREnd->nNode.GetIndex() ==
- pEnd->nNode.GetIndex() + 1 )
+ if( !pREnd->nContent.GetIndex() && pREnd->GetNodeIndex() ==
+ pEnd->GetNodeIndex() + 1 )
*pEnd = *pREnd;
}
}
@@ -2693,14 +2693,14 @@ SwRedlineTable::size_type DocumentRedlineManager::GetRedlinePos( const SwNode& r
auto it = std::lower_bound(maRedlineTable.begin(), maRedlineTable.end(), rNd,
[&nNdIdx](const SwRangeRedline* lhs, const SwNode& /*rhs*/)
{
- return lhs->End()->nNode.GetIndex() < nNdIdx;
+ return lhs->End()->GetNodeIndex() < nNdIdx;
});
for( ; it != maRedlineTable.end(); ++it)
{
const SwRangeRedline* pTmp = *it;
auto [pStart, pEnd] = pTmp->StartEnd(); // SwPosition*
- SwNodeOffset nStart = pStart->nNode.GetIndex(),
- nEnd = pEnd->nNode.GetIndex();
+ SwNodeOffset nStart = pStart->GetNodeIndex(),
+ nEnd = pEnd->GetNodeIndex();
if( ( RedlineType::Any == nType || nType == pTmp->GetType()) &&
nStart <= nNdIdx && nNdIdx <= nEnd )
@@ -2715,8 +2715,8 @@ SwRedlineTable::size_type DocumentRedlineManager::GetRedlinePos( const SwNode& r
for( SwRedlineTable::size_type n = 0; n < maRedlineTable.size() ; ++n )
{
const SwRangeRedline* pTmp = maRedlineTable[ n ];
- SwNodeOffset nPt = pTmp->GetPoint()->nNode.GetIndex(),
- nMk = pTmp->GetMark()->nNode.GetIndex();
+ SwNodeOffset nPt = pTmp->GetPoint()->GetNodeIndex(),
+ nMk = pTmp->GetMark()->GetNodeIndex();
if( nPt < nMk ) { SwNodeOffset nTmp = nMk; nMk = nPt; nPt = nTmp; }
if( ( RedlineType::Any == nType || nType == pTmp->GetType()) &&
@@ -2951,14 +2951,14 @@ void DocumentRedlineManager::AcceptRedlineParagraphFormatting( const SwPaM &rPam
{
auto [pStt, pEnd] = rPam.StartEnd(); // SwPosition*
- const SwNodeOffset nSttIdx = pStt->nNode.GetIndex();
- const SwNodeOffset nEndIdx = pEnd->nNode.GetIndex();
+ const SwNodeOffset nSttIdx = pStt->GetNodeIndex();
+ const SwNodeOffset nEndIdx = pEnd->GetNodeIndex();
for( SwRedlineTable::size_type n = 0; n < maRedlineTable.size() ; ++n )
{
const SwRangeRedline* pTmp = maRedlineTable[ n ];
- SwNodeOffset nPt = pTmp->GetPoint()->nNode.GetIndex(),
- nMk = pTmp->GetMark()->nNode.GetIndex();
+ SwNodeOffset nPt = pTmp->GetPoint()->GetNodeIndex(),
+ nMk = pTmp->GetMark()->GetNodeIndex();
if( nPt < nMk ) { SwNodeOffset nTmp = nMk; nMk = nPt; nPt = nTmp; }
if( RedlineType::ParagraphFormat == pTmp->GetType() &&
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index b7956df30cc9..d95ea954fe73 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -317,7 +317,7 @@ static OUString lcl_dbg_out(const SwPosition & rPos)
{
OUString aStr =
"( " +
- OUString::number(sal_Int32(rPos.nNode.GetIndex())) +
+ OUString::number(sal_Int32(rPos.GetNodeIndex())) +
", " +
OUString::number(rPos.nContent.GetIndex()) +
": " +
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index e2c15c188d7c..2f56cba64c53 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -459,9 +459,9 @@ namespace
const SwPosition* const pStPos = &pMark->GetMarkStart();
const SwPosition* const pEndPos = &pMark->GetMarkEnd();
SAL_INFO("sw.core",
- sal_Int32(pStPos->nNode.GetIndex()) << "," <<
+ sal_Int32(pStPos->GetNodeIndex()) << "," <<
pStPos->nContent.GetIndex() << " " <<
- sal_Int32(pEndPos->nNode.GetIndex()) << "," <<
+ sal_Int32(pEndPos->GetNodeIndex()) << "," <<
pEndPos->nContent.GetIndex() << " " <<
typeid(*pMark).name() << " " <<
pMark->GetName());
@@ -553,9 +553,9 @@ namespace sw::mark
pPos2 = rPaM.GetMark();
SAL_INFO("sw.core",
rName << " " <<
- sal_Int32(pPos1->nNode.GetIndex() )<< "," <<
+ sal_Int32(pPos1->GetNodeIndex() )<< "," <<
pPos1->nContent.GetIndex() << " " <<
- sal_Int32(pPos2->nNode.GetIndex()) << "," <<
+ sal_Int32(pPos2->GetNodeIndex()) << "," <<
pPos2->nContent.GetIndex());
}
#endif
@@ -1817,7 +1817,7 @@ SaveBookmark::SaveBookmark(
m_pMetadataUndo = pMetadatable->CreateUndo();
}
}
- m_nNode1 = rBkmk.GetMarkPos().nNode.GetIndex();
+ m_nNode1 = rBkmk.GetMarkPos().GetNodeIndex();
m_nContent1 = rBkmk.GetMarkPos().nContent.GetIndex();
m_nNode1 -= rMvPos.GetIndex();
@@ -1826,7 +1826,7 @@ SaveBookmark::SaveBookmark(
if(rBkmk.IsExpanded())
{
- m_nNode2 = rBkmk.GetOtherMarkPos().nNode.GetIndex();
+ m_nNode2 = rBkmk.GetOtherMarkPos().GetNodeIndex();
m_nContent2 = rBkmk.GetOtherMarkPos().nContent.GetIndex();
m_nNode2 -= rMvPos.GetIndex();
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 97e1aa362117..560c0dceb5a4 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -1746,7 +1746,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo )
const SwContentNode* pCNd;
if( rSttEnd == rEndStt ||
(!rEndStt.nContent.GetIndex() &&
- rEndStt.nNode.GetIndex() - 1 == rSttEnd.nNode.GetIndex() &&
+ rEndStt.GetNodeIndex() - 1 == rSttEnd.GetNodeIndex() &&
nullptr != ( pCNd = rSttEnd.GetNode().GetContentNode() ) &&
rSttEnd.nContent.GetIndex() == pCNd->Len()))
{
@@ -1931,8 +1931,8 @@ SaveMergeRedline::SaveMergeRedline( const SwNode& rDstNd,
const SwPosition* pEnd = rSrcRedl.End();
pDestRedl->SetMark();
- pDestRedl->GetPoint()->nNode += pEnd->nNode.GetIndex() -
- pStt->nNode.GetIndex();
+ pDestRedl->GetPoint()->nNode += pEnd->GetNodeIndex() -
+ pStt->GetNodeIndex();
pDestRedl->GetPoint()->nContent.Assign( pDestRedl->GetContentNode(),
pEnd->nContent.GetIndex() );
}
@@ -2104,7 +2104,7 @@ tools::Long SwDoc::MergeDoc( const SwDoc& rDoc )
SwNodeOffset nMyEndOfExtra = GetNodes().GetEndOfExtras().GetIndex();
for(const SwRangeRedline* pRedl : rSrcRedlTable)
{
- SwNodeOffset nNd = pRedl->GetPoint()->nNode.GetIndex();
+ SwNodeOffset nNd = pRedl->GetPoint()->GetNodeIndex();
RedlineType eType = pRedl->GetType();
if( nEndOfExtra < nNd &&
( RedlineType::Insert == eType || RedlineType::Delete == eType ))
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index e63d85050f11..4e545432acb6 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -86,7 +86,7 @@ void RestFlyInRange( SaveFlyArr & rArr, const SwPosition& rStartPos,
}
else
{
- aPos.nNode = rStartPos.nNode.GetIndex() + rSave.nNdDiff;
+ aPos.nNode = rStartPos.GetNodeIndex() + rSave.nNdDiff;
assert(aPos.GetNode().GetContentNode());
aPos.nContent.Assign(aPos.GetNode().GetContentNode(),
rSave.nNdDiff == SwNodeOffset(0)
@@ -118,7 +118,7 @@ void SaveFlyInRange( const SwNodeRange& rRg, SaveFlyArr& rArr )
(RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
rRg.aStart <= pAPos->nNode && pAPos->nNode < rRg.aEnd )
{
- SaveFly aSave( pAPos->nNode.GetIndex() - rRg.aStart.GetIndex(),
+ SaveFly aSave( pAPos->GetNodeIndex() - rRg.aStart.GetIndex(),
(RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId())
? pAPos->nContent.GetIndex()
: 0,
@@ -186,7 +186,7 @@ void SaveFlyInRange( const SwPaM& rPam, const SwPosition& rInsPos,
{
pHistory->AddChangeFlyAnchor(*pFormat);
}
- SaveFly aSave( pAPos->nNode.GetIndex() - rSttNdIdx.GetIndex(),
+ SaveFly aSave( pAPos->GetNodeIndex() - rSttNdIdx.GetIndex(),
(RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId())
? (pAPos->nNode == rSttNdIdx)
? pAPos->nContent.GetIndex() - rPam.Start()->nContent.GetIndex()
@@ -538,8 +538,8 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
pEndPos->GetNode().GetTextNode(), pEndPos->nContent,
bGrammarCheck ));
- SwNodeOffset nCurrNd = pSttPos->nNode.GetIndex();
- SwNodeOffset nEndNd = pEndPos->nNode.GetIndex();
+ SwNodeOffset nCurrNd = pSttPos->GetNodeIndex();
+ SwNodeOffset nEndNd = pEndPos->GetNodeIndex();
uno::Any aRet;
if( nCurrNd <= nEndNd )
@@ -737,7 +737,7 @@ SwHyphArgs::SwHyphArgs( const SwPaM *pPam, const Point &rCursorPos,
"SwDoc::Hyphenate: New York, New York");
const SwPosition *pPoint = pPam->GetPoint();
- m_nNode = pPoint->nNode.GetIndex();
+ m_nNode = pPoint->GetNodeIndex();
// Set start
m_pStart = pPoint->GetNode().GetTextNode();
@@ -846,8 +846,8 @@ void SwDoc::CountWords( const SwPaM& rPaM, SwDocStat& rStat )
// This is a modified version of SwDoc::TransliterateText
auto [pStt, pEnd] = rPaM.StartEnd(); // SwPosition*
- const SwNodeOffset nSttNd = pStt->nNode.GetIndex();
- const SwNodeOffset nEndNd = pEnd->nNode.GetIndex();
+ const SwNodeOffset nSttNd = pStt->GetNodeIndex();
+ const SwNodeOffset nEndNd = pEnd->GetNodeIndex();
const sal_Int32 nSttCnt = pStt->nContent.GetIndex();
const sal_Int32 nEndCnt = pEnd->nContent.GetIndex();
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 10d8361aeaf7..ddab1366b4a3 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -103,7 +103,7 @@ SetGetExpField::SetGetExpField( const SwSectionNode& rSectNd,
if( pPos )
{
- m_nNode = pPos->nNode.GetIndex();
+ m_nNode = pPos->GetNodeIndex();
m_nContent = pPos->nContent.GetIndex();
}
else
@@ -123,12 +123,12 @@ SetGetExpField::SetGetExpField(::sw::mark::IBookmark const& rBookmark,
if (pPos)
{
- m_nNode = pPos->nNode.GetIndex();
+ m_nNode = pPos->GetNodeIndex();
m_nContent = pPos->nContent.GetIndex();
}
else
{
- m_nNode = rBookmark.GetMarkStart().nNode.GetIndex();
+ m_nNode = rBookmark.GetMarkStart().GetNodeIndex();
m_nContent = rBookmark.GetMarkStart().nContent.GetIndex();;
}
}
@@ -162,7 +162,7 @@ SetGetExpField::SetGetExpField( const SwPosition& rPos )
{
m_eSetGetExpFieldType = CRSRPOS;
m_CNTNT.pPos = &rPos;
- m_nNode = rPos.nNode.GetIndex();
+ m_nNode = rPos.GetNodeIndex();
m_nContent = rPos.nContent.GetIndex();
}
@@ -173,7 +173,7 @@ SetGetExpField::SetGetExpField( const SwFlyFrameFormat& rFlyFormat,
m_CNTNT.pFlyFormat = &rFlyFormat;
if( pPos )
{
- m_nNode = pPos->nNode.GetIndex();
+ m_nNode = pPos->GetNodeIndex();
m_nContent = pPos->nContent.GetIndex();
}
else
@@ -213,7 +213,7 @@ void SetGetExpField::SetBodyPos( const SwContentFrame& rFrame )
SwPosition aPos( aIdx );
bool const bResult = ::GetBodyTextNode( rDoc, aPos, rFrame );
OSL_ENSURE(bResult, "Where is the field?");
- m_nNode = aPos.nNode.GetIndex();
+ m_nNode = aPos.GetNodeIndex();
m_nContent = aPos.nContent.GetIndex();
}
}
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index d5fc46715b08..8434ebc53355 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -1052,7 +1052,7 @@ SwChainRet SwDoc::Chainable( const SwFrameFormat &rSource, const SwFrameFormat &
continue;
if ( nullptr == rAnchor.GetContentAnchor() )
continue;
- SwNodeOffset nTstSttNd = rAnchor.GetContentAnchor()->nNode.GetIndex();
+ SwNodeOffset nTstSttNd = rAnchor.GetContentAnchor()->GetNodeIndex();
if( nFlySttNd <= nTstSttNd && nTstSttNd < nFlySttNd + SwNodeOffset(2) )
{
return SwChainRet::NOT_EMPTY;
@@ -1073,7 +1073,7 @@ SwChainRet SwDoc::Chainable( const SwFrameFormat &rSource, const SwFrameFormat &
{
if ( (RndStdIds::FLY_AT_PAGE == rDstAnchor.GetAnchorId()) ||
( rDstAnchor.GetContentAnchor() &&
- rDstAnchor.GetContentAnchor()->nNode.GetIndex() > nEndOfExtras ))
+ rDstAnchor.GetContentAnchor()->GetNodeIndex() > nEndOfExtras ))
bAllowed = true;
}
else if( rSrcAnchor.GetContentAnchor() && rDstAnchor.GetContentAnchor() )
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index d9208ff38da6..24ce692c2568 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -234,7 +234,7 @@ void SwDoc::RstTextAttrs(const SwPaM &rRg, bool bInclRefToxMark,
pStt, pEnd, pHst, nullptr, pLayout );
aPara.bInclRefToxMark = bInclRefToxMark;
aPara.bExactRange = bExactRange;
- GetNodes().ForEach( pStt->nNode.GetIndex(), pEnd->nNode.GetIndex()+1,
+ GetNodes().ForEach( pStt->GetNodeIndex(), pEnd->GetNodeIndex()+1,
sw::DocumentContentOperationsManager::lcl_RstTextAttr, &aPara );
getIDocumentState().SetModified();
}
@@ -1106,7 +1106,7 @@ bool SwDoc::SetTextFormatColl(const SwPaM &rRg,
// #i62675#
aPara.bResetListAttrs = bResetListAttrs;
- GetNodes().ForEach( pStt->nNode.GetIndex(), pEnd->nNode.GetIndex()+1,
+ GetNodes().ForEach( pStt->GetNodeIndex(), pEnd->GetNodeIndex()+1,
lcl_SetTextFormatColl, &aPara );
if( !aPara.nWhich )
bRet = false; // didn't find a valid Node
diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx
index d9e955619916..cdc13e4284de 100644
--- a/sw/source/core/doc/docftn.cxx
+++ b/sw/source/core/doc/docftn.cxx
@@ -436,9 +436,9 @@ bool SwDoc::SetCurFootnote( const SwPaM& rPam, const OUString& rNumStr,
SwRootFrame* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout();
auto [pStt, pEnd] = rPam.StartEnd(); // SwPosition*
- const SwNodeOffset nSttNd = pStt->nNode.GetIndex();
+ const SwNodeOffset nSttNd = pStt->GetNodeIndex();
const sal_Int32 nSttCnt = pStt->nContent.GetIndex();
- const SwNodeOffset nEndNd = pEnd->nNode.GetIndex();
+ const SwNodeOffset nEndNd = pEnd->GetNodeIndex();
const sal_Int32 nEndCnt = pEnd->nContent.GetIndex();
size_t nPos = 0;
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 04acd5a5e121..5c1297a48ccb 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -276,7 +276,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection_( const SwPosition& rAnchPos,
if (GetIDocumentUndoRedo().DoesUndo())
{
- SwNodeOffset nNodeIdx = rAnchPos.nNode.GetIndex();
+ SwNodeOffset nNodeIdx = rAnchPos.GetNodeIndex();
const sal_Int32 nCntIdx = rAnchPos.nContent.GetIndex();
GetIDocumentUndoRedo().AppendUndo(
std::make_unique<SwUndoInsLayFormat>( pFormat, nNodeIdx, nCntIdx ));
@@ -469,10 +469,10 @@ static bool lcl_TstFlyRange( const SwPaM* pPam, const SwPosition* pFlyPos,
bool bOk = false;
const SwPaM* pTmp = pPam;
do {
- const SwNodeOffset nFlyIndex = pFlyPos->nNode.GetIndex();
+ const SwNodeOffset nFlyIndex = pFlyPos->GetNodeIndex();
auto [pPaMStart, pPaMEnd] = pTmp->StartEnd(); // SwPosition*
- const SwNodeOffset nPamStartIndex = pPaMStart->nNode.GetIndex();
- const SwNodeOffset nPamEndIndex = pPaMEnd->nNode.GetIndex();
+ const SwNodeOffset nPamStartIndex = pPaMStart->GetNodeIndex();
+ const SwNodeOffset nPamEndIndex = pPaMEnd->GetNodeIndex();
if (RndStdIds::FLY_AT_PARA == nAnchorId)
bOk = (nPamStartIndex < nFlyIndex && nPamEndIndex > nFlyIndex) ||
(((nPamStartIndex == nFlyIndex) && (pPaMStart->nContent.GetIndex() == 0)) &&
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 25efba75a672..a40919ff04cd 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -1197,9 +1197,9 @@ SwNodeIndex SwDoc::AppendDoc(const SwDoc& rSource, sal_uInt16 const nStartPageNu
// Update the rsid of each pasted text node
SwNodes &rDestNodes = GetNodes();
- SwNodeOffset const nEndIdx = aPaM.End()->nNode.GetIndex();
+ SwNodeOffset const nEndIdx = aPaM.End()->GetNodeIndex();
- for (SwNodeOffset nIdx = aPaM.Start()->nNode.GetIndex();
+ for (SwNodeOffset nIdx = aPaM.Start()->GetNodeIndex();
nIdx <= nEndIdx; ++nIdx)
{
SwTextNode *const pTextNode = rDestNodes[nIdx]->GetTextNode();
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index dc9284daa82b..239a534264de 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -454,8 +454,8 @@ bool SwDoc::MoveOutlinePara( const SwPaM& rPam, SwOutlineNodes::difference_type
const SwPosition& rStt = *rPam.Start(),
& rEnd = *rPam.End();
if( GetNodes().GetOutLineNds().empty() || !nOffset ||
- (rStt.nNode.GetIndex() < GetNodes().GetEndOfExtras().GetIndex()) ||
- (rEnd.nNode.GetIndex() < GetNodes().GetEndOfExtras().GetIndex()))
+ (rStt.GetNodeIndex() < GetNodes().GetEndOfExtras().GetIndex()) ||
+ (rEnd.GetNodeIndex() < GetNodes().GetEndOfExtras().GetIndex()))
{
return false;
}
@@ -1240,8 +1240,8 @@ void SwDoc::MakeUniqueNumRules(const SwPaM & rPaM)
bool bFirst = true;
- const SwNodeOffset nStt = rPaM.Start()->nNode.GetIndex();
- const SwNodeOffset nEnd = rPaM.End()->nNode.GetIndex();
+ const SwNodeOffset nStt = rPaM.Start()->GetNodeIndex();
+ const SwNodeOffset nEnd = rPaM.End()->GetNodeIndex();
for (SwNodeOffset n = nStt; n <= nEnd; n++)
{
SwTextNode * pCNd = GetNodes()[n]->GetTextNode();
@@ -1323,8 +1323,8 @@ void SwDoc::DelNumRules(const SwPaM& rPam, SwRootFrame const*const pLayout)
{
SwPaM aPam(rPam, nullptr);
ExpandPamForParaPropsNodes(aPam, pLayout);
- SwNodeOffset nStt = aPam.Start()->nNode.GetIndex();
- SwNodeOffset const nEnd = aPam.End()->nNode.GetIndex();
+ SwNodeOffset nStt = aPam.Start()->GetNodeIndex();
+ SwNodeOffset const nEnd = aPam.End()->GetNodeIndex();
SwUndoDelNum* pUndo;
if (GetIDocumentUndoRedo().DoesUndo())
@@ -1710,8 +1710,8 @@ bool SwDoc::NumUpDown(const SwPaM& rPam, bool bDown, SwRootFrame const*const pLa
{
SwPaM aPam(rPam, nullptr);
ExpandPamForParaPropsNodes(aPam, pLayout);
- SwNodeOffset nStt = aPam.Start()->nNode.GetIndex();
- SwNodeOffset const nEnd = aPam.End()->nNode.GetIndex();
+ SwNodeOffset nStt = aPam.Start()->GetNodeIndex();
+ SwNodeOffset const nEnd = aPam.End()->GetNodeIndex();
// -> outline nodes are promoted or demoted differently
bool bOnlyOutline = true;
@@ -1845,7 +1845,7 @@ bool SwDoc::MoveParagraph(SwPaM& rPam, SwNodeOffset nOffset, bool const bIsOutlM
assert(nodes.second);
if (nOffset < SwNodeOffset(0))
{
- nOffset += rPam.Start()->nNode.GetIndex() - nodes.first->GetIndex();
+ nOffset += rPam.Start()->GetNodeIndex() - nodes.first->GetIndex();
if (SwNodeOffset(0) <= nOffset) // hack: there are callers that know what
{ // node they want; those should never need
nOffset = SwNodeOffset(-1); // this; other callers just pass in -1
@@ -1855,7 +1855,7 @@ bool SwDoc::MoveParagraph(SwPaM& rPam, SwNodeOffset nOffset, bool const bIsOutlM
{
rPam.SetMark();
}
- assert(nodes.first->GetIndex() < rPam.Start()->nNode.GetIndex());
+ assert(nodes.first->GetIndex() < rPam.Start()->GetNodeIndex());
rPam.Start()->nNode = *nodes.first;
rPam.Start()->nContent.Assign(nodes.first, 0);
}
@@ -1865,7 +1865,7 @@ bool SwDoc::MoveParagraph(SwPaM& rPam, SwNodeOffset nOffset, bool const bIsOutlM
assert(nodes.first);
if (SwNodeOffset(0) < nOffset)
{
- nOffset -= nodes.second->GetIndex() - rPam.End()->nNode.GetIndex();
+ nOffset -= nodes.second->GetIndex() - rPam.End()->GetNodeIndex();
if (nOffset <= SwNodeOffset(0)) // hack: there are callers that know what
{ // node they want; those should never need
nOffset = SwNodeOffset(+1); // this; other callers just pass in +1
@@ -1875,7 +1875,7 @@ bool SwDoc::MoveParagraph(SwPaM& rPam, SwNodeOffset nOffset, bool const bIsOutlM
{
rPam.SetMark();
}
- assert(rPam.End()->nNode.GetIndex() < nodes.second->GetIndex());
+ assert(rPam.End()->GetNodeIndex() < nodes.second->GetIndex());
rPam.End()->nNode = *nodes.second;
// until end, otherwise Impl will detect overlapping redline
rPam.End()->nContent.Assign(nodes.second, nodes.second->GetTextNode()->Len());
@@ -1883,17 +1883,17 @@ bool SwDoc::MoveParagraph(SwPaM& rPam, SwNodeOffset nOffset, bool const bIsOutlM
if (nOffset > SwNodeOffset(0))
{ // sw_redlinehide: avoid moving into delete redline, skip forward
- if (GetNodes().GetEndOfContent().GetIndex() <= rPam.End()->nNode.GetIndex() + nOffset)
+ if (GetNodes().GetEndOfContent().GetIndex() <= rPam.End()->GetNodeIndex() + nOffset)
{
return false; // can't move
}
- SwNode const* pNode(GetNodes()[rPam.End()->nNode.GetIndex() + nOffset + 1]);
+ SwNode const* pNode(GetNodes()[rPam.End()->GetNodeIndex() + nOffset + 1]);
if ( pNode->GetRedlineMergeFlag() != SwNode::Merge::None
&& pNode->GetRedlineMergeFlag() != SwNode::Merge::First)
{
for ( ; ; ++nOffset)
{
- pNode = GetNodes()[rPam.End()->nNode.GetIndex() + nOffset];
+ pNode = GetNodes()[rPam.End()->GetNodeIndex() + nOffset];
if (pNode->IsTextNode())
{
nodes = GetFirstAndLastNode(*pLayout, *pNode->GetTextNode());
@@ -1907,17 +1907,17 @@ bool SwDoc::MoveParagraph(SwPaM& rPam, SwNodeOffset nOffset, bool const bIsOutlM
}
else
{ // sw_redlinehide: avoid moving into delete redline, skip backward
- if (rPam.Start()->nNode.GetIndex() + nOffset < SwNodeOffset(1))
+ if (rPam.Start()->GetNodeIndex() + nOffset < SwNodeOffset(1))
{
return false; // can't move
}
- SwNode const* pNode(GetNodes()[rPam.Start()->nNode.GetIndex() + nOffset]);
+ SwNode const* pNode(GetNodes()[rPam.Start()->GetNodeIndex() + nOffset]);
if ( pNode->GetRedlineMergeFlag() != SwNode::Merge::None
&& pNode->GetRedlineMergeFlag() != SwNode::Merge::First)
{
for ( ; ; --nOffset)
{
- pNode = GetNodes()[rPam.Start()->nNode.GetIndex() + nOffset];
+ pNode = GetNodes()[rPam.Start()->GetNodeIndex() + nOffset];
if (pNode->IsTextNode())
{
nodes = GetFirstAndLastNode(*pLayout, *pNode->GetTextNode());
@@ -1938,8 +1938,8 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset,
{
auto [pStt, pEnd] = rPam.StartEnd(); // SwPosition*
- SwNodeOffset nStIdx = pStt->nNode.GetIndex();
- SwNodeOffset nEndIdx = pEnd->nNode.GetIndex();
+ SwNodeOffset nStIdx = pStt->GetNodeIndex();
+ SwNodeOffset nEndIdx = pEnd->GetNodeIndex();
// Here are some sophisticated checks whether the wished PaM will be moved or not.
// For moving outlines (bIsOutlMv) I've already done some checks, so here are two different
@@ -2188,9 +2188,9 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset,
size_t nRedlines(getIDocumentRedlineAccess().GetRedlineTable().size());
#endif
if (nOffset > SwNodeOffset(0))
- assert(aPam.End()->nNode.GetIndex() - aPam.Start()->nNode.GetIndex() + nOffset == aInsPos.nNode.GetIndex() - aPam.End()->nNode.GetIndex());
+ assert(aPam.End()->GetNodeIndex() - aPam.Start()->GetNodeIndex() + nOffset == aInsPos.GetNodeIndex() - aPam.End()->GetNodeIndex());
else
- assert(aPam.Start()->nNode.GetIndex() - aPam.End()->nNode.GetIndex() + nOffset == aInsPos.nNode.GetIndex() - aPam.End()->nNode.GetIndex());
+ assert(aPam.Start()->GetNodeIndex() - aPam.End()->GetNodeIndex() + nOffset == aInsPos.GetNodeIndex() - aPam.End()->GetNodeIndex());
SwRedlineTable::size_type i;
getIDocumentRedlineAccess().GetRedline(*aPam.End(), &i);
for ( ; 0 < i; --i)
@@ -2209,7 +2209,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset,
{
SwPaM pam(*pRedline, nullptr);
SwNodeOffset const nCurrentOffset(
- nOrigIdx - aPam.Start()->nNode.GetIndex());
+ nOrigIdx - aPam.Start()->GetNodeIndex());
pam.GetPoint()->nNode += nCurrentOffset;
pam.GetPoint()->nContent.Assign(pam.GetPoint()->GetNode().GetContentNode(), pam.GetPoint()->nContent.GetIndex());
pam.GetMark()->nNode += nCurrentOffset;
@@ -2354,8 +2354,8 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset,
if( pOwnRedl )
{
const SwPosition *pRStt = pOwnRedl->Start(), *pREnd = pOwnRedl->End();
- nRedlSttNd = pRStt->nNode.GetIndex();
- nRedlEndNd = pREnd->nNode.GetIndex();
+ nRedlSttNd = pRStt->GetNodeIndex();
+ nRedlEndNd = pREnd->GetNodeIndex();
}
std::unique_ptr<SwUndoMoveNum> pUndo;
@@ -2363,7 +2363,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset,
if (GetIDocumentUndoRedo().DoesUndo())
{
pUndo.reset(new SwUndoMoveNum( rPam, nOffset, bIsOutlMv ));
- nMoved = rPam.End()->nNode.GetIndex() - rPam.Start()->nNode.GetIndex() + 1;
+ nMoved = rPam.End()->GetNodeIndex() - rPam.Start()->GetNodeIndex() + 1;
}
(void) pLayout; // note: move will insert between aIdx-1 and aIdx
@@ -2386,12 +2386,12 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset,
if( pOwnRedl )
{
auto [pRStt, pREnd] = pOwnRedl->StartEnd(); // SwPosition*
- if( pRStt->nNode.GetIndex() != nRedlSttNd )
+ if( pRStt->GetNodeIndex() != nRedlSttNd )
{
pRStt->nNode = nRedlSttNd;
pRStt->nContent.Assign( pRStt->GetNode().GetContentNode(),0);
}
- if( pREnd->nNode.GetIndex() != nRedlEndNd )
+ if( pREnd->GetNodeIndex() != nRedlEndNd )
{
pREnd->nNode = nRedlEndNd;
SwContentNode* pCNd = pREnd->GetNode().GetContentNode();
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index bbf5d1b40928..c085b5012cd9 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -447,7 +447,7 @@ void SwRedlineTable::CheckOverlapping(vector_type::const_iterator it)
if (itNext != maVector.end())
{
auto pNext = *itNext;
- if (pCurr->End()->nNode.GetIndex() >= pNext->Start()->nNode.GetIndex())
+ if (pCurr->End()->GetNodeIndex() >= pNext->Start()->GetNodeIndex())
{
m_bHasOverlappingElements = true;
return;
@@ -456,7 +456,7 @@ void SwRedlineTable::CheckOverlapping(vector_type::const_iterator it)
if (it != maVector.begin())
{
auto pPrev = *(it - 1);
- if (pPrev->End()->nNode.GetIndex() >= pCurr->Start()->nNode.GetIndex())
+ if (pPrev->End()->GetNodeIndex() >= pCurr->Start()->GetNodeIndex())
m_bHasOverlappingElements = true;
}
}
@@ -535,7 +535,7 @@ std::vector<SwRangeRedline*> GetAllValidRanges(std::unique_ptr<SwRangeRedline> p
SwNode& rCurNd = aNewStt.GetNode();
if( rCurNd.IsStartNode() )
{
- if( rCurNd.EndOfSectionIndex() < pEnd->nNode.GetIndex() )
+ if( rCurNd.EndOfSectionIndex() < pEnd->GetNodeIndex() )
aNewStt.nNode = *rCurNd.EndOfSectionNode();
else
break;
@@ -543,7 +543,7 @@ std::vector<SwRangeRedline*> GetAllValidRanges(std::unique_ptr<SwRangeRedline> p
else if( rCurNd.IsContentNode() )
pC = rCurNd.GetContentNode();
++aNewStt.nNode;
- } while( aNewStt.nNode.GetIndex() < pEnd->nNode.GetIndex() );
+ } while( aNewStt.GetNodeIndex() < pEnd->GetNodeIndex() );
if( aNewStt.nNode == pEnd->nNode )
aNewStt.nContent = pEnd->nContent;
@@ -1383,8 +1383,8 @@ void SwRangeRedline::ShowOriginal(sal_uInt16 nLoop, size_t nMyPos, bool /*bForce
void SwRangeRedline::InvalidateRange(Invalidation const eWhy)
{
auto [pRStt, pREnd] = StartEnd(); // SwPosition*
- SwNodeOffset nSttNd = pRStt->nNode.GetIndex(),
- nEndNd = pREnd->nNode.GetIndex();
+ SwNodeOffset nSttNd = pRStt->GetNodeIndex(),
+ nEndNd = pREnd->GetNodeIndex();
sal_Int32 nSttCnt = pRStt->nContent.GetIndex();
sal_Int32 nEndCnt = pREnd->nContent.GetIndex();
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 2cc1ccb4dbfc..c5dee367da90 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -298,8 +298,8 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
// Check if only TextNodes are within the Selection
{
- SwNodeOffset nStart = pStart->nNode.GetIndex(),
- nEnd = pEnd->nNode.GetIndex();
+ SwNodeOffset nStart = pStart->GetNodeIndex(),
+ nEnd = pEnd->GetNodeIndex();
while( nStart <= nEnd )
// Iterate over a selected range
if( !GetNodes()[ nStart++ ]->IsTextNode() )
@@ -379,7 +379,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
}
// Now comes the tricky part: Move Nodes (and always keep Undo in mind)
- SwNodeOffset nBeg = pStart->nNode.GetIndex();
+ SwNodeOffset nBeg = pStart->GetNodeIndex();
SwNodeRange aRg( aStart, aStart );
if( bUndo && !pRedlUndo )
diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx
index c81da3929276..a9927a4e0ec3 100644
--- a/sw/source/core/doc/extinput.cxx
+++ b/sw/source/core/doc/extinput.cxx
@@ -280,8 +280,8 @@ SwExtTextInput* SwDoc::GetExtTextInput( const SwNode& rNd,
SwNodeOffset nNdIdx = rNd.GetIndex();
SwExtTextInput* pTmp = mpExtInputRing;
do {
- SwNodeOffset nStartNode = pTmp->Start()->nNode.GetIndex(),
- nEndNode = pTmp->End()->nNode.GetIndex();
+ SwNodeOffset nStartNode = pTmp->Start()->GetNodeIndex(),
+ nEndNode = pTmp->End()->GetNodeIndex();
sal_Int32 nStartCnt = pTmp->Start()->nContent.GetIndex();
sal_Int32 nEndCnt = pTmp->End()->nContent.GetIndex();
diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx
index 2d3da62aed2b..5bb22e4e7713 100644
--- a/sw/source/core/doc/swserv.cxx
+++ b/sw/source/core/doc/swserv.cxx
@@ -128,7 +128,7 @@ void SwServerObject::SendDataChanged( const SwPosition& rPos )
}
if( pNd )
{
- SwNodeOffset nNd = rPos.nNode.GetIndex();
+ SwNodeOffset nNd = rPos.GetNodeIndex();
bCall = pNd->GetIndex() < nNd && nNd < pNd->EndOfSectionIndex();
}
@@ -166,8 +166,8 @@ void SwServerObject::SendDataChanged( const SwPaM& rRange )
if( pNd )
{
// Is the start area within the node area?
- bCall = pStt->nNode.GetIndex() < pNd->EndOfSectionIndex() &&
- pEnd->nNode.GetIndex() >= pNd->GetIndex();
+ bCall = pStt->GetNodeIndex() < pNd->EndOfSectionIndex() &&
+ pEnd->GetNodeIndex() >= pNd->GetIndex();
}
if( bCall )
@@ -192,8 +192,8 @@ bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
const SwPosition* pStt = &m_CNTNT_TYPE.pBkmk->GetMarkStart(),
* pEnd = &m_CNTNT_TYPE.pBkmk->GetMarkEnd();
- nSttNd = pStt->nNode.GetIndex();
- nEndNd = pEnd->nNode.GetIndex();
+ nSttNd = pStt->GetNodeIndex();
+ nEndNd = pEnd->GetNodeIndex();
pNds = &pStt->GetNodes();
}
break;
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 878674393427..07b0d3a7ba4e 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -275,7 +275,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
getIDocumentContentOperations().SplitNode( *pEndPos, false );
SwTextNode* pTNd;
- if( pEndPos->nNode.GetIndex() == pSttPos->nNode.GetIndex() )
+ if( pEndPos->GetNodeIndex() == pSttPos->GetNodeIndex() )
{
--pSttPos->nNode;
--pEndPos->nNode;
@@ -408,11 +408,11 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
// located at the Section's beginning and End at it's end
nRet = 0;
if( !pStt->nContent.GetIndex()
- && pSectNd->GetIndex() == pStt->nNode.GetIndex() - 1
+ && pSectNd->GetIndex() == pStt->GetNodeIndex() - 1
&& pEnd->nContent.GetIndex() == pCNd->Len() )
{
SwNodeIndex aIdx( pStt->nNode, -1 );
- SwNodeOffset nCmp = pEnd->nNode.GetIndex();
+ SwNodeOffset nCmp = pEnd->GetNodeIndex();
const SwStartNode* pPrvNd;
const SwEndNode* pNxtNd;
while( nullptr != ( pPrvNd = (pNd = &aIdx.GetNode())->GetSectionNode() ) &&
@@ -425,8 +425,8 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
pPrvNd = pNd->IsStartNode() ? static_cast<const SwStartNode*>(pNd)
: pNd->StartOfSectionNode();
- aIdx = pEnd->nNode.GetIndex() + 1;
- nCmp = pStt->nNode.GetIndex();
+ aIdx = pEnd->GetNodeIndex() + 1;
+ nCmp = pStt->GetNodeIndex();
while( nullptr != ( pNxtNd = (pNd = &aIdx.GetNode())->GetEndNode() ) &&
pNxtNd->StartOfSectionNode()->IsSectionNode() &&
( pNxtNd->StartOfSectionIndex() >= nCmp ||
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 10908ffb08d5..7a29ef4f07a8 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -634,8 +634,8 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts,
// See if the selection contains a Table
auto [pStt, pEnd] = rRange.StartEnd(); // SwPosition*
{
- SwNodeOffset nCnt = pStt->nNode.GetIndex();
- for( ; nCnt <= pEnd->nNode.GetIndex(); ++nCnt )
+ SwNodeOffset nCnt = pStt->GetNodeIndex();
+ for( ; nCnt <= pEnd->GetNodeIndex(); ++nCnt )
if( !GetNodes()[ nCnt ]->IsTextNode() )
return nullptr;
}
@@ -672,14 +672,14 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts,
if( bEndContent )
{
if( pEnd->GetNode().GetContentNode()->Len() != pEnd->nContent.GetIndex()
- || pEnd->nNode.GetIndex() >= GetNodes().GetEndOfContent().GetIndex()-1 )
+ || pEnd->GetNodeIndex() >= GetNodes().GetEndOfContent().GetIndex()-1 )
{
getIDocumentContentOperations().SplitNode( *pEnd, false );
--const_cast<SwNodeIndex&>(pEnd->nNode);
const_cast<SwContentIndex&>(pEnd->nContent).Assign(
pEnd->GetNode().GetContentNode(), 0 );
// A Node and at the End?
- if( pStt->nNode.GetIndex() >= pEnd->nNode.GetIndex() )
+ if( pStt->GetNodeIndex() >= pEnd->GetNodeIndex() )
--aRg.aStart;
}
else
@@ -1174,14 +1174,14 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
if( bEndContent )
{
if( pEnd->GetNode().GetContentNode()->Len() != pEnd->nContent.GetIndex()
- || pEnd->nNode.GetIndex() >= GetNodes().GetEndOfContent().GetIndex()-1 )
+ || pEnd->GetNodeIndex() >= GetNodes().GetEndOfContent().GetIndex()-1 )
{
getIDocumentContentOperations().SplitNode( *pEnd, false );
--const_cast<SwNodeIndex&>(pEnd->nNode);
const_cast<SwContentIndex&>(pEnd->nContent).Assign(
pEnd->GetNode().GetContentNode(), 0 );
// A Node and at the End?
- if( pStt->nNode.GetIndex() >= pEnd->nNode.GetIndex() )
+ if( pStt->GetNodeIndex() >= pEnd->GetNodeIndex() )
--aRg.aStart;
}
else
@@ -1689,8 +1689,8 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
if (pAPos &&
((RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()) ||
(RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId())) &&
- nStt <= pAPos->nNode.GetIndex() &&
- pAPos->nNode.GetIndex() < nEnd )
+ nStt <= pAPos->GetNodeIndex() &&
+ pAPos->GetNodeIndex() < nEnd )
{
pFormat->MakeFrames();
}
@@ -4330,7 +4330,7 @@ bool SwDoc::InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
if( pUndo && bRet )
{
- pInsTableNd = GetNodes()[ rInsPos.nNode.GetIndex() - 1 ]->FindTableNode();
+ pInsTableNd = GetNodes()[ rInsPos.GetNodeIndex() - 1 ]->FindTableNode();
pUndo->SetTableSttIdx( pInsTableNd->GetIndex() );
GetIDocumentUndoRedo().AppendUndo( std::move(pUndo) );
@@ -4531,8 +4531,8 @@ void SwDoc::UnProtectTables( const SwPaM& rPam )
SwPaM* pTmp = const_cast<SwPaM*>(&rPam);
do {
auto [pStt, pEnd] = pTmp->StartEnd(); // SwPosition*
- bFound = pStt->nNode.GetIndex() < nTableIdx &&
- nTableIdx < pEnd->nNode.GetIndex();
+ bFound = pStt->GetNodeIndex() < nTableIdx &&
+ nTableIdx < pEnd->GetNodeIndex();
} while( !bFound && &rPam != ( pTmp = pTmp->GetNext() ) );
if( !bFound )
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 1a5f2499fa97..040a109ca05f 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -1472,8 +1472,8 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
if( !pEnd->GetNode().IsContentNode() )
{
bOneNd = true;
- SwNodeOffset nSttNdIdx = pStt->nNode.GetIndex() + 1;
- const SwNodeOffset nEndNdIdx = pEnd->nNode.GetIndex();
+ SwNodeOffset nSttNdIdx = pStt->GetNodeIndex() + 1;
+ const SwNodeOffset nEndNdIdx = pEnd->GetNodeIndex();
for( ; nSttNdIdx < nEndNdIdx; ++nSttNdIdx )
{
if( (*this)[ nSttNdIdx ]->IsContentNode() )
@@ -1508,7 +1508,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
}
bSplitDestNd = true;
- pDestNd = rNodes[ rPos.nNode.GetIndex() - 1 ]->GetTextNode();
+ pDestNd = rNodes[ rPos.GetNodeIndex() - 1 ]->GetTextNode();
if( nLen )
{
pSrcNd->CutText( pDestNd, SwContentIndex( pDestNd, pDestNd->Len()),
@@ -1628,7 +1628,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
if( aEndIdx != aSttIdx )
{
// move the nodes into the NodesArray
- const SwNodeOffset nSttDiff = aSttIdx.GetIndex() - pStt->nNode.GetIndex();
+ const SwNodeOffset nSttDiff = aSttIdx.GetIndex() - pStt->GetNodeIndex();
SwNodeRange aRg( aSttIdx, aEndIdx );
MoveNodes( aRg, rNodes, rPos.nNode );
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index ea443b1bd1a2..46880f06b170 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -588,7 +588,7 @@ void SwAutoCorrDoc::SaveCpltSttWord( ACFlags nFlag, sal_Int32 nPos,
const OUString& rExceptWord,
sal_Unicode cChar )
{
- SwNodeOffset nNode = m_pIndex ? m_pIndex->GetIndex() : m_rCursor.GetPoint()->nNode.GetIndex();
+ SwNodeOffset nNode = m_pIndex ? m_pIndex->GetIndex() : m_rCursor.GetPoint()->GetNodeIndex();
LanguageType eLang = GetLanguage(nPos);
m_rEditSh.GetDoc()->SetAutoCorrExceptWord( std::make_unique<SwAutoCorrExceptWord>( nFlag,
nNode, nPos, rExceptWord, cChar, eLang ));
@@ -616,7 +616,7 @@ void SwAutoCorrExceptWord::CheckChar( const SwPosition& rPos, sal_Unicode cChr )
{
// test only if this is an improvement.
// If yes, then add the word to the list.
- if (m_cChar == cChr && rPos.nNode.GetIndex() == m_nNode && rPos.nContent.GetIndex() == m_nContent)
+ if (m_cChar == cChr && rPos.GetNodeIndex() == m_nNode && rPos.nContent.GetIndex() == m_nContent)
{
// get the current autocorrection:
SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get().GetAutoCorrect();
@@ -632,7 +632,7 @@ void SwAutoCorrExceptWord::CheckChar( const SwPosition& rPos, sal_Unicode cChr )
bool SwAutoCorrExceptWord::CheckDelChar( const SwPosition& rPos )
{
bool bRet = false;
- if (!m_bDeleted && rPos.nNode.GetIndex() == m_nNode && rPos.nContent.GetIndex() == m_nContent)
+ if (!m_bDeleted && rPos.GetNodeIndex() == m_nNode && rPos.nContent.GetIndex() == m_nContent)
m_bDeleted = bRet = true;
return bRet;
}
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index a18bd4488301..57505ac31d65 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -105,8 +105,8 @@ bool SwEditShell::GetPaMAttr( SwPaM* pPaM, SfxItemSet& rSet,
continue;
}
- SwNodeOffset nSttNd = rCurrentPaM.Start()->nNode.GetIndex(),
- nEndNd = rCurrentPaM.End()->nNode.GetIndex();
+ SwNodeOffset nSttNd = rCurrentPaM.Start()->GetNodeIndex(),
+ nEndNd = rCurrentPaM.End()->GetNodeIndex();
sal_Int32 nSttCnt = rCurrentPaM.Start()->nContent.GetIndex();
sal_Int32 nEndCnt = rCurrentPaM.End()->nContent.GetIndex();
@@ -191,8 +191,8 @@ void SwEditShell::GetPaMParAttr( SwPaM* pPaM, SfxItemSet& rSet ) const
{ // for all the point and mark (selections)
// get the start and the end node of the current selection
- SwNodeOffset nSttNd = rCurrentPaM.GetMark()->nNode.GetIndex(),
- nEndNd = rCurrentPaM.GetPoint()->nNode.GetIndex();
+ SwNodeOffset nSttNd = rCurrentPaM.GetMark()->GetNodeIndex(),
+ nEndNd = rCurrentPaM.GetPoint()->GetNodeIndex();
// reverse start and end if there number aren't sorted correctly
if( nSttNd > nEndNd )
@@ -249,8 +249,8 @@ SwTextFormatColl* SwEditShell::GetPaMTextFormatColl( SwPaM* pPaM ) const
{ // for all the point and mark (selections)
// get the start and the end node of the current selection
- SwNodeOffset nSttNd = rCurrentPaM.Start()->nNode.GetIndex(),
- nEndNd = rCurrentPaM.End()->nNode.GetIndex();
+ SwNodeOffset nSttNd = rCurrentPaM.Start()->GetNodeIndex(),
+ nEndNd = rCurrentPaM.End()->GetNodeIndex();
// for all the nodes in the current Point and Mark
for( SwNodeOffset n = nSttNd; n <= nEndNd; ++n )
@@ -289,8 +289,8 @@ std::vector<std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM> >> SwEditShell
{ // for all the point and mark (selections)
// get the start and the end node of the current selection
- SwNodeOffset nSttNd = rCurrentPaM.Start()->nNode.GetIndex(),
- nEndNd = rCurrentPaM.End()->nNode.GetIndex();
+ SwNodeOffset nSttNd = rCurrentPaM.Start()->GetNodeIndex(),
+ nEndNd = rCurrentPaM.End()->GetNodeIndex();
sal_Int32 nSttCnt = rCurrentPaM.Start()->nContent.GetIndex();
sal_Int32 nEndCnt = rCurrentPaM.End()->nContent.GetIndex();
@@ -503,8 +503,8 @@ bool SwEditShell::IsMoveLeftMargin( bool bRight, bool bModulus ) const
for(SwPaM& rPaM : GetCursor()->GetRingContainer())
{
- SwNodeOffset nSttNd = rPaM.Start()->nNode.GetIndex(),
- nEndNd = rPaM.End()->nNode.GetIndex();
+ SwNodeOffset nSttNd = rPaM.Start()->GetNodeIndex(),
+ nEndNd = rPaM.End()->GetNodeIndex();
SwContentNode* pCNd;
for( SwNodeOffset n = nSttNd; bRet && n <= nEndNd; ++n )
@@ -704,7 +704,7 @@ SvtScriptType SwEditShell::GetScriptType() const
}
else
{
- SwNodeOffset nEndIdx = pEnd->nNode.GetIndex();
+ SwNodeOffset nEndIdx = pEnd->GetNodeIndex();
SwNodeIndex aIdx( pStt->nNode );
for( ; aIdx.GetIndex() <= nEndIdx; ++aIdx )
if( aIdx.GetNode().IsTextNode() )
@@ -833,7 +833,7 @@ sal_uInt16 SwEditShell::GetScalingOfSelectedText() const
assert(pFrame); // shell cursor must be positioned in node with frame
TextFrameIndex const nStart(pFrame->MapModelToViewPos(*pStt));
TextFrameIndex const nEnd(
- sw::FrameContainsNode(*pFrame, pCursor->End()->nNode.GetIndex())
+ sw::FrameContainsNode(*pFrame, pCursor->End()->GetNodeIndex())
? pFrame->MapModelToViewPos(*pCursor->End())
: TextFrameIndex(pFrame->GetText().getLength()));
nScaleWidth = pFrame->GetScalingOfSelectedText(nStart, nEnd);
diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx
index c9f537468c8b..3503807554ef 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -63,7 +63,7 @@ void SwEditShell::DeleteSel(SwPaM& rPam, bool const isArtificialSelection, bool
aDelPam.SetMark();
SwNode& rNd = aDelPam.GetNode();
const SwNode& rEndNd = *rNd.EndOfSectionNode();
- if( pEndSelPos->nNode.GetIndex() <= rEndNd.GetIndex() )
+ if( pEndSelPos->GetNodeIndex() <= rEndNd.GetIndex() )
{
*aDelPam.GetPoint() = *pEndSelPos;
pEndSelPos = nullptr; // misuse a pointer as a flag
@@ -253,7 +253,7 @@ bool SwEditShell::Copy( SwEditShell& rDestShell )
if( bFirstMove )
{
// Store start position of the new area
- aSttNdIdx = pPos->nNode.GetIndex()-1;
+ aSttNdIdx = pPos->GetNodeIndex()-1;
nSttCntIdx = pPos->nContent.GetIndex();
bFirstMove = false;
}
diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx
index f88dca55839b..be63713ec436 100644
--- a/sw/source/core/edit/edglbldc.cxx
+++ b/sw/source/core/edit/edglbldc.cxx
@@ -185,7 +185,7 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
bool bEndUndo = false;
SwDoc* pMyDoc = GetDoc();
SwTextNode* pTextNd = rPos.GetNode().GetTextNode();
- if (pTextNd && pTextNd->GetText().getLength() && rPos.nNode.GetIndex() + 1 !=
+ if (pTextNd && pTextNd->GetText().getLength() && rPos.GetNodeIndex() + 1 !=
pMyDoc->GetNodes().GetEndOfContent().GetIndex() )
rPos.nContent.Assign( pTextNd, 0 );
else
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index a1dc7bdcd131..627f667127b4 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -464,7 +464,7 @@ OUString SwEditShell::GetDropText( const sal_Int32 nChars ) const
{
// if a multi selection exists, search for the first line
// -> it is the cursor with the lowest index
- SwNodeOffset nIndex = pCursor->GetMark()->nNode.GetIndex();
+ SwNodeOffset nIndex = pCursor->GetMark()->GetNodeIndex();
bool bPrev = true;
SwPaM* pLast = pCursor;
SwPaM* pTemp = pCursor;
@@ -475,7 +475,7 @@ OUString SwEditShell::GetDropText( const sal_Int32 nChars ) const
if ( bPrev )
{
pTemp = pPrev2;
- SwNodeOffset nTemp = pPrev2->GetMark()->nNode.GetIndex();
+ SwNodeOffset nTemp = pPrev2->GetMark()->GetNodeIndex();
if ( nTemp < nIndex )
{
nIndex = nTemp;
@@ -572,7 +572,7 @@ OUString SwEditShell::Calculate()
if( !bValidFields )
{
GetDoc()->getIDocumentFieldsAccess().FieldsToCalc( aCalc,
- pStart->nNode.GetIndex(),
+ pStart->GetNodeIndex(),
pStart->nContent.GetIndex() );
bValidFields = true;
}
@@ -780,8 +780,8 @@ void SwEditShell::SetNumberingRestart()
else
MakeFindRange(SwDocPositions::OtherStart, SwDocPositions::OtherEnd, pCursor); // extra content
SwPosition* pSttPos = pCursor->Start(), *pEndPos = pCursor->End();
- SwNodeOffset nCurrNd = pSttPos->nNode.GetIndex();
- SwNodeOffset nEndNd = pEndPos->nNode.GetIndex();
+ SwNodeOffset nCurrNd = pSttPos->GetNodeIndex();
+ SwNodeOffset nEndNd = pEndPos->GetNodeIndex();
if( nCurrNd <= nEndNd )
{
SwContentFrame* pContentFrame;
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index 79989ff424a2..bf6739d6de02 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -152,8 +152,8 @@ bool SwEditShell::SelectionHasNumber() const
bool bResult = false;
for (SwPaM& rPaM : GetCursor()->GetRingContainer())
{
- SwNodeOffset nStt = rPaM.Start()->nNode.GetIndex();
- SwNodeOffset nEnd = rPaM.End()->nNode.GetIndex();
+ SwNodeOffset nStt = rPaM.Start()->GetNodeIndex();
+ SwNodeOffset nEnd = rPaM.End()->GetNodeIndex();
for (SwNodeOffset nPos = nStt; nPos<=nEnd; nPos++)
{
SwTextNode* pTextNd = mxDoc->GetNodes()[nPos]->GetTextNode();
@@ -187,8 +187,8 @@ bool SwEditShell::SelectionHasBullet() const
bool bResult = false;
for (SwPaM& rPaM : GetCursor()->GetRingContainer())
{
- SwNodeOffset nStt = rPaM.Start()->nNode.GetIndex();
- SwNodeOffset nEnd = rPaM.End()->nNode.GetIndex();
+ SwNodeOffset nStt = rPaM.Start()->GetNodeIndex();
+ SwNodeOffset nEnd = rPaM.End()->GetNodeIndex();
for (SwNodeOffset nPos = nStt; nPos<=nEnd; nPos++)
{
SwTextNode* pTextNd = mxDoc->GetNodes()[nPos]->GetTextNode();
@@ -424,11 +424,11 @@ bool SwEditShell::MoveNumParas( bool bUpperLower, bool bUpperLeft )
{
SwPosition aPos( *aCursor.GetMark() );
if (SwDoc::GotoPrevNum( aPos, GetLayout(), false ))
- nOffset = aPos.nNode.GetIndex() -
- aCursor.GetMark()->nNode.GetIndex();
+ nOffset = aPos.GetNodeIndex() -
+ aCursor.GetMark()->GetNodeIndex();
else
{
- SwNodeOffset nStt = aPos.nNode.GetIndex(), nIdx = nStt - 1;
+ SwNodeOffset nStt = aPos.GetNodeIndex(), nIdx = nStt - 1;
if (SwTextNode const*const pStt = aPos.GetNode().GetTextNode())
{
@@ -452,7 +452,7 @@ bool SwEditShell::MoveNumParas( bool bUpperLower, bool bUpperLeft )
if( aCursor.GetNode().IsTextNode() &&
pOrig == aCursor.GetNode().GetTextNode()->GetNumRule() )
{
- SwNodeOffset nStt = aCursor.GetPoint()->nNode.GetIndex(), nIdx = nStt+1;
+ SwNodeOffset nStt = aCursor.GetPoint()->GetNodeIndex(), nIdx = nStt+1;
if (SwTextNode const*const pStt = aCursor.GetPoint()->GetNode().GetTextNode())
{
std::pair<SwTextNode *, SwTextNode *> nodes(
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index 30cb3b412063..9e630b8b3374 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -205,8 +205,8 @@ bool SwEditShell::IsTextToTableAvailable() const
bOnlyText = true;
// check if selection is in listing
- SwNodeOffset nStt = rPaM.Start()->nNode.GetIndex(),
- nEnd = rPaM.End()->nNode.GetIndex();
+ SwNodeOffset nStt = rPaM.Start()->GetNodeIndex(),
+ nEnd = rPaM.End()->GetNodeIndex();
for( ; nStt <= nEnd; ++nStt )
if( !GetDoc()->GetNodes()[ nStt ]->IsTextNode() )
diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx
index 865d00550c93..7fbdeb96e543 100644
--- a/sw/source/core/fields/postithelper.cxx
+++ b/sw/source/core/fields/postithelper.cxx
@@ -169,7 +169,7 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos(
if (pAnnotationMark != nullptr)
{
const SwPosition& rAnnotationStartPos = pAnnotationMark->GetMarkStart();
- o_rInfo.mnStartNodeIdx = rAnnotationStartPos.nNode.GetIndex();
+ o_rInfo.mnStartNodeIdx = rAnnotationStartPos.GetNodeIndex();
o_rInfo.mnStartContent = rAnnotationStartPos.nContent.GetIndex();
}
else
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index d239058d26b1..650abb6abe5e 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -865,8 +865,8 @@ bool SwFEShell::Paste(SwDoc& rClpDoc, bool bNestedTable)
// Creation of the list of insert positions
std::vector< Insertion > aCopyVector;
// The number of text portions of the rectangular selection
- const SwNodeOffset nSelCount = aCpyPam.GetPoint()->nNode.GetIndex()
- - aCpyPam.GetMark()->nNode.GetIndex();
+ const SwNodeOffset nSelCount = aCpyPam.GetPoint()->GetNodeIndex()
+ - aCpyPam.GetMark()->GetNodeIndex();
SwNodeOffset nCount = nSelCount;
SwNodeIndex aClpIdx( aIdx );
SwPaM* pStartCursor = GetCursor();
@@ -1050,7 +1050,7 @@ bool SwFEShell::Paste(SwDoc& rClpDoc, bool bNestedTable)
// shouldn't happen here)
SwFormatAnchor const& rAnchor(pFlyFormat->GetAnchor());
if (RndStdIds::FLY_AT_PAGE == rAnchor.GetAnchorId()
- || rClpDoc.GetNodes().GetEndOfExtras().GetIndex() < rAnchor.GetContentAnchor()->nNode.GetIndex())
+ || rClpDoc.GetNodes().GetEndOfExtras().GetIndex() < rAnchor.GetContentAnchor()->GetNodeIndex())
{
inserted.emplace_back(
lcl_PasteFlyOrDrawFormat(rPaM, pFlyFormat, *this));
@@ -1100,9 +1100,9 @@ bool SwFEShell::Paste(SwDoc& rClpDoc, bool bNestedTable)
// Update the rsid of each pasted text node.
SwNodes &rDestNodes = GetDoc()->GetNodes();
- SwNodeOffset const nEndIdx = aPaM.End()->nNode.GetIndex();
+ SwNodeOffset const nEndIdx = aPaM.End()->GetNodeIndex();
- for (SwNodeOffset nIdx = aPaM.Start()->nNode.GetIndex();
+ for (SwNodeOffset nIdx = aPaM.Start()->GetNodeIndex();
nIdx <= nEndIdx; ++nIdx)
{
SwTextNode *const pTextNode = rDestNodes[nIdx]->GetTextNode();
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 13a4a82d4b97..5654189976d4 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -950,10 +950,10 @@ bool SwFEShell::HasBoxSelection() const
pPam->Exchange();
}
SwNode* pNd;
- if( pPam->GetPoint()->nNode.GetIndex() -1 ==
+ if( pPam->GetPoint()->GetNodeIndex() -1 ==
( pNd = &pPam->GetNode())->StartOfSectionIndex() &&
!pPam->GetPoint()->nContent.GetIndex() &&
- pPam->GetMark()->nNode.GetIndex() + 1 ==
+ pPam->GetMark()->GetNodeIndex() + 1 ==
pNd->EndOfSectionIndex())
{
SwNodeIndex aIdx( *pNd->EndOfSectionNode(), -1 );
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index dc74c8cd4e33..4775e47f240b 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -556,7 +556,7 @@ bool SwFEShell::Sort(const SwSortOptions& rOpt)
auto [pStart, pEnd] = pPam->StartEnd(); // SwPosition*
SwNodeIndex aPrevIdx( pStart->nNode, -1 );
- SwNodeOffset nOffset = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
+ SwNodeOffset nOffset = pEnd->GetNodeIndex() - pStart->GetNodeIndex();
const sal_Int32 nCntStt = pStart->nContent.GetIndex();
// Sorting
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 45fc820b2e1f..9518177c5fd7 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -898,13 +898,13 @@ bool IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam )
rPam.GetPoint()->nNode = *rBox.GetSttNd();
rPam.Move( fnMoveForward, GoInContent );
bool bRet = *rPam.GetMark() == *rPam.GetPoint()
- && ( rBox.GetSttNd()->GetIndex() + 1 == rPam.GetPoint()->nNode.GetIndex() );
+ && ( rBox.GetSttNd()->GetIndex() + 1 == rPam.GetPoint()->GetNodeIndex() );
if( bRet )
{
// now check for paragraph bound flies
const SwFrameFormats& rFormats = *rPam.GetDoc().GetSpzFrameFormats();
- SwNodeOffset nSttIdx = rPam.GetPoint()->nNode.GetIndex(),
+ SwNodeOffset nSttIdx = rPam.GetPoint()->GetNodeIndex(),
nEndIdx = rBox.GetSttNd()->EndOfSectionIndex(),
nIdx;
@@ -915,7 +915,7 @@ bool IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam )
if (pAPos &&
((RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()) ||
(RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId())) &&
- nSttIdx <= ( nIdx = pAPos->nNode.GetIndex() ) &&
+ nSttIdx <= ( nIdx = pAPos->GetNodeIndex() ) &&
nIdx < nEndIdx )
{
bRet = false;
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 17daef874372..01d3e61b0bff 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -2689,9 +2689,9 @@ void SwFrameFormat::SwClientNotify(const SwModify& rMod, const SfxHint& rHint)
const_cast<SwFormatFooter*>(pF)->RegisterToFormat(*pFormat);
}
SwFormat::SwClientNotify(rMod, rHint);
- if(pOldAnchorPosition != nullptr && (pNewAnchorPosition == nullptr || pOldAnchorPosition->nNode.GetIndex() != pNewAnchorPosition->nNode.GetIndex()))
+ if(pOldAnchorPosition != nullptr && (pNewAnchorPosition == nullptr || pOldAnchorPosition->GetNodeIndex() != pNewAnchorPosition->GetNodeIndex()))
pOldAnchorPosition->GetNode().RemoveAnchoredFly(this);
- if(pNewAnchorPosition != nullptr && (pOldAnchorPosition == nullptr || pOldAnchorPosition->nNode.GetIndex() != pNewAnchorPosition->nNode.GetIndex()))
+ if(pNewAnchorPosition != nullptr && (pOldAnchorPosition == nullptr || pOldAnchorPosition->GetNodeIndex() != pNewAnchorPosition->GetNodeIndex()))
pNewAnchorPosition->GetNode().AddAnchoredFly(this);
}
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index 891ff1574bb6..c60e4ca6ec86 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -395,7 +395,7 @@ sal_uInt8 SwFlowFrame::BwdMoveNecessary( const SwPageFrame *pPage, const SwRect
if ( rFormat.GetAnchor().GetAnchorId() == RndStdIds::FLY_AT_PARA )
{
// The index of the other one can be retrieved using the anchor attribute.
- SwNodeOffset nTmpIndex = rFormat.GetAnchor().GetContentAnchor()->nNode.GetIndex();
+ SwNodeOffset nTmpIndex = rFormat.GetAnchor().GetContentAnchor()->GetNodeIndex();
// Now we're going to check whether the current paragraph before
// the anchor of the displacing object sits in the text. If this
// is the case, we don't try to evade it.
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 489fe2cdcfcd..48e0fbd5764b 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -1386,7 +1386,7 @@ void SwFlyAtContentFrame::SetAbsPos( const Point &rNew )
SwCursorMoveState eTmpState( CursorMoveState::SetOnlyText );
Point aPt( rNew );
if( pCnt->GetModelPositionForViewPoint( &pos, aPt, &eTmpState )
- && FrameContainsNode(*pTextFrame, pos.nNode.GetIndex()))
+ && FrameContainsNode(*pTextFrame, pos.GetNodeIndex()))
{
const SwTextAttr *const pTextInputField =
pos.GetNode().GetTextNode()->GetTextAttrAt(
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 4fa22f4fdf2d..0e5bd7aac0a5 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -965,7 +965,7 @@ void SwContentNotify::ImplDestroy()
continue;
}
- if (FrameContainsNode(*pCnt, rAnch.GetContentAnchor()->nNode.GetIndex()))
+ if (FrameContainsNode(*pCnt, rAnch.GetContentAnchor()->GetNodeIndex()))
{
OSL_FAIL( "<SwContentNotify::~SwContentNotify()> - to page anchored object with content position." );
if ( !pPage )
@@ -1103,7 +1103,7 @@ static bool IsShown(SwNodeOffset const nIndex,
{
assert(!pIter || *pIter == *pEnd || (*pIter)->pNode->GetIndex() == nIndex);
SwPosition const& rAnchor(*rAnch.GetContentAnchor());
- if (rAnchor.nNode.GetIndex() != nIndex)
+ if (rAnchor.GetNodeIndex() != nIndex)
{
return false;
}
@@ -1213,7 +1213,7 @@ void RemoveHiddenObjsOfNode(SwTextNode const& rNode,
if (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_CHAR
|| rAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR)
{
- assert(rAnchor.GetContentAnchor()->nNode.GetIndex() == rNode.GetIndex());
+ assert(rAnchor.GetContentAnchor()->GetNodeIndex() == rNode.GetIndex());
if (!IsShown(rNode.GetIndex(), rAnchor, pIter, pEnd, pFirstNode, pLastNode))
{
pFrameFormat->DelFrames();
@@ -1361,7 +1361,7 @@ bool IsAnchoredObjShown(SwTextFrame const& rFrame, SwFormatAnchor const& rAnchor
break;
}
pNode = iter->pNode;
- if (pAnchor->nNode.GetIndex() < pNode->GetIndex())
+ if (pAnchor->GetNodeIndex() < pNode->GetIndex())
{
break;
}
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 58792ecf80d6..429fba4598ef 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -831,13 +831,13 @@ bool SwTextFrame::UnitUp_( SwPaM *pPam, const SwTwips nOffset,
// See comment in SwTextFrame::GetModelPositionForViewPoint()
#if OSL_DEBUG_LEVEL > 0
- const SwNodeOffset nOldNode = pPam->GetPoint()->nNode.GetIndex();
+ const SwNodeOffset nOldNode = pPam->GetPoint()->GetNodeIndex();
#endif
// The node should not be changed
TextFrameIndex nTmpOfst = aLine.GetModelPositionForViewPoint(pPam->GetPoint(),
aCharBox.Pos(), false );
#if OSL_DEBUG_LEVEL > 0
- OSL_ENSURE( nOldNode == pPam->GetPoint()->nNode.GetIndex(),
+ OSL_ENSURE( nOldNode == pPam->GetPoint()->GetNodeIndex(),
"SwTextFrame::UnitUp: illegal node change" );
#endif
@@ -1192,7 +1192,7 @@ bool SwTextFrame::UnitDown_(SwPaM *pPam, const SwTwips nOffset,
aCharBox.Width( aCharBox.SSize().Width() / 2 );
#if OSL_DEBUG_LEVEL > 0
// See comment in SwTextFrame::GetModelPositionForViewPoint()
- const SwNodeOffset nOldNode = pPam->GetPoint()->nNode.GetIndex();
+ const SwNodeOffset nOldNode = pPam->GetPoint()->GetNodeIndex();
#endif
if ( pNextLine && ! bFirstOfDouble )
aLine.NextLine();
@@ -1200,7 +1200,7 @@ bool SwTextFrame::UnitDown_(SwPaM *pPam, const SwTwips nOffset,
TextFrameIndex nTmpOfst = aLine.GetModelPositionForViewPoint( pPam->GetPoint(),
aCharBox.Pos(), false );
#if OSL_DEBUG_LEVEL > 0
- OSL_ENSURE( nOldNode == pPam->GetPoint()->nNode.GetIndex(),
+ OSL_ENSURE( nOldNode == pPam->GetPoint()->GetNodeIndex(),
"SwTextFrame::UnitDown: illegal node change" );
#endif
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 36885753e514..e09ad12373cb 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -539,13 +539,13 @@ bool SwTextFrame::PaintEmpty( const SwRect &rRect, bool bCheck ) const
SwRedlineItr aRedln(rTextNode, *pFnt, aAttrHandler, nRedlPos, SwRedlineItr::Mode::Show);
const SwRangeRedline* pRedline = rIDRA.GetRedlineTable()[nRedlPos];
// show redlining only on the inserted/deleted empty paragraph, but not on the next one
- if ( rTextNode.GetIndex() != pRedline->End()->nNode.GetIndex() )
+ if ( rTextNode.GetIndex() != pRedline->End()->GetNodeIndex() )
eRedline = pRedline->GetType();
// except if the next empty paragraph starts a new redline (e.g. deletion after insertion)
else if ( nRedlPos + 1 < rIDRA.GetRedlineTable().size() )
{
const SwRangeRedline* pNextRedline = rIDRA.GetRedlineTable()[nRedlPos + 1];
- if ( rTextNode.GetIndex() == pNextRedline->Start()->nNode.GetIndex() )
+ if ( rTextNode.GetIndex() == pNextRedline->Start()->GetNodeIndex() )
eRedline = pNextRedline->GetType();
}
}
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 527f546aeed3..66d0ffa7c307 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -746,7 +746,7 @@ TextFrameIndex SwAttrIter::GetNextAttr() const
if (redline.second.first)
{
assert(m_pMergedPara);
- assert(redline.second.first->End()->nNode.GetIndex() <= m_pMergedPara->pLastNode->GetIndex()
+ assert(redline.second.first->End()->GetNodeIndex() <= m_pMergedPara->pLastNode->GetIndex()
|| !redline.second.first->End()->GetNode().IsTextNode());
if (CanSkipOverRedline(*pTextNode, redline.first, *redline.second.first,
nStartIndex, nEndIndex, m_nPosition == redline.first))
@@ -893,7 +893,7 @@ static void lcl_MinMaxNode(SwFrameFormat* pNd, SwMinMaxNodeArgs& rIn)
const SwPosition *pPos = rFormatA.GetContentAnchor();
OSL_ENSURE(pPos, "Unexpected NULL arguments");
- if (!pPos || rIn.m_nIndex != pPos->nNode.GetIndex())
+ if (!pPos || rIn.m_nIndex != pPos->GetNodeIndex())
return;
tools::Long nMin, nMax;
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 3fe690770354..a61ff4304902 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -921,7 +921,7 @@ static void InitBookmarks(
if (&rStart.GetNode() != iter->pNode // iter moved to next node
|| rStart.nContent.GetIndex() < iter->nStart)
{
- if (rEnd.nNode.GetIndex() < iter->pNode->GetIndex()
+ if (rEnd.GetNodeIndex() < iter->pNode->GetIndex()
|| (&rEnd.GetNode() == iter->pNode && rEnd.nContent.GetIndex() <= iter->nStart))
{
break; // deleted - skip it
@@ -938,7 +938,7 @@ static void InitBookmarks(
if (rStart.nContent.GetIndex() == iter->nEnd
&& (iterNext == end
? &rEnd.GetNode() == iter->pNode
- : (rEnd.nNode.GetIndex() < iterNext->pNode->GetIndex()
+ : (rEnd.GetNodeIndex() < iterNext->pNode->GetIndex()
|| (&rEnd.GetNode() == iterNext->pNode && rEnd.nContent.GetIndex() < iterNext->nStart))))
{
break; // deleted - skip it
@@ -960,7 +960,7 @@ static void InitBookmarks(
}
if (iter == end)
{
- if (pNode->GetIndex() < rEnd.nNode.GetIndex()) // pNode is last node of merged
+ if (pNode->GetIndex() < rEnd.GetNodeIndex()) // pNode is last node of merged
{
break; // deleted - skip it
}
@@ -984,7 +984,7 @@ static void InitBookmarks(
SwPosition const& rStart(it.first->GetMarkStart());
// oPrevIter may point to pNode or a preceding node
if (oPrevIter
- ? ((*oPrevIter)->pNode->GetIndex() < rStart.nNode.GetIndex()
+ ? ((*oPrevIter)->pNode->GetIndex() < rStart.GetNodeIndex()
|| ((*oPrevIter)->pNode == &rStart.GetNode()
&& ((iter != end && &rEnd.GetNode() == iter->pNode && rEnd.nContent.GetIndex() == iter->nStart)
? (*oPrevIter)->nEnd < rStart.nContent.GetIndex()
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index 08f62d47213f..afe6ff7dd0a4 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -104,7 +104,7 @@ public:
{
SwRangeRedline const*const pRed = m_rIDRA.GetRedlineTable()[m_RedlineIndex];
- if (m_pEndPos->nNode.GetIndex() < pRed->Start()->nNode.GetIndex())
+ if (m_pEndPos->GetNodeIndex() < pRed->Start()->GetNodeIndex())
break;
if (pRed->GetType() != RedlineType::Delete)
@@ -240,7 +240,7 @@ CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & rTextNode,
pNode->SetRedlineMergeFlag(SwNode::Merge::First);
} // else: was already set before
int nLevel(0);
- for (SwNodeOffset j = pNode->GetIndex() + 1; j < pEnd->nNode.GetIndex(); ++j)
+ for (SwNodeOffset j = pNode->GetIndex() + 1; j < pEnd->GetNodeIndex(); ++j)
{
SwNode *const pTmp(pNode->GetNodes()[j]);
if (nLevel == 0)
@@ -275,7 +275,7 @@ CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & rTextNode,
assert(pEnd->nNode != pStart->nNode);
// must set pNode too because it will mark the last node
pNode = nodes.back();
- assert(pNode == pNode->GetNodes()[pEnd->nNode.GetIndex() - 1]);
+ assert(pNode == pNode->GetNodes()[pEnd->GetNodeIndex() - 1]);
if (pNode != &rTextNode)
{ // something might depend on last merged one being NonFirst?
pNode->SetRedlineMergeFlag(SwNode::Merge::NonFirst);
@@ -654,7 +654,7 @@ SwRedlineItr::SwRedlineItr( const SwTextNode& rTextNd, SwFont& rFnt,
if( pArr )
{
assert(pExtInputStart);
- m_pExt.reset( new SwExtend(*pArr, pExtInputStart->nNode.GetIndex(),
+ m_pExt.reset( new SwExtend(*pArr, pExtInputStart->GetNodeIndex(),
pExtInputStart->nContent.GetIndex()) );
}
else
@@ -787,8 +787,8 @@ short SwRedlineItr::Seek(SwFont& rFnt,
m_rDoc.getIDocumentRedlineAccess().GetRedlineTable()[m_nAct]);
SwPosition const*const pStart(pRedline->Start());
if (pRedline->GetType() == RedlineType::Delete
- && (nNode < pStart->nNode.GetIndex()
- || (nNode == pStart->nNode.GetIndex()
+ && (nNode < pStart->GetNodeIndex()
+ || (nNode == pStart->GetNodeIndex()
&& nNew <= pStart->nContent.GetIndex())))
{
pRedline->CalcStartEnd(nNode, m_nStart, m_nEnd);
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 9aa36c0c86d3..57847dd86524 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -553,8 +553,8 @@ static const SwRangeRedline* lcl_GetRedlineAtNodeInsertionOrDeletion( const SwTe
for( ; nRedlPos < rTable.size() ; ++nRedlPos )
{
const SwRangeRedline* pTmp = rTable[ nRedlPos ];
- SwNodeOffset nStart = pTmp->GetPoint()->nNode.GetIndex(),
- nEnd = pTmp->GetMark()->nNode.GetIndex();
+ SwNodeOffset nStart = pTmp->GetPoint()->GetNodeIndex(),
+ nEnd = pTmp->GetMark()->GetNodeIndex();
if( nStart > nEnd )
std::swap(nStart, nEnd);
if( RedlineType::Delete == pTmp->GetType() ||
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 88f0687de8c1..bc526b27f14b 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -806,7 +806,7 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
// Compare indices:
// The Index of the other is retrieved from the anchor attr.
- SwNodeOffset nTmpIndex = rNewA.GetContentAnchor()->nNode.GetIndex();
+ SwNodeOffset nTmpIndex = rNewA.GetContentAnchor()->GetNodeIndex();
// Now check whether the current paragraph is before the anchor
// of the displaced object in the text, then we don't have to
// get out of its way.
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 6ad808d224f4..73d73d5e46e6 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -174,7 +174,7 @@ SwTOXSortTabBase::SwTOXSortTabBase( TOXSortType nTyp, const SwContentNode* pNd,
const SwDoc& rDoc = pNd->GetDoc();
bool const bResult = GetBodyTextNode( rDoc, aPos, *pFrame );
OSL_ENSURE(bResult, "where is the text node");
- nPos = aPos.nNode.GetIndex();
+ nPos = aPos.GetNodeIndex();
nCntPos = aPos.nContent.GetIndex();
}
}
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 3df1f05aa24a..5a4c98f856f2 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -396,7 +396,7 @@ void MoveMergedFlysAndFootnotes(std::vector<SwTextFrame*> const& rFrames,
{
SwFrameFormat & rFormat(pObj->GetFrameFormat());
SwFormatAnchor const& rAnchor(rFormat.GetAnchor());
- if (rFirstNode.GetIndex() < rAnchor.GetContentAnchor()->nNode.GetIndex())
+ if (rFirstNode.GetIndex() < rAnchor.GetContentAnchor()->GetNodeIndex())
{
// move it to the new frame of "this"
rFormat.CallSwClientNotify(sw::LegacyModifyHint(&rAnchor, &rAnchor));
diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx
index 0be699af645b..665a4b7272ed 100644
--- a/sw/source/core/undo/SwUndoField.cxx
+++ b/sw/source/core/undo/SwUndoField.cxx
@@ -35,7 +35,7 @@ using namespace ::com::sun::star::uno;
SwUndoField::SwUndoField(const SwPosition & rPos )
: SwUndo(SwUndoId::FIELD, &rPos.GetDoc())
{
- m_nNodeIndex = rPos.nNode.GetIndex();
+ m_nNodeIndex = rPos.GetNodeIndex();
m_nOffset = rPos.nContent.GetIndex();
m_pDoc = &rPos.GetDoc();
}
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index b46645b91934..64c23dc43c25 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -609,9 +609,9 @@ SwHistoryBookmark::SwHistoryBookmark(
, m_aName(rBkmk.GetName())
, m_bHidden(false)
, m_nNode(bSavePos ?
- rBkmk.GetMarkPos().nNode.GetIndex() : SwNodeOffset(0))
+ rBkmk.GetMarkPos().GetNodeIndex() : SwNodeOffset(0))
, m_nOtherNode(bSaveOtherPos ?
- rBkmk.GetOtherMarkPos().nNode.GetIndex() : SwNodeOffset(0))
+ rBkmk.GetOtherMarkPos().GetNodeIndex() : SwNodeOffset(0))
, m_nContent(bSavePos ?
rBkmk.GetMarkPos().nContent.GetIndex() : 0)
, m_nOtherContent(bSaveOtherPos ?
@@ -721,7 +721,7 @@ void SwHistoryBookmark::SetInDoc( SwDoc* pDoc, bool )
bool SwHistoryBookmark::IsEqualBookmark(const ::sw::mark::IMark& rBkmk)
{
- return m_nNode == rBkmk.GetMarkPos().nNode.GetIndex()
+ return m_nNode == rBkmk.GetMarkPos().GetNodeIndex()
&& m_nContent == rBkmk.GetMarkPos().nContent.GetIndex()
&& m_aName == rBkmk.GetName();
}
@@ -729,7 +729,7 @@ bool SwHistoryBookmark::IsEqualBookmark(const ::sw::mark::IMark& rBkmk)
SwHistoryNoTextFieldmark::SwHistoryNoTextFieldmark(const ::sw::mark::IFieldmark& rFieldMark)
: SwHistoryHint(HSTRY_NOTEXTFIELDMARK)
, m_sType(rFieldMark.GetFieldname())
- , m_nNode(rFieldMark.GetMarkStart().nNode.GetIndex())
+ , m_nNode(rFieldMark.GetMarkStart().GetNodeIndex())
, m_nContent(rFieldMark.GetMarkStart().nContent.GetIndex())
{
}
@@ -774,13 +774,13 @@ SwHistoryTextFieldmark::SwHistoryTextFieldmark(const ::sw::mark::IFieldmark& rFi
: SwHistoryHint(HSTRY_TEXTFIELDMARK)
, m_sName(rFieldMark.GetName())
, m_sType(rFieldMark.GetFieldname())
- , m_nStartNode(rFieldMark.GetMarkStart().nNode.GetIndex())
+ , m_nStartNode(rFieldMark.GetMarkStart().GetNodeIndex())
, m_nStartContent(rFieldMark.GetMarkStart().nContent.GetIndex())
- , m_nEndNode(rFieldMark.GetMarkEnd().nNode.GetIndex())
+ , m_nEndNode(rFieldMark.GetMarkEnd().GetNodeIndex())
, m_nEndContent(rFieldMark.GetMarkEnd().nContent.GetIndex())
{
SwPosition const sepPos(sw::mark::FindFieldSep(rFieldMark));
- m_nSepNode = sepPos.nNode.GetIndex();
+ m_nSepNode = sepPos.GetNodeIndex();
m_nSepContent = sepPos.nContent.GetIndex();
}
@@ -925,7 +925,7 @@ void SwHistorySetAttrSet::SetInDoc( SwDoc* pDoc, bool )
SwHistoryChangeFlyAnchor::SwHistoryChangeFlyAnchor( SwFrameFormat& rFormat )
: SwHistoryHint( HSTRY_CHGFLYANCHOR )
, m_rFormat( rFormat )
- , m_nOldNodeIndex( rFormat.GetAnchor().GetContentAnchor()->nNode.GetIndex() )
+ , m_nOldNodeIndex( rFormat.GetAnchor().GetContentAnchor()->GetNodeIndex() )
, m_nOldContentIndex( (RndStdIds::FLY_AT_CHAR == rFormat.GetAnchor().GetAnchorId())
? rFormat.GetAnchor().GetContentAnchor()->nContent.GetIndex()
: COMPLETE_STRING )
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index b7347301ddee..59aae54f4062 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -372,7 +372,7 @@ void SwUndoFormatAttr::SaveFlyAnchor( const SwFormat * pFormat, bool bSvDrwPt )
[[fallthrough]];
case RndStdIds::FLY_AT_PARA:
case RndStdIds::FLY_AT_FLY:
- m_nNodeIndex = rAnchor.GetContentAnchor()->nNode.GetIndex();
+ m_nNodeIndex = rAnchor.GetContentAnchor()->GetNodeIndex();
break;
default:
return;
@@ -552,7 +552,7 @@ SwUndoResetAttr::SwUndoResetAttr( const SwPosition& rPos, sal_uInt16 nFormatId )
, m_pHistory( new SwHistory )
, m_nFormatId( nFormatId )
{
- m_nSttNode = m_nEndNode = rPos.nNode.GetIndex();
+ m_nSttNode = m_nEndNode = rPos.GetNodeIndex();
m_nSttContent = m_nEndContent = rPos.nContent.GetIndex();
}
@@ -710,7 +710,7 @@ void SwUndoAttr::SaveRedlineData( const SwPaM& rPam, bool bIsContent )
SetRedlineFlags( rDoc.getIDocumentRedlineAccess().GetRedlineFlags() );
if ( bIsContent ) {
- m_nNodeIndex = rPam.GetPoint()->nNode.GetIndex();
+ m_nNodeIndex = rPam.GetPoint()->GetNodeIndex();
}
}
@@ -1029,7 +1029,7 @@ void SwUndoEndNoteInfo::RedoImpl(::sw::UndoRedoContext & rContext)
SwUndoDontExpandFormat::SwUndoDontExpandFormat( const SwPosition& rPos )
: SwUndo( SwUndoId::DONTEXPAND, &rPos.GetDoc() )
- , m_nNodeIndex( rPos.nNode.GetIndex() )
+ , m_nNodeIndex( rPos.GetNodeIndex() )
, m_nContentIndex( rPos.nContent.GetIndex() )
{
}
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 79e95faa35e5..8fa0b3144282 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -63,7 +63,7 @@ static void lcl_MakeAutoFrames( const SwFrameFormats& rSpzArr, SwNodeOffset nMov
if (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_CHAR)
{
const SwPosition* pAPos = pAnchor->GetContentAnchor();
- if( pAPos && nMovedIndex == pAPos->nNode.GetIndex() )
+ if( pAPos && nMovedIndex == pAPos->GetNodeIndex() )
pFormat->MakeFrames();
}
}
@@ -243,7 +243,7 @@ SwUndoDelete::SwUndoDelete(
m_nSetPos = m_pHistory ? m_pHistory->Count() : 0;
// Is already anything deleted?
- m_nNdDiff = m_nSttNode - pStt->nNode.GetIndex();
+ m_nNdDiff = m_nSttNode - pStt->GetNodeIndex();
m_bJoinNext = !bFullPara && pEnd == rPam.GetPoint();
m_bBackSp = !bFullPara && !m_bJoinNext;
@@ -267,8 +267,8 @@ SwUndoDelete::SwUndoDelete(
if( pSttTextNd && pEndTextNd && pSttTextNd != pEndTextNd )
{
// two different TextNodes, thus save also the TextFormatCollection
- m_pHistory->Add( pSttTextNd->GetTextColl(),pStt->nNode.GetIndex(), SwNodeType::Text );
- m_pHistory->Add( pEndTextNd->GetTextColl(),pEnd->nNode.GetIndex(), SwNodeType::Text );
+ m_pHistory->Add( pSttTextNd->GetTextColl(),pStt->GetNodeIndex(), SwNodeType::Text );
+ m_pHistory->Add( pEndTextNd->GetTextColl(),pEnd->GetNodeIndex(), SwNodeType::Text );
if( !m_bJoinNext ) // Selection from bottom to top
{
@@ -422,7 +422,7 @@ SwUndoDelete::SwUndoDelete(
// have ContentNodes)?
if( !pSttTextNd && !pEndTextNd )
{
- m_nNdDiff = m_nSttNode - rPam.GetPoint()->nNode.GetIndex() - (bFullPara ? 0 : 1);
+ m_nNdDiff = m_nSttNode - rPam.GetPoint()->GetNodeIndex() - (bFullPara ? 0 : 1);
rPam.Move( fnMoveForward, GoInNode );
}
else
@@ -430,7 +430,7 @@ SwUndoDelete::SwUndoDelete(
m_nNdDiff = m_nSttNode;
if( m_nSectDiff && m_bBackSp )
m_nNdDiff += m_nSectDiff;
- m_nNdDiff -= rPam.GetPoint()->nNode.GetIndex();
+ m_nNdDiff -= rPam.GetPoint()->GetNodeIndex();
}
if( !rPam.GetNode().IsContentNode() )
@@ -444,7 +444,7 @@ SwUndoDelete::SwUndoDelete(
bool SwUndoDelete::SaveContent( const SwPosition* pStt, const SwPosition* pEnd,
SwTextNode* pSttTextNd, SwTextNode* pEndTextNd )
{
- SwNodeOffset nNdIdx = pStt->nNode.GetIndex();
+ SwNodeOffset nNdIdx = pStt->GetNodeIndex();
// 1 - copy start in Start-String
if( pSttTextNd )
{
@@ -487,7 +487,7 @@ bool SwUndoDelete::SaveContent( const SwPosition* pStt, const SwPosition* pEnd,
if( pEndTextNd )
{
SwContentIndex aEndIdx( pEndTextNd );
- nNdIdx = pEnd->nNode.GetIndex();
+ nNdIdx = pEnd->GetNodeIndex();
SwRegHistory aRHst( *pEndTextNd, m_pHistory.get() );
// always save all text atttibutes because of possibly overlapping
@@ -836,7 +836,7 @@ static void lcl_ReAnchorAtContentFlyFrames( const SwFrameFormats& rSpzArr, const
if (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA)
{
pAPos = pAnchor->GetContentAnchor();
- if( pAPos && nOldIdx == pAPos->nNode.GetIndex() )
+ if( pAPos && nOldIdx == pAPos->GetNodeIndex() )
{
SwFormatAnchor aAnch( *pAnchor );
aAnch.SetAnchor( &rPos );
@@ -893,7 +893,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
{ // tdf#134250 section node wasn't deleted; but aPos must point to it in bNodeMove case below
assert(m_nSttContent == 0);
assert(!m_aSttStr);
- pTextNd = rDoc.GetNodes()[aPos.nNode.GetIndex() + 1]->GetTextNode();
+ pTextNd = rDoc.GetNodes()[aPos.GetNodeIndex() + 1]->GetTextNode();
}
else
{
@@ -908,7 +908,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
if( m_aSttStr && !m_bFromTableCopy )
{
- SwNodeOffset nOldIdx = aPos.nNode.GetIndex();
+ SwNodeOffset nOldIdx = aPos.GetNodeIndex();
rDoc.getIDocumentContentOperations().SplitNode( aPos, false );
// After the split all objects are anchored at the first
// paragraph, but the pHistory of the fly frame formats relies
@@ -936,7 +936,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
{
if (m_nSttContent < pNd->GetText().getLength())
{
- SwNodeOffset nOldIdx = aPos.nNode.GetIndex();
+ SwNodeOffset nOldIdx = aPos.GetNodeIndex();
rDoc.getIDocumentContentOperations().SplitNode( aPos, false );
if( m_bBackSp )
lcl_ReAnchorAtContentFlyFrames(*rDoc.GetSpzFrameFormats(), aPos, nOldIdx);
@@ -947,7 +947,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
}
if( m_nSectDiff )
{
- SwNodeOffset nMoveIndex = aPos.nNode.GetIndex();
+ SwNodeOffset nMoveIndex = aPos.GetNodeIndex();
SwNodeOffset nDiff(0);
if( m_bJoinNext )
{
@@ -989,7 +989,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
else
{
aPos = SwPosition( aCopyIndex );
- nMoveIndex = aPos.nNode.GetIndex() + m_nReplaceDummy + 1;
+ nMoveIndex = aPos.GetNodeIndex() + m_nReplaceDummy + 1;
}
SwNodeIndex aMvIdx(rDoc.GetNodes(), nMoveIndex);
SwNodeRange aRg( aPos.nNode, SwNodeOffset(0), aPos.nNode, SwNodeOffset(1) );
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index a4f03c2a9c74..f26996a10fad 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -63,7 +63,7 @@ void SwUndRng::SetValues( const SwPaM& rPam )
if( rPam.HasMark() )
{
const SwPosition *pEnd = rPam.End();
- m_nEndNode = pEnd->nNode.GetIndex();
+ m_nEndNode = pEnd->GetNodeIndex();
m_nEndContent = pEnd->nContent.GetIndex();
}
else
@@ -73,7 +73,7 @@ void SwUndRng::SetValues( const SwPaM& rPam )
m_nEndContent = COMPLETE_STRING;
}
- m_nSttNode = pStt->nNode.GetIndex();
+ m_nSttNode = pStt->GetNodeIndex();
m_nSttContent = pStt->nContent.GetIndex();
}
@@ -743,7 +743,7 @@ void SwUndoSaveContent::MoveToUndoNds( SwPaM& rPaM, SwNodeIndex* pNodeIdx,
const SwPosition* pStt = rPaM.Start(), *pEnd = rPaM.End();
- SwNodeOffset nTmpMvNode = aPos.nNode.GetIndex();
+ SwNodeOffset nTmpMvNode = aPos.GetNodeIndex();
if( pCpyNd || pEndNdIdx )
{
@@ -757,7 +757,7 @@ void SwUndoSaveContent::MoveToUndoNds( SwPaM& rPaM, SwNodeIndex* pNodeIdx,
rDoc.GetNodes().MoveRange( rPaM, aPos, rNds );
}
if( pEndNdIdx )
- *pEndNdIdx = aPos.nNode.GetIndex();
+ *pEndNdIdx = aPos.GetNodeIndex();
// old position
aPos.nNode = nTmpMvNode;
@@ -805,7 +805,7 @@ void SwUndoSaveContent::MoveFromUndoNds( SwDoc& rDoc, SwNodeOffset nNodeIdx,
aPaM.SetMark();
rNds.Delete( aPaM.GetPoint()->nNode,
rNds.GetEndOfExtras().GetIndex() -
- aPaM.GetPoint()->nNode.GetIndex() );
+ aPaM.GetPoint()->GetNodeIndex() );
}
aRedlRest.Restore();
@@ -891,7 +891,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
// for now delete all that come afterwards
while( nPos < rFootnoteArr.size() && ( pFootnoteNd =
&( pSrch = rFootnoteArr[ nPos ] )->GetTextNode())->GetIndex()
- <= pEnd->nNode.GetIndex() )
+ <= pEnd->GetNodeIndex() )
{
const sal_Int32 nFootnoteSttIdx = pSrch->GetStart();
if( (DelContentType::CheckNoCntnt & nDelContentType )
@@ -921,7 +921,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
}
while( nPos-- && ( pFootnoteNd = &( pSrch = rFootnoteArr[ nPos ] )->
- GetTextNode())->GetIndex() >= pStt->nNode.GetIndex() )
+ GetTextNode())->GetIndex() >= pStt->GetNodeIndex() )
{
const sal_Int32 nFootnoteSttIdx = pSrch->GetStart();
if( !(DelContentType::CheckNoCntnt & nDelContentType) && (
@@ -1009,8 +1009,8 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
// new node *before* existing one so a no-op
// may need to be done here to add it to
// history for Undo.
- (rPoint.nNode.GetIndex() == pAPos->nNode.GetIndex()
- || pStt->nNode.GetIndex() == pAPos->nNode.GetIndex())
+ (rPoint.GetNodeIndex() == pAPos->GetNodeIndex()
+ || pStt->GetNodeIndex() == pAPos->GetNodeIndex())
// Do not try to move the anchor to a table!
&& rMark.GetNode().IsTextNode())
{
@@ -1342,19 +1342,19 @@ SwRedlineSaveData::SwRedlineSaveData(
switch (eCmpPos)
{
case SwComparePosition::OverlapBefore: // Pos1 overlaps Pos2 at the beginning
- m_nEndNode = rEndPos.nNode.GetIndex();
+ m_nEndNode = rEndPos.GetNodeIndex();
m_nEndContent = rEndPos.nContent.GetIndex();
break;
case SwComparePosition::OverlapBehind: // Pos1 overlaps Pos2 at the end
- m_nSttNode = rSttPos.nNode.GetIndex();
+ m_nSttNode = rSttPos.GetNodeIndex();
m_nSttContent = rSttPos.nContent.GetIndex();
break;
case SwComparePosition::Inside: // Pos1 lays completely in Pos2
- m_nSttNode = rSttPos.nNode.GetIndex();
+ m_nSttNode = rSttPos.GetNodeIndex();
m_nSttContent = rSttPos.nContent.GetIndex();
- m_nEndNode = rEndPos.nNode.GetIndex();
+ m_nEndNode = rEndPos.GetNodeIndex();
m_nEndContent = rEndPos.nContent.GetIndex();
break;
@@ -1597,7 +1597,7 @@ static bool IsNotBackspaceHeuristic(
SwPosition const& rStart, SwPosition const& rEnd)
{
// check if the selection is backspace/delete created by DelLeft/DelRight
- if (rStart.nNode.GetIndex() + 1 != rEnd.nNode.GetIndex())
+ if (rStart.GetNodeIndex() + 1 != rEnd.GetNodeIndex())
return true;
if (rEnd.nContent != 0)
return true;
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index 0273160da340..177491361c4e 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -193,7 +193,7 @@ void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrame)
case RndStdIds::FLY_AT_CHAR:
{
const SwFormatAnchor& rAnchor = m_pFrameFormat->GetAnchor();
- m_nNodePagePos = rAnchor.GetContentAnchor()->nNode.GetIndex();
+ m_nNodePagePos = rAnchor.GetContentAnchor()->GetNodeIndex();
m_nContentPos = rAnchor.GetContentAnchor()->nContent.GetIndex();
}
break;
@@ -201,7 +201,7 @@ void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrame)
case RndStdIds::FLY_AT_FLY:
{
const SwFormatAnchor& rAnchor = m_pFrameFormat->GetAnchor();
- m_nNodePagePos = rAnchor.GetContentAnchor()->nNode.GetIndex();
+ m_nNodePagePos = rAnchor.GetContentAnchor()->GetNodeIndex();
}
break;
case RndStdIds::FLY_AT_PAGE:
@@ -243,7 +243,7 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
m_nRndId = rAnchor.GetAnchorId();
if (RndStdIds::FLY_AS_CHAR == m_nRndId)
{
- m_nNodePagePos = pPos->nNode.GetIndex();
+ m_nNodePagePos = pPos->GetNodeIndex();
m_nContentPos = pPos->nContent.GetIndex();
SwTextNode *const pTextNd = pPos->GetNode().GetTextNode();
OSL_ENSURE( pTextNd, "No Textnode found" );
@@ -260,12 +260,12 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
}
else if (RndStdIds::FLY_AT_CHAR == m_nRndId)
{
- m_nNodePagePos = pPos->nNode.GetIndex();
+ m_nNodePagePos = pPos->GetNodeIndex();
m_nContentPos = pPos->nContent.GetIndex();
}
else if ((RndStdIds::FLY_AT_PARA == m_nRndId) || (RndStdIds::FLY_AT_FLY == m_nRndId))
{
- m_nNodePagePos = pPos->nNode.GetIndex();
+ m_nNodePagePos = pPos->GetNodeIndex();
}
else
{
@@ -676,7 +676,7 @@ void SwUndoSetFlyFormat::PutAttr( sal_uInt16 nWhich, const SfxPoolItem* pItem )
[[fallthrough]];
case RndStdIds::FLY_AT_PARA:
case RndStdIds::FLY_AT_FLY:
- m_nOldNode = pAnchor->GetContentAnchor()->nNode.GetIndex();
+ m_nOldNode = pAnchor->GetContentAnchor()->GetNodeIndex();
break;
default:
@@ -693,7 +693,7 @@ void SwUndoSetFlyFormat::PutAttr( sal_uInt16 nWhich, const SfxPoolItem* pItem )
[[fallthrough]];
case RndStdIds::FLY_AT_PARA:
case RndStdIds::FLY_AT_FLY:
- m_nNewNode = pAnchor->GetContentAnchor()->nNode.GetIndex();
+ m_nNewNode = pAnchor->GetContentAnchor()->GetNodeIndex();
break;
default:
diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx
index a9caa1279b73..aab3209d8ab6 100644
--- a/sw/source/core/undo/undraw.cxx
+++ b/sw/source/core/undo/undraw.cxx
@@ -105,7 +105,7 @@ static void lcl_SaveAnchor( SwFrameFormat* pFormat, SwNodeOffset& rNodePos )
(RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId())))
return;
- rNodePos = rAnchor.GetContentAnchor()->nNode.GetIndex();
+ rNodePos = rAnchor.GetContentAnchor()->GetNodeIndex();
sal_Int32 nContentPos = 0;
if (RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId())
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index ffd6830675e0..7ce9c303c42a 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -145,7 +145,7 @@ bool SwUndoInsert::CanGrouping( sal_Unicode cIns )
bool SwUndoInsert::CanGrouping( const SwPosition& rPos )
{
bool bRet = false;
- if( m_nNode == rPos.nNode.GetIndex() &&
+ if( m_nNode == rPos.GetNodeIndex() &&
m_nContent == rPos.nContent.GetIndex() )
{
// consider Redline
@@ -263,7 +263,7 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext)
RemoveIdxFromRange( aPaM, false );
}
- nNd = aPaM.GetPoint()->nNode.GetIndex();
+ nNd = aPaM.GetPoint()->GetNodeIndex();
nCnt = aPaM.GetPoint()->nContent.GetIndex();
if (!maText)
@@ -272,7 +272,7 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext)
new SwNodeIndex(m_pDoc->GetNodes().GetEndOfContent()));
MoveToUndoNds(aPaM, m_pUndoNodeIndex.get());
}
- m_nNode = aPaM.GetPoint()->nNode.GetIndex();
+ m_nNode = aPaM.GetPoint()->GetNodeIndex();
m_nContent = aPaM.GetPoint()->nContent.GetIndex();
}
@@ -348,7 +348,7 @@ void SwUndoInsert::RedoImpl(::sw::UndoRedoContext & rContext)
m_pUndoNodeIndex.reset();
MoveFromUndoNds(*pTmpDoc, nMvNd, *pPam->GetMark());
}
- m_nNode = pPam->GetMark()->nNode.GetIndex();
+ m_nNode = pPam->GetMark()->GetNodeIndex();
m_nContent = pPam->GetMark()->nContent.GetIndex();
MovePtForward( *pPam, bMvBkwrd );
@@ -589,11 +589,11 @@ SwUndoReplace::Impl::Impl(
auto [pStt, pEnd] = rPam.StartEnd(); // SwPosition*
- m_nSttNd = m_nEndNd = pStt->nNode.GetIndex();
+ m_nSttNd = m_nEndNd = pStt->GetNodeIndex();
m_nSttCnt = pStt->nContent.GetIndex();
m_nSelEnd = m_nEndCnt = pEnd->nContent.GetIndex();
- m_bSplitNext = m_nSttNd != pEnd->nNode.GetIndex();
+ m_bSplitNext = m_nSttNd != pEnd->GetNodeIndex();
SwTextNode* pNd = pStt->GetNode().GetTextNode();
OSL_ENSURE( pNd, "Dude, where's my TextNode?" );
@@ -603,7 +603,7 @@ SwUndoReplace::Impl::Impl(
m_nSetPos = m_pHistory->Count();
- SwNodeOffset nNewPos = pStt->nNode.GetIndex();
+ SwNodeOffset nNewPos = pStt->GetNodeIndex();
m_nOffset = m_nSttNd - nNewPos;
if ( pNd->GetpSwpHints() )
@@ -770,12 +770,12 @@ void SwUndoReplace::Impl::RedoImpl(::sw::UndoRedoContext & rContext)
void SwUndoReplace::Impl::SetEnd(SwPaM const& rPam)
{
const SwPosition* pEnd = rPam.End();
- m_nEndNd = m_nOffset + pEnd->nNode.GetIndex();
+ m_nEndNd = m_nOffset + pEnd->GetNodeIndex();
m_nEndCnt = pEnd->nContent.GetIndex();
}
SwUndoReRead::SwUndoReRead( const SwPaM& rPam, const SwGrfNode& rGrfNd )
- : SwUndo( SwUndoId::REREAD, &rPam.GetDoc() ), mnPosition( rPam.GetPoint()->nNode.GetIndex() )
+ : SwUndo( SwUndoId::REREAD, &rPam.GetDoc() ), mnPosition( rPam.GetPoint()->GetNodeIndex() )
{
SaveGraphicData( rGrfNd );
}
diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx
index d91617394de7..07886e80cddf 100644
--- a/sw/source/core/undo/unmove.cxx
+++ b/sw/source/core/undo/unmove.cxx
@@ -32,7 +32,7 @@ SwUndoMove::SwUndoMove( const SwPaM& rRange, const SwPosition& rMvPos )
, m_nDestStartNode(0)
, m_nDestEndNode(0)
, m_nInsPosNode(0)
- , m_nMoveDestNode(rMvPos.nNode.GetIndex())
+ , m_nMoveDestNode(rMvPos.GetNodeIndex())
, m_nDestStartContent(0)
, m_nDestEndContent(0)
, m_nInsPosContent(0)
@@ -292,7 +292,7 @@ void SwUndoMove::DelFootnote( const SwPaM& rRange )
SwDoc& rDoc = rRange.GetDoc();
SwNodeOffset nContentStt = rDoc.GetNodes().GetEndOfAutotext().GetIndex();
if( m_nMoveDestNode < nContentStt &&
- rRange.GetPoint()->nNode.GetIndex() >= nContentStt )
+ rRange.GetPoint()->GetNodeIndex() >= nContentStt )
{
// delete all footnotes since they are undesired there
DelContentIndex( *rRange.GetMark(), *rRange.GetPoint(),
diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx
index ac2592b3844f..69cf6b8a809f 100644
--- a/sw/source/core/undo/unnum.cxx
+++ b/sw/source/core/undo/unnum.cxx
@@ -52,7 +52,7 @@ SwUndoInsNum::SwUndoInsNum( const SwPosition& rPos, const SwNumRule& rRule,
// No selection!
m_nEndNode = SwNodeOffset(0);
m_nEndContent = COMPLETE_STRING;
- m_nSttNode = rPos.nNode.GetIndex();
+ m_nSttNode = rPos.GetNodeIndex();
m_nSttContent = rPos.nContent.GetIndex();
}
@@ -325,14 +325,14 @@ void SwUndoNumOrNoNum::RepeatImpl(::sw::RepeatContext & rContext)
SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, bool bFlg )
: SwUndo( SwUndoId::SETNUMRULESTART, &rPos.GetDoc() ),
- m_nIndex( rPos.nNode.GetIndex() ), m_nOldStart( USHRT_MAX ),
+ m_nIndex( rPos.GetNodeIndex() ), m_nOldStart( USHRT_MAX ),
m_nNewStart( USHRT_MAX ), m_bSetStartValue( false ), m_bFlag( bFlg )
{
}
SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, sal_uInt16 nStt )
: SwUndo(SwUndoId::SETNUMRULESTART, &rPos.GetDoc())
- , m_nIndex(rPos.nNode.GetIndex())
+ , m_nIndex(rPos.GetNodeIndex())
, m_nOldStart(USHRT_MAX)
, m_nNewStart(nStt)
, m_bSetStartValue(true)
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index 5128eaed3872..aa442593c826 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -48,7 +48,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc& rDoc, SwPosition& rPos,
assert(pTextNd);
sal_Int32 const nTextNdLen = pTextNd->GetText().getLength();
- m_nStartNode = rPos.nNode.GetIndex();
+ m_nStartNode = rPos.GetNodeIndex();
m_nStartContent = rPos.nContent.GetIndex();
if( !rDoc.getIDocumentRedlineAccess().IsIgnoreRedline() && !rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() )
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index 7203479b150e..2f074d2b0363 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -336,7 +336,7 @@ void SwUndoRedlineSort::UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
auto [pStart, pEnd] = rPam.StartEnd(); // SwPosition*
SwNodeIndex aPrevIdx( pStart->nNode, -1 );
- SwNodeOffset nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
+ SwNodeOffset nOffsetTemp = pEnd->GetNodeIndex() - pStart->GetNodeIndex();
if( !( RedlineFlags::ShowDelete & rDoc.getIDocumentRedlineAccess().GetRedlineFlags()) )
{
@@ -385,7 +385,7 @@ void SwUndoRedlineSort::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
auto [pStart, pEnd] = pPam->StartEnd(); // SwPosition*
SwNodeIndex aPrevIdx( pStart->nNode, -1 );
- SwNodeOffset nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
+ SwNodeOffset nOffsetTemp = pEnd->GetNodeIndex() - pStart->GetNodeIndex();
const sal_Int32 nCntStt = pStart->nContent.GetIndex();
rDoc.SortText(rPam, *m_pOpt);
@@ -418,7 +418,7 @@ void SwUndoRedlineSort::RepeatImpl(::sw::RepeatContext & rContext)
void SwUndoRedlineSort::SetSaveRange( const SwPaM& rRange )
{
const SwPosition& rPos = *rRange.End();
- m_nSaveEndNode = rPos.nNode.GetIndex();
+ m_nSaveEndNode = rPos.GetNodeIndex();
m_nSaveEndContent = rPos.nContent.GetIndex();
}
diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx
index c3c65970efac..20f467859805 100644
--- a/sw/source/core/undo/unspnd.cxx
+++ b/sw/source/core/undo/unspnd.cxx
@@ -39,7 +39,7 @@
SwUndoSplitNode::SwUndoSplitNode( SwDoc& rDoc, const SwPosition& rPos,
bool bChkTable )
- : SwUndo( SwUndoId::SPLITNODE, &rDoc ), m_nNode( rPos.nNode.GetIndex() ),
+ : SwUndo( SwUndoId::SPLITNODE, &rDoc ), m_nNode( rPos.GetNodeIndex() ),
m_nContent( rPos.nContent.GetIndex() ),
m_bTableFlag( false ), m_bCheckTableStart( bChkTable )
{
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index c488009c1cf2..5c2dd6225862 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -238,7 +238,7 @@ SwUndoInsTable::SwUndoInsTable( const SwPosition& rPos, sal_uInt16 nCl, sal_uInt
const OUString & rName)
: SwUndo( SwUndoId::INSTABLE, &rPos.GetDoc() ),
m_aInsTableOptions( rInsTableOpts ),
- m_nStartNode( rPos.nNode.GetIndex() ), m_nRows( nRw ), m_nColumns( nCl ), m_nAdjust( nAdj )
+ m_nStartNode( rPos.GetNodeIndex() ), m_nRows( nRw ), m_nColumns( nCl ), m_nAdjust( nAdj )
{
if( pColArr )
{
@@ -438,8 +438,8 @@ SwUndoTableToText::SwUndoTableToText( const SwTable& rTable, sal_Unicode cCh )
if (pAPos &&
((RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId()) ||
(RndStdIds::FLY_AT_PARA == pAnchor->GetAnchorId())) &&
- nTableStt <= pAPos->nNode.GetIndex() &&
- pAPos->nNode.GetIndex() < nTableEnd )
+ nTableStt <= pAPos->GetNodeIndex() &&
+ pAPos->GetNodeIndex() < nTableEnd )
{
m_pHistory->AddChangeFlyAnchor(*pFormat);
}
@@ -720,7 +720,7 @@ SwUndoTextToTable::SwUndoTextToTable( const SwPaM& rRg,
SwNodes& rNds = rRg.GetDoc().GetNodes();
m_bSplitEnd = pEnd->nContent.GetIndex() && ( pEnd->nContent.GetIndex()
!= pEnd->GetNode().GetContentNode()->Len() ||
- pEnd->nNode.GetIndex() >= rNds.GetEndOfContent().GetIndex()-1 );
+ pEnd->GetNodeIndex() >= rNds.GetEndOfContent().GetIndex()-1 );
}
SwUndoTextToTable::~SwUndoTextToTable()
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index df8f059663cf..820333ddc70b 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -48,7 +48,7 @@ GetFlysAnchoredAt(SwDoc & rDoc, SwNodeOffset const nSttNode)
SwFormatAnchor const*const pAnchor = &pFormat->GetAnchor();
SwPosition const*const pAPos = pAnchor->GetContentAnchor();
if (pAPos
- && nSttNode == pAPos->nNode.GetIndex()
+ && nSttNode == pAPos->GetNodeIndex()
&& ((pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA)
|| (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_CHAR)))
{
@@ -115,7 +115,7 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool bScanFlys,
SwNodeOffset const nDeleteTextNodes)
{
const SwPosition* pTmpPos = rPam.End();
- m_nEndNode = pTmpPos->nNode.GetIndex();
+ m_nEndNode = pTmpPos->GetNodeIndex();
m_nEndContent = pTmpPos->nContent.GetIndex();
if( rPam.HasMark() )
{
@@ -124,7 +124,7 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool bScanFlys,
else
pTmpPos = rPam.GetPoint();
- m_nSttNode = pTmpPos->nNode.GetIndex();
+ m_nSttNode = pTmpPos->GetNodeIndex();
m_nSttContent = pTmpPos->nContent.GetIndex();
m_nDeleteTextNodes = nDeleteTextNodes;
@@ -182,8 +182,8 @@ bool SwUndoInserts::IsCreateUndoForNewFly(SwFormatAnchor const& rAnchor,
return pAnchorPos != nullptr
&& ( rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA
|| rAnchor.GetAnchorId() == RndStdIds::FLY_AT_CHAR)
- && ( nStartNode == pAnchorPos->nNode.GetIndex()
- || nEndNode == pAnchorPos->nNode.GetIndex());
+ && ( nStartNode == pAnchorPos->GetNodeIndex()
+ || nEndNode == pAnchorPos->GetNodeIndex());
}
void SwUndoInserts::dumpAsXml(xmlTextWriterPtr pWriter) const
@@ -293,22 +293,22 @@ void SwUndoInserts::UndoImpl(::sw::UndoRedoContext & rContext)
// indexes
if (!m_FlyUndos.empty())
{
- SwNodeOffset nTmp = rPam.GetPoint()->nNode.GetIndex();
+ SwNodeOffset nTmp = rPam.GetPoint()->GetNodeIndex();
for (size_t n = m_FlyUndos.size(); 0 < n; --n)
{
m_FlyUndos[ n-1 ]->UndoImpl(rContext);
}
- m_nNodeDiff += nTmp - rPam.GetPoint()->nNode.GetIndex();
+ m_nNodeDiff += nTmp - rPam.GetPoint()->GetNodeIndex();
}
if (m_nSttNode != m_nEndNode || m_nSttContent != m_nEndContent)
{
// are there Footnotes or ContentFlyFrames in text?
m_nSetPos = m_pHistory->Count();
- SwNodeOffset nTmp = rPam.GetMark()->nNode.GetIndex();
+ SwNodeOffset nTmp = rPam.GetMark()->GetNodeIndex();
DelContentIndex(*rPam.GetMark(), *rPam.GetPoint(),
DelContentType::AllMask|DelContentType::ExcludeFlyAtStartEnd);
- m_nNodeDiff += nTmp - rPam.GetMark()->nNode.GetIndex();
+ m_nNodeDiff += nTmp - rPam.GetMark()->GetNodeIndex();
if( *rPam.GetPoint() != *rPam.GetMark() )
{
m_pUndoNodeIndex.reset(
@@ -390,7 +390,7 @@ void SwUndoInserts::RedoImpl(::sw::UndoRedoContext & rContext)
if( ( m_nSttNode != m_nEndNode || m_nSttContent != m_nEndContent ) && m_pUndoNodeIndex)
{
auto const pFlysAtInsPos(sw::GetFlysAnchoredAt(rDoc,
- rPam.GetPoint()->nNode.GetIndex()));
+ rPam.GetPoint()->GetNodeIndex()));
const bool bMvBkwrd = MovePtBackward(rPam);
diff --git a/sw/source/core/unocore/unocrsr.cxx b/sw/source/core/unocore/unocrsr.cxx
index 91bf3b31c93e..92dbd6e5b25b 100644
--- a/sw/source/core/unocore/unocrsr.cxx
+++ b/sw/source/core/unocore/unocrsr.cxx
@@ -183,7 +183,7 @@ void SwUnoTableCursor::MakeBoxSels()
{
const SwContentNode* pCNd;
bool bMakeTableCursors = true;
- if( GetPoint()->nNode.GetIndex() && GetMark()->nNode.GetIndex() &&
+ if( GetPoint()->GetNodeIndex() && GetMark()->GetNodeIndex() &&
nullptr != ( pCNd = GetContentNode() ) && pCNd->getLayoutFrame( pCNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout() ) &&
nullptr != ( pCNd = GetContentNode(false) ) && pCNd->getLayoutFrame( pCNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout() ) )
bMakeTableCursors = GetDoc().getIDocumentLayoutAccess().GetCurrentLayout()->MakeTableCursors( *this );
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 2fbbd8312bc2..088f826eeddc 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -579,7 +579,7 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry
{
const SwPosition *pPos = rPam.Start();
const SwTextNode *pTextNd =
- rPam.GetDoc().GetNodes()[pPos->nNode.GetIndex()]->GetTextNode();
+ rPam.GetDoc().GetNodes()[pPos->GetNodeIndex()]->GetTextNode();
const SwTextAttr* pTextAttr = pTextNd
? pTextNd->GetFieldTextAttrAt( pPos->nContent.GetIndex(), true )
: nullptr;
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index ce29a60a264d..e8edade0ad47 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -617,8 +617,8 @@ SwUnoCursorHelper::GetCurTextFormatColl(SwPaM & rPaM, const bool bConditional)
SwPaM *pTmpCursor = &rPaM;
do
{
- const SwNodeOffset nSttNd = pTmpCursor->Start()->nNode.GetIndex();
- const SwNodeOffset nEndNd = pTmpCursor->End()->nNode.GetIndex();
+ const SwNodeOffset nSttNd = pTmpCursor->Start()->GetNodeIndex();
+ const SwNodeOffset nEndNd = pTmpCursor->End()->GetNodeIndex();
if( nEndNd - nSttNd >= SwNodeOffset(nMaxLookup) )
{
@@ -2853,7 +2853,7 @@ SwXTextCursor::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor)
SwPosition & rEnd = *rUnoCursor.End();
SwNodeIndex aPrevIdx( rStart.nNode, -1 );
- const SwNodeOffset nOffset = rEnd.nNode.GetIndex() - rStart.nNode.GetIndex();
+ const SwNodeOffset nOffset = rEnd.GetNodeIndex() - rStart.GetNodeIndex();
const sal_Int32 nCntStt = rStart.nContent.GetIndex();
rUnoCursor.GetDoc().SortText(rUnoCursor, aSortOpt);
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index ce84947aca13..143802804803 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -303,8 +303,8 @@ void SwUnoCursorHelper::GetCursorAttr(SwPaM & rPam,
{
SwPosition const & rStart( *rCurrent.Start() );
SwPosition const & rEnd( *rCurrent.End() );
- const SwNodeOffset nSttNd = rStart.nNode.GetIndex();
- const SwNodeOffset nEndNd = rEnd .nNode.GetIndex();
+ const SwNodeOffset nSttNd = rStart.GetNodeIndex();
+ const SwNodeOffset nEndNd = rEnd .GetNodeIndex();
if (nEndNd - nSttNd >= SwNodeOffset(nMaxLookup))
{
@@ -388,7 +388,7 @@ struct SwXParagraphEnumerationImpl final : public SwXParagraphEnumeration
// for import of tables in tables we have to remember the actual
// table and start node of the current position in the enumeration.
, m_pOwnTable( pTable )
- , m_nEndIndex( pCursor->End()->nNode.GetIndex() )
+ , m_nEndIndex( pCursor->End()->GetNodeIndex() )
, m_nFirstParaStart( -1 )
, m_nLastParaEnd( -1 )
, m_bFirstParagraph( true )
@@ -512,8 +512,8 @@ lcl_CursorIsInSection(
if (pUnoCursor && pOwnStartNode)
{
const SwEndNode * pOwnEndNode = pOwnStartNode->EndOfSectionNode();
- bRes = pOwnStartNode->GetIndex() <= pUnoCursor->Start()->nNode.GetIndex() &&
- pUnoCursor->End()->nNode.GetIndex() <= pOwnEndNode->GetIndex();
+ bRes = pOwnStartNode->GetIndex() <= pUnoCursor->Start()->GetNodeIndex() &&
+ pUnoCursor->End()->GetNodeIndex() <= pOwnEndNode->GetIndex();
}
return bRes;
}
@@ -523,7 +523,7 @@ bool SwXParagraphEnumerationImpl::IgnoreLastElement(SwUnoCursor& rCursor, bool b
// Ignore the last element of a selection enumeration if this is a stub
// paragraph (directly after table, selection ends at paragraph start).
- if (rCursor.Start()->nNode.GetIndex() != m_nEndIndex)
+ if (rCursor.Start()->GetNodeIndex() != m_nEndIndex)
return false;
if (m_eCursorType != CursorType::Selection)
@@ -567,7 +567,7 @@ SwXParagraphEnumerationImpl::NextElement_Impl()
{
aNewCursor->MovePara(GoNextPara, fnParaStart);
}
- if (m_nEndIndex < aNewCursor->Start()->nNode.GetIndex())
+ if (m_nEndIndex < aNewCursor->Start()->GetNodeIndex())
{
return nullptr;
}
@@ -609,7 +609,7 @@ SwXParagraphEnumerationImpl::NextElement_Impl()
{
// This is a selection, check if the cursor would go past the end
// of the selection.
- if (rUnoCursor.Start()->nNode.GetIndex() > m_nEndIndex)
+ if (rUnoCursor.Start()->GetNodeIndex() > m_nEndIndex)
return nullptr;
}
@@ -617,7 +617,7 @@ SwXParagraphEnumerationImpl::NextElement_Impl()
const sal_Int32 nFirstContent =
m_bFirstParagraph ? m_nFirstParaStart : -1;
const sal_Int32 nLastContent =
- (m_nEndIndex == pStart->nNode.GetIndex()) ? m_nLastParaEnd : -1;
+ (m_nEndIndex == pStart->GetNodeIndex()) ? m_nLastParaEnd : -1;
// position in a table, or in a simple paragraph?
SwTableNode * pTableNode = rUnoCursor.GetNode().FindTableNode();
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 5de3a185d6bc..53fa90128e47 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1714,8 +1714,8 @@ SwXText::convertToTextFrame(
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
if ( !isGraphicNode(pFrameFormat) &&
(RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId() || RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId()) &&
- pStartPam->Start()->nNode.GetIndex() <= rAnchor.GetContentAnchor()->nNode.GetIndex() &&
- pStartPam->End()->nNode.GetIndex() >= rAnchor.GetContentAnchor()->nNode.GetIndex())
+ pStartPam->Start()->GetNodeIndex() <= rAnchor.GetContentAnchor()->GetNodeIndex() &&
+ pStartPam->End()->GetNodeIndex() >= rAnchor.GetContentAnchor()->GetNodeIndex())
{
if (pFrameFormat->GetName().isEmpty())
{
@@ -1945,7 +1945,7 @@ void SwXText::Impl::ConvertCell(
// we must reach zero at the end and must not go below zero
tools::Long nOpenNodeBlock = 0;
SwNodeIndex aCellIndex = aStartCellPam.Start()->nNode;
- while (aCellIndex < aEndCellPam.End()->nNode.GetIndex())
+ while (aCellIndex < aEndCellPam.End()->GetNodeIndex())
{
if (aCellIndex.GetNode().IsStartNode())
{
@@ -1985,7 +1985,7 @@ void SwXText::Impl::ConvertCell(
{
// check the predecessor
const SwNodeOffset nStartCellNodeIndex =
- aStartCellPam.Start()->nNode.GetIndex();
+ aStartCellPam.Start()->GetNodeIndex();
const SwNodeOffset nLastNodeEndIndex = pLastCell->aEnd.GetIndex();
if (nLastNodeEndIndex == nStartCellNodeIndex)
{
@@ -1996,7 +1996,7 @@ void SwXText::Impl::ConvertCell(
}
m_pDoc->getIDocumentContentOperations().SplitNode(*aStartCellPam.Start(), false);
- SwNodeOffset const nNewIndex(aStartCellPam.Start()->nNode.GetIndex());
+ SwNodeOffset const nNewIndex(aStartCellPam.Start()->GetNodeIndex());
if (nNewIndex != nStartCellNodeIndex)
{
// aStartCellPam now points to the 2nd node
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index 130c0572bfc5..ebcf5965616e 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -191,8 +191,8 @@ public:
return false;
}
SwRangeRedline const*const pRedline(m_rIDRA.GetRedlineTable()[m_nextRedline]);
- return pRedline->Start()->nNode.GetIndex() < m_rNode.GetIndex()
- && m_rNode.GetIndex() < pRedline->End()->nNode.GetIndex();
+ return pRedline->Start()->GetNodeIndex() < m_rNode.GetIndex()
+ && m_rNode.GetIndex() < pRedline->End()->GetNodeIndex();
}
std::pair<sal_Int32, sal_Int32> GetNextRedlineSkip()
@@ -207,14 +207,14 @@ public:
continue;
}
auto [pStart, pEnd] = pRedline->StartEnd(); // SwPosition*
- if (m_rNode.GetIndex() < pStart->nNode.GetIndex())
+ if (m_rNode.GetIndex() < pStart->GetNodeIndex())
{
m_nextRedline = SwRedlineTable::npos;
break; // done
}
if (nRedlineStart == COMPLETE_STRING)
{
- nRedlineStart = pStart->nNode.GetIndex() == m_rNode.GetIndex()
+ nRedlineStart = pStart->GetNodeIndex() == m_rNode.GetIndex()
? pStart->nContent.GetIndex()
: 0;
}
@@ -226,7 +226,7 @@ public:
break; // no increment, revisit it next call
}
}
- nRedlineEnd = pEnd->nNode.GetIndex() == m_rNode.GetIndex()
+ nRedlineEnd = pEnd->GetNodeIndex() == m_rNode.GetIndex()
? pEnd->nContent.GetIndex()
: COMPLETE_STRING;
}
diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx
index 75781fe04a79..5e4480524f43 100644
--- a/sw/source/filter/ascii/wrtasc.cxx
+++ b/sw/source/filter/ascii/wrtasc.cxx
@@ -122,8 +122,8 @@ ErrCode SwASCWriter::WriteStream()
// Output all areas of the pam into the ASC file
do {
bool bTstFly = true;
- while( m_pCurrentPam->GetPoint()->nNode.GetIndex() < m_pCurrentPam->GetMark()->nNode.GetIndex() ||
- (m_pCurrentPam->GetPoint()->nNode.GetIndex() == m_pCurrentPam->GetMark()->nNode.GetIndex() &&
+ while( m_pCurrentPam->GetPoint()->GetNodeIndex() < m_pCurrentPam->GetMark()->GetNodeIndex() ||
+ (m_pCurrentPam->GetPoint()->GetNodeIndex() == m_pCurrentPam->GetMark()->GetNodeIndex() &&
m_pCurrentPam->GetPoint()->nContent.GetIndex() <= m_pCurrentPam->GetMark()->nContent.GetIndex()) )
{
SwTextNode* pNd = m_pCurrentPam->GetPoint()->GetNode().GetTextNode();
@@ -140,7 +140,7 @@ ErrCode SwASCWriter::WriteStream()
m_pDoc->GetNodes().GetEndOfContent().GetIndex() &&
// And exactly this one is selected
m_pDoc->GetNodes().GetEndOfContent().GetIndex() - 1 ==
- m_pCurrentPam->GetPoint()->nNode.GetIndex() )
+ m_pCurrentPam->GetPoint()->GetNodeIndex() )
{
// Print the frame's content.
// It is always at position 0!
@@ -195,7 +195,7 @@ ErrCode SwASCWriter::WriteStream()
break;
if( m_bShowProgress )
- ::SetProgressState( sal_Int32(m_pCurrentPam->GetPoint()->nNode.GetIndex()),
+ ::SetProgressState( sal_Int32(m_pCurrentPam->GetPoint()->GetNodeIndex()),
m_pDoc->GetDocShell() ); // How far?
}
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx
index 93fb744df83a..c2db52c4cb64 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -183,7 +183,7 @@ SwFltControlStack::~SwFltControlStack()
// same paragraph further out by one character.
void SwFltControlStack::MoveAttrs(const SwPosition& rPos, MoveAttrsMode eMode)
{
- SwNodeOffset nPosNd = rPos.nNode.GetIndex();
+ SwNodeOffset nPosNd = rPos.GetNodeIndex();
sal_uInt16 nPosCt = rPos.nContent.GetIndex() - 1;
for (size_t i = 0, nCnt = m_Entries.size(); i < nCnt; ++i)
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 67ba9d9e635e..47655081cd56 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -247,8 +247,8 @@ ErrCode SwReader::Read( const Reader& rOptions )
if ( (RndStdIds::FLY_AT_PAGE == rAnchor.GetAnchorId())
// TODO: why is this not handled via SetInsertRange?
|| SwUndoInserts::IsCreateUndoForNewFly(rAnchor,
- pUndoPam->GetPoint()->nNode.GetIndex(),
- pUndoPam->GetMark()->nNode.GetIndex()))
+ pUndoPam->GetPoint()->GetNodeIndex(),
+ pUndoPam->GetMark()->GetNodeIndex()))
{
if( bChkHeaderFooter &&
(RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()) &&
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index b18549e1c113..6c489783aca0 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -3033,7 +3033,7 @@ static Writer& OutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep( Writer& rWrt,
if( !rHTMLWrt.IsCSS1Source( CSS1_OUTMODE_PARA ) ||
!rHTMLWrt.m_bCSS1IgnoreFirstPageDesc ||
rHTMLWrt.m_pStartNdIdx->GetIndex() !=
- rHTMLWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex() )
+ rHTMLWrt.m_pCurrentPam->GetPoint()->GetNodeIndex() )
pPDescItem = rItemSet.GetItemIfSet( RES_PAGEDESC, bDeep );
const SvxFormatKeepItem *pKeepItem = rItemSet.GetItemIfSet( RES_KEEP, bDeep );
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index db67572c545c..41afa3638a85 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -584,8 +584,8 @@ static void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
: rFormat.GetULSpace();
if( (rHWrt.m_bOutHeader &&
- rWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex() ==
- rWrt.m_pCurrentPam->GetMark()->nNode.GetIndex()) ||
+ rWrt.m_pCurrentPam->GetPoint()->GetNodeIndex() ==
+ rWrt.m_pCurrentPam->GetMark()->GetNodeIndex()) ||
rHWrt.m_bOutFooter )
{
if( rHWrt.m_bCfgOutStyles )
@@ -625,8 +625,8 @@ static void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
// Consider the lower spacing of the paragraph? (never in the last
// paragraph of tables)
bool bUseParSpace = !rHWrt.m_bOutTable ||
- (rWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex() !=
- rWrt.m_pCurrentPam->GetMark()->nNode.GetIndex());
+ (rWrt.m_pCurrentPam->GetPoint()->GetNodeIndex() !=
+ rWrt.m_pCurrentPam->GetMark()->GetNodeIndex());
// If styles are exported, indented paragraphs become definition lists
const SvxLRSpaceItem& rLRSpace =
pNodeItemSet ? pNodeItemSet->Get(RES_LR_SPACE)
@@ -657,7 +657,7 @@ static void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
}
bool bIsNextTextNode =
- rWrt.m_pDoc->GetNodes()[rWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex()+1]
+ rWrt.m_pDoc->GetNodes()[rWrt.m_pCurrentPam->GetPoint()->GetNodeIndex()+1]
->IsTextNode();
if( bForceDL && bDT )
@@ -2106,7 +2106,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
40 == pFontHeightItem->GetHeight() )
{
// ... moreover, the 2pt font is set ...
- SwNodeOffset nNdPos = rWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex();
+ SwNodeOffset nNdPos = rWrt.m_pCurrentPam->GetPoint()->GetNodeIndex();
const SwNode *pNextNd = rWrt.m_pDoc->GetNodes()[nNdPos+1];
const SwNode *pPrevNd = rWrt.m_pDoc->GetNodes()[nNdPos-1];
bool bStdColl = nPoolId == RES_POOLCOLL_STANDARD;
@@ -2133,7 +2133,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
bool bPageBreakBehind = false;
if( rHTMLWrt.m_bCfgFormFeed &&
!(rHTMLWrt.m_bOutTable || rHTMLWrt.m_bOutFlyFrame) &&
- rHTMLWrt.m_pStartNdIdx->GetIndex() != rHTMLWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex() )
+ rHTMLWrt.m_pStartNdIdx->GetIndex() != rHTMLWrt.m_pCurrentPam->GetPoint()->GetNodeIndex() )
{
bool bPageBreakBefore = false;
const SfxItemSet* pItemSet = pNd->GetpSwAttrSet();
@@ -2528,8 +2528,8 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
if( bWriteBreak )
{
bool bEndOfCell = rHTMLWrt.m_bOutTable &&
- rWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex() ==
- rWrt.m_pCurrentPam->GetMark()->nNode.GetIndex();
+ rWrt.m_pCurrentPam->GetPoint()->GetNodeIndex() ==
+ rWrt.m_pCurrentPam->GetMark()->GetNodeIndex();
if( bEndOfCell && !nEnd &&
rHTMLWrt.IsHTMLMode(HTMLMODE_NBSP_IN_TABLES) )
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index ff1fbff03c93..30d21fb30609 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -266,7 +266,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
if( bMoveBack )
m_pPam->Move( fnMoveForward );
- assert(m_pPam->GetPoint()->nNode.GetIndex() == nOld);
+ assert(m_pPam->GetPoint()->GetNodeIndex() == nOld);
}
void SwHTMLParser::SaveDocContext( HTMLAttrContext *pCntxt,
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index 6677b620f8d9..6889ad4fee2c 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -617,7 +617,7 @@ void SwHTMLParser::InsertComment( const OUString& rComment, const char *pTag )
{
bMoveFwd = true;
- SwNodeOffset nNodeIdx = m_pPam->GetPoint()->nNode.GetIndex();
+ SwNodeOffset nNodeIdx = m_pPam->GetPoint()->GetNodeIndex();
const sal_Int32 nIdx = m_pPam->GetPoint()->nContent.GetIndex();
for( auto i = m_aSetAttrTab.size(); i > 0; )
{
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index 5b08ad274f3c..4efee1377701 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -2224,7 +2224,7 @@ void SwHTMLWriter::AddLinkTarget( const OUString& rURL )
SwPosition aPos( *m_pCurrentPam->GetPoint() );
if( m_pDoc->GotoOutline( aPos, aOutline ) )
{
- SwNodeOffset nIdx = aPos.nNode.GetIndex();
+ SwNodeOffset nIdx = aPos.GetNodeIndex();
decltype(m_aOutlineMarkPoss)::size_type nIns=0;
while( nIns < m_aOutlineMarkPoss.size() &&
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index e810c2420101..72c9e351a67e 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -211,7 +211,7 @@ static bool lcl_html_isHTMLControl( sal_Int16 nClassId )
bool SwHTMLWriter::HasControls() const
{
- SwNodeOffset nStartIdx = m_pCurrentPam->GetPoint()->nNode.GetIndex();
+ SwNodeOffset nStartIdx = m_pCurrentPam->GetPoint()->GetNodeIndex();
size_t i = 0;
// Skip all controls in front of the current paragraph
@@ -240,7 +240,7 @@ void SwHTMLWriter::OutForm( bool bTag_On, const SwStartNode *pStartNd )
uno::Reference< container::XIndexContainer > xNewFormComps;
SwNodeOffset nStartIdx = pStartNd ? pStartNd->GetIndex()
- : m_pCurrentPam->GetPoint()->nNode.GetIndex();
+ : m_pCurrentPam->GetPoint()->GetNodeIndex();
// skip controls before the interesting area
size_t i = 0;
@@ -1338,7 +1338,7 @@ void SwHTMLWriter::GetControls()
if( !pSdrObj )
continue;
- AddControl( m_aHTMLControls, dynamic_cast<const SdrUnoObj&>(*pSdrObj), pPos->nNode.GetIndex() );
+ AddControl( m_aHTMLControls, dynamic_cast<const SdrUnoObj&>(*pSdrObj), pPos->GetNodeIndex() );
}
}
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 1040877afe48..ba5d09dce50a 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -1368,7 +1368,7 @@ void SwHTMLParser::InsertBookmark( const OUString& rName )
bool SwHTMLParser::HasCurrentParaBookmarks( bool bIgnoreStack ) const
{
bool bHasMarks = false;
- SwNodeOffset nNodeIdx = m_pPam->GetPoint()->nNode.GetIndex();
+ SwNodeOffset nNodeIdx = m_pPam->GetPoint()->GetNodeIndex();
// first step: are there still bookmark in the attribute-stack?
// bookmarks are added to the end of the stack - thus we only have
@@ -1397,7 +1397,7 @@ bool SwHTMLParser::HasCurrentParaBookmarks( bool bIgnoreStack ) const
{
const ::sw::mark::IMark* pBookmark = *ppMark;
- const SwNodeOffset nBookNdIdx = pBookmark->GetMarkPos().nNode.GetIndex();
+ const SwNodeOffset nBookNdIdx = pBookmark->GetMarkPos().GetNodeIndex();
if( nBookNdIdx==nNodeIdx )
{
bHasMarks = true;
@@ -1418,7 +1418,7 @@ void SwHTMLParser::StripTrailingPara()
bool bSetSmallFont = false;
SwContentNode* pCNd = m_pPam->GetContentNode();
- SwNodeOffset nNodeIdx = m_pPam->GetPoint()->nNode.GetIndex();
+ SwNodeOffset nNodeIdx = m_pPam->GetPoint()->GetNodeIndex();
if( !m_pPam->GetPoint()->nContent.GetIndex() )
{
if( pCNd && pCNd->StartOfSectionIndex() + 2 <
@@ -1462,7 +1462,7 @@ void SwHTMLParser::StripTrailingPara()
{
::sw::mark::IMark* pMark = *ppMark;
- SwNodeOffset nBookNdIdx = pMark->GetMarkPos().nNode.GetIndex();
+ SwNodeOffset nBookNdIdx = pMark->GetMarkPos().GetNodeIndex();
if(nBookNdIdx==nNodeIdx)
{
SwNodeIndex nNewNdIdx(m_pPam->GetPoint()->nNode);
diff --git a/sw/source/filter/html/htmlnumwriter.cxx b/sw/source/filter/html/htmlnumwriter.cxx
index f41ac73929f9..6a353af603d6 100644
--- a/sw/source/filter/html/htmlnumwriter.cxx
+++ b/sw/source/filter/html/htmlnumwriter.cxx
@@ -37,7 +37,7 @@ void SwHTMLWriter::FillNextNumInfo()
{
m_pNextNumRuleInfo = nullptr;
- SwNodeOffset nPos = m_pCurrentPam->GetPoint()->nNode.GetIndex() + 1;
+ SwNodeOffset nPos = m_pCurrentPam->GetPoint()->GetNodeIndex() + 1;
bool bTable = false;
do
@@ -99,7 +99,7 @@ Writer& OutHTML_NumberBulletListStart( SwHTMLWriter& rWrt,
{
// If the list only consists of non-numbered text nodes, then don't start the list.
bool bAtLeastOneNumbered = false;
- SwNodeOffset nPos = rWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex() + 1;
+ SwNodeOffset nPos = rWrt.m_pCurrentPam->GetPoint()->GetNodeIndex() + 1;
SwNumRule* pNumRule = nullptr;
while (true)
{
@@ -150,7 +150,7 @@ Writer& OutHTML_NumberBulletListStart( SwHTMLWriter& rWrt,
if( rInfo.GetDepth() > 1 )
{
SwNodeOffset nPos =
- rWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex() + 1;
+ rWrt.m_pCurrentPam->GetPoint()->GetNodeIndex() + 1;
do
{
const SwNode* pNd = rWrt.m_pDoc->GetNodes()[nPos];
@@ -327,7 +327,7 @@ Writer& OutHTML_NumberBulletListEnd( SwHTMLWriter& rWrt,
if (rWrt.mbXHTML && !rInfo.IsNumbered())
{
oAtLeastOneNumbered = false;
- SwNodeOffset nPos = rWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex() - 1;
+ SwNodeOffset nPos = rWrt.m_pCurrentPam->GetPoint()->GetNodeIndex() - 1;
SwNumRule* pNumRule = nullptr;
while (true)
{
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 1fbfc6f6c0b2..58e33bca84c9 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -352,7 +352,7 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken )
// move PageDesc and SwFormatBreak attribute from current node into
// (first) node of the section
if( pOldTextNd )
- MovePageDescAttrs( pOldTextNd, m_pPam->GetPoint()->nNode.GetIndex(),
+ MovePageDescAttrs( pOldTextNd, m_pPam->GetPoint()->GetNodeIndex(),
true );
if( pPostIts )
@@ -436,7 +436,7 @@ void SwHTMLParser::FixHeaderFooterDistance( bool bHeader,
}
else
{
- nPrvNxtIdx = pOldPos->nNode.GetIndex() - 1;
+ nPrvNxtIdx = pOldPos->GetNodeIndex() - 1;
}
sal_uInt16 nSpace = 0;
@@ -463,7 +463,7 @@ void SwHTMLParser::FixHeaderFooterDistance( bool bHeader,
if( bHeader )
{
- nPrvNxtIdx = pOldPos->nNode.GetIndex();
+ nPrvNxtIdx = pOldPos->GetNodeIndex();
}
else
{
@@ -505,7 +505,7 @@ void SwHTMLParser::FixHeaderFooterDistance( bool bHeader,
bool SwHTMLParser::EndSection( bool bLFStripped )
{
- SwEndNode *pEndNd = m_xDoc->GetNodes()[m_pPam->GetPoint()->nNode.GetIndex()+1]
+ SwEndNode *pEndNd = m_xDoc->GetNodes()[m_pPam->GetPoint()->GetNodeIndex()+1]
->GetEndNode();
if( pEndNd && pEndNd->StartOfSectionNode()->IsSectionNode() )
{
@@ -732,7 +732,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
// Move PageDesc and SwFormatBreak attributes of the current node
// to the section's first node.
if( pOldTextNd )
- MovePageDescAttrs( pOldTextNd, m_pPam->GetPoint()->nNode.GetIndex(),
+ MovePageDescAttrs( pOldTextNd, m_pPam->GetPoint()->GetNodeIndex(),
true );
if( pPostIts )
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index fb9645b7c267..0678412ead87 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -3093,7 +3093,7 @@ void CellSaveStruct::StartNoBreak( const SwPosition& rPos )
(!rPos.nContent.GetIndex() && m_pCurrCnts == m_xCnts.get() &&
m_xCnts->GetStartNode() &&
m_xCnts->GetStartNode()->GetIndex() + 1 ==
- rPos.nNode.GetIndex()) )
+ rPos.GetNodeIndex()) )
{
m_bNoBreak = true;
}
@@ -3120,7 +3120,7 @@ void CellSaveStruct::CheckNoBreak( const SwPosition& rPos )
m_xCnts->SetNoBreak();
}
else if( m_pNoBreakEndNodeIndex &&
- m_pNoBreakEndNodeIndex->GetIndex() == rPos.nNode.GetIndex() )
+ m_pNoBreakEndNodeIndex->GetIndex() == rPos.GetNodeIndex() )
{
if( m_nNoBreakEndContentPos == rPos.nContent.GetIndex() )
{
@@ -4735,7 +4735,7 @@ void TableSaveStruct::MakeTable( sal_uInt16 nWidth, SwPosition& rPos, SwDoc *pDo
{
pTableNd->DelFrames();
SwNodeIndex aIdx( *pTableNd->EndOfSectionNode(), 1 );
- OSL_ENSURE( aIdx.GetIndex() <= pTCntxt->GetPos()->nNode.GetIndex(),
+ OSL_ENSURE( aIdx.GetIndex() <= pTCntxt->GetPos()->GetNodeIndex(),
"unexpected node for table layout" );
pTableNd->MakeOwnFrames(&aIdx);
}
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 801ca7da058b..3d55e56f28d2 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -563,7 +563,7 @@ SvParserState SwHTMLParser::CallParser()
m_xDoc->getIDocumentContentOperations().SplitNode( *pPos, false );
- *m_pSttNdIdx = pPos->nNode.GetIndex()-1;
+ *m_pSttNdIdx = pPos->GetNodeIndex()-1;
m_xDoc->getIDocumentContentOperations().SplitNode( *pPos, false );
SwPaM aInsertionRangePam( *pPos );
@@ -761,18 +761,18 @@ void SwHTMLParser::Continue( HtmlTokenId nToken )
#if OSL_DEBUG_LEVEL > 0
// !!! shouldn't be possible, or ??
- OSL_ENSURE( m_pSttNdIdx->GetIndex()+1 != m_pPam->GetBound().nNode.GetIndex(),
+ OSL_ENSURE( m_pSttNdIdx->GetIndex()+1 != m_pPam->GetBound().GetNodeIndex(),
"Pam.Bound1 is still in the node" );
- OSL_ENSURE( m_pSttNdIdx->GetIndex()+1 != m_pPam->GetBound( false ).nNode.GetIndex(),
+ OSL_ENSURE( m_pSttNdIdx->GetIndex()+1 != m_pPam->GetBound( false ).GetNodeIndex(),
"Pam.Bound2 is still in the node" );
- if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound().nNode.GetIndex() )
+ if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound().GetNodeIndex() )
{
const sal_Int32 nCntPos = m_pPam->GetBound().nContent.GetIndex();
m_pPam->GetBound().nContent.Assign( pTextNode,
pTextNode->GetText().getLength() + nCntPos );
}
- if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound( false ).nNode.GetIndex() )
+ if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound( false ).GetNodeIndex() )
{
const sal_Int32 nCntPos = m_pPam->GetBound( false ).nContent.GetIndex();
m_pPam->GetBound( false ).nContent.Assign( pTextNode,
@@ -804,7 +804,7 @@ void SwHTMLParser::Continue( HtmlTokenId nToken )
if( !pPos->nContent.GetIndex() && !bLFStripped )
{
SwTextNode* pCurrentNd;
- SwNodeOffset nNodeIdx = pPos->nNode.GetIndex();
+ SwNodeOffset nNodeIdx = pPos->GetNodeIndex();
bool bHasFlysOrMarks =
HasCurrentParaFlys() || HasCurrentParaBookmarks( true );
@@ -821,7 +821,7 @@ void SwHTMLParser::Continue( HtmlTokenId nToken )
SwCursorShell *pCursorSh = dynamic_cast<SwCursorShell *>( pVSh );
if( pCursorSh &&
pCursorSh->GetCursor()->GetPoint()
- ->nNode.GetIndex() == nNodeIdx )
+ ->GetNodeIndex() == nNodeIdx )
{
pCursorSh->MovePara(GoPrevPara, fnParaEnd );
pCursorSh->SetMark();
@@ -1779,7 +1779,7 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken )
EndPara();
OSL_ENSURE(!m_xTable, "table in table not allowed here");
if( !m_xTable && (IsNewDoc() || !m_pPam->GetNode().FindTableNode()) &&
- (m_pPam->GetPoint()->nNode.GetIndex() >
+ (m_pPam->GetPoint()->GetNodeIndex() >
m_xDoc->GetNodes().GetEndOfExtras().GetIndex() ||
!m_pPam->GetNode().FindFootnoteStartNode() ) )
{
@@ -2496,7 +2496,7 @@ void SwHTMLParser::AddParSpace()
m_bNoParSpace = false;
- SwNodeOffset nNdIdx = m_pPam->GetPoint()->nNode.GetIndex() - 1;
+ SwNodeOffset nNdIdx = m_pPam->GetPoint()->GetNodeIndex() - 1;
SwTextNode *pTextNode = m_xDoc->GetNodes()[nNdIdx]->GetTextNode();
if( !pTextNode )
@@ -2879,7 +2879,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
aAttrPam.GetPoint()->nContent.Assign( pCNd, pAttr->m_nEndContent );
if( bBeforeTable &&
- aAttrPam.GetPoint()->nNode.GetIndex() ==
+ aAttrPam.GetPoint()->GetNodeIndex() ==
rEndIdx.GetIndex() )
{
// If we're before inserting a table and the attribute ends
@@ -2888,7 +2888,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
if( nWhich != RES_BREAK && nWhich != RES_PAGEDESC &&
!isTXTATR_NOEND(nWhich) )
{
- if( aAttrPam.GetMark()->nNode.GetIndex() !=
+ if( aAttrPam.GetMark()->GetNodeIndex() !=
rEndIdx.GetIndex() )
{
OSL_ENSURE( !aAttrPam.GetPoint()->nContent.GetIndex(),
@@ -2953,8 +2953,8 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
continue;
case RES_LR_SPACE:
- if( aAttrPam.GetPoint()->nNode.GetIndex() ==
- aAttrPam.GetMark()->nNode.GetIndex())
+ if( aAttrPam.GetPoint()->GetNodeIndex() ==
+ aAttrPam.GetMark()->GetNodeIndex())
{
// because of numbering set this attribute directly at node
pCNd->SetAttr( *pAttr->m_pItem );
@@ -3013,7 +3013,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
OSL_ENSURE( RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId(),
"Only At-Para flys need special handling" );
const SwPosition *pFlyPos = rAnchor.GetContentAnchor();
- SwNodeOffset nFlyParaIdx = pFlyPos->nNode.GetIndex();
+ SwNodeOffset nFlyParaIdx = pFlyPos->GetNodeIndex();
bool bMoveFly;
if( bChkEnd )
{
@@ -3066,7 +3066,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
aAttrPam.GetPoint()->nContent.Assign( pCNd, field->m_nStartContent );
if( bBeforeTable &&
- aAttrPam.GetPoint()->nNode.GetIndex() == rEndIdx.GetIndex() )
+ aAttrPam.GetPoint()->GetNodeIndex() == rEndIdx.GetIndex() )
{
OSL_ENSURE( !bBeforeTable, "Aha, the case does occur" );
OSL_ENSURE( !aAttrPam.GetPoint()->nContent.GetIndex(),
@@ -4987,7 +4987,7 @@ void SwHTMLParser::InsertSpacer()
SetAttr(); // set still open paragraph attributes
- pTextNode = m_xDoc->GetNodes()[m_pPam->GetPoint()->nNode.GetIndex()-1]
+ pTextNode = m_xDoc->GetNodes()[m_pPam->GetPoint()->GetNodeIndex()-1]
->GetTextNode();
// If the previous paragraph isn't a text node, then now an
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 61c2939227d2..f230f4dab303 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -866,7 +866,7 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd )
{
HTMLSaveData aSaveData( rHTMLWrt,
- rHTMLWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex()+1,
+ rHTMLWrt.m_pCurrentPam->GetPoint()->GetNodeIndex()+1,
rSectNd.EndOfSectionIndex(),
false, pFormat );
rHTMLWrt.Out_SwDoc( rHTMLWrt.m_pCurrentPam.get() );
@@ -903,8 +903,8 @@ void SwHTMLWriter::Out_SwDoc( SwPaM* pPam )
// search for first on PaM created FlyFrame
// still missing:
- while( m_pCurrentPam->GetPoint()->nNode.GetIndex() < m_pCurrentPam->GetMark()->nNode.GetIndex() ||
- (m_pCurrentPam->GetPoint()->nNode.GetIndex() == m_pCurrentPam->GetMark()->nNode.GetIndex() &&
+ while( m_pCurrentPam->GetPoint()->GetNodeIndex() < m_pCurrentPam->GetMark()->GetNodeIndex() ||
+ (m_pCurrentPam->GetPoint()->GetNodeIndex() == m_pCurrentPam->GetMark()->GetNodeIndex() &&
m_pCurrentPam->GetPoint()->nContent.GetIndex() <= m_pCurrentPam->GetMark()->nContent.GetIndex()) )
{
SwNode& rNd = m_pCurrentPam->GetNode();
@@ -934,7 +934,7 @@ void SwHTMLWriter::Out_SwDoc( SwPaM* pPam )
break;
++m_pCurrentPam->GetPoint()->nNode; // move
- SwNodeOffset nPos = m_pCurrentPam->GetPoint()->nNode.GetIndex();
+ SwNodeOffset nPos = m_pCurrentPam->GetPoint()->GetNodeIndex();
if( m_bShowProgress )
::SetProgressState( sal_Int32(nPos), m_pDoc->GetDocShell() ); // How far ?
@@ -945,7 +945,7 @@ void SwHTMLWriter::Out_SwDoc( SwPaM* pPam )
* all formats!)
*/
m_bWriteAll = bSaveWriteAll ||
- nPos != m_pCurrentPam->GetMark()->nNode.GetIndex();
+ nPos != m_pCurrentPam->GetMark()->GetNodeIndex();
m_bFirstLine = false;
m_bOutFooter = false; // after one node no footer anymore
}
@@ -1019,8 +1019,8 @@ static void OutBodyColor( const char* pTag, const SwFormat *pFormat,
sal_uInt16 SwHTMLWriter::OutHeaderAttrs()
{
- SwNodeOffset nIdx = m_pCurrentPam->GetPoint()->nNode.GetIndex();
- SwNodeOffset nEndIdx = m_pCurrentPam->GetMark()->nNode.GetIndex();
+ SwNodeOffset nIdx = m_pCurrentPam->GetPoint()->GetNodeIndex();
+ SwNodeOffset nEndIdx = m_pCurrentPam->GetMark()->GetNodeIndex();
SwTextNode *pTextNd = nullptr;
while( nIdx<=nEndIdx &&
@@ -1108,7 +1108,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
// In none HTML documents the first set template will be exported
// and if none is set the default template
- SwNodeOffset nNodeIdx = m_pCurrentPam->GetPoint()->nNode.GetIndex();
+ SwNodeOffset nNodeIdx = m_pCurrentPam->GetPoint()->GetNodeIndex();
while( nNodeIdx < m_pDoc->GetNodes().Count() )
{
@@ -1235,9 +1235,9 @@ void SwHTMLWriter::OutBookmarks()
pBookmark = pMarkAccess->getAllMarksBegin()[m_nBkmkTabPos];
// Output all bookmarks in this paragraph. The content position
// for the moment isn't considered!
- SwNodeOffset nNode = m_pCurrentPam->GetPoint()->nNode.GetIndex();
+ SwNodeOffset nNode = m_pCurrentPam->GetPoint()->GetNodeIndex();
while( m_nBkmkTabPos != -1
- && pBookmark->GetMarkPos().nNode.GetIndex() == nNode )
+ && pBookmark->GetMarkPos().GetNodeIndex() == nNode )
{
// The area of bookmarks is first ignored, because it's not read.
@@ -1594,7 +1594,7 @@ HTMLSaveData::HTMLSaveData(SwHTMLWriter& rWriter, SwNodeOffset nStt,
rWrt.m_pCurrentPam = Writer::NewUnoCursor(*rWrt.m_pDoc, nStt, nEnd);
// recognize table in special areas
- if( nStt != rWrt.m_pCurrentPam->GetMark()->nNode.GetIndex() )
+ if( nStt != rWrt.m_pCurrentPam->GetMark()->GetNodeIndex() )
{
const SwNode *pNd = rWrt.m_pDoc->GetNodes()[ nStt ];
if( pNd->IsTableNode() || pNd->IsSectionNode() )
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index f7c605414e5a..865ff5cfdf97 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -71,7 +71,7 @@ public:
void FromSwPosition(const SwPosition &rPos)
{
- m_nNode = rPos.nNode.GetIndex()-1;
+ m_nNode = rPos.GetNodeIndex()-1;
m_nContent = rPos.nContent.GetIndex();
}
};
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index 214322ebafa7..ba9c6b80d076 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -66,12 +66,12 @@ ErrCode SwRTFReader::Read(SwDoc& rDoc, const OUString& /*rBaseURL*/, SwPaM& rPam
// Step 2: Split once and remember the node that has been split.
rDoc.getIDocumentContentOperations().SplitNode(*pPos, false);
- *pSttNdIdx = pPos->nNode.GetIndex() - 1;
+ *pSttNdIdx = pPos->GetNodeIndex() - 1;
// Step 3: Split again.
rDoc.getIDocumentContentOperations().SplitNode(*pPos, false);
auto pSttNdIdx2 = std::make_shared<SwNodeIndex>(rDoc.GetNodes());
- *pSttNdIdx2 = pPos->nNode.GetIndex();
+ *pSttNdIdx2 = pPos->GetNodeIndex();
// Step 4: Insert all content into the new node
rPam.Move(fnMoveBackward);
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index 55f36351b918..1252ff41243d 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -90,13 +90,13 @@ void Writer_Impl::RemoveFontList( SwDoc& rDoc )
void Writer_Impl::InsertBkmk(const ::sw::mark::IMark& rBkmk)
{
- SwNodeOffset nNd = rBkmk.GetMarkPos().nNode.GetIndex();
+ SwNodeOffset nNd = rBkmk.GetMarkPos().GetNodeIndex();
aBkmkNodePos.emplace( nNd, &rBkmk );
if(rBkmk.IsExpanded() && rBkmk.GetOtherMarkPos().nNode != nNd)
{
- nNd = rBkmk.GetOtherMarkPos().nNode.GetIndex();
+ nNd = rBkmk.GetOtherMarkPos().GetNodeIndex();
aBkmkNodePos.emplace( nNd, &rBkmk );
}
}
@@ -470,7 +470,7 @@ bool Writer::GetBookmarks(const SwContentNode& rNd, sal_Int32 nStt,
rArr.push_back( &rBkmk );
}
else if( rBkmk.IsExpanded() && nNd ==
- rBkmk.GetOtherMarkPos().nNode.GetIndex() && (nContent =
+ rBkmk.GetOtherMarkPos().GetNodeIndex() && (nContent =
rBkmk.GetOtherMarkPos().nContent.GetIndex() ) >= nStt &&
nContent < nEnd )
{
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index a8597cb13d40..9576ea860ff6 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -280,7 +280,7 @@ void RtfAttributeOutput::EndParagraph(ww8::WW8TableNodeInfoInner::Pointer_t pTex
// We're ending a paragraph that is the last paragraph of a footnote or endnote, or of clipboard.
bLastPara
= m_rExport.GetCurrentNodeIndex()
- && m_rExport.GetCurrentNodeIndex() == m_rExport.m_pCurPam->End()->nNode.GetIndex();
+ && m_rExport.GetCurrentNodeIndex() == m_rExport.m_pCurPam->End()->GetNodeIndex();
}
FinishTableRowCell(pTextNodeInfoInner);
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 0cc32ff159a4..354e428ea513 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -734,7 +734,7 @@ namespace sw
sw::mark::IFieldmark *const pFieldMark(
rPos.GetDoc().getIDocumentMarkAccess()->getFieldmarkAt(end));
SAL_WARN_IF(!pFieldMark, "sw.ww8", "expected a field mark");
- if (pFieldMark && pFieldMark->GetMarkPos().nNode.GetIndex() == (*aResult)->m_aMkPos.m_nNode.GetIndex()+1
+ if (pFieldMark && pFieldMark->GetMarkPos().GetNodeIndex() == (*aResult)->m_aMkPos.m_nNode.GetIndex()+1
&& pFieldMark->GetMarkPos().nContent.GetIndex() < (*aResult)->m_aMkPos.m_nContent)
{
(*aResult)->SetEndPos(end);
@@ -755,7 +755,7 @@ namespace sw
void MoveAttrFieldmarkInserted(SwFltPosition& rMkPos, SwFltPosition& rPtPos, const SwPosition& rPos)
{
sal_Int32 const nInserted = 2; // CH_TXT_ATR_FIELDSTART, CH_TXT_ATR_FIELDSEP
- SwNodeOffset nPosNd = rPos.nNode.GetIndex();
+ SwNodeOffset nPosNd = rPos.GetNodeIndex();
sal_Int32 nPosCt = rPos.nContent.GetIndex() - nInserted;
bool const isPoint(rMkPos == rPtPos);
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 6f260a25c1c6..5a7064bd3d27 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -628,7 +628,7 @@ bool SwWW8AttrIter::IsAnchorLinkedToThisNode( SwNodeOffset nNodePos )
/* if current node position and the anchor position are the same
then the frame anchor is linked to this node
*/
- return nNodePos == maFlyIter->GetPosition().nNode.GetIndex();
+ return nNodePos == maFlyIter->GetPosition().GetNodeIndex();
}
bool SwWW8AttrIter::HasFlysAt(sal_Int32 nSwPos) const
@@ -1522,7 +1522,7 @@ bool SwWW8AttrIter::IncludeEndOfParaCRInRedlineProperties( sal_Int32 nEnd ) cons
}
bBreak = false;
}
- if (pStart->nNode.GetIndex()-1 == m_rNode.GetIndex())
+ if (pStart->GetNodeIndex()-1 == m_rNode.GetIndex())
{
if (pStart->nContent.GetIndex() == 0)
{
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index f5f3814f6631..d0ae1a49d835 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -1442,14 +1442,14 @@ void WW8Export::AppendBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, s
pOPos = &rBkmk.GetMarkPos();
}
- if( !pOPos || ( nNd == pPos->nNode.GetIndex() &&
+ if( !pOPos || ( nNd == pPos->GetNodeIndex() &&
( nContent = pPos->nContent.GetIndex() ) >= nCurrentPos &&
nContent < nCurrentEnd ) )
{
sal_uLong nCp = nSttCP + pPos->nContent.GetIndex() - nCurrentPos;
m_pBkmks->Append(nCp, BookmarkToWord(rBkmk.GetName()));
}
- if( pOPos && nNd == pOPos->nNode.GetIndex() &&
+ if( pOPos && nNd == pOPos->GetNodeIndex() &&
( nContent = pOPos->nContent.GetIndex() ) >= nCurrentPos &&
nContent < nCurrentEnd )
{
@@ -1880,7 +1880,7 @@ void MSWordExportBase::SetCurPam(SwNodeOffset nStt, SwNodeOffset nEnd)
m_pCurPam = Writer::NewUnoCursor( m_rDoc, nStt, nEnd );
// Recognize tables in special cases
- if ( nStt != m_pCurPam->GetMark()->nNode.GetIndex() &&
+ if ( nStt != m_pCurPam->GetMark()->GetNodeIndex() &&
m_rDoc.GetNodes()[ nStt ]->IsTableNode() )
{
m_pCurPam->GetMark()->nNode = nStt;
@@ -2921,7 +2921,7 @@ void MSWordExportBase::WriteText()
else
++m_pCurPam->GetPoint()->nNode;
- SwNodeOffset nPos = m_pCurPam->GetPoint()->nNode.GetIndex();
+ SwNodeOffset nPos = m_pCurPam->GetPoint()->GetNodeIndex();
::SetProgressState( sal_Int32(nPos), m_pCurPam->GetDoc().GetDocShell() );
}
@@ -3154,7 +3154,7 @@ void MSWordExportBase::AddLinkTarget(std::u16string_view rURL)
// node index number of where it points to
if( m_rDoc.GotoOutline( aPos, aName ) )
{
- nIdx = aPos.nNode.GetIndex();
+ nIdx = aPos.GetNodeIndex();
noBookmark = true;
}
}
@@ -3896,8 +3896,8 @@ MSWordExportBase::MSWordExportBase( SwDoc& rDocument, std::shared_ptr<SwUnoCurso
, m_bFontSizeWritten(false)
, m_bAddFootnoteTab(false)
, m_rDoc(rDocument)
- , m_nCurStart(pCurrentPam->GetPoint()->nNode.GetIndex())
- , m_nCurEnd(pCurrentPam->GetMark()->nNode.GetIndex())
+ , m_nCurStart(pCurrentPam->GetPoint()->GetNodeIndex())
+ , m_nCurEnd(pCurrentPam->GetMark()->GetNodeIndex())
, m_pCurPam(pCurrentPam)
, m_pOrigPam(pOriginalPam)
{
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index cb86dd31973e..d83af1e5a6c9 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -5724,8 +5724,8 @@ const SwRedlineData* AttributeOutputBase::GetParagraphMarkerRedline( const SwTex
if ( pRedl->GetRedlineData().GetType() != aRedlineType )
continue;
- SwNodeOffset uStartNodeIndex = pRedl->Start()->nNode.GetIndex();
- SwNodeOffset uEndNodeIndex = pRedl->End()->nNode.GetIndex();
+ SwNodeOffset uStartNodeIndex = pRedl->Start()->GetNodeIndex();
+ SwNodeOffset uEndNodeIndex = pRedl->End()->GetNodeIndex();
SwNodeOffset uNodeIndex = rNode.GetIndex();
if( uStartNodeIndex <= uNodeIndex && uNodeIndex < uEndNodeIndex )
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index a9af15c46f92..821d31e47c49 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -70,7 +70,7 @@ bool WW8Glossary::HasBareGraphicEnd(SwDoc *pDoc,SwNodeIndex const &rIdx)
if (pAPos &&
((RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()) ||
(RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId())) &&
- rIdx == pAPos->nNode.GetIndex() )
+ rIdx == pAPos->GetNodeIndex() )
{
bRet=true;
break;
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index e7623d4510a3..749ec62caa95 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1350,8 +1350,8 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
if (rEntry.MakeRegion(m_rDoc, aRegion, SwFltStackEntry::RegionMode::NoCheck))
{
SvxLRSpaceItem aNewLR( *static_cast<SvxLRSpaceItem*>(rEntry.m_pAttr.get()) );
- SwNodeOffset nStart = aRegion.Start()->nNode.GetIndex();
- SwNodeOffset nEnd = aRegion.End()->nNode.GetIndex();
+ SwNodeOffset nStart = aRegion.Start()->GetNodeIndex();
+ SwNodeOffset nEnd = aRegion.End()->GetNodeIndex();
for(; nStart <= nEnd; ++nStart)
{
SwNode* pNode = m_rDoc.GetNodes()[ nStart ];
@@ -4650,8 +4650,8 @@ void wwSectionManager::InsertSegments()
SwFormatPageDesc aDesc(SetSwFormatPageDesc(aIter, aStart, true));
if (aDesc.GetPageDesc())
{
- SwNodeOffset nStart = aSectPaM.Start()->nNode.GetIndex();
- SwNodeOffset nEnd = aSectPaM.End()->nNode.GetIndex();
+ SwNodeOffset nStart = aSectPaM.Start()->GetNodeIndex();
+ SwNodeOffset nEnd = aSectPaM.End()->GetNodeIndex();
for(; nStart <= nEnd; ++nStart)
{
SwNode* pNode = mrReader.m_rDoc.GetNodes()[nStart];
@@ -5215,7 +5215,7 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary const *pGloss)
}
// suppress insertion of tables inside footnotes.
- const SwNodeOffset nNd = pPos->nNode.GetIndex();
+ const SwNodeOffset nNd = pPos->GetNodeIndex();
m_bReadNoTable = ( nNd < m_rDoc.GetNodes().GetEndOfInserts().GetIndex() &&
m_rDoc.GetNodes().GetEndOfInserts().StartOfSectionIndex() < nNd );
}
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 3fae08a5271b..9d4cf7f28377 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -680,7 +680,7 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
// set content node (if necessary)
if (nullptr != pRedlineInfo->pContentIndex)
{
- SwNodeOffset nPoint = aPaM.GetPoint()->nNode.GetIndex();
+ SwNodeOffset nPoint = aPaM.GetPoint()->GetNodeIndex();
if( nPoint < pRedlineInfo->pContentIndex->GetIndex() ||
nPoint > pRedlineInfo->pContentIndex->GetNode().EndOfSectionIndex() )
pRedline->SetContentIdx(pRedlineInfo->pContentIndex);
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index d86bf0973a44..6cbfbda7b17a 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -574,7 +574,7 @@ void SwXMLImport::startDocument()
// Split once and remember the node that has been split.
pDoc->getIDocumentContentOperations().SplitNode( *pPos, false );
- *m_pSttNdIdx = pPos->nNode.GetIndex()-1;
+ *m_pSttNdIdx = pPos->GetNodeIndex()-1;
// Split again.
pDoc->getIDocumentContentOperations().SplitNode( *pPos, false );
@@ -666,14 +666,14 @@ void SwXMLImport::endDocument()
#if OSL_DEBUG_LEVEL > 0
// !!! This should be impossible !!!!
OSL_ENSURE( m_pSttNdIdx->GetIndex()+1 !=
- pPaM->GetBound().nNode.GetIndex(),
+ pPaM->GetBound().GetNodeIndex(),
"PaM.Bound1 point to new node " );
OSL_ENSURE( m_pSttNdIdx->GetIndex()+1 !=
- pPaM->GetBound( false ).nNode.GetIndex(),
+ pPaM->GetBound( false ).GetNodeIndex(),
"PaM.Bound2 points to new node" );
if( m_pSttNdIdx->GetIndex()+1 ==
- pPaM->GetBound().nNode.GetIndex() )
+ pPaM->GetBound().GetNodeIndex() )
{
const sal_Int32 nCntPos =
pPaM->GetBound().nContent.GetIndex();
@@ -681,7 +681,7 @@ void SwXMLImport::endDocument()
pTextNode->GetText().getLength() + nCntPos );
}
if( m_pSttNdIdx->GetIndex()+1 ==
- pPaM->GetBound( false ).nNode.GetIndex() )
+ pPaM->GetBound( false ).GetNodeIndex() )
{
const sal_Int32 nCntPos =
pPaM->GetBound( false ).nContent.GetIndex();
@@ -715,7 +715,7 @@ void SwXMLImport::endDocument()
if( !pPos->nContent.GetIndex() )
{
SwTextNode* pCurrNd;
- SwNodeOffset nNodeIdx = pPos->nNode.GetIndex();
+ SwNodeOffset nNodeIdx = pPos->GetNodeIndex();
pDoc = &pPaM->GetDoc();
OSL_ENSURE( pPos->GetNode().IsContentNode(),
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 50dccbcded98..04ed6f737a0d 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -437,8 +437,8 @@ sal_Bool SAL_CALL SwTransferable::isComplex()
SwNodes& aNodes = m_pWrtShell->GetDoc()->GetNodes();
for (SwPaM& rPaM : m_pWrtShell->GetCursor()->GetRingContainer())
{
- for (SwNodeOffset nIndex = rPaM.GetMark()->nNode.GetIndex();
- nIndex <= rPaM.GetPoint()->nNode.GetIndex(); ++nIndex)
+ for (SwNodeOffset nIndex = rPaM.GetMark()->GetNodeIndex();
+ nIndex <= rPaM.GetPoint()->GetNodeIndex(); ++nIndex)
{
SwNode& rNd = *aNodes[nIndex];
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index e5b3709d613f..cd90bfb74ce1 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -5794,9 +5794,9 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
if( pCursor )
{
- SwNodeOffset nPosNodeIdx = pCursor->GetPoint()->nNode.GetIndex();
+ SwNodeOffset nPosNodeIdx = pCursor->GetPoint()->GetNodeIndex();
const sal_Int32 nPosIdx = pCursor->GetPoint()->nContent.GetIndex();
- SwNodeOffset nMarkNodeIdx = pCursor->GetMark()->nNode.GetIndex();
+ SwNodeOffset nMarkNodeIdx = pCursor->GetMark()->GetNodeIndex();
const sal_Int32 nMarkIdx = pCursor->GetMark()->nContent.GetIndex();
if( !rSh.GetCursor()->HasMark() )