[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - sc/source

Eike Rathke erack at redhat.com
Fri Aug 30 13:49:01 PDT 2013


 sc/source/ui/docshell/docfunc.cxx |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

New commits:
commit 2ea6f5e741bb21649fb438bf7b8b4ac523d0085e
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
    (cherry picked from commit a6fdfb960ad0f5b019adff700d0046f20a740996)
    Reviewed-on: https://gerrit.libreoffice.org/5712
    Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
    Tested-by: Kohei Yoshida <libreoffice at kohei.us>

diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 1144c0e..61786e2 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