diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-04-24 16:41:08 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-05-08 21:29:05 +0200 |
commit | d840c7e15402dc3a133b400b113e28c0c78702c5 (patch) | |
tree | 3d33370bf2fd60704b07f1c3d1731da79442624a /sc/source/filter/xml | |
parent | aa3e3efbfe8ce7b25bcbda6020bd3f6b8712c61e (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/source/filter/xml')
-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 7a9a21758764..d09b63002c7f 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 8b9bcd98325e..3d06e30c291f 100644 --- a/sc/source/filter/xml/xmldpimp.cxx +++ b/sc/source/filter/xml/xmldpimp.cxx @@ -749,6 +749,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; |