[Libreoffice-commits] .: 2 commits - sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jan 10 20:50:44 PST 2013


 sc/source/core/data/dpfilteredcache.cxx |   12 +++++++++++-
 sc/source/ui/docshell/dbdocfun.cxx      |    7 ++++---
 2 files changed, 15 insertions(+), 4 deletions(-)

New commits:
commit 3db92283955741b490dc2d4f9e1782b179fee894
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Thu Jan 10 23:48:17 2013 -0500

    fdo#59084: Sync dimension members after reloading the group data.
    
    Else the syncing would end up syncing to the older version of the
    group data before the reload, which (as you can see in the bug report)
    may lead to a crash.
    
    Change-Id: Ibd674a97a59205e5e28efd007f8857731e8df4d3

diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 4d0d2ec..94d4f1f 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -1319,6 +1319,8 @@ bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
             if ( pDestObj )
             {
                 pDestObj->ReloadGroupTableData();
+                if (!pDestObj->SyncAllDimensionMembers())
+                    return false;
                 pDestObj->InvalidateData();             // before getting the new output area
 
                 //  make sure the table has a name (not set by dialog)
@@ -1461,11 +1463,10 @@ sal_uLong ScDBDocFunc::RefreshPivotTables(ScDPObject* pDPObj, bool bApi)
     for (; it != itEnd; ++it)
     {
         ScDPObject* pObj = *it;
-        if (!pObj->SyncAllDimensionMembers())
-            continue;
 
         // This action is intentionally not undoable since it modifies cache.
-        DataPilotUpdate(pObj, pObj, false, bApi);
+        if (!DataPilotUpdate(pObj, pObj, false, bApi))
+            continue;
     }
 
     return 0;
commit 6fae3211507884e23b305c1f55e7b1be7951f7a9
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Thu Jan 10 23:17:18 2013 -0500

    Dump field member IDs cached in the filtered cache object.
    
    Change-Id: Id792e9e58a2c62b742eb07b400d30c5027bbc87b

diff --git a/sc/source/core/data/dpfilteredcache.cxx b/sc/source/core/data/dpfilteredcache.cxx
index ff82719..e3231ce 100644
--- a/sc/source/core/data/dpfilteredcache.cxx
+++ b/sc/source/core/data/dpfilteredcache.cxx
@@ -437,7 +437,7 @@ void ScDPFilteredCache::dumpRowFlag(const RowFlagType& rFlag) const
 
 void ScDPFilteredCache::dump() const
 {
-    cout << "--- pivot cache filter dump" << endl;
+    cout << "--- pivot filtered cache dump" << endl;
 
     cout << endl;
     cout << "* show by filter" << endl;
@@ -447,6 +447,16 @@ void ScDPFilteredCache::dump() const
     cout << "* show by page dimensions" << endl;
     dumpRowFlag(maShowByPage);
 
+    cout << endl;
+    cout << "* field entries" << endl;
+    size_t nFieldCount = maFieldEntries.size();
+    for (size_t i = 0; i < nFieldCount; ++i)
+    {
+        const vector<SCROW>& rField = maFieldEntries[i];
+        cout << "  * field " << i << endl;
+        for (size_t j = 0, n = rField.size(); j < n; ++j)
+            cout << "    ID: " << rField[j] << endl;
+    }
     cout << "---" << endl;
 }
 


More information about the Libreoffice-commits mailing list