[ooo-build-commit] patches/dev300
Kohei Yoshida
kohei at kemper.freedesktop.org
Tue Sep 22 19:50:26 PDT 2009
patches/dev300/apply | 6 -
patches/dev300/calc-getpivotdata-force-interpret-formula.diff | 44 ++++++++++
2 files changed, 48 insertions(+), 2 deletions(-)
New commits:
commit 36ff167736ceb38661111040a66500eefb68347d
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Tue Sep 22 14:32:03 2009 -0400
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 fe5db6b..bb7c13d 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -833,6 +833,10 @@ calc-html-csv-import-force-text-cell.diff, n#523414, 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
+
# Support PHONETIC function to display asian phonetic guide.
# LATER: I'll take care of this later. --kohei
# calc-formula-asian-phonetic.diff, i#80764, i#80765, i#80766, kohei
@@ -3379,8 +3383,6 @@ SectionOwner => kohei
# line even if matching quotes are on separate lines.
stream-read-csv-always-single-line.diff, n#523517, kohei
-
-
[ AutoLayout ]
impress-autolayout.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