[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Fri Aug 30 13:38:35 PDT 2013
sc/source/ui/docshell/docfunc.cxx | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
New commits:
commit a6fdfb960ad0f5b019adff700d0046f20a740996
Author: Eike Rathke <erack at redhat.com>
Date: Fri Aug 30 22:23:01 2013 +0200
resolved fdo#67836 do not overwrite already interpreted English cell
... with a not matching locale dependent interpretation
Change-Id: I66553627cab282ed333443ee8bf687596a616a28
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index a150f62..d0b0e50 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;
}
//------------------------------------------------------------------------
More information about the Libreoffice-commits
mailing list