summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-10 13:43:56 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-14 12:03:26 +0200
commitedc5240a96f003b9aec8f8d2ce92db39ad603fd7 (patch)
treeda0faa62c787e15d7368a5dbf48e723c96652e2c /sw/source/filter/xml
parentab0d9af99b2dc69fa8e7463fb33ca28cbccf484d (diff)
rename SwPaM::GetContentNode to GetPointContentNode/GetMarkContentNode
Using a parameter to select point/mark makes the code much harder to read Change-Id: Ic24098a6045ff2262d4c808228ded7bf8206fe8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138085 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/swxml.cxx10
-rw-r--r--sw/source/filter/xml/xmlimp.cxx2
2 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index aaf206016603..b124189ccd72 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -90,18 +90,18 @@ using namespace ::com::sun::star::lang;
static void lcl_EnsureValidPam( SwPaM& rPam )
{
- if( rPam.GetContentNode() != nullptr )
+ if( rPam.GetPointContentNode() != nullptr )
{
// set proper point content
- if( rPam.GetContentNode() != rPam.GetPoint()->GetContentNode() )
+ if( rPam.GetPointContentNode() != rPam.GetPoint()->GetContentNode() )
{
- rPam.GetPoint()->nContent.Assign( rPam.GetContentNode(), 0 );
+ rPam.GetPoint()->nContent.Assign( rPam.GetPointContentNode(), 0 );
}
// else: point was already valid
// if mark is invalid, we delete it
- if( ( rPam.GetContentNode( false ) == nullptr ) ||
- ( rPam.GetContentNode( false ) != rPam.GetMark()->GetContentNode() ) )
+ if( ( rPam.GetMarkContentNode() == nullptr ) ||
+ ( rPam.GetMarkContentNode() != rPam.GetMark()->GetContentNode() ) )
{
rPam.DeleteMark();
}
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 8816422d39ef..a0b201cda9cc 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -727,7 +727,7 @@ void SwXMLImport::endDocument()
( pPrev->IsEndNode() &&
pPrev->StartOfSectionNode()->IsSectionNode() ) )
{
- SwContentNode* pCNd = pPaM->GetContentNode();
+ SwContentNode* pCNd = pPaM->GetPointContentNode();
if( pCNd && pCNd->StartOfSectionIndex()+2 <
pCNd->EndOfSectionIndex() )
{