summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-09-05 20:29:18 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-09-06 01:38:31 -0400
commit7969bb659ef78ec6e1aaaf922757419795a823de (patch)
tree3a43da82013097634b72af09cbf4febc6eafc599 /sc
parente462eb1183c0e52c06786296b39c121ea3671199 (diff)
Handle string or edit cells when resolving static reference for group calc.
Change-Id: Ifb2d0d6e7c9f3040bca61b5bdce14d853058d954
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/column2.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 658a316301ea..9d0130c9c609 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1823,6 +1823,17 @@ formula::FormulaTokenRef ScColumn::ResolveStaticReference( SCROW nRow )
return formula::FormulaTokenRef(new formula::FormulaStringToken(p->GetString()));
}
+ case sc::element_type_string:
+ {
+ OUString aStr = sc::string_block::at(*it->data, aPos.second);
+ return formula::FormulaTokenRef(new formula::FormulaStringToken(aStr));
+ }
+ case sc::element_type_edittext:
+ {
+ const EditTextObject* pText = sc::edittext_block::at(*it->data, aPos.second);
+ OUString aStr = ScEditUtil::GetString(*pText, pDocument);
+ return formula::FormulaTokenRef(new formula::FormulaStringToken(aStr));
+ }
case sc::element_type_empty:
default:
// Return a value of 0.0 in all the other cases.