summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-09-30 09:10:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-09-30 13:37:04 +0200
commit1f9fc5da3c38d3e73f1427f040d29a27bacfbe44 (patch)
tree1724db0033c071822075a3a9605039113c32982d
parent113d9bba057b2fd634fcfcebb83a4d92cf41d69f (diff)
use more SwPosition::SetContent
as part of the process of hiding the internals of SwPosition Change-Id: Idc7bc4cd22f13cf7bfb7982d445d13970a9e70a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140792 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sw/source/core/edit/edattr.cxx2
-rw-r--r--sw/source/core/edit/editsh.cxx3
-rw-r--r--sw/source/core/edit/edtab.cxx7
3 files changed, 4 insertions, 8 deletions
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 5da7b9dffb59..8ff0026d03c3 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -682,7 +682,7 @@ SvtScriptType SwEditShell::GetScriptType() const
// position, if no selection exist!
if( nPos )
{
- SwContentIndex aIdx( pStt->nContent );
+ SwContentIndex aIdx( pStt->GetContentNode(), pStt->GetContentIndex() );
if( pTNd->GoPrevious( &aIdx, SwCursorSkipMode::Chars ) )
nPos = aIdx.GetIndex();
}
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 93540b887a98..6803f31bc13f 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -119,8 +119,7 @@ void SwEditShell::Insert2(const OUString &rStr, const bool bForceExpandHints )
SwNode& rNode = pTmpCursor->GetPoint()->GetNode();
if ( rNode.IsTextNode() )
{
- SwContentIndex& rIdx = pTmpCursor->GetPoint()->nContent;
- sal_Int32 nPrevPos = rIdx.GetIndex();
+ sal_Int32 nPrevPos = pTmpCursor->GetPoint()->GetContentIndex();
if ( nPrevPos )
--nPrevPos;
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index 6e83806595b7..7d4a8a789838 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -172,8 +172,7 @@ bool SwEditShell::TableToText( sal_Unicode cCh )
// move current Cursor out of the listing area
SwNodeIndex aTabIdx( *pTableNd );
pCursor->DeleteMark();
- pCursor->GetPoint()->nNode = *pTableNd->EndOfSectionNode();
- pCursor->GetPoint()->nContent.Assign( nullptr, 0 );
+ pCursor->GetPoint()->Assign(*pTableNd->EndOfSectionNode());
// move sPoint and Mark out of the area!
pCursor->SetMark();
pCursor->DeleteMark();
@@ -183,13 +182,11 @@ bool SwEditShell::TableToText( sal_Unicode cCh )
bool bRet = ConvertTableToText( pTableNd, cCh );
EndUndo();
//End for bug #i119954#
- pCursor->GetPoint()->nNode = aTabIdx;
+ pCursor->GetPoint()->Assign(aTabIdx);
SwContentNode* pCNd = pCursor->GetPointContentNode();
if( !pCNd )
pCursor->Move( fnMoveForward, GoInContent );
- else
- pCursor->GetPoint()->nContent.Assign( pCNd, 0 );
EndAllAction();
return bRet;