summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-08-30 22:23:01 +0200
committerEike Rathke <erack@redhat.com>2013-08-30 22:38:13 +0200
commita6fdfb960ad0f5b019adff700d0046f20a740996 (patch)
tree847d1b926101b5a9b9e2bd6814cacf120f6f4cc5 /sc
parent6c5ee38b09fd59d415850ad7d5e85ee791b18b91 (diff)
resolved fdo#67836 do not overwrite already interpreted English cell
... with a not matching locale dependent interpretation Change-Id: I66553627cab282ed333443ee8bf687596a616a28
Diffstat (limited to 'sc')
-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 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;
}
//------------------------------------------------------------------------