[ooo-build-commit] Branch 'ooo-build-3-1-1' - patches/dev300
Kohei Yoshida
kohei at kemper.freedesktop.org
Tue Sep 22 11:40:24 PDT 2009
patches/dev300/apply | 5 +
patches/dev300/calc-getpivotdata-force-interpret-formula.diff | 44 ++++++++++
2 files changed, 49 insertions(+)
New commits:
commit 9438312bf6d71dbc078d904f215f0ae20e4c779d
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Tue Sep 22 14:32:03 2009 -0400
[experimental] Force-interpret formula cell results when filling cache tables.
* patches/dev300/apply: add this new patch.
* patches/dev300/calc-getpivotdata-force-interpret-formula.diff:
force-interpret formula cell results within the data range when
the cache table is being populated as part of a GETPIVOTDATA
interpretation, by incrementing the macro interpret level.
(n#540563)
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 8e32726..a87cdb2 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3412,6 +3412,11 @@ calc-html-csv-import-force-text-cell.diff, n#523414, i#103939, kohei
# When finding or replacing cell contents, skip filtered cells.
calc-find-replace-skip-filtered.diff, n#539282, kohei
+# When the cache table is being populated as part of the GETPIVOTDATA call,
+# force-interpret formula cell results.
+calc-getpivotdata-force-interpret-formula.diff, n#540563, kohei
+
+
[ AutoLayout ]
sd-layoutcode.diff, cocofan
offapi-layoutcode.diff, cocofan
diff --git a/patches/dev300/calc-getpivotdata-force-interpret-formula.diff b/patches/dev300/calc-getpivotdata-force-interpret-formula.diff
new file mode 100644
index 0000000..5464780
--- /dev/null
+++ b/patches/dev300/calc-getpivotdata-force-interpret-formula.diff
@@ -0,0 +1,44 @@
+diff --git sc/source/core/data/dpcachetable.cxx sc/source/core/data/dpcachetable.cxx
+index a27c16d..5cb60ad 100644
+--- sc/source/core/data/dpcachetable.cxx
++++ sc/source/core/data/dpcachetable.cxx
+@@ -209,9 +209,39 @@ sal_Int32 ScDPCacheTable::getColSize() const
+ return maTable.empty() ? 0 : maTable[0].size();
+ }
+
++namespace {
++
++/**
++ * While the macro interpret level is incremented, the formula cells are
++ * (semi-)guaranteed to be interpreted.
++ */
++class MacroInterpretIncrementer
++{
++public:
++ MacroInterpretIncrementer(ScDocument* pDoc) :
++ mpDoc(pDoc)
++ {
++ mpDoc->IncMacroInterpretLevel();
++ }
++ ~MacroInterpretIncrementer()
++ {
++ mpDoc->DecMacroInterpretLevel();
++ }
++private:
++ ScDocument* mpDoc;
++};
++
++}
++
+ void ScDPCacheTable::fillTable(ScDocument* pDoc, const ScRange& rRange, const ScQueryParam& rQuery, BOOL* pSpecial,
+ bool bIgnoreEmptyRows)
+ {
++ // Make sure the formula cells within the data range are interpreted
++ // during this call, for this method may be called from the interpretation
++ // of GETPIVOTDATA, which disables nested formula interpretation without
++ // an increased macro level.
++ MacroInterpretIncrementer aMacroInc(pDoc);
++
+ SCTAB nTab = rRange.aStart.Tab();
+ SCCOL nStartCol = rRange.aStart.Col();
+ SCROW nStartRow = rRange.aStart.Row();
More information about the ooo-build-commit
mailing list