Commits

Niklas Nebel  committed 0e605a8

calc62: #i115431# if #VALUE! doesn't fit into the cell, always use hashes

  • Participants
  • Parent commits b4bf1a1

Comments (0)

Files changed (1)

File sc/source/ui/view/output2.cxx

         // 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)