summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/formulacell.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 7108597f5f4c..d4a484625d13 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1301,7 +1301,10 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
sal_uInt16 nFormatType = p->GetRetFormatType();
sal_Int32 nFormatIndex = p->GetRetFormatIndex();
- if((nFormatIndex % SV_COUNTRY_LANGUAGE_OFFSET) == 0)
+ // don't set text format as hard format
+ if(nFormatType == NUMBERFORMAT_TEXT)
+ nFormatIndex = 0;
+ else if((nFormatIndex % SV_COUNTRY_LANGUAGE_OFFSET) == 0)
nFormatIndex = ScGlobal::GetStandardFormat(*pDocument->GetFormatTable(),
nFormatIndex, nFormatType);