summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-24 11:01:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-24 14:29:26 +0200
commitf067bfebf6fbdfb66d545585fea9fe6cec559038 (patch)
tree2566a770a5ddeccc5b31db19008d5ada16882433 /sw
parenta310d3f4669650b9b33eb81c1e9f7e9be679b1e2 (diff)
Use more SwPosition::Adjust
to keep the internal fields of SwPosition in sync. Change-Id: I8a418c2806eefada74471c28aa23189950d2e7ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138758 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8par.cxx18
1 files changed, 5 insertions, 13 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index e18ab2e655c7..18610cc41f5a 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2503,9 +2503,9 @@ bool SwWW8ImplReader::SetSpacing(SwPaM &rMyPam, int nSpace, bool bIsUpper )
aUL.SetLower( static_cast< sal_uInt16 >(nSpace) );
const sal_Int32 nEnd = pSpacingPos->GetContentIndex();
- rMyPam.GetPoint()->nContent.Assign(rMyPam.GetPointContentNode(), 0);
+ rMyPam.GetPoint()->SetContent(0);
m_xCtrlStck->NewAttr(*pSpacingPos, aUL);
- rMyPam.GetPoint()->nContent.Assign(rMyPam.GetPointContentNode(), nEnd);
+ rMyPam.GetPoint()->SetContent(nEnd);
m_xCtrlStck->SetAttr(*pSpacingPos, RES_UL_SPACE);
bRet = true;
}
@@ -4454,11 +4454,7 @@ static void GiveNodePageDesc(SwNodeIndex const &rIdx, const SwFormatPageDesc &rP
}
else
{
- SwPosition aPamStart(rIdx);
- aPamStart.nContent.Assign(
- rIdx.GetNode().GetContentNode(), 0);
- SwPaM aPage(aPamStart);
-
+ SwPaM aPage(rIdx);
rDoc.getIDocumentContentOperations().InsertPoolItem(aPage, rPgDesc);
}
}
@@ -4620,9 +4616,7 @@ void wwSectionManager::InsertSegments()
mrReader.m_rDoc.GetNodes().MakeTextNode(aAnchor.GetNode(),
mrReader.m_rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_TEXT ));
- aSectPaM.GetPoint()->Assign(*pTextNd);
- aSectPaM.GetPoint()->nContent.Assign(
- aSectPaM.GetPointContentNode(), 0);
+ aSectPaM.GetPoint()->Assign(*pTextNd, 0);
}
aSectPaM.SetMark();
@@ -6726,9 +6720,7 @@ namespace sw::hack
Position::operator SwPosition() const
{
- SwPosition aRet(maPtNode);
- aRet.nContent.Assign(maPtNode.GetNode().GetContentNode(), mnPtContent);
- return aRet;
+ return SwPosition(maPtNode, maPtNode.GetNode().GetContentNode(), mnPtContent);
}
}