sw/source/core/edit/edatmisc.cxx | 2 +- sw/source/core/edit/edattr.cxx | 2 +- sw/source/core/edit/editsh.cxx | 7 +++---- sw/source/core/edit/edlingu.cxx | 6 +++--- 4 files changed, 8 insertions(+), 9 deletions(-)
New commits: commit 4e91f49339d5197f8d32f633a5f48375db68e808 Author: Noel Grandin <[email protected]> AuthorDate: Sun Aug 21 19:09:51 2022 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Mon Aug 22 09:38:35 2022 +0200 use more SwPosition::GetNode Change-Id: Id277c3c56a3a5f3d11160d750fd712d599150cc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138645 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> 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 )
