From 0c2933d0a3ebd6074b89369df653538511363abb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 6 Aug 2022 13:18:55 +0200 Subject: 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 --- sw/source/filter/xml/xmltble.cxx | 3 +-- sw/source/filter/xml/xmltexti.cxx | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'sw/source/filter/xml') 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 ) -- cgit