[Libreoffice-commits] core.git: 2 commits - formula/source include/formula scaddins/source sc/qa sc/source

Eike Rathke erack at redhat.com
Wed Aug 3 16:58:09 UTC 2016


 formula/source/core/api/FormulaCompiler.cxx    |    2 +-
 formula/source/core/resource/core_resource.src |   14 +++++++-------
 include/formula/compiler.hrc                   |    2 +-
 include/formula/opcode.hxx                     |    2 +-
 sc/qa/unit/ucalc.cxx                           |    2 +-
 sc/source/core/inc/interpre.hxx                |    2 +-
 sc/source/core/tool/interpr2.cxx               |    2 +-
 sc/source/core/tool/interpr4.cxx               |    2 +-
 sc/source/core/tool/odffmap.cxx                |    2 +-
 sc/source/filter/excel/xlformula.cxx           |    2 +-
 sc/source/ui/src/scfuncs.src                   |    4 ++--
 scaddins/source/analysis/analysishelper.cxx    |    2 +-
 12 files changed, 19 insertions(+), 19 deletions(-)

New commits:
commit ced79363cc30f225e766195ace4f892754fc85a0
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Aug 3 18:56:01 2016 +0200

    Resolves: tdf#69539 UI rename CONVERT to CONVERT_OOO, CONVERT_ADD to CONVERT
    
    ... with same syntax but different semantics that was even more confusing.
    
    Change-Id: Ibe1efcd5c4e82c9ce8d9fe8ed0f85e86dac327f7

diff --git a/formula/source/core/resource/core_resource.src b/formula/source/core/resource/core_resource.src
index b1f09dd..40f4895 100644
--- a/formula/source/core/resource/core_resource.src
+++ b/formula/source/core/resource/core_resource.src
@@ -1301,7 +1301,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF
     String SC_OPCODE_DDE { Text = "DDE" ; };
     String SC_OPCODE_BASE { Text = "BASE" ; };
     String SC_OPCODE_DECIMAL { Text = "DECIMAL" ; };
-    String SC_OPCODE_CONVERT_OOO { Text = "CONVERT" ; };
+    String SC_OPCODE_CONVERT_OOO { Text = "CONVERT" ; };    // wrong but ODF1.1, keep it.
     String SC_OPCODE_ROMAN { Text = "ROMAN" ; };
     String SC_OPCODE_ARABIC { Text = "ARABIC" ; };
     String SC_OPCODE_HYPERLINK { Text = "HYPERLINK" ; };
@@ -1743,7 +1743,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_API
     String SC_OPCODE_DDE { Text = "DDE" ; };
     String SC_OPCODE_BASE { Text = "BASE" ; };
     String SC_OPCODE_DECIMAL { Text = "DECIMAL" ; };
-    String SC_OPCODE_CONVERT_OOO { Text = "CONVERT" ; };
+    String SC_OPCODE_CONVERT_OOO { Text = "CONVERT" ; };    /* TODO: wrong but API, change? */
     String SC_OPCODE_ROMAN { Text = "ROMAN" ; };
     String SC_OPCODE_ARABIC { Text = "ARABIC" ; };
     String SC_OPCODE_HYPERLINK { Text = "HYPERLINK" ; };
@@ -2184,7 +2184,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH
     String SC_OPCODE_DDE { Text = "DDE" ; };
     String SC_OPCODE_BASE { Text = "BASE" ; };
     String SC_OPCODE_DECIMAL { Text = "DECIMAL" ; };
-    String SC_OPCODE_CONVERT_OOO { Text = "CONVERT" ; };
+    String SC_OPCODE_CONVERT_OOO { Text = "CONVERT_OOO" ; };
     String SC_OPCODE_ROMAN { Text = "ROMAN" ; };
     String SC_OPCODE_ARABIC { Text = "ARABIC" ; };
     String SC_OPCODE_HYPERLINK { Text = "HYPERLINK" ; };
@@ -3750,7 +3750,7 @@ Resource RID_STRLIST_FUNCTION_NAMES
     };
     String SC_OPCODE_CONVERT_OOO
     {
-        Text [ en-US ] = "CONVERT";
+        Text [ en-US ] = "CONVERT_OOO";
     };
     String SC_OPCODE_ROMAN
     {
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 5d3d663..394259d 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -2212,7 +2212,7 @@ void Test::testFunctionLists()
         "COLOR",
         "COMBIN",
         "COMBINA",
-        "CONVERT",
+        "CONVERT_OOO",
         "COS",
         "COSH",
         "COT",
diff --git a/sc/source/core/tool/odffmap.cxx b/sc/source/core/tool/odffmap.cxx
index 3f66859..4a37e2f 100644
--- a/sc/source/core/tool/odffmap.cxx
+++ b/sc/source/core/tool/odffmap.cxx
@@ -95,7 +95,7 @@ ScCompiler::AddInMap ScCompiler::maAddInMap[] =
     { "IMSECH", "IMSECH", "com.sun.star.sheet.addin.Analysis.getImsech", "COM.SUN.STAR.SHEET.ADDIN.ANALYSIS.GETIMSECH" },
     { "IMCSCH", "IMCSCH", "com.sun.star.sheet.addin.Analysis.getImcsch", "COM.SUN.STAR.SHEET.ADDIN.ANALYSIS.GETIMCSCH" },
     { "COMPLEX", "COMPLEX", "com.sun.star.sheet.addin.Analysis.getComplex", "COM.SUN.STAR.SHEET.ADDIN.ANALYSIS.GETCOMPLEX" },
-    { "CONVERT", "CONVERT_ADD", "com.sun.star.sheet.addin.Analysis.getConvert", "COM.SUN.STAR.SHEET.ADDIN.ANALYSIS.GETCONVERT" },
+    { "CONVERT", "CONVERT", "com.sun.star.sheet.addin.Analysis.getConvert", "COM.SUN.STAR.SHEET.ADDIN.ANALYSIS.GETCONVERT" },
     { "AMORDEGRC", "AMORDEGRC", "com.sun.star.sheet.addin.Analysis.getAmordegrc", "COM.SUN.STAR.SHEET.ADDIN.ANALYSIS.GETAMORDEGRC" },
     { "AMORLINC", "AMORLINC", "com.sun.star.sheet.addin.Analysis.getAmorlinc", "COM.SUN.STAR.SHEET.ADDIN.ANALYSIS.GETAMORLINC" },
     { "ACCRINT", "ACCRINT", "com.sun.star.sheet.addin.Analysis.getAccrint", "COM.SUN.STAR.SHEET.ADDIN.ANALYSIS.GETACCRINT" },
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx
index ea8da0c..5d83a06 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -113,7 +113,7 @@ const FuncDataBase pFuncDatas[] =
     FUNCDATA( Imsech,           UNIQUE,     STDPAR,     1,          FDCat_Tech ),
     FUNCDATA( Imcsch,           UNIQUE,     STDPAR,     1,          FDCat_Tech ),
     FUNCDATA( Complex,          UNIQUE,     STDPAR,     3,          FDCat_Tech ),
-    FUNCDATA( Convert,          DOUBLE,     STDPAR,     3,          FDCat_Tech ),
+    FUNCDATA( Convert,          UNIQUE,     STDPAR,     3,          FDCat_Tech ),
     FUNCDATA( Amordegrc,        UNIQUE,     INTPAR,     7,          FDCat_Finance ),
     FUNCDATA( Amorlinc,         UNIQUE,     INTPAR,     7,          FDCat_Finance ),
     FUNCDATA( Accrint,          UNIQUE,     INTPAR,     7,          FDCat_Finance ),
commit fa2fdb6607a7b961affadb6ca633b8feed828467
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Aug 3 18:17:16 2016 +0200

    rename ocConvert to ocConvertOOo and related
    
    ... to clarify that this is not the "real" CONVERT function.
    
    Change-Id: Ia71949ffabd2c983be0dbf9fa36bb8c52f0077ee

diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 86ac30a..7354cfc 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1338,7 +1338,7 @@ void FormulaCompiler::Factor()
                     // Don't use SetExclusiveRecalcModeOnLoad() which would
                     // override ModeAlways, use
                     // AddRecalcMode(ScRecalcMode::ONLOAD) instead.
-                case ocConvert :
+                case ocConvertOOo :
                 case ocDde:
                 case ocMacro:
                 case ocExternal:
diff --git a/formula/source/core/resource/core_resource.src b/formula/source/core/resource/core_resource.src
index d130204..b1f09dd 100644
--- a/formula/source/core/resource/core_resource.src
+++ b/formula/source/core/resource/core_resource.src
@@ -421,7 +421,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF
     String SC_OPCODE_DDE { Text = "DDE" ; };
     String SC_OPCODE_BASE { Text = "BASE" ; };
     String SC_OPCODE_DECIMAL { Text = "DECIMAL" ; };
-    String SC_OPCODE_CONVERT { Text = "ORG.OPENOFFICE.CONVERT" ; };
+    String SC_OPCODE_CONVERT_OOO { Text = "ORG.OPENOFFICE.CONVERT" ; };
     String SC_OPCODE_ROMAN { Text = "ROMAN" ; };
     String SC_OPCODE_ARABIC { Text = "ARABIC" ; };
     String SC_OPCODE_HYPERLINK { Text = "HYPERLINK" ; };
@@ -859,7 +859,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML
     String SC_OPCODE_DDE { Text = "DDE" ; };
     String SC_OPCODE_BASE { Text = "_xlfn.BASE" ; };
     String SC_OPCODE_DECIMAL { Text = "_xlfn.DECIMAL" ; };
-    String SC_OPCODE_CONVERT { Text = "_xlfn.ORG.OPENOFFICE.CONVERT" ; };
+    String SC_OPCODE_CONVERT_OOO { Text = "_xlfn.ORG.OPENOFFICE.CONVERT" ; };
     String SC_OPCODE_ROMAN { Text = "ROMAN" ; };
     String SC_OPCODE_ARABIC { Text = "_xlfn.ARABIC" ; };
     String SC_OPCODE_HYPERLINK { Text = "HYPERLINK" ; };
@@ -1301,7 +1301,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF
     String SC_OPCODE_DDE { Text = "DDE" ; };
     String SC_OPCODE_BASE { Text = "BASE" ; };
     String SC_OPCODE_DECIMAL { Text = "DECIMAL" ; };
-    String SC_OPCODE_CONVERT { Text = "CONVERT" ; };
+    String SC_OPCODE_CONVERT_OOO { Text = "CONVERT" ; };
     String SC_OPCODE_ROMAN { Text = "ROMAN" ; };
     String SC_OPCODE_ARABIC { Text = "ARABIC" ; };
     String SC_OPCODE_HYPERLINK { Text = "HYPERLINK" ; };
@@ -1743,7 +1743,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_API
     String SC_OPCODE_DDE { Text = "DDE" ; };
     String SC_OPCODE_BASE { Text = "BASE" ; };
     String SC_OPCODE_DECIMAL { Text = "DECIMAL" ; };
-    String SC_OPCODE_CONVERT { Text = "CONVERT" ; };
+    String SC_OPCODE_CONVERT_OOO { Text = "CONVERT" ; };
     String SC_OPCODE_ROMAN { Text = "ROMAN" ; };
     String SC_OPCODE_ARABIC { Text = "ARABIC" ; };
     String SC_OPCODE_HYPERLINK { Text = "HYPERLINK" ; };
@@ -2184,7 +2184,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH
     String SC_OPCODE_DDE { Text = "DDE" ; };
     String SC_OPCODE_BASE { Text = "BASE" ; };
     String SC_OPCODE_DECIMAL { Text = "DECIMAL" ; };
-    String SC_OPCODE_CONVERT { Text = "CONVERT" ; };
+    String SC_OPCODE_CONVERT_OOO { Text = "CONVERT" ; };
     String SC_OPCODE_ROMAN { Text = "ROMAN" ; };
     String SC_OPCODE_ARABIC { Text = "ARABIC" ; };
     String SC_OPCODE_HYPERLINK { Text = "HYPERLINK" ; };
@@ -3748,7 +3748,7 @@ Resource RID_STRLIST_FUNCTION_NAMES
     {
         Text [ en-US ] = "DECIMAL" ;
     };
-    String SC_OPCODE_CONVERT
+    String SC_OPCODE_CONVERT_OOO
     {
         Text [ en-US ] = "CONVERT";
     };
diff --git a/include/formula/compiler.hrc b/include/formula/compiler.hrc
index 915cea4..92627cd 100644
--- a/include/formula/compiler.hrc
+++ b/include/formula/compiler.hrc
@@ -390,7 +390,7 @@
 #define SC_OPCODE_VAR_P_A           379
 #define SC_OPCODE_EASTERSUNDAY      380
 #define SC_OPCODE_DECIMAL           381
-#define SC_OPCODE_CONVERT           382
+#define SC_OPCODE_CONVERT_OOO       382
 #define SC_OPCODE_ROMAN             383
 #define SC_OPCODE_MIRR              384
 #define SC_OPCODE_CELL              385
diff --git a/include/formula/opcode.hxx b/include/formula/opcode.hxx
index bfc7ac6..13c85fb 100644
--- a/include/formula/opcode.hxx
+++ b/include/formula/opcode.hxx
@@ -485,7 +485,7 @@ enum OpCode : sal_uInt16
         ocVarPA             = SC_OPCODE_VAR_P_A,
         ocEasterSunday      = SC_OPCODE_EASTERSUNDAY,
         ocDecimal           = SC_OPCODE_DECIMAL,
-        ocConvert           = SC_OPCODE_CONVERT,
+        ocConvertOOo        = SC_OPCODE_CONVERT_OOO,
         ocRoman             = SC_OPCODE_ROMAN,
         ocHyperLink         = SC_OPCODE_HYPERLINK,
         ocGetPivotData      = SC_OPCODE_GET_PIVOT_DATA,
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 6dcab80..e26aa5a 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -729,7 +729,7 @@ void ScStyle();
 void ScDde();
 void ScBase();
 void ScDecimal();
-void ScConvert();
+void ScConvertOOo();
 void ScEuroConvert();
 
 // financial functions
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 3d7c036..455ac73 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -2954,7 +2954,7 @@ void ScInterpreter::ScDecimal()
     }
 }
 
-void ScInterpreter::ScConvert()
+void ScInterpreter::ScConvertOOo()
 {   // Value, FromUnit, ToUnit
     if ( MustHaveParamCount( GetByte(), 3 ) )
     {
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 49bc50f..8c4dd5c 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -4289,7 +4289,7 @@ StackVar ScInterpreter::Interpret()
                 case ocDde              : ScDde();                      break;
                 case ocBase             : ScBase();                     break;
                 case ocDecimal          : ScDecimal();                  break;
-                case ocConvert          : ScConvert();                  break;
+                case ocConvertOOo       : ScConvertOOo();               break;
                 case ocEuroConvert      : ScEuroConvert();              break;
                 case ocRoman            : ScRoman();                    break;
                 case ocArabic           : ScArabic();                   break;
diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx
index 6e6635e..1dc696e1 100644
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -624,7 +624,7 @@ static const XclFunctionInfo saFuncTable_OOoLO[] =
     EXC_FUNCENTRY_OOO_IBR( ocCurrent,   0,  0,  0,  "CURRENT" ),        // was written wrongly, read it
     EXC_FUNCENTRY_OOO( ocStyle,         1,  3,  0,  "ORG.OPENOFFICE.STYLE" ),
     EXC_FUNCENTRY_OOO_IBR( ocStyle,     1,  3,  0,  "STYLE" ),          // was written wrongly, read it
-    EXC_FUNCENTRY_OOO( ocConvert,       3,  3,  0,  "ORG.OPENOFFICE.CONVERT" ),
+    EXC_FUNCENTRY_OOO( ocConvertOOo,    3,  3,  0,  "ORG.OPENOFFICE.CONVERT" ),
     EXC_FUNCENTRY_OOO( ocColor,         3,  4,  0,  "ORG.LIBREOFFICE.COLOR" ),
     EXC_FUNCENTRY_OOO( ocRawSubtract,   2, MX,  0,  "ORG.LIBREOFFICE.RAWSUBTRACT" ),
     EXC_FUNCENTRY_OOO( ocWeeknumOOo,    2,  2,  0,  "ORG.LIBREOFFICE.WEEKNUM_OOO" ),
diff --git a/sc/source/ui/src/scfuncs.src b/sc/source/ui/src/scfuncs.src
index af30bb5..0774875 100644
--- a/sc/source/ui/src/scfuncs.src
+++ b/sc/source/ui/src/scfuncs.src
@@ -12397,8 +12397,8 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
             Text [ en-US ] = "The base number for conversion must be in the range 2 - 36." ;
         };
     };
-     // -=*# Resource for function CONVERT #*=-
-    Resource SC_OPCODE_CONVERT
+     // -=*# Resource for function CONVERT_OOO #*=-
+    Resource SC_OPCODE_CONVERT_OOO
     {
         String 1 // Description
         {


More information about the Libreoffice-commits mailing list