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

Eike Rathke erack at redhat.com
Tue Dec 10 02:57:15 PST 2013


 include/xmloff/xmltoken.hxx                    |    4 +++-
 sc/source/filter/xml/XMLStylesExportHelper.cxx |    2 +-
 sc/source/filter/xml/xmlcvali.cxx              |    7 +++----
 xmloff/source/core/xmltoken.cxx                |    4 +++-
 4 files changed, 10 insertions(+), 7 deletions(-)

New commits:
commit 6e89666b4e23189dcaa8fdb308e1b48015d6875b
Author: Eike Rathke <erack at redhat.com>
Date:   Tue Dec 10 11:52:33 2013 +0100

    write the correct 'sort-ascending' value, fdo#72548
    
    ... for <table:content-validation table:display-list='sort-ascending' ...>
    
    Change-Id: I57d35cd08e3fce4eff5d571a19bb8793fde4a201

diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index f9196af..71e41b0 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -2203,9 +2203,11 @@ namespace xmloff { namespace token {
         XML_DISPLAY_LIST,
         XML_NO,
         XML_UNSORTED,
-        XML_SORTED_ASCENDING,
         XML_FONT_INDEPENDENT_LINE_SPACING,
 
+        // Wrong! Do not write, use XML_SORT_ASCENDING instead. Only read. fdo#72548
+        XML_SORTED_ASCENDING,
+
         XML_DATABASE,
         XML_DATASOURCE,
         XML_QUERIES,
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 594d742..c3d862d 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -368,7 +368,7 @@ void ScMyValidationsContainer::WriteValidations(ScXMLExport& rExport)
                         rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DISPLAY_LIST, XML_UNSORTED);
                     break;
                     case sheet::TableValidationVisibility::SORTEDASCENDING:
-                        rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DISPLAY_LIST, XML_SORTED_ASCENDING);
+                        rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DISPLAY_LIST, XML_SORT_ASCENDING);
                     break;
                     default:
                         OSL_FAIL("unknown ListType");
diff --git a/sc/source/filter/xml/xmlcvali.cxx b/sc/source/filter/xml/xmlcvali.cxx
index da0a3f5..6ed1780 100644
--- a/sc/source/filter/xml/xmlcvali.cxx
+++ b/sc/source/filter/xml/xmlcvali.cxx
@@ -255,14 +255,13 @@ ScXMLContentValidationContext::ScXMLContentValidationContext( ScXMLImport& rImpo
                 {
                     nShowList = sheet::TableValidationVisibility::UNSORTED;
                 }
-                else if (IsXMLToken(sValue, XML_SORTED_ASCENDING))
+                else if (IsXMLToken(sValue, XML_SORT_ASCENDING))
                 {
-                    // Read old wrong value, fdo#72548
                     nShowList = sheet::TableValidationVisibility::SORTEDASCENDING;
                 }
-                else if (IsXMLToken(sValue, XML_SORT_ASCENDING))
+                else if (IsXMLToken(sValue, XML_SORTED_ASCENDING))
                 {
-                    // Read correct value, fdo#72548
+                    // Read old wrong value, fdo#72548
                     nShowList = sheet::TableValidationVisibility::SORTEDASCENDING;
                 }
             }
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 431e778..95ce705 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -2214,9 +2214,11 @@ namespace xmloff { namespace token {
         TOKEN( "display-list",                     XML_DISPLAY_LIST ),
         TOKEN( "no",                               XML_NO ),
         TOKEN( "unsorted",                         XML_UNSORTED ),
-        TOKEN( "sorted-ascending",                 XML_SORTED_ASCENDING ),
         TOKEN( "font-independent-line-spacing",        XML_FONT_INDEPENDENT_LINE_SPACING ),
 
+        // Wrong! Do not write, use XML_SORT_ASCENDING instead. Only read. fdo#72548
+        TOKEN( "sorted-ascending",                 XML_SORTED_ASCENDING ),
+
         TOKEN( "database",                         XML_DATABASE ),
         TOKEN( "data-source",                      XML_DATASOURCE ),
         TOKEN( "queries",                          XML_QUERIES ),


More information about the Libreoffice-commits mailing list