sw/inc/unocrsrhelper.hxx                                |    4 +--
 sw/source/core/crsr/crsrsh.cxx                          |    4 +--
 sw/source/core/crsr/swcrsr.cxx                          |    2 -
 sw/source/core/doc/DocumentContentOperationsManager.cxx |    2 -
 sw/source/core/doc/DocumentRedlineManager.cxx           |   10 ++++----
 sw/source/core/doc/doccomp.cxx                          |    8 +++---
 sw/source/core/doc/docredln.cxx                         |    2 -
 sw/source/core/frmedt/fetab.cxx                         |    2 -
 sw/source/core/layout/frmtool.cxx                       |    2 -
 sw/source/core/layout/trvlfrm.cxx                       |    2 -
 sw/source/core/text/itratr.cxx                          |    2 -
 sw/source/core/text/redlnitr.cxx                        |    2 -
 sw/source/core/undo/undel.cxx                           |    4 +--
 sw/source/core/undo/undobj.cxx                          |   20 ++++++++--------
 sw/source/core/undo/unins.cxx                           |    8 +++---
 sw/source/core/unocore/unoobj.cxx                       |   10 ++++----
 sw/source/core/unocore/unoparagraph.cxx                 |    6 ++--
 sw/source/uibase/docvw/edtwin.cxx                       |    7 ++---
 sw/source/uibase/uiview/formatclipboard.cxx             |    2 -
 sw/source/uibase/uiview/viewstat.cxx                    |    2 -
 20 files changed, 50 insertions(+), 51 deletions(-)

New commits:
commit d0c07ec1cad386a0ec3bf34c6aa6e7b50859ef09
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sun Aug 14 18:02:27 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Aug 14 21:28:37 2022 +0200

    use more GetContentIndex
    
    Change-Id: I48e36a95872b5c2bdb6b92c66403d4c08eedd38c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138255
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx
index 014421371ba0..af3c779f2288 100644
--- a/sw/inc/unocrsrhelper.hxx
+++ b/sw/inc/unocrsrhelper.hxx
@@ -86,10 +86,10 @@ namespace SwUnoCursorHelper
     void                    GetCurPageStyle(SwPaM const & rPaM, OUString 
&rString);
 
     inline bool             IsStartOfPara(SwPaM& rUnoCursor)
-                                        { return 
rUnoCursor.GetPoint()->nContent == 0;}
+                                        { return 
rUnoCursor.GetPoint()->GetContentIndex() == 0;}
     inline bool             IsEndOfPara(SwPaM& rUnoCursor)
                                         { return 
rUnoCursor.GetPointContentNode() &&
-                                            rUnoCursor.GetPoint()->nContent == 
rUnoCursor.GetPointContentNode()->Len();}
+                                            
rUnoCursor.GetPoint()->GetContentIndex() == 
rUnoCursor.GetPointContentNode()->Len();}
 
     void                        resetCursorPropertyValue(const 
SfxItemPropertyMapEntry& rEntry, SwPaM& rPam);
     /// @throws css::lang::IllegalArgumentException
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 013f65bf6e5b..d9a040adfad4 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1107,7 +1107,7 @@ bool SwCursorShell::IsSttPara() const
             }
         }
     }
-    return m_pCurrentCursor->GetPoint()->nContent == 0;
+    return m_pCurrentCursor->GetPoint()->GetContentIndex() == 0;
 }
 
 bool SwCursorShell::IsEndPara() const
@@ -1126,7 +1126,7 @@ bool SwCursorShell::IsEndPara() const
             }
         }
     }
-    return m_pCurrentCursor->GetPoint()->nContent == 
m_pCurrentCursor->GetPointContentNode()->Len();
+    return m_pCurrentCursor->GetPoint()->GetContentIndex() == 
m_pCurrentCursor->GetPointContentNode()->Len();
 }
 
 bool SwCursorShell::IsEndOfTable() const
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 9cd4a326a533..5a47e9bdb965 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1280,7 +1280,7 @@ bool SwCursor::IsInWordWT(sal_Int16 nWordType, 
SwRootFrame const*const pLayout)
 bool SwCursor::IsStartEndSentence(bool bEnd, SwRootFrame const*const pLayout) 
const
 {
     bool bRet = bEnd ?
-                    GetPointContentNode() && GetPoint()->nContent == 
GetPointContentNode()->Len() :
+                    GetPointContentNode() && GetPoint()->GetContentIndex() == 
GetPointContentNode()->Len() :
                     GetPoint()->GetContentIndex() == 0;
 
     if ((pLayout != nullptr && pLayout->HasMergedParas()) || !bRet)
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index bd8b154b1323..1972be388df2 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -2452,7 +2452,7 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& 
rPaM, SwPosition& rPos,
     // tdf#99692 don't Move() back if that would end up in another node
     // because moving backward is not necessarily the inverse of forward then.
     // (but do Move() back if we have split the node)
-    const bool bNullContent = !bSplit && aSavePam.GetPoint()->nContent == 0;
+    const bool bNullContent = !bSplit && 
aSavePam.GetPoint()->GetContentIndex() == 0;
     if( bNullContent )
     {
         aSavePam.GetPoint()->Adjust(SwNodeOffset(-1));
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx 
b/sw/source/core/doc/DocumentRedlineManager.cxx
index b7faa6c43b29..676b031d9e54 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -59,11 +59,11 @@ using namespace com::sun::star;
             SwTextNode* pTextNode = pPos->GetNode().GetTextNode();
             if( pTextNode == nullptr )
             {
-                assert(pPos->nContent == 0);
+                assert(pPos->GetContentIndex() == 0);
             }
             else
             {
-                assert(pPos->nContent >= 0 && pPos->nContent <= 
pTextNode->Len());
+                assert(pPos->GetContentIndex() >= 0 && pPos->GetContentIndex() 
<= pTextNode->Len());
             }
         }
 
@@ -643,7 +643,7 @@ namespace
                     pREnd = pRedl->End();
 
                     // keep style of the empty paragraph after deletion of 
wholly paragraphs
-                    if( pCSttNd && pCEndNd && pRStt && pREnd && 
pRStt->nContent == 0 )
+                    if( pCSttNd && pCEndNd && pRStt && pREnd && 
pRStt->GetContentIndex() == 0 )
                         lcl_CopyStyle(*pREnd, *pRStt);
 
                     if( bDelRedl )
@@ -1295,7 +1295,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* 
pNewRedl, bool const bCall
         SwTextNode* pTextNode = pStt->GetNode().GetTextNode();
         if( pTextNode == nullptr )
         {
-            if( pStt->nContent > 0 )
+            if( pStt->GetContentIndex() > 0 )
             {
                 OSL_ENSURE( false, "Redline start: non-text-node with content" 
);
                 pStt->nContent = 0;
@@ -1756,7 +1756,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* 
pNewRedl, bool const bCall
                             // For this case, we completely delete the
                             // paragraphs (if, of course, we also start on
                             // a paragraph boundary).
-                            if( (pStt->nContent == 0) &&
+                            if( (pStt->GetContentIndex() == 0) &&
                                 pEnd->GetNode().IsEndNode() )
                             {
                                 pEnd->Adjust(SwNodeOffset(-1));
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index a32f01514037..9a2fea47067e 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -1663,7 +1663,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo )
                                     OUString(), nullptr );
         do {
             // #i65201#: Expand again, see comment above.
-            if( pTmp->GetPoint()->nContent == 0 )
+            if( pTmp->GetPoint()->GetContentIndex() == 0 )
             {
                 pTmp->GetPoint()->Adjust(SwNodeOffset(1));
             }
@@ -1677,7 +1677,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo )
                 pTmp->GetPoint()->nContent.Assign( pContentNode,
                         pContentNode ? pContentNode->Len() : 0 );
                 // tdf#106218 try to avoid losing a paragraph break here:
-                if (pTmp->GetMark()->nContent == 0)
+                if (pTmp->GetMark()->GetContentIndex() == 0)
                 {
                     SwNodeIndex const prev(pTmp->GetMark()->GetNode(), -1);
                     if (prev.GetNode().IsTextNode())
@@ -1706,7 +1706,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo )
         return;
 
     do {
-        if( pTmp->GetPoint()->nContent == 0 )
+        if( pTmp->GetPoint()->GetContentIndex() == 0 )
         {
             pTmp->GetPoint()->Adjust(SwNodeOffset(1));
         }
@@ -1720,7 +1720,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo )
             pTmp->GetPoint()->nContent.Assign( pContentNode,
                     pContentNode ? pContentNode->Len() : 0 );
             // tdf#106218 try to avoid losing a paragraph break here:
-            if (pTmp->GetMark()->nContent == 0)
+            if (pTmp->GetMark()->GetContentIndex() == 0)
             {
                 SwNodeIndex const prev(pTmp->GetMark()->GetNode(), -1);
                 if (prev.GetNode().IsTextNode())
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index e5e7e6bd32e7..514ee9788b8c 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -906,7 +906,7 @@ void SwRedlineExtraData_FormatColl::Reject( SwPaM& rPam ) 
const
 
     const SwPosition* pEnd = rPam.End();
 
-    if ( !m_bFormatAll || pEnd->nContent == 0 )
+    if ( !m_bFormatAll || pEnd->GetContentIndex() == 0 )
     {
         // don't reject the format of the next paragraph (that is handled by 
the next redline)
         if (aPam.GetPoint()->nNode > aPam.GetMark()->nNode)
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 185040bdc022..61a1361ac6ec 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -961,7 +961,7 @@ bool SwFEShell::HasBoxSelection() const
                 pCNd = SwNodes::GoPrevious( &aIdx );
                 OSL_ENSURE( pCNd, "no ContentNode in box ??" );
             }
-            if( pPam->GetMark()->nContent == pCNd->Len() )
+            if( pPam->GetMark()->GetContentIndex() == pCNd->Len() )
             {
                 if( bChg )
                     pPam->Exchange();
diff --git a/sw/source/core/layout/frmtool.cxx 
b/sw/source/core/layout/frmtool.cxx
index d2dfacf52f34..6bccf8d73869 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1340,7 +1340,7 @@ bool IsAnchoredObjShown(SwTextFrame const& rFrame, 
SwFormatAnchor const& rAnchor
                         || pAnchor->nContent == 0))
                 || (&pAnchor->GetNode() == pMergedPara->pLastNode
                     && (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA
-                        || pAnchor->nContent == 
pMergedPara->pLastNode->Len()));
+                        || pAnchor->GetContentIndex() == 
pMergedPara->pLastNode->Len()));
         }
         auto iter(iterFirst);
         SwTextNode const* pNode(pMergedPara->pFirstNode);
diff --git a/sw/source/core/layout/trvlfrm.cxx 
b/sw/source/core/layout/trvlfrm.cxx
index 6eff7b47692c..f8b171e70b58 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -298,7 +298,7 @@ bool SwPageFrame::GetModelPositionForViewPoint( SwPosition 
*pPos, Point &rPoint,
                     SwRect aTextRect;
                     pTextFrame->GetCharRect(aTextRect, prevTextPos);
 
-                    if (prevTextPos.nContent < pContentNode->Len())
+                    if (prevTextPos.GetContentIndex() < pContentNode->Len())
                     {
                         // aRextRect is just a line on the left edge of the
                         // previous character; to get a better measure from
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index cd240b445637..4feae7547841 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -461,7 +461,7 @@ static bool CanSkipOverRedline(
     size_t nEndIndex(rEndIndex);
     SwPosition const*const pRLEnd(rRedline.End());
     if (!pRLEnd->GetNode().IsTextNode() // if fully deleted...
-        || pRLEnd->nContent == pRLEnd->GetNode().GetTextNode()->Len())
+        || pRLEnd->GetContentIndex() == pRLEnd->GetNode().GetTextNode()->Len())
     {
         // shortcut: nothing follows redline
         // current state is end state
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index e826141a9afa..eb37da3e96c0 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -227,7 +227,7 @@ CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & 
rTextNode,
         SwPosition const*const pEnd(iter.GetEndPos());
         bHaveRedlines = true;
         assert(pNode != &rTextNode || &pStart->GetNode() == &rTextNode); // 
detect calls with wrong start node
-        if (pStart->nContent != nLastEnd) // not 0 so we eliminate adjacent 
deletes
+        if (pStart->GetContentIndex() != nLastEnd) // not 0 so we eliminate 
adjacent deletes
         {
             extents.emplace_back(pNode, nLastEnd, pStart->GetContentIndex());
             mergedText.append(pNode->GetText().subView(nLastEnd, 
pStart->GetContentIndex() - nLastEnd));
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index c6129993dbfa..56bb84119571 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -538,12 +538,12 @@ bool SwUndoDelete::CanGrouping( SwDoc& rDoc, const SwPaM& 
rDelPam )
 
     // Distinguish between BackSpace and Delete because the Undo array needs to
     // be constructed differently!
-    if( pEnd->nContent == m_nSttContent )
+    if( pEnd->GetContentIndex() == m_nSttContent )
     {
         if( m_bGroup && !m_bBackSp ) return false;
         m_bBackSp = true;
     }
-    else if( pStt->nContent == m_nSttContent )
+    else if( pStt->GetContentIndex() == m_nSttContent )
     {
         if( m_bGroup && m_bBackSp ) return false;
         m_bBackSp = false;
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 84ff22209bf5..2487a02efdea 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -1136,8 +1136,8 @@ void SwUndoSaveContent::DelContentIndex( const 
SwPosition& rMark,
                     || (bMaybe
                         && !(nDelContentType & DelContentType::Replace)
                         && type == IDocumentMarkAccess::MarkType::BOOKMARK
-                        && pStt->nContent == 0 // entire paragraph deleted?
-                        && pEnd->nContent == 
pEnd->GetNode().GetTextNode()->Len()))
+                        && pStt->GetContentIndex() == 0 // entire paragraph 
deleted?
+                        && pEnd->GetContentIndex() == 
pEnd->GetNode().GetTextNode()->Len()))
                 {
                     if( bMaybe )
                         bSavePos = true;
@@ -1562,7 +1562,7 @@ static bool IsAtEndOfSection(SwPosition const& rAnchorPos)
     assert(rAnchorPos.nNode <= node); // last valid anchor pos is last content
     return node == rAnchorPos.nNode
         // at-para fly has no SwContentIndex!
-        && (rAnchorPos.nContent == pNode->Len() || rAnchorPos.GetContentNode() 
== nullptr);
+        && (rAnchorPos.GetContentIndex() == pNode->Len() || 
rAnchorPos.GetContentNode() == nullptr);
 }
 
 static bool IsAtStartOfSection(SwPosition const& rAnchorPos)
@@ -1573,7 +1573,7 @@ static bool IsAtStartOfSection(SwPosition const& 
rAnchorPos)
     assert(pNode);
     (void) pNode;
     assert(node <= rAnchorPos.nNode);
-    return node == rAnchorPos.nNode && rAnchorPos.nContent == 0;
+    return node == rAnchorPos.nNode && rAnchorPos.GetContentIndex() == 0;
 }
 
 /// passed start / end position could be on section start / end node
@@ -1595,10 +1595,10 @@ static bool IsNotBackspaceHeuristic(
     // check if the selection is backspace/delete created by DelLeft/DelRight
     if (rStart.GetNodeIndex() + 1 != rEnd.GetNodeIndex())
         return true;
-    if (rEnd.nContent != 0)
+    if (rEnd.GetContentIndex() != 0)
         return true;
     const SwTextNode* pTextNode = rStart.GetNode().GetTextNode();
-    if (!pTextNode || rStart.nContent != pTextNode->Len())
+    if (!pTextNode || rStart.GetContentIndex() != pTextNode->Len())
         return true;
     return false;
 }
@@ -1632,14 +1632,14 @@ bool IsDestroyFrameAnchoredAtChar(SwPosition const & 
rAnchorPos,
     return ((rStart < rAnchorPos)
             || (rStart == rAnchorPos
                 // special case: fully deleted node
-                && ((rStart.nNode != rEnd.nNode && rStart.nContent == 0
+                && ((rStart.nNode != rEnd.nNode && rStart.GetContentIndex() == 0
                         // but not if the selection is backspace/delete!
                         && IsNotBackspaceHeuristic(rStart, rEnd))
                     || (IsAtStartOfSection(rAnchorPos) && 
IsAtEndOfSection2(rEnd)))))
         && ((rAnchorPos < rEnd)
             || (rAnchorPos == rEnd
                 // special case: fully deleted node
-                && ((rEnd.nNode != rStart.nNode && rEnd.nContent == 
rEnd.GetNode().GetTextNode()->Len()
+                && ((rEnd.nNode != rStart.nNode && rEnd.GetContentIndex() == 
rEnd.GetNode().GetTextNode()->Len()
                         && IsNotBackspaceHeuristic(rStart, rEnd))
                     || (IsAtEndOfSection(rAnchorPos) && 
IsAtStartOfSection2(rStart)))));
 }
@@ -1673,7 +1673,7 @@ bool IsSelectFrameAnchoredAtPara(SwPosition const & 
rAnchorPos,
             || (rStart.nNode == rAnchorPos.nNode
                 && !(nDelContentType & DelContentType::ExcludeFlyAtStartEnd)
                 // special case: fully deleted node
-                && ((rStart.nNode != rEnd.nNode && rStart.nContent == 0
+                && ((rStart.nNode != rEnd.nNode && rStart.GetContentIndex() == 0
                         // but not if the selection is backspace/delete!
                         && IsNotBackspaceHeuristic(rStart, rEnd))
                     || (IsAtStartOfSection2(rStart) && 
IsAtEndOfSection2(rEnd)))))
@@ -1681,7 +1681,7 @@ bool IsSelectFrameAnchoredAtPara(SwPosition const & 
rAnchorPos,
             || (rAnchorPos.nNode == rEnd.nNode
                 && !(nDelContentType & DelContentType::ExcludeFlyAtStartEnd)
                 // special case: fully deleted node
-                && ((rEnd.nNode != rStart.nNode && rEnd.nContent == 
rEnd.GetNode().GetTextNode()->Len()
+                && ((rEnd.nNode != rStart.nNode && rEnd.GetContentIndex() == 
rEnd.GetNode().GetTextNode()->Len()
                         && IsNotBackspaceHeuristic(rStart, rEnd))
                     || (IsAtEndOfSection2(rEnd) && 
IsAtStartOfSection2(rStart)))));
 }
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 932a36706507..eef08382f53e 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -166,9 +166,9 @@ bool SwUndoInsert::CanGrouping( const SwPosition& rPos )
                 const SwContentNode* pIReg = rPos.GetContentNode();
                 for(SwRangeRedline* pRedl : rTable)
                 {
-                    SwContentIndex* pIdx = &pRedl->End()->nContent;
-                    if( pIReg == pIdx->GetContentNode() &&
-                        m_nContent == pIdx->GetIndex() )
+                    const SwPosition& rIdx = *pRedl->End();
+                    if( pIReg == rIdx.GetContentNode() &&
+                        m_nContent == rIdx.GetContentIndex() )
                     {
                         if( !pRedl->HasMark() || !m_pRedlData ||
                             *pRedl != *m_pRedlData || *pRedl != aRData )
@@ -670,7 +670,7 @@ void SwUndoReplace::Impl::UndoImpl(::sw::UndoRedoContext & 
rContext)
         assert(ret); (void)ret;
         if (m_nSttNd != m_nEndNd)
         {   // in case of regex inserting paragraph breaks, join nodes...
-            assert(rPam.GetMark()->nContent == 
rPam.GetMark()->GetNode().GetTextNode()->Len());
+            assert(rPam.GetMark()->GetContentIndex() == 
rPam.GetMark()->GetNode().GetTextNode()->Len());
             rPam.GetPoint()->Assign( m_nEndNd - m_nOffset, m_nEndCnt );
             pDoc->getIDocumentContentOperations().DeleteAndJoin(rPam);
         }
diff --git a/sw/source/core/unocore/unoobj.cxx 
b/sw/source/core/unocore/unoobj.cxx
index d531430a9eb4..11669ff2e9a7 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -1237,7 +1237,7 @@ SwXTextCursor::gotoNextWord(sal_Bool Expand)
     SwUnoCursorHelper::SelectPam(rUnoCursor, Expand);
     // end of paragraph
     if (rUnoCursor.GetPointContentNode() &&
-            (pPoint->nContent == rUnoCursor.GetPointContentNode()->Len()))
+            (pPoint->GetContentIndex() == 
rUnoCursor.GetPointContentNode()->Len()))
     {
         rUnoCursor.Right(1);
     }
@@ -1280,14 +1280,14 @@ SwXTextCursor::gotoPreviousWord(sal_Bool Expand)
 
     SwUnoCursorHelper::SelectPam(rUnoCursor, Expand);
     // start of paragraph?
-    if (pPoint->nContent == 0)
+    if (pPoint->GetContentIndex() == 0)
     {
         rUnoCursor.Left(1);
     }
     else
     {
         rUnoCursor.GoPrevWordWT( i18n::WordType::DICTIONARY_WORD );
-        if (pPoint->nContent == 0)
+        if (pPoint->GetContentIndex() == 0)
         {
             rUnoCursor.Left(1);
         }
@@ -1383,7 +1383,7 @@ SwXTextCursor::isStartOfSentence()
     SwUnoCursor & rUnoCursor( GetCursorOrThrow() );
 
     // start of paragraph?
-    bool bRet = rUnoCursor.GetPoint()->nContent == 0;
+    bool bRet = rUnoCursor.GetPoint()->GetContentIndex() == 0;
     // with mark ->no sentence start
     // (check if cursor is no selection, i.e. it does not have
     // a mark or else point and mark are identical)
@@ -1407,7 +1407,7 @@ SwXTextCursor::isEndOfSentence()
 
     // end of paragraph?
     bool bRet = rUnoCursor.GetPointContentNode() &&
-        (rUnoCursor.GetPoint()->nContent == 
rUnoCursor.GetPointContentNode()->Len());
+        (rUnoCursor.GetPoint()->GetContentIndex() == 
rUnoCursor.GetPointContentNode()->Len());
     // with mark->no sentence end
     // (check if cursor is no selection, i.e. it does not have
     // a mark or else point and mark are identical)
diff --git a/sw/source/core/unocore/unoparagraph.cxx 
b/sw/source/core/unocore/unoparagraph.cxx
index b4a3a6553c22..2ef641a6e6b9 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -80,12 +80,12 @@ SwParaSelection::SwParaSelection(SwCursor & rCursor)
         m_rCursor.DeleteMark();
     }
     // is it at the start?
-    if (m_rCursor.GetPoint()->nContent != 0)
+    if (m_rCursor.GetPoint()->GetContentIndex() != 0)
     {
         m_rCursor.MovePara(GoCurrPara, fnParaStart);
     }
     // or at the end already?
-    if (m_rCursor.GetPoint()->nContent != 
m_rCursor.GetPointContentNode()->Len())
+    if (m_rCursor.GetPoint()->GetContentIndex() != 
m_rCursor.GetPointContentNode()->Len())
     {
         m_rCursor.SetMark();
         m_rCursor.MovePara(GoCurrPara, fnParaEnd);
@@ -94,7 +94,7 @@ SwParaSelection::SwParaSelection(SwCursor & rCursor)
 
 SwParaSelection::~SwParaSelection()
 {
-    if (m_rCursor.GetPoint()->nContent != 0)
+    if (m_rCursor.GetPoint()->GetContentIndex() != 0)
     {
         m_rCursor.DeleteMark();
         m_rCursor.MovePara(GoCurrPara, fnParaStart);
diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index fcb030a974aa..919364816ebb 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -3809,11 +3809,10 @@ void SwEditWin::MouseButtonDown(const MouseEvent& 
_rMEvt)
                         // position or on position after field depending on 
which
                         // half of the field was clicked on.
                         SwTextAttr const*const 
pTextField(aFieldAtPos.pFndTextAttr);
-                        if (pTextField && 
rSh.GetCurrentShellCursor().GetPoint()->nContent
-                                .GetIndex() != pTextField->GetStart())
+                        if (pTextField &&
+                            
rSh.GetCurrentShellCursor().GetPoint()->GetContentIndex() != 
pTextField->GetStart())
                         {
-                            
assert(rSh.GetCurrentShellCursor().GetPoint()->nContent
-                                    .GetIndex() == (pTextField->GetStart() + 
1));
+                            
assert(rSh.GetCurrentShellCursor().GetPoint()->GetContentIndex() == 
(pTextField->GetStart() + 1));
                             rSh.Left( SwCursorSkipMode::Chars, false, 1, false 
);
                         }
                         // don't go into the !bOverSelect block below - it 
moves
diff --git a/sw/source/uibase/uiview/formatclipboard.cxx 
b/sw/source/uibase/uiview/formatclipboard.cxx
index 16e72e40bdfc..b8c5023eac0d 100644
--- a/sw/source/uibase/uiview/formatclipboard.cxx
+++ b/sw/source/uibase/uiview/formatclipboard.cxx
@@ -319,7 +319,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, 
SfxItemPool& rPool, bool bP
             // revert left and right
             if ( rightToLeft )
             {
-                if (pCursor->GetPoint()->nContent == 0)
+                if (pCursor->GetPoint()->GetContentIndex() == 0)
                     dontMove = true;
                 else
                     bForwardSelection = !bForwardSelection;
diff --git a/sw/source/uibase/uiview/viewstat.cxx 
b/sw/source/uibase/uiview/viewstat.cxx
index e002558a6133..8f69f23d4aea 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -403,7 +403,7 @@ void SwView::GetState(SfxItemSet &rSet)
                             oSelectionEnd.emplace(*pEndNode);
                         }
                         else
-                            oSelectionEnd.emplace(pCursor->End()->nNode, 
pCursor->End()->nContent);
+                            oSelectionEnd.emplace(*pCursor->End());
 
                         for(; index < table.size(); ++index )
                         {

Reply via email to