summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/runtime/runtime.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 815030d76e87..d18f42b05cd8 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -389,12 +389,14 @@ void SbiInstance::PrepareNumberFormatter( SvNumberFormatter*& rpNumberFormatter,
case YMD: aDateStr = "JJJJ.MM.TT"; break;
default: aDateStr = "MM.TT.JJJJ"; break;
}
- rpNumberFormatter->PutandConvertEntry( aDateStr, nCheckPos, nType,
- rnStdDateIdx, LANGUAGE_GERMAN, eLangType );
+ OUString aStr( aDateStr ); // PutandConvertEntry() modifies string!
+ rpNumberFormatter->PutandConvertEntry( aStr, nCheckPos, nType,
+ rnStdDateIdx, LANGUAGE_GERMAN, eLangType );
nCheckPos = 0;
OUString aStrHHMMSS(" HH:MM:SS");
aDateStr += aStrHHMMSS;
- rpNumberFormatter->PutandConvertEntry( aDateStr, nCheckPos, nType,
+ aStr = aDateStr;
+ rpNumberFormatter->PutandConvertEntry( aStr, nCheckPos, nType,
rnStdDateTimeIdx, LANGUAGE_GERMAN, eLangType );
}