diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/xml/xmltble.cxx | 9 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltexte.hxx | 6 |
2 files changed, 14 insertions, 1 deletions
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index 00b0b79bae5b..e0c3cc57fd54 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -1156,6 +1156,13 @@ void SwXMLExport::ExportTable( const SwTableNode& rTableNd ) lcl_xmltble_ClearName_Line( pLine ); } +void SwXMLTextParagraphExport::exportTableAutoStyles() { + for (const auto* pTableNode : maTableNodes) + { + static_cast<SwXMLExport&>(GetExport()).ExportTableAutoStyles(*pTableNode); + } +} + void SwXMLTextParagraphExport::exportTable( const Reference < XTextContent > & rTextContent, bool bAutoStyles, bool _bProgress ) @@ -1193,7 +1200,7 @@ void SwXMLTextParagraphExport::exportTable( // ALL flags are set at the same time. const bool bExportStyles = bool( GetExport().getExportFlags() & SvXMLExportFlags::STYLES ); if ( bExportStyles || !pFormat->GetDoc()->IsInHeaderFooter( aIdx ) ) - static_cast<SwXMLExport&>(GetExport()).ExportTableAutoStyles( *pTableNd ); + maTableNodes.push_back(pTableNd); } else { diff --git a/sw/source/filter/xml/xmltexte.hxx b/sw/source/filter/xml/xmltexte.hxx index e7ec5a991d3e..3fc9530e6303 100644 --- a/sw/source/filter/xml/xmltexte.hxx +++ b/sw/source/filter/xml/xmltexte.hxx @@ -28,6 +28,7 @@ class SwXMLExport; class SvXMLAutoStylePoolP; class SwNoTextNode; +class SwTableNode; namespace com::sun::star::style { class XStyle; } class SwXMLTextParagraphExport : public XMLTextParagraphExport @@ -36,6 +37,9 @@ class SwXMLTextParagraphExport : public XMLTextParagraphExport const SvGlobalName aPluginClassId; const SvGlobalName aIFrameClassId; + // Collected autostyles for use in exportTextAutoStyles + std::vector<const SwTableNode*> maTableNodes; + static SwNoTextNode *GetNoTextNode( const css::uno::Reference < css::beans::XPropertySet >& rPropSet ); @@ -50,6 +54,8 @@ protected: const css::uno::Reference< css::text::XTextContent > & rTextContent, bool bAutoStyles, bool bProgress ) override; + virtual void exportTableAutoStyles() override; + public: SwXMLTextParagraphExport( SwXMLExport& rExp, |