[Libreoffice-commits] core.git: sc/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Fri May 8 19:29:48 UTC 2020


 sc/source/filter/xml/XMLExportDataPilot.cxx |    5 +++++
 sc/source/filter/xml/xmldpimp.cxx           |    1 +
 2 files changed, 6 insertions(+)

New commits:
commit d840c7e15402dc3a133b400b113e28c0c78702c5
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Fri Apr 24 16:41:08 2020 +0200
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Fri May 8 21:29:05 2020 +0200

    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 at cib.de>
    Tested-by: Jenkins

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;


More information about the Libreoffice-commits mailing list