summaryrefslogtreecommitdiff
path: root/sw/source/filter/html
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-25 14:38:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-25 17:57:15 +0200
commit0e6afb0b2c0f9020b3144657f11b30c8c28bf67b (patch)
tree63f8a96c64863fb99778c9b4a43bfd939162fac9 /sw/source/filter/html
parent35e4647689b1663a6e5a13f7ab8aebb0165e4ab2 (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/html')
-rw-r--r--sw/source/filter/html/htmlatr.cxx2
-rw-r--r--sw/source/filter/html/htmlgrin.cxx4
-rw-r--r--sw/source/filter/html/htmltab.cxx7
3 files changed, 4 insertions, 9 deletions
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;
}