diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-01 10:23:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-02 15:10:43 +0200 |
commit | 961d42e1ca1da7f3199d46445b3766d9c6a6c938 (patch) | |
tree | 1797e56bac0bb438f4d3d27a7fb09d82fdafe827 /sw/source/filter/xml | |
parent | 21ed46f683dd9d838371cdba02593f3e64a5124c (diff) |
introduce SwPosition::GetNodeIndex
as part of the process of hiding the internals of SwPosition
largely done by doing:
git grep -lF 'nNode.GetIndex' | xargs perl -pi -e
's/\bnNode\.GetIndex/GetNodeIndex/g'
Change-Id: I3616cea4c47595afe74f1aa8e3be553279f25d44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137694
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/xml')
-rw-r--r-- | sw/source/filter/xml/XMLRedlineImportHelper.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlimp.cxx | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index 3fae08a5271b..9d4cf7f28377 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -680,7 +680,7 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo) // set content node (if necessary) if (nullptr != pRedlineInfo->pContentIndex) { - SwNodeOffset nPoint = aPaM.GetPoint()->nNode.GetIndex(); + SwNodeOffset nPoint = aPaM.GetPoint()->GetNodeIndex(); if( nPoint < pRedlineInfo->pContentIndex->GetIndex() || nPoint > pRedlineInfo->pContentIndex->GetNode().EndOfSectionIndex() ) pRedline->SetContentIdx(pRedlineInfo->pContentIndex); diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index d86bf0973a44..6cbfbda7b17a 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -574,7 +574,7 @@ void SwXMLImport::startDocument() // Split once and remember the node that has been split. pDoc->getIDocumentContentOperations().SplitNode( *pPos, false ); - *m_pSttNdIdx = pPos->nNode.GetIndex()-1; + *m_pSttNdIdx = pPos->GetNodeIndex()-1; // Split again. pDoc->getIDocumentContentOperations().SplitNode( *pPos, false ); @@ -666,14 +666,14 @@ void SwXMLImport::endDocument() #if OSL_DEBUG_LEVEL > 0 // !!! This should be impossible !!!! OSL_ENSURE( m_pSttNdIdx->GetIndex()+1 != - pPaM->GetBound().nNode.GetIndex(), + pPaM->GetBound().GetNodeIndex(), "PaM.Bound1 point to new node " ); OSL_ENSURE( m_pSttNdIdx->GetIndex()+1 != - pPaM->GetBound( false ).nNode.GetIndex(), + pPaM->GetBound( false ).GetNodeIndex(), "PaM.Bound2 points to new node" ); if( m_pSttNdIdx->GetIndex()+1 == - pPaM->GetBound().nNode.GetIndex() ) + pPaM->GetBound().GetNodeIndex() ) { const sal_Int32 nCntPos = pPaM->GetBound().nContent.GetIndex(); @@ -681,7 +681,7 @@ void SwXMLImport::endDocument() pTextNode->GetText().getLength() + nCntPos ); } if( m_pSttNdIdx->GetIndex()+1 == - pPaM->GetBound( false ).nNode.GetIndex() ) + pPaM->GetBound( false ).GetNodeIndex() ) { const sal_Int32 nCntPos = pPaM->GetBound( false ).nContent.GetIndex(); @@ -715,7 +715,7 @@ void SwXMLImport::endDocument() if( !pPos->nContent.GetIndex() ) { SwTextNode* pCurrNd; - SwNodeOffset nNodeIdx = pPos->nNode.GetIndex(); + SwNodeOffset nNodeIdx = pPos->GetNodeIndex(); pDoc = &pPaM->GetDoc(); OSL_ENSURE( pPos->GetNode().IsContentNode(), |