summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-24 09:56:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-24 12:50:57 +0200
commit47d51286103dc6fa2c4ddfa871bde4878aef17ef (patch)
tree444222c3dfe37407620b4d569310dc7591319b76 /sw/source/filter/ww8
parentbe9644c5b6aeecdb363d4fc9ba4a113c6280ae80 (diff)
Use more SwPosition::Adjust
to keep the internal fields of SwPosition in sync. Change-Id: Icdcf9db112f34b3164e52c33f90484755cc08ccf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx6
3 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 078d2aae5ddc..e18ab2e655c7 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -6720,7 +6720,7 @@ bool SwWW8ImplReader::InEqualApo(int nLvl) const
namespace sw::hack
{
Position::Position(const SwPosition &rPos)
- : maPtNode(rPos.nNode), mnPtContent(rPos.GetContentIndex())
+ : maPtNode(rPos.GetNode()), mnPtContent(rPos.GetContentIndex())
{
}
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 9b6cdfe6c754..08b7e8017a46 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2366,7 +2366,7 @@ void wwSectionManager::PrependedInlineNode(const SwPosition &rPos,
{
OSL_ENSURE(!maSegments.empty(),
"should not be possible, must be at least one segment");
- if ((!maSegments.empty()) && (maSegments.back().maStart == rPos.nNode))
+ if ((!maSegments.empty()) && (maSegments.back().maStart == rPos.GetNode()))
maSegments.back().maStart.Assign(rNode);
}
@@ -2649,13 +2649,13 @@ void WW8TabDesc::MergeCells()
if( rCell.bVertMerge && !rCell.bVertRestart )
{
SwPaM aPam( *m_pTabBox->GetSttNd(), 0 );
- aPam.GetPoint()->nNode++;
+ aPam.GetPoint()->Adjust(SwNodeOffset(1));
SwTextNode* pNd = aPam.GetPointNode().GetTextNode();
while( pNd )
{
pNd->SetCountedInList( false );
- aPam.GetPoint()->nNode++;
+ aPam.GetPoint()->Adjust(SwNodeOffset(1));
pNd = aPam.GetPointNode().GetTextNode();
}
}
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 12b940b96a9d..f137dfec72a4 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -529,7 +529,7 @@ sal_uInt16 SwWW8ImplReader::End_Field()
case ww::eFORMTEXT:
if (bUseEnhFields && m_pPaM!=nullptr && m_pPaM->GetPoint()!=nullptr) {
SwPosition aEndPos = *m_pPaM->GetPoint();
- SwPaM aFieldPam( m_aFieldStack.back().GetPtNode(), m_aFieldStack.back().GetPtContent(), aEndPos.nNode, aEndPos.GetContentIndex());
+ SwPaM aFieldPam( m_aFieldStack.back().GetPtNode().GetNode(), m_aFieldStack.back().GetPtContent(), aEndPos.GetNode(), aEndPos.GetContentIndex());
IDocumentMarkAccess* pMarksAccess = m_rDoc.getIDocumentMarkAccess( );
IFieldmark *pFieldmark = pMarksAccess->makeFieldBookmark(
aFieldPam, m_aFieldStack.back().GetBookmarkName(), ODF_FORMTEXT,
@@ -636,8 +636,8 @@ sal_uInt16 SwWW8ImplReader::End_Field()
// Unhandled field with stored code
SwPosition aEndPos = *m_pPaM->GetPoint();
SwPaM aFieldPam(
- m_aFieldStack.back().GetPtNode(), m_aFieldStack.back().GetPtContent(),
- aEndPos.nNode, aEndPos.GetContentIndex());
+ m_aFieldStack.back().GetPtNode().GetNode(), m_aFieldStack.back().GetPtContent(),
+ aEndPos.GetNode(), aEndPos.GetContentIndex());
IDocumentMarkAccess* pMarksAccess = m_rDoc.getIDocumentMarkAccess( );