[Libreoffice-commits] .: Branch 'libreoffice-3-6' - 2 commits - sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Thu Jul 5 13:14:50 PDT 2012
sc/source/core/data/dpcache.cxx | 22 +++++++++++++++++++++-
sc/source/core/data/dpsave.cxx | 1 -
2 files changed, 21 insertions(+), 2 deletions(-)
New commits:
commit 3988c35c9635dfc38f6a2125e5664f60f164951b
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Thu Jul 5 16:08:36 2012 -0400
Use correct row indices to keep track of empty rows.
In pivot table cache, data rows are always zero-based, and are
different from the rows of cells from which the data are pulled.
This error resulted in incorrect pivot table result when the "skip
empty rows" option was set.
Change-Id: I4fccb37a8667f7e40d6130ac641d7b2a1daa7694
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index 2d2a0a3..3299ba0 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -412,7 +412,7 @@ bool ScDPCache::InitFromDoc(ScDocument* pDoc, const ScRange& rRange)
if (!aData.IsEmpty())
{
- maEmptyRows.insert_back(nRow, nRow+1, false);
+ maEmptyRows.insert_back(i, i+1, false);
rField.mnNumFormat = nNumFormat;
}
}
@@ -1212,6 +1212,26 @@ void ScDPCache::Dump() const
}
{
+ struct { SCROW start; SCROW end; bool empty; } aRange;
+ cout << "* empty rows: " << endl;
+ mdds::flat_segment_tree<SCROW, bool>::const_iterator it = maEmptyRows.begin(), itEnd = maEmptyRows.end();
+ if (it != itEnd)
+ {
+ aRange.start = it->first;
+ aRange.empty = it->second;
+ ++it;
+ }
+
+ for (; it != itEnd; ++it)
+ {
+ aRange.end = it->first-1;
+ cout << " rows " << aRange.start << "-" << aRange.end << ": " << (aRange.empty ? "empty" : "not-empty") << endl;
+ aRange.start = it->first;
+ aRange.empty = it->second;
+ }
+ }
+
+ {
GroupFieldsType::const_iterator it = maGroupFields.begin(), itEnd = maGroupFields.end();
for (size_t i = maFields.size(); it != itEnd; ++it, ++i)
{
commit 1d29c97313988b4e128030f2e7011891725c8fe7
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Thu Jul 5 14:47:46 2012 -0400
Unnecessary header include.
Change-Id: I3f25f2275d8351b16d955941bc2cee13eb34d504
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index fc289b9..5c987da 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -37,7 +37,6 @@
#include "global.hxx"
#include "dptabsrc.hxx"
#include "dputil.hxx"
-#include "stlalgorithm.hxx"
#include <sal/types.h>
#include "comphelper/string.hxx"
More information about the Libreoffice-commits
mailing list