summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Charrière <lcharriere@gmail.com>2015-01-12 19:56:39 +0100
committerEike Rathke <erack@redhat.com>2015-01-14 19:52:07 +0000
commit1f56cbf8cc15f76131d1dc8801935bec92be05ea (patch)
tree4fc480b6ba409d9a68aee78130df7693e12b43b2
parent975832d885ca5d185e91a975b157bf06bf9a7a0e (diff)
sc: rename ocChose et al. to ocChoose et al.
Change-Id: I1aa8ee6c827a6d6a6c6beb190bdc9c3c91d82b22 Reviewed-on: https://gerrit.libreoffice.org/13889 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx10
-rw-r--r--formula/source/core/api/token.cxx14
-rw-r--r--formula/source/core/resource/core_resource.src8
-rw-r--r--include/formula/FormulaCompiler.hxx2
-rw-r--r--include/formula/compiler.hrc2
-rw-r--r--include/formula/opcode.hxx2
-rw-r--r--include/formula/tokenarray.hxx2
-rw-r--r--sc/source/core/inc/interpre.hxx2
-rw-r--r--sc/source/core/tool/interpr1.cxx2
-rw-r--r--sc/source/core/tool/interpr4.cxx6
-rw-r--r--sc/source/core/tool/parclass.cxx4
-rw-r--r--sc/source/core/tool/token.cxx4
-rw-r--r--sc/source/filter/excel/xeformula.cxx6
-rw-r--r--sc/source/filter/excel/xlformula.cxx2
-rw-r--r--sc/source/filter/lotus/lotform.cxx6
-rw-r--r--sc/source/filter/qpro/qproform.cxx2
-rw-r--r--sc/source/ui/src/scfuncs.src2
-rw-r--r--sc/source/ui/unoobj/tokenuno.cxx2
18 files changed, 39 insertions, 39 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 55a1063b1f75..39083786aa5c 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -465,7 +465,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create
SC_OPCODE_IF,
SC_OPCODE_IF_ERROR,
SC_OPCODE_IF_NA,
- SC_OPCODE_CHOSE,
+ SC_OPCODE_CHOOSE,
SC_OPCODE_AND,
SC_OPCODE_OR,
SC_OPCODE_NOT,
@@ -814,7 +814,7 @@ bool FormulaCompiler::IsOpCodeJumpCommand( OpCode eOp )
case ocIf:
case ocIfError:
case ocIfNA:
- case ocChose:
+ case ocChoose:
return true;
default:
;
@@ -1318,7 +1318,7 @@ void FormulaCompiler::Factor()
case ocIf:
pFacToken->GetJump()[ 0 ] = 3; // if, else, behind
break;
- case ocChose:
+ case ocChoose:
pFacToken->GetJump()[ 0 ] = FORMULA_MAXJUMPCOUNT + 1;
break;
case ocIfError:
@@ -1348,7 +1348,7 @@ void FormulaCompiler::Factor()
case ocIf:
nJumpMax = 3;
break;
- case ocChose:
+ case ocChoose:
nJumpMax = FORMULA_MAXJUMPCOUNT;
break;
case ocIfError:
@@ -1385,7 +1385,7 @@ void FormulaCompiler::Factor()
case ocIf:
bLimitOk = (nJumpCount <= 3);
break;
- case ocChose:
+ case ocChoose:
bLimitOk = (nJumpCount < FORMULA_MAXJUMPCOUNT); /* TODO: check, really <, not <=? */
break;
case ocIfError:
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 0ae70594c2db..e033835685e5 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -81,7 +81,7 @@ bool FormulaToken::IsFunction() const
eOp != ocColRowNameAuto && eOp != ocName && eOp != ocDBArea &&
(GetByte() != 0 // x parameters
|| (SC_OPCODE_START_NO_PAR <= eOp && eOp < SC_OPCODE_STOP_NO_PAR) // no parameter
- || (ocIf == eOp || ocIfError == eOp || ocIfNA == eOp || ocChose == eOp ) // @ jump commands
+ || (ocIf == eOp || ocIfError == eOp || ocIfNA == eOp || ocChoose == eOp ) // @ jump commands
|| (SC_OPCODE_START_1_PAR <= eOp && eOp < SC_OPCODE_STOP_1_PAR) // one parameter
|| (SC_OPCODE_START_2_PAR <= eOp && eOp < SC_OPCODE_STOP_2_PAR) // x parameters (cByte==0 in
// FuncAutoPilot)
@@ -96,10 +96,10 @@ bool FormulaToken::IsFunction() const
sal_uInt8 FormulaToken::GetParamCount() const
{
if ( eOp < SC_OPCODE_STOP_DIV && eOp != ocExternal && eOp != ocMacro &&
- eOp != ocIf && eOp != ocIfError && eOp != ocIfNA && eOp != ocChose &&
+ eOp != ocIf && eOp != ocIfError && eOp != ocIfNA && eOp != ocChoose &&
eOp != ocPercentSign )
return 0; // parameters and specials
- // ocIf, ocIfError, ocIfNA and ocChose not for FAP, have cByte then
+ // ocIf, ocIfError, ocIfNA and ocChoose not for FAP, have cByte then
//2do: bool parameter whether FAP or not?
else if ( GetByte() )
return GetByte(); // all functions, also ocExternal and ocMacro
@@ -112,7 +112,7 @@ sal_uInt8 FormulaToken::GetParamCount() const
return 0; // no parameter
else if (SC_OPCODE_START_1_PAR <= eOp && eOp < SC_OPCODE_STOP_1_PAR)
return 1; // one parameter
- else if ( eOp == ocIf || eOp == ocIfError || eOp == ocIfNA || eOp == ocChose )
+ else if ( eOp == ocIf || eOp == ocIfError || eOp == ocIfNA || eOp == ocChoose )
return 1; // only the condition counts as parameter
else
return 0; // all the rest, no Parameter, or
@@ -967,7 +967,7 @@ bool FormulaTokenArray::HasMatrixDoubleRefOps()
}
if ( eOp == ocPush || lcl_IsReference( eOp, t->GetType() ) )
pStack[sp++] = t;
- else if ( eOp == ocIf || eOp == ocIfError || eOp == ocIfNA || eOp == ocChose )
+ else if ( eOp == ocIf || eOp == ocIfError || eOp == ocIfNA || eOp == ocChoose )
{ // ignore Jumps, pop previous Result (Condition)
if ( sp )
--sp;
@@ -1441,12 +1441,12 @@ FormulaToken* FormulaTokenArray::AddOpCode( OpCode eOp )
case ocIf:
case ocIfError:
case ocIfNA:
- case ocChose:
+ case ocChoose:
{
short nJump[FORMULA_MAXJUMPCOUNT + 1];
if ( eOp == ocIf )
nJump[ 0 ] = 3;
- else if ( eOp == ocChose )
+ else if ( eOp == ocChoose )
nJump[ 0 ] = FORMULA_MAXJUMPCOUNT + 1;
else
nJump[ 0 ] = 2;
diff --git a/formula/source/core/resource/core_resource.src b/formula/source/core/resource/core_resource.src
index 3dfec5cce236..3d28399ab83e 100644
--- a/formula/source/core/resource/core_resource.src
+++ b/formula/source/core/resource/core_resource.src
@@ -27,7 +27,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF
String SC_OPCODE_IF { Text = "IF" ; };
String SC_OPCODE_IF_ERROR { Text = "IFERROR" ; };
String SC_OPCODE_IF_NA { Text = "IFNA" ; };
- String SC_OPCODE_CHOSE { Text = "CHOOSE" ; };
+ String SC_OPCODE_CHOOSE { Text = "CHOOSE" ; };
String SC_OPCODE_OPEN { Text = "(" ; };
String SC_OPCODE_CLOSE { Text = ")" ; };
String SC_OPCODE_ARRAY_OPEN { Text = "{" ; };
@@ -435,7 +435,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML
String SC_OPCODE_IF { Text = "IF" ; };
String SC_OPCODE_IF_ERROR { Text = "IFERROR" ; };
String SC_OPCODE_IF_NA { Text = "_xlfn.IFNA" ; };
- String SC_OPCODE_CHOSE { Text = "CHOOSE" ; };
+ String SC_OPCODE_CHOOSE { Text = "CHOOSE" ; };
String SC_OPCODE_OPEN { Text = "(" ; };
String SC_OPCODE_CLOSE { Text = ")" ; };
String SC_OPCODE_ARRAY_OPEN { Text = "{" ; };
@@ -845,7 +845,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH
String SC_OPCODE_IF { Text = "IF" ; };
String SC_OPCODE_IF_ERROR { Text = "IFERROR" ; };
String SC_OPCODE_IF_NA { Text = "IFNA" ; };
- String SC_OPCODE_CHOSE { Text = "CHOOSE" ; };
+ String SC_OPCODE_CHOOSE { Text = "CHOOSE" ; };
String SC_OPCODE_OPEN { Text = "(" ; };
String SC_OPCODE_CLOSE { Text = ")" ; };
String SC_OPCODE_ARRAY_OPEN { Text = "{" ; };
@@ -1261,7 +1261,7 @@ Resource RID_STRLIST_FUNCTION_NAMES
{
Text [ en-US ] = "IFNA" ;
};
- String SC_OPCODE_CHOSE
+ String SC_OPCODE_CHOOSE
{
Text [ en-US ] = "CHOOSE" ;
};
diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx
index 488760e4a618..0d959c69fdca 100644
--- a/include/formula/FormulaCompiler.hxx
+++ b/include/formula/FormulaCompiler.hxx
@@ -37,7 +37,7 @@
#include <unordered_map>
-#define FORMULA_MAXJUMPCOUNT 32 /* maximum number of jumps (ocChose) */
+#define FORMULA_MAXJUMPCOUNT 32 /* maximum number of jumps (ocChoose) */
#define FORMULA_MAXTOKENS 8192 /* maximum number of tokens in formula */
diff --git a/include/formula/compiler.hrc b/include/formula/compiler.hrc
index 9578a2a06783..cc8b7091507a 100644
--- a/include/formula/compiler.hrc
+++ b/include/formula/compiler.hrc
@@ -32,7 +32,7 @@
#define SC_OPCODE_IF 6 /* jump commands */
#define SC_OPCODE_IF_ERROR 7
#define SC_OPCODE_IF_NA 8
-#define SC_OPCODE_CHOSE 9
+#define SC_OPCODE_CHOOSE 9
#define SC_OPCODE_OPEN 10 /* parentheses and separators */
#define SC_OPCODE_CLOSE 11
#define SC_OPCODE_SEP 12
diff --git a/include/formula/opcode.hxx b/include/formula/opcode.hxx
index 25da573b162e..b7cdba5f59ce 100644
--- a/include/formula/opcode.hxx
+++ b/include/formula/opcode.hxx
@@ -36,7 +36,7 @@ enum OpCode : sal_uInt16
ocIf = SC_OPCODE_IF,
ocIfError = SC_OPCODE_IF_ERROR,
ocIfNA = SC_OPCODE_IF_NA,
- ocChose = SC_OPCODE_CHOSE,
+ ocChoose = SC_OPCODE_CHOOSE,
// Parentheses and separators
ocOpen = SC_OPCODE_OPEN,
ocClose = SC_OPCODE_CLOSE,
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index e37f75167cff..244a7b96b427 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -321,7 +321,7 @@ public:
@param nStop
Stop before reaching code at position nStop. If not specified the
default is to either run the entire code, or to stop if an ocSep or
- ocClose is encountered, which are only present in ocIf or ocChose
+ ocClose is encountered, which are only present in ocIf or ocChoose
jumps.
*/
void Jump( short nStart, short nNext, short nStop = SHRT_MAX );
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index e3b85a31ccea..1a59d10ec3f4 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -396,7 +396,7 @@ bool LookupQueryWithCache( ScAddress & o_rResultPos,
void ScIfJump();
void ScIfError( bool bNAonly );
-void ScChoseJump();
+void ScChooseJump();
// Be sure to only call this if pStack[sp-nStackLevel] really contains a
// ScJumpMatrixToken, no further checks are applied!
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 77dfcad2bbad..2c58fcc965e4 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -396,7 +396,7 @@ void ScInterpreter::ScIfError( bool bNAonly )
}
}
-void ScInterpreter::ScChoseJump()
+void ScInterpreter::ScChooseJump()
{
// We have to set a jump, if there was none chosen because of an error set
// it to endpoint.
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 311f86d50c7c..18cbb93dadd6 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3812,7 +3812,7 @@ StackVar ScInterpreter::Interpret()
PushWithoutError( (FormulaToken&) *pCur );
}
else if (pTokenMatrixMap &&
- !(eOp == ocIf || eOp == ocIfError || eOp == ocIfNA || eOp == ocChose) &&
+ !(eOp == ocIf || eOp == ocIfError || eOp == ocIfNA || eOp == ocChoose) &&
((aTokenMatrixMapIter = pTokenMatrixMap->find( pCur)) !=
pTokenMatrixMap->end()) &&
(*aTokenMatrixMapIter).second->GetType() != svJumpMatrix)
@@ -3833,7 +3833,7 @@ StackVar ScInterpreter::Interpret()
nFuncFmtType = NUMBERFORMAT_NUMBER;
nFuncFmtIndex = 0;
- if ( eOp == ocIf || eOp == ocChose || eOp == ocIfError || eOp == ocIfNA )
+ if ( eOp == ocIf || eOp == ocChoose || eOp == ocIfError || eOp == ocIfNA )
nStackBase = sp; // don't mess around with the jumps
else
{
@@ -3862,7 +3862,7 @@ StackVar ScInterpreter::Interpret()
case ocIf : ScIfJump(); break;
case ocIfError : ScIfError( false ); break;
case ocIfNA : ScIfError( true ); break;
- case ocChose : ScChoseJump(); break;
+ case ocChoose : ScChooseJump(); break;
case ocAdd : ScAdd(); break;
case ocSub : ScSub(); break;
case ocMul : ScMul(); break;
diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index b066c5c1744f..1f564071f4cf 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -56,7 +56,7 @@ const ScParameterClassification::RawData ScParameterClassification::pRawData[] =
{ ocIf, {{ Array, Reference, Reference }, 0 }},
{ ocIfError, {{ Array, Reference }, 0 }},
{ ocIfNA, {{ Array, Reference }, 0 }},
- { ocChose, {{ Array, Reference }, 1 }},
+ { ocChoose, {{ Array, Reference }, 1 }},
// Other specials.
{ ocOpen, {{ Bounds }, 0 }},
{ ocClose, {{ Bounds }, 0 }},
@@ -509,7 +509,7 @@ void ScParameterClassification::GenerateDocumentation()
break;
case ocIfError:
case ocIfNA:
- case ocChose:
+ case ocChoose:
aToken.SetByte(2);
break;
case ocPercentSign:
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 0aa1f474020a..1d1f9164d731 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -154,7 +154,7 @@ void ScRawToken::SetOpCode( OpCode e )
eType = svJump;
nJump[ 0 ] = 2; // If, Behind
break;
- case ocChose:
+ case ocChoose:
eType = svJump;
nJump[ 0 ] = FORMULA_MAXJUMPCOUNT + 1;
break;
@@ -1153,7 +1153,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
case ocIf:
case ocIfError:
case ocIfNA:
- case ocChose:
+ case ocChoose:
// Jump commands are now supported.
break;
case ocAverage:
diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx
index 145aaf368448..752c6a997f81 100644
--- a/sc/source/filter/excel/xeformula.cxx
+++ b/sc/source/filter/excel/xeformula.cxx
@@ -1433,7 +1433,7 @@ void XclExpFmlaCompImpl::FinishFunction( XclExpFuncData& rFuncData, sal_uInt8 nC
switch( rFuncData.GetOpCode() )
{
case ocIf:
- case ocChose:
+ case ocChoose:
AppendJumpToken( rFuncData, EXC_TOK_ATTR_GOTO );
break;
default:;
@@ -1451,7 +1451,7 @@ void XclExpFmlaCompImpl::FinishFunction( XclExpFuncData& rFuncData, sal_uInt8 nC
case ocIf:
FinishIfFunction( rFuncData );
break;
- case ocChose:
+ case ocChoose:
FinishChooseFunction( rFuncData );
break;
@@ -1574,7 +1574,7 @@ void XclExpFmlaCompImpl::PrepareParam( XclExpFuncData& rFuncData )
}
break;
- case ocChose:
+ case ocChoose:
switch( nParamIdx )
{
// do nothing for first parameter
diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx
index cd019cfbbcda..5d721a5ab440 100644
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -163,7 +163,7 @@ static const XclFunctionInfo saFuncTable_2[] =
{ ocArcTan2, 97, 2, 2, V, { VR }, 0, 0 },
{ ocArcSin, 98, 1, 1, V, { VR }, 0, 0 },
{ ocArcCos, 99, 1, 1, V, { VR }, 0, 0 },
- { ocChose, 100, 2, MX, R, { VO, RO }, 0, 0 },
+ { ocChoose, 100, 2, MX, R, { VO, RO }, 0, 0 },
{ ocHLookup, 101, 3, 3, V, { VV, RO, RO, C }, 0, 0 },
{ ocVLookup, 102, 3, 3, V, { VV, RO, RO, C }, 0, 0 },
{ ocIsRef, 105, 1, 1, V, { RX }, 0, 0 },
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index a4ef34e895bf..9e83d446ecf7 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -105,7 +105,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtStri
aPool << ocOpen;
}
break;
- case ocChose:
+ case ocChoose:
{// 1. Parameter ++
if (nAnz >= 1)
IncToken( eParam[ nAnz - 1 ] );
@@ -974,7 +974,7 @@ DefTokenId LotusToSc::IndexToToken( sal_uInt8 nIndex )
ocArcCos, // 45 Arcus-Cosinus
ocExp, // 46 Exponential function
ocMod, // 47 Modulo
- ocChose, // 48 Selection
+ ocChoose, // 48 Selection
ocIsNA, // 49 Is not available?
ocIsError, // 50 Is Error?
ocFalse, // 51 FALSE
@@ -1503,7 +1503,7 @@ DefTokenId LotusToSc::IndexToTokenWK123( sal_uInt8 nIndex )
ocArcCos, // 45 Arcus-Cosinus
ocExp, // 46 Exponentialfunction
ocMod, // 47 Modulo
- ocChose, // 48 Selection
+ ocChoose, // 48 Selection
ocIsNA, // 49 Is not available?
ocIsError, // 50 Is Error?
ocFalse, // 51 FALSE
diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx
index ab1c80da8b6b..a63eed149025 100644
--- a/sc/source/filter/qpro/qproform.cxx
+++ b/sc/source/filter/qpro/qproform.cxx
@@ -420,7 +420,7 @@ static const struct
{ ocArcCos, FT_FuncFix1 },
{ ocExp, FT_FuncFix1 },
{ ocMod, FT_FuncFix2 },
- { ocChose, FT_FuncVar }, // 0x30
+ { ocChoose, FT_FuncVar }, // 0x30
{ ocIsNA, FT_FuncFix1 },
{ ocIsError, FT_FuncFix1 },
{ ocFalse, FT_FuncFix0 },
diff --git a/sc/source/ui/src/scfuncs.src b/sc/source/ui/src/scfuncs.src
index b6b3c987c168..748d373050bf 100644
--- a/sc/source/ui/src/scfuncs.src
+++ b/sc/source/ui/src/scfuncs.src
@@ -9899,7 +9899,7 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
};
};
// -=*# Resource for function CHOOSE #*=-
- Resource SC_OPCODE_CHOSE
+ Resource SC_OPCODE_CHOOSE
{
String 1 // Description
{
diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx
index a918eb3a73e1..a260705a01cc 100644
--- a/sc/source/ui/unoobj/tokenuno.cxx
+++ b/sc/source/ui/unoobj/tokenuno.cxx
@@ -480,7 +480,7 @@ bool ScTokenConversion::ConvertToTokenSequence( const ScDocument& rDoc,
OSL_TRACE( "ScTokenConversion::ConvertToTokenSequence: unhandled token type SvStackVar %d", rToken.GetType());
//fall-through
case svSep: // occurs with ocSep, ocOpen, ocClose, ocArray*
- case svJump: // occurs with ocIf, ocChose
+ case svJump: // occurs with ocIf, ocChoose
case svMissing: // occurs with ocMissing
rAPI.Data.clear(); // no data
}