summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Nebel <nn@openoffice.org>2010-11-08 17:59:01 +0100
committerNiklas Nebel <nn@openoffice.org>2010-11-08 17:59:01 +0100
commita92726be8f251b1cd4d8c0c9413308ee3011ef55 (patch)
treedcb575de1dfd78e1c1a6c48006927b0326a6456b
parente939353f9c1486f149a481b25a2c57103189c9bb (diff)
calc62: #i115431# if #VALUE! doesn't fit into the cell, always use hashes
-rw-r--r--sc/source/ui/view/output2.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index e26056ba8..aff5a5abe 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -529,9 +529,18 @@ void ScDrawStringsVars::SetTextToWidthOrHash( ScBaseCell* pCell, long nWidth )
// must be a value or formula cell.
return;
- if (eType == CELLTYPE_FORMULA && !static_cast<ScFormulaCell*>(pCell)->IsValue())
+ if (eType == CELLTYPE_FORMULA)
+ {
+ ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
+ if (pFCell->GetErrCode() != 0)
+ {
+ SetHashText(); // If the error string doesn't fit, always use "###"
+ return;
+ }
// If it's formula, the result must be a value.
- return;
+ if (!pFCell->IsValue())
+ return;
+ }
ULONG nFormat = GetValueFormat();
if ((nFormat % SV_COUNTRY_LANGUAGE_OFFSET) != 0)