sw/source/core/fields/postithelper.cxx |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 124d786e68dd5838b814ec8a453769ff7ba76f23
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Sep 28 16:07:30 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Sep 28 17:45:40 2022 +0200

    use more SwPosition::AdjustContent
    
    part of the process of hiding the internals of SwPosition
    
    Change-Id: Ic2a13b4bcdc820f3604179ee391b8a0df962226b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140709
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/core/fields/postithelper.cxx 
b/sw/source/core/fields/postithelper.cxx
index 558b65fcbcbb..a3f27be6f533 100644
--- a/sw/source/core/fields/postithelper.cxx
+++ b/sw/source/core/fields/postithelper.cxx
@@ -59,13 +59,13 @@ bool AnnotationMarkCoversCommentAnchor(const 
sw::mark::IMark* pAnnotationMark,
         // This can be the as-char case: the comment placeholder character is 
exactly between the
         // annotation mark start and end.
         SwPosition aPosition(rMarkStart);
-        ++aPosition.nContent;
+        aPosition.AdjustContent(+1);
         if (aPosition != rAnchorPos)
         {
             return false;
         }
 
-        ++aPosition.nContent;
+        aPosition.AdjustContent(+1);
         if (aPosition != rMarkEnd)
         {
             return false;
@@ -74,7 +74,7 @@ bool AnnotationMarkCoversCommentAnchor(const sw::mark::IMark* 
pAnnotationMark,
         return true;
     }
 
-    if (rMarkStart.nNode != rMarkEnd.nNode)
+    if (rMarkStart.GetNode() != rMarkEnd.GetNode())
     {
         return false;
     }
@@ -253,8 +253,7 @@ SwPosition SwAnnotationItem::GetAnchorPosition() const
     SwTextField* pTextField = mrFormatField.GetTextField();
     SwTextNode* pTextNode = pTextField->GetpTextNode();
 
-    SwPosition aPos( *pTextNode );
-    aPos.nContent.Assign( pTextNode, pTextField->GetStart() );
+    SwPosition aPos( *pTextNode, pTextField->GetStart() );
     return aPos;
 }
 

Reply via email to