summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2010-03-22 17:02:35 +0100
committerVladimir Glazunov <vg@openoffice.org>2010-03-22 17:02:35 +0100
commit8d39d5f26f520911e47731fa4e25125f2828f9d8 (patch)
treec0bebc32234f97a5b4f046c6e3de8e9a39768f20
parentf2cf0b3fde3d8577260c8b12e380d23a27dbae17 (diff)
parentbba205263e907c63be75f36a0620b4d98f2c012c (diff)
CWS-TOOLING: integrate CWS calc52
-rw-r--r--[-rwxr-xr-x]sc/source/core/data/dociter.cxx6
-rw-r--r--sc/source/core/tool/doubleref.cxx4
-rw-r--r--sc/source/core/tool/interpr1.cxx4
3 files changed, 12 insertions, 2 deletions
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index b68ad36364f3..706783579a24 100755..100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -591,7 +591,11 @@ bool ScDBQueryDataIterator::DataAccessInternal::getCurrent(Value& rValue)
if (ScDBQueryDataIterator::IsQueryValid(*mpDoc, *mpParam, nTab, nRow, pCell))
{
- switch (pCell->GetCellType())
+ // #i109812# get cell here if it wasn't done above
+ if (nCol != static_cast<SCCOL>(nFirstQueryField))
+ pCell = ScDBQueryDataIterator::GetCellByColEntryIndex(*mpDoc, nTab, nCol, nColRow);
+
+ switch (pCell ? pCell->GetCellType() : CELLTYPE_NONE)
{
case CELLTYPE_VALUE:
{
diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx
index 28fae20ddb62..5c2d3f575654 100644
--- a/sc/source/core/tool/doubleref.cxx
+++ b/sc/source/core/tool/doubleref.cxx
@@ -337,7 +337,9 @@ OUString ScDBInternalRange::getString(SCCOL nCol, SCROW nRow) const
{
String aStr;
const ScAddress& s = maRange.aStart;
- getDoc()->GetString(s.Col() + nCol, s.Row() + nRow, maRange.aStart.Tab(), aStr);
+ // #i109200# this is used in formula calculation, use GetInputString, not GetString
+ // (consistent with ScDBInternalRange::getCellString)
+ getDoc()->GetInputString(s.Col() + nCol, s.Row() + nRow, maRange.aStart.Tab(), aStr);
return aStr;
}
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 166261b98ffd..94cd5c1a02e9 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -6053,6 +6053,10 @@ void ScInterpreter::ScDBCount()
// iterators.
ScDBQueryParamInternal* p = static_cast<ScDBQueryParamInternal*>(pQueryParam.get());
SCTAB nTab = p->nTab;
+ // ScQueryCellIterator doesn't make use of ScDBQueryParamBase::mnField,
+ // so the source range has to be restricted, like before the introduction
+ // of ScDBQueryParamBase.
+ p->nCol1 = p->nCol2 = p->mnField;
ScQueryCellIterator aCellIter( pDok, nTab, *p);
if ( aCellIter.GetFirst() )
{