summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-08-06 13:18:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-07 10:25:08 +0200
commit0c2933d0a3ebd6074b89369df653538511363abb (patch)
tree87f5f0da90ae2e840f0c909567b22b3b661bc14c /sw/source/filter/xml
parentb8b9ad9ade866175d8d7f1b68a465060901efee9 (diff)
make IsInHeaderFooter take a SwNode, not an SwNodeIndex
as part of the process of hiding the internals of SwPosition Change-Id: Ic9e7e3fd121a86d8b84536157b6d6b204627f758 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137905 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/xmltble.cxx3
-rw-r--r--sw/source/filter/xml/xmltexti.cxx2
2 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 81528e5b8c2f..da4b0473f4ad 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -1196,7 +1196,6 @@ void SwXMLTextParagraphExport::exportTable(
OSL_ENSURE( pTableNd, "table node missing" );
if( bAutoStyles )
{
- SwNodeIndex aIdx( *pTableNd );
// AUTOSTYLES: Optimization: Do not export table autostyle if
// we are currently exporting the content.xml stuff and
// the table is located in header/footer:
@@ -1204,7 +1203,7 @@ void SwXMLTextParagraphExport::exportTable(
// ALL flags are set at the same time.
const bool bExportStyles = bool( GetExport().getExportFlags() & SvXMLExportFlags::STYLES );
if (!isAutoStylesCollected()
- && (bExportStyles || !pFormat->GetDoc()->IsInHeaderFooter(aIdx)))
+ && (bExportStyles || !pFormat->GetDoc()->IsInHeaderFooter(*pTableNd)))
{
maTableNodes.push_back(pTableNd);
m_TableFormats.emplace(pTableNd, ::std::make_pair(SwXMLTextParagraphExport::FormatMap(), SwXMLTextParagraphExport::FormatMap()));
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 64be72d6146c..448ea1b79043 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -179,7 +179,7 @@ bool SwXMLTextImportHelper::IsInHeaderFooter() const
SAL_WARN_IF(!pTextCursor, "sw.uno", "SwXTextCursor missing");
SwDoc *pDoc = pTextCursor ? pTextCursor->GetDoc() : nullptr;
- return pDoc && pDoc->IsInHeaderFooter( pTextCursor->GetPaM()->GetPoint()->nNode );
+ return pDoc && pDoc->IsInHeaderFooter( pTextCursor->GetPaM()->GetPoint()->GetNode() );
}
static SwOLENode *lcl_GetOLENode( const SwFrameFormat *pFrameFormat )