diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-04-24 16:41:08 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2021-01-07 16:32:52 +0100 |
commit | 684418cb58e785773148f760191459bea1200bf4 (patch) | |
tree | dfa6b3a5670cbd4891e3314106fb72b66fea9a89 /sc | |
parent | f942c9f6108cf81cacf704bc10b030edb4d2b59b (diff) |
sc: ODF export: table:name extension element, step 1
3119de050ef5e3561e01badeb6307ae2538d215a introduced an attribute
table:name on table:source-cell-range, but it should be in loext
namespace.
Allow import from LO_EXT namespace, but keep export to TABLE for
now because existing LO releases expect that.
Change-Id: Ic0e8737218473338d18b00150209bcc16678fee9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92863
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/XMLExportDataPilot.cxx | 5 | ||||
-rw-r--r-- | sc/source/filter/xml/xmldpimp.cxx | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx index 48be7c33d907..2c35a7f520b0 100644 --- a/sc/source/filter/xml/XMLExportDataPilot.cxx +++ b/sc/source/filter/xml/XMLExportDataPilot.cxx @@ -835,8 +835,13 @@ void ScXMLExportDataPilot::WriteDataPilots() if (rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012) { if (pSheetSource->HasRangeName()) + { + // FIXME this was wrongly exported to TABLE namespace since 2011 rExport.AddAttribute( XML_NAMESPACE_TABLE, XML_NAME, pSheetSource->GetRangeName()); + rExport.AddAttribute( + XML_NAMESPACE_LO_EXT, XML_NAME, pSheetSource->GetRangeName()); + } } OUString sCellRangeAddress; diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx index 15dd638deaeb..881e58ee84ed 100644 --- a/sc/source/filter/xml/xmldpimp.cxx +++ b/sc/source/filter/xml/xmldpimp.cxx @@ -756,6 +756,7 @@ ScXMLSourceCellRangeContext::ScXMLSourceCellRangeContext( ScXMLImport& rImport, pDataPilotTable->SetSourceCellRangeAddress(aSourceRangeAddress); } break; + case XML_ELEMENT( LO_EXT, XML_NAME ): case XML_ELEMENT( TABLE, XML_NAME ): pDataPilotTable->SetSourceRangeName(aIter.toString()); break; |