sw/source/core/layout/flycnt.cxx | 2 +- sw/source/core/layout/trvlfrm.cxx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
New commits: commit 2ccbea717d1e11a821bc5fc0900ac0e6f7a566c4 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Sep 30 09:14:24 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Sep 30 13:37:24 2022 +0200 use more SwPosition::SetContent part of the process of hiding the internals of SwPosition Change-Id: I3dde04bf78e1412f731b3cd63c658adfb1b2fea5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140793 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 7fce8802948b..0756eadf5b5a 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -1393,7 +1393,7 @@ void SwFlyAtContentFrame::SetAbsPos( const Point &rNew ) pos.GetContentIndex(), RES_TXTATR_INPUTFIELD, ::sw::GetTextAttrMode::Parent); if (pTextInputField != nullptr) { - pos.nContent = pTextInputField->GetStart(); + pos.SetContent( pTextInputField->GetStart() ); } ResetLastCharRectHeight(); if( text::RelOrientation::CHAR == pFormat->GetVertOrient().GetRelationOrient() ) diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index ef503f153650..dfcfad57cef5 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -304,7 +304,8 @@ bool SwPageFrame::GetModelPositionForViewPoint( SwPosition *pPos, Point &rPoint, // previous character; to get a better measure from // lcl_getDistance, extend that to a rectangle over // the entire character. - SwPosition const nextTextPos(prevTextPos.nContent, +1); + SwPosition nextTextPos(prevTextPos); + nextTextPos.AdjustContent(+1); SwRect nextTextRect; pTextFrame->GetCharRect(nextTextRect, nextTextPos); SwRectFnSet aRectFnSet(pTextFrame);