summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/tool/cellform.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index bc65f9199a39..0893149ca078 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -143,14 +143,16 @@ OUString ScCellFormat::GetString(
{
case CELLTYPE_STRING:
{
- OUString aCellString = rDoc.GetString(rPos);
- rFormatter.GetOutputString(aCellString, nFormat, aString, ppColor, bUseStarFormat);
+ ScRefCellValue aCell;
+ aCell.assign(rDoc, rPos);
+ rFormatter.GetOutputString(aCell.getString(&rDoc), nFormat, aString, ppColor, bUseStarFormat);
}
break;
case CELLTYPE_EDIT:
{
- OUString aCellString = rDoc.GetString(rPos);
- rFormatter.GetOutputString(aCellString, nFormat, aString, ppColor);
+ ScRefCellValue aCell;
+ aCell.assign(rDoc, rPos);
+ rFormatter.GetOutputString(aCell.getString(&rDoc), nFormat, aString, ppColor);
}
break;
case CELLTYPE_VALUE: