[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 29 13:11:17 UTC 2020
sw/source/filter/xml/xmltble.cxx | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
New commits:
commit b8403f48b68b64e05a0c50578b8bde67b300c783
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Thu May 28 17:41:17 2020 +0200
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Fri May 29 15:10:47 2020 +0200
tdf#102256 sw: ODF export: oops, don't write table attributes ...
... when not writing table itself.
(regression from commit d705a860936a58e40a2894a12d02be585a06e1c1)
Change-Id: I73cbb126a5c6d12399806a20cd7f4307111a6c8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95057
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
(cherry picked from commit 316d68416dfee64d54ecaa4839a4045a4f205c4d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95112
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index ce5aaf56630d..3febc00ae82e 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -1077,23 +1077,6 @@ void lcl_xmltble_ClearName_Line( SwTableLine* pLine )
void SwXMLExport::ExportTable( const SwTableNode& rTableNd )
{
- const SwTable& rTable = rTableNd.GetTable();
- const SwFrameFormat *pTableFormat = rTable.GetFrameFormat();
- if( pTableFormat && !pTableFormat->GetName().isEmpty() )
- {
- AddAttribute( XML_NAMESPACE_TABLE, XML_NAME, pTableFormat->GetName() );
- AddAttribute( XML_NAMESPACE_TABLE, XML_STYLE_NAME,
- EncodeStyleName( pTableFormat->GetName() ) );
- }
-
- // table:template-name=
- if (!rTable.GetTableStyleName().isEmpty())
- {
- OUString sStyleName;
- SwStyleNameMapper::FillProgName(rTable.GetTableStyleName(), sStyleName, SwGetPoolIdFromName::TabStyle);
- AddAttribute(XML_NAMESPACE_TABLE, XML_TEMPLATE_NAME, sStyleName);
- }
-
::std::optional<sal_uInt16> oPrefix = XML_NAMESPACE_TABLE;
if (const SwFrameFormat* pFlyFormat = rTableNd.GetFlyFormat())
{
@@ -1113,6 +1096,23 @@ void SwXMLExport::ExportTable( const SwTableNode& rTableNd )
if (oPrefix)
{
+ const SwTable& rTable = rTableNd.GetTable();
+ const SwFrameFormat *pTableFormat = rTable.GetFrameFormat();
+ if (pTableFormat && !pTableFormat->GetName().isEmpty())
+ {
+ AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, pTableFormat->GetName());
+ AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME,
+ EncodeStyleName(pTableFormat->GetName()));
+ }
+
+ // table:template-name=
+ if (!rTable.GetTableStyleName().isEmpty())
+ {
+ OUString sStyleName;
+ SwStyleNameMapper::FillProgName(rTable.GetTableStyleName(), sStyleName, SwGetPoolIdFromName::TabStyle);
+ AddAttribute(XML_NAMESPACE_TABLE, XML_TEMPLATE_NAME, sStyleName);
+ }
+
SvXMLElementExport aElem(*this, *oPrefix, XML_TABLE, true, true);
// export DDE source (if this is a DDE table)
More information about the Libreoffice-commits
mailing list