summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/doclay.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-01 10:30:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-02 15:11:17 +0200
commitaf23d1c1fc407b3d5f020122e2830959d45ffaf1 (patch)
tree4ff56a1fd767efc3aa05266bc7038e811d1450ee /sw/source/core/doc/doclay.cxx
parent961d42e1ca1da7f3199d46445b3766d9c6a6c938 (diff)
introduce SwPosition::GetContentIndex
as part of the process of hiding the internals of SwPosition largely done by doing: git grep -lF 'nContent.GetIndex' | xargs perl -pi -e 's/\bnContent\.GetIndex/GetContentIndex/g' Change-Id: I12684071a6666c365dbadbab2a4b37cf51b274d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137695 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/doc/doclay.cxx')
-rw-r--r--sw/source/core/doc/doclay.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 5c1297a48ccb..8b9cd0ee6484 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -234,7 +234,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection_( const SwPosition& rAnchPos,
if ( RndStdIds::FLY_AS_CHAR == eAnchorId )
{
- const sal_Int32 nStt = rAnchPos.nContent.GetIndex();
+ const sal_Int32 nStt = rAnchPos.GetContentIndex();
SwTextNode * pTextNode = rAnchPos.GetNode().GetTextNode();
OSL_ENSURE(pTextNode!= nullptr, "There should be a SwTextNode!");
@@ -277,7 +277,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection_( const SwPosition& rAnchPos,
if (GetIDocumentUndoRedo().DoesUndo())
{
SwNodeOffset nNodeIdx = rAnchPos.GetNodeIndex();
- const sal_Int32 nCntIdx = rAnchPos.nContent.GetIndex();
+ const sal_Int32 nCntIdx = rAnchPos.GetContentIndex();
GetIDocumentUndoRedo().AppendUndo(
std::make_unique<SwUndoInsLayFormat>( pFormat, nNodeIdx, nCntIdx ));
}
@@ -475,19 +475,19 @@ static bool lcl_TstFlyRange( const SwPaM* pPam, const SwPosition* pFlyPos,
const SwNodeOffset nPamEndIndex = pPaMEnd->GetNodeIndex();
if (RndStdIds::FLY_AT_PARA == nAnchorId)
bOk = (nPamStartIndex < nFlyIndex && nPamEndIndex > nFlyIndex) ||
- (((nPamStartIndex == nFlyIndex) && (pPaMStart->nContent.GetIndex() == 0)) &&
+ (((nPamStartIndex == nFlyIndex) && (pPaMStart->GetContentIndex() == 0)) &&
(nPamEndIndex > nFlyIndex));
else
{
- const sal_Int32 nFlyContentIndex = pFlyPos->nContent.GetIndex();
- const sal_Int32 nPamEndContentIndex = pPaMEnd->nContent.GetIndex();
+ const sal_Int32 nFlyContentIndex = pFlyPos->GetContentIndex();
+ const sal_Int32 nPamEndContentIndex = pPaMEnd->GetContentIndex();
bOk = (nPamStartIndex < nFlyIndex &&
(( nPamEndIndex > nFlyIndex )||
((nPamEndIndex == nFlyIndex) &&
(nPamEndContentIndex > nFlyContentIndex))) )
||
(((nPamStartIndex == nFlyIndex) &&
- (pPaMStart->nContent.GetIndex() <= nFlyContentIndex)) &&
+ (pPaMStart->GetContentIndex() <= nFlyContentIndex)) &&
((nPamEndIndex > nFlyIndex) ||
(nPamEndContentIndex > nFlyContentIndex )));
}
@@ -793,7 +793,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable,
const SwPosition *pPos = rAnchor.GetContentAnchor();
SwTextNode *pTextNode = pPos->GetNode().GetTextNode();
OSL_ENSURE( pTextNode->HasHints(), "Missing FlyInCnt-Hint." );
- const sal_Int32 nIdx = pPos->nContent.GetIndex();
+ const sal_Int32 nIdx = pPos->GetContentIndex();
SwTextAttr * const pHint =
pTextNode->GetTextAttrForCharAt(nIdx, RES_TXTATR_FLYCNT);
@@ -1112,7 +1112,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable
const SwPosition *pPos = rAnchor.GetContentAnchor();
SwTextNode *pTextNode = pPos->GetNode().GetTextNode();
OSL_ENSURE( pTextNode->HasHints(), "Missing FlyInCnt-Hint." );
- const sal_Int32 nIdx = pPos->nContent.GetIndex();
+ const sal_Int32 nIdx = pPos->GetContentIndex();
SwTextAttr * const pHint =
pTextNode->GetTextAttrForCharAt( nIdx, RES_TXTATR_FLYCNT );