diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-08-05 11:16:32 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-08-05 16:45:42 +0200 |
commit | 35021cd56b3b4e38035804087f215c80085564be (patch) | |
tree | 008898c50092fb5b81421a5174b7c9fcd60fb9d5 /sw/source/filter/xml/xmltble.cxx | |
parent | 3d0eebe0f1471db6f0b9a472a582f51c8c37753b (diff) |
tdf#124470: Split export of table autostyles out from collection phase
This allows to call collectAutoStyles where required (e.g. when enumerating
used fonts), without side effect of writing table styles XML inside the call,
out of place.
Change-Id: Ida05e373eb8502590c43e2b0e85c3b0c1107c551
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100153
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source/filter/xml/xmltble.cxx')
-rw-r--r-- | sw/source/filter/xml/xmltble.cxx | 9 |
1 files changed, 8 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 { |