enforce some form of consistent indent here

Change-Id: Ib26aaa29861e940748a31a3df7f8c5f0408e8c13
This commit is contained in:
Caolán McNamara
2016-09-29 21:12:57 +01:00
parent ea2b56a72a
commit a218467c93

View File

@@ -1042,13 +1042,26 @@ SwSbxValue SwCalc::Prim()
switch (m_eCurrOper)
{
case CALC_SIN: pFnc = &sin; break;
case CALC_COS: pFnc = &cos; break;
case CALC_TAN: pFnc = &tan; break;
case CALC_ATAN: pFnc = &atan; break;
case CALC_ASIN: pFnc = &asin; bChkTrig = true; break;
case CALC_ACOS: pFnc = &acos; bChkTrig = true; break;
case CALC_SIN:
pFnc = &sin;
break;
case CALC_COS:
pFnc = &cos;
break;
case CALC_TAN:
pFnc = &tan;
break;
case CALC_ATAN:
pFnc = &atan;
break;
case CALC_ASIN:
pFnc = &asin;
bChkTrig = true;
break;
case CALC_ACOS:
pFnc = &acos;
bChkTrig = true;
break;
case CALC_NOT:
{
GetToken();
@@ -1073,10 +1086,10 @@ SwSbxValue SwCalc::Prim()
//!! computes a binary NOT
nErg.Compute( SbxNOT, nErg );
}
}
break;
}
case CALC_NUMBER:
{
if( GetToken() == CALC_PHD )
{
double aTmp = m_nNumberValue.GetDouble();
@@ -1094,8 +1107,9 @@ SwSbxValue SwCalc::Prim()
bChkPow = true;
}
break;
}
case CALC_NAME:
{
switch(SwCalcOper eOper = GetToken())
{
case CALC_ASSIGN:
@@ -1103,8 +1117,8 @@ SwSbxValue SwCalc::Prim()
SwCalcExp* n = VarInsert(m_aVarName);
GetToken();
nErg = n->nValue = Expr();
}
break;
}
default:
nErg = VarLook(m_aVarName)->nValue;
// Explicitly disallow unknown function names (followed by "("),
@@ -1113,14 +1127,14 @@ SwSbxValue SwCalc::Prim()
m_eError = CALC_SYNTAX;
else
bChkPow = true;
break;
}
break;
}
case CALC_MINUS:
GetToken();
nErg.PutDouble( -(Prim().GetDouble()) );
break;
case CALC_LP:
{
GetToken();
@@ -1134,9 +1148,8 @@ SwSbxValue SwCalc::Prim()
GetToken();
bChkPow = true; // in order for =(7)^2 to work
}
}
break;
}
case CALC_MEAN:
{
m_nListPor = 1;
@@ -1145,9 +1158,8 @@ SwSbxValue SwCalc::Prim()
double aTmp = nErg.GetDouble();
aTmp /= m_nListPor;
nErg.PutDouble( aTmp );
}
break;
}
case CALC_SQRT:
{
GetToken();
@@ -1156,9 +1168,8 @@ SwSbxValue SwCalc::Prim()
m_eError = CALC_OVERFLOW;
else
nErg.PutDouble( sqrt( nErg.GetDouble() ));
}
break;
}
case CALC_SUM:
case CALC_DATE:
case CALC_MIN:
@@ -1166,11 +1177,9 @@ SwSbxValue SwCalc::Prim()
GetToken();
nErg = Expr();
break;
case CALC_ENDCALC:
nErg.Clear();
break;
default:
m_eError = CALC_SYNTAX;
break;