[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - dbaccess/source include/xmloff xmloff/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Tue Jan 12 10:04:10 UTC 2021


 dbaccess/source/filter/xml/xmlDatabase.cxx |    2 +-
 dbaccess/source/filter/xml/xmlExport.cxx   |    2 +-
 include/xmloff/xmltoken.hxx                |    3 ++-
 xmloff/source/core/xmltoken.cxx            |    3 ++-
 xmloff/source/token/tokens.txt             |    1 +
 5 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit f0949fb60de9c54ac95bbce7e57e36cb02759583
Author:     Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Fri Jan 8 20:22:05 2021 +0100
Commit:     Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Tue Jan 12 11:03:36 2021 +0100

    xmloff: "form:datasource" vs. "db:data-source"
    
    Recently xmloff started to use XML_DATASOURCE for "form:datasource"
    but it actually means "data-source".
    
    Add XML_DATA_SOURCE and use it for "db:data-source".
    
    (regression from 3de38e95561ab7ca114d9f3307702ba89c4e3e9a)
    
    Change-Id: I893efd3fb0fb7c19ae998442459bf36cb1da0b20
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109019
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
    (cherry picked from commit db283d2e3f5cd8be412c5204f358cd06af761b13)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109000
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Tested-by: Michael Stahl <michael.stahl at allotropia.de>

diff --git a/dbaccess/source/filter/xml/xmlDatabase.cxx b/dbaccess/source/filter/xml/xmlDatabase.cxx
index 9de9bf349810..2f629caff37e 100644
--- a/dbaccess/source/filter/xml/xmlDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlDatabase.cxx
@@ -57,7 +57,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > OXMLDatabase::createFa
 
     switch( nElement & TOKEN_MASK )
     {
-        case XML_DATASOURCE:
+        case XML_DATA_SOURCE:
             GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
             pContext = new OXMLDataSource( GetOwnImport(), xAttrList, OXMLDataSource::eDataSource );
             break;
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 985b6daf0249..61800a5ab194 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -420,7 +420,7 @@ void ODBExport::exportDataSource()
         if ( aDelimiter.bUsed )
             m_aDelimiter.reset( new TDelimiter( aDelimiter ) );
 
-        SvXMLElementExport aElem(*this,XML_NAMESPACE_DB, XML_DATASOURCE, true, true);
+        SvXMLElementExport aElem(*this, XML_NAMESPACE_DB, XML_DATA_SOURCE, true, true);
 
         exportConnectionData();
         exportDriverSettings(aSettingsMap);
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index e0f3ef898c65..03f6afe51378 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -2304,7 +2304,8 @@ namespace xmloff::token {
         XML_SORTED_ASCENDING,
 
         XML_DATABASE,
-        XML_DATASOURCE,
+        XML_DATASOURCE, // forms "datasource"
+        XML_DATA_SOURCE, // db "data-source"
         XML_QUERIES,
         XML_REPORTS,
         XML_REPORT,
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index c64f51768cf3..7b32a897c0c3 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -2316,7 +2316,8 @@ namespace xmloff::token {
         TOKEN( "sorted-ascending",                 XML_SORTED_ASCENDING ),
 
         TOKEN( "database",                         XML_DATABASE ),
-        TOKEN( "data-source",                      XML_DATASOURCE ),
+        TOKEN( "datasource",                       XML_DATASOURCE ),
+        TOKEN( "data-source",                      XML_DATA_SOURCE ),
         TOKEN( "queries",                          XML_QUERIES ),
         TOKEN( "reports",                          XML_REPORTS ),
         TOKEN( "report",                           XML_REPORT ),
diff --git a/xmloff/source/token/tokens.txt b/xmloff/source/token/tokens.txt
index ff92a2f34a9c..e23cd24abda6 100644
--- a/xmloff/source/token/tokens.txt
+++ b/xmloff/source/token/tokens.txt
@@ -2183,6 +2183,7 @@ unsorted
 font-independent-line-spacing
 sorted-ascending
 database
+datasource
 data-source
 queries
 reports


More information about the Libreoffice-commits mailing list