sw/source/filter/html/htmlatr.cxx | 2 +- sw/source/filter/html/htmlgrin.cxx | 4 +--- sw/source/filter/html/htmltab.cxx | 7 ++----- 3 files changed, 4 insertions(+), 9 deletions(-)
New commits: commit 0e6afb0b2c0f9020b3144657f11b30c8c28bf67b Author: Noel Grandin <[email protected]> AuthorDate: Thu Aug 25 14:38:07 2022 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Thu Aug 25 17:57:15 2022 +0200 use more SwPosition::AdjustContent part of hiding the internals of SwPosition Change-Id: Ie42ffa1bdea93dc351bf4fa46a8cab080e1616c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138812 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 97711c3e5430..b3011ee78f0e 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -2470,7 +2470,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) // Placeholder for a single-point fieldmark. SwPosition aMarkPos = *rWrt.m_pCurrentPam->GetPoint(); - aMarkPos.nContent += nStrPos - aMarkPos.GetContentIndex(); + aMarkPos.AdjustContent( nStrPos - aMarkPos.GetContentIndex() ); rHTMLWrt.OutPointFieldmarks(aMarkPos); } else diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 9d0ee1011427..2fbd30610705 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -1476,9 +1476,7 @@ void SwHTMLParser::StripTrailingPara() // #i81002# - refactoring // Do not directly manipulate member of <SwBookmark> { - SwPosition aNewPos(*pNd); - aNewPos.nContent.Assign(pNd, pNd->Len()); - const SwPaM aPaM(aNewPos); + const SwPaM aPaM(*pNd, pNd->Len()); pMarkAccess->repositionMark(*ppMark, aPaM); } } diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index c0ec29da8e4d..b06536055e10 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -2645,13 +2645,10 @@ const SwStartNode *SwHTMLParser::InsertTableSection( sal_uInt16 nPoolId ) SwStartNode *SwHTMLParser::InsertTempTableCaptionSection() { SwTextFormatColl *pColl = m_pCSS1Parser->GetTextCollFromPool( RES_POOLCOLL_TEXT ); - SwNodeIndex& rIdx = m_pPam->GetPoint()->nNode; - rIdx = m_xDoc->GetNodes().GetEndOfExtras(); - SwStartNode *pStNd = m_xDoc->GetNodes().MakeTextSection( rIdx.GetNode(), + SwStartNode *pStNd = m_xDoc->GetNodes().MakeTextSection( m_xDoc->GetNodes().GetEndOfExtras(), SwNormalStartNode, pColl ); - rIdx = pStNd->GetIndex() + 1; - m_pPam->GetPoint()->nContent.Assign( rIdx.GetNode().GetTextNode(), 0 ); + m_pPam->GetPoint()->Assign( pStNd->GetIndex() + 1); return pStNd; }
