From a6fdfb960ad0f5b019adff700d0046f20a740996 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Fri, 30 Aug 2013 22:23:01 +0200 Subject: resolved fdo#67836 do not overwrite already interpreted English cell ... with a not matching locale dependent interpretation Change-Id: I66553627cab282ed333443ee8bf687596a616a28 --- sc/source/ui/docshell/docfunc.cxx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'sc') diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index a150f62f50c8..d0b0e50a21ed 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -1106,6 +1106,7 @@ bool ScDocFunc::SetCellText( const ScAddress& rPos, const OUString& rText, bool bInterpret, bool bEnglish, bool bApi, const formula::FormulaGrammar::Grammar eGrammar ) { + bool bSet = false; if ( bInterpret ) { if ( bEnglish ) @@ -1122,13 +1123,13 @@ bool ScDocFunc::SetCellText( switch (aRes.meType) { case ScInputStringType::Formula: - SetFormulaCell(rPos, new ScFormulaCell(pDoc, rPos, aRes.maText, eGrammar), !bApi); + bSet = SetFormulaCell(rPos, new ScFormulaCell(pDoc, rPos, aRes.maText, eGrammar), !bApi); break; case ScInputStringType::Number: - SetValueCell(rPos, aRes.mfValue, !bApi); + bSet = SetValueCell(rPos, aRes.mfValue, !bApi); break; case ScInputStringType::Text: - SetStringOrEditCell(rPos, aRes.maText, !bApi); + bSet = SetStringOrEditCell(rPos, aRes.maText, !bApi); break; default: ; @@ -1138,11 +1139,15 @@ bool ScDocFunc::SetCellText( } else if (!rText.isEmpty()) { - SetStringOrEditCell(rPos, rText, !bApi); + bSet = SetStringOrEditCell(rPos, rText, !bApi); } - bool bNumFmtSet = false; - return SetNormalString( bNumFmtSet, rPos, rText, bApi ); + if (!bSet) + { + bool bNumFmtSet = false; + bSet = SetNormalString( bNumFmtSet, rPos, rText, bApi ); + } + return bSet; } //------------------------------------------------------------------------ -- cgit