[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source

Tor Lillqvist tml at kemper.freedesktop.org
Mon Mar 19 00:01:20 PDT 2012


 sc/source/filter/xml/xmldrani.cxx |   10 +++++++---
 sc/source/filter/xml/xmldrani.hxx |    2 ++
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit a0d2fd2096e267a29c5b8a07b0349e699e13ded5
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Mar 18 17:44:00 2012 +0100

    add all imported properties to ScDBData, fdo#40426
    
    (cherry picked from commit ed88b144ce24b9a733d4a9ab6614307c96537baa)
    
    Signed-off-by: Tor Lillqvist <tlillqvist at suse.com>

diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx
index 653af63..a0ca754 100644
--- a/sc/source/filter/xml/xmldrani.cxx
+++ b/sc/source/filter/xml/xmldrani.cxx
@@ -148,6 +148,8 @@ ScXMLDatabaseRangeContext::ScXMLDatabaseRangeContext( ScXMLImport& rImport,
     bSubTotalsEnabledUserList(false),
     bSubTotalsAscending(true),
     bFilterConditionSourceRange(false),
+    bHasHeader(true),
+    bByRow(false),
     meRangeType(ScDBCollection::GlobalNamed)
 {
     nSourceType = sheet::DataImportMode_NONE;
@@ -190,12 +192,14 @@ ScXMLDatabaseRangeContext::ScXMLDatabaseRangeContext( ScXMLImport& rImport,
             break;
             case XML_TOK_DATABASE_RANGE_ATTR_ORIENTATION :
             {
-                mpQueryParam->bByRow = !IsXMLToken(sValue, XML_COLUMN);
+                bByRow = !IsXMLToken(sValue, XML_COLUMN);
+                mpQueryParam->bByRow = bByRow;
             }
             break;
             case XML_TOK_DATABASE_RANGE_ATTR_CONTAINS_HEADER :
             {
-                mpQueryParam->bHasHeader = IsXMLToken(sValue, XML_TRUE);
+                bHasHeader = IsXMLToken(sValue, XML_TRUE);
+                mpQueryParam->bHasHeader = bHasHeader;
             }
             break;
             case XML_TOK_DATABASE_RANGE_ATTR_DISPLAY_FILTER_BUTTONS :
@@ -303,7 +307,7 @@ ScDBData* ScXMLDatabaseRangeContext::ConvertToDBData(const OUString& rName)
 
     SAL_WNODEPRECATED_DECLARATIONS_PUSH
     ::std::auto_ptr<ScDBData> pData(
-        new ScDBData(rName, maRange.aStart.Tab(), maRange.aStart.Col(), maRange.aStart.Row(), maRange.aEnd.Col(), maRange.aEnd.Row()));
+        new ScDBData(rName, maRange.aStart.Tab(), maRange.aStart.Col(), maRange.aStart.Row(), maRange.aEnd.Col(), maRange.aEnd.Row(), bByRow, bHasHeader));
     SAL_WNODEPRECATED_DECLARATIONS_POP
 
     pData->SetAutoFilter(bAutoFilter);
diff --git a/sc/source/filter/xml/xmldrani.hxx b/sc/source/filter/xml/xmldrani.hxx
index 9fe1408..ff659f8 100644
--- a/sc/source/filter/xml/xmldrani.hxx
+++ b/sc/source/filter/xml/xmldrani.hxx
@@ -106,6 +106,8 @@ class ScXMLDatabaseRangeContext : public SvXMLImportContext
     bool            bSubTotalsEnabledUserList;
     bool            bSubTotalsAscending;
     bool            bFilterConditionSourceRange;
+    bool            bHasHeader;
+    bool            bByRow;
     ScDBCollection::RangeType meRangeType;
 
     const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }


More information about the Libreoffice-commits mailing list