summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-08-30 22:23:01 +0200
committerKohei Yoshida <libreoffice@kohei.us>2013-08-30 20:48:40 +0000
commit2ea6f5e741bb21649fb438bf7b8b4ac523d0085e (patch)
treefecf94e4053da62aa464ec0151982b9c8f0be153
parent8e71befa4756de72675569649684fb4c34773e9b (diff)
resolved fdo#67836 do not overwrite already interpreted English cell
... with a not matching locale dependent interpretation Change-Id: I66553627cab282ed333443ee8bf687596a616a28 (cherry picked from commit a6fdfb960ad0f5b019adff700d0046f20a740996) Reviewed-on: https://gerrit.libreoffice.org/5712 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
-rw-r--r--sc/source/ui/docshell/docfunc.cxx17
1 files changed, 11 insertions, 6 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 1144c0e31694..61786e2c22dc 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;
}
//------------------------------------------------------------------------