summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-08-21 19:09:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-22 09:38:35 +0200
commit4e91f49339d5197f8d32f633a5f48375db68e808 (patch)
treef934335015b16b5787af9d7b5074a9fad6353658
parentdb04b3e154a1fb8f222232ef969bb3617e051329 (diff)
use more SwPosition::GetNode
Change-Id: Id277c3c56a3a5f3d11160d750fd712d599150cc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138645 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sw/source/core/edit/edatmisc.cxx2
-rw-r--r--sw/source/core/edit/edattr.cxx2
-rw-r--r--sw/source/core/edit/editsh.cxx7
-rw-r--r--sw/source/core/edit/edlingu.cxx6
4 files changed, 8 insertions, 9 deletions
diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx
index 9dc807250c2f..cfc465fce837 100644
--- a/sw/source/core/edit/edatmisc.cxx
+++ b/sw/source/core/edit/edatmisc.cxx
@@ -67,7 +67,7 @@ void SwEditShell::GCAttr()
}
else
{
- const SwNodeIndex& rEnd = rPaM.End()->nNode;
+ const SwNode& rEnd = rPaM.End()->GetNode();
SwNodeIndex aIdx( rPaM.Start()->GetNode() );
SwNode* pNd = &aIdx.GetNode();
do {
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 01f29cd05b97..5da7b9dffb59 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -717,7 +717,7 @@ SvtScriptType SwEditShell::GetScriptType() const
const SwScriptInfo *const pScriptInfo =
SwScriptInfo::GetScriptInfo(*pTNd, &pFrame);
- sal_Int32 nChg = aIdx == pStt->nNode
+ sal_Int32 nChg = aIdx == pStt->GetNode()
? pStt->GetContentIndex()
: 0;
sal_Int32 nEndPos = aIdx == nEndIdx
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 7a6e08bf76d2..93540b887a98 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -510,10 +510,10 @@ void SwEditShell::ReplaceDropText( const OUString &rStr, SwPaM* pPaM )
StartAllAction();
- const SwNodeIndex& rNd = pCursor->GetPoint()->nNode;
+ const SwNode& rNd = pCursor->GetPoint()->GetNode();
SwPaM aPam( rNd, rStr.getLength(), rNd, 0 );
SwTextFrame const*const pTextFrame(static_cast<SwTextFrame const*>(
- rNd.GetNode().GetTextNode()->getLayoutFrame(GetLayout())));
+ rNd.GetTextNode()->getLayoutFrame(GetLayout())));
if (pTextFrame)
{
*aPam.GetPoint() = pTextFrame->MapViewToModelPos(TextFrameIndex(0));
@@ -858,8 +858,7 @@ sal_uInt16 SwEditShell::GetLineCount()
sal_uInt16 nRet = 0;
CalcLayout();
SwPaM* pPam = GetCursor();
- SwNodeIndex& rPtIdx = pPam->GetPoint()->nNode;
- SwNodeIndex aStart( rPtIdx );
+ SwNodeIndex aStart( pPam->GetPoint()->GetNode() );
SwContentNode* pCNd;
SwContentFrame *pContentFrame = nullptr;
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 00590e931fbb..94d691b9ac87 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -555,7 +555,7 @@ void SwHyphIter::InsertSoftHyph( const sal_Int32 nHyphPos )
const sal_Int32 nLastHyphLen = GetEnd()->GetContentIndex() -
pSttPos->GetContentIndex();
- if( pSttPos->nNode != pEndPos->nNode || !nLastHyphLen )
+ if( pSttPos->GetNode() != pEndPos->GetNode() || !nLastHyphLen )
{
OSL_ENSURE( pSttPos->GetNode() == pEndPos->GetNode(),
"SwHyphIter::InsertSoftHyph: node warp during hyphenation" );
@@ -1702,8 +1702,8 @@ void SwEditShell::IgnoreGrammarErrorAt( SwPaM& rErrorPosition )
{
SwTextNode *pNode;
SwWrongList *pWrong;
- SwNodeIndex aIdx = rErrorPosition.Start()->nNode;
- SwNodeIndex aEndIdx = rErrorPosition.Start()->nNode;
+ SwNodeIndex aIdx(rErrorPosition.Start()->GetNode());
+ SwNodeIndex aEndIdx(rErrorPosition.Start()->GetNode());
sal_Int32 nStart = rErrorPosition.Start()->GetContentIndex();
sal_Int32 nEnd = COMPLETE_STRING;
while( aIdx <= aEndIdx )