From d840c7e15402dc3a133b400b113e28c0c78702c5 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 24 Apr 2020 16:41:08 +0200 Subject: 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 Tested-by: Jenkins --- sc/source/filter/xml/XMLExportDataPilot.cxx | 5 +++++ sc/source/filter/xml/xmldpimp.cxx | 1 + 2 files changed, 6 insertions(+) (limited to 'sc/source/filter/xml') 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; -- cgit v1.2.3