diff options
Diffstat (limited to 'kspread/plugins/calculator')
| -rw-r--r-- | kspread/plugins/calculator/kcalc_core.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/kspread/plugins/calculator/kcalc_core.cpp b/kspread/plugins/calculator/kcalc_core.cpp index 881a05ebe..8c1db2a3c 100644 --- a/kspread/plugins/calculator/kcalc_core.cpp +++ b/kspread/plugins/calculator/kcalc_core.cpp @@ -71,7 +71,7 @@ stack_ptr top_type_stack[2] = { NULL, NULL }; int stack_next, stack_last; stack_item process_stack[STACK_SIZE]; -int inverse = FALSE; +bool inverse = false; int precedence_base = 0; num_base current_base = NB_DECIMAL; int input_limit = 0; @@ -229,7 +229,7 @@ void TQtCalculator::RefreshCalculator(void) InitStack(); display_error = 0; DISPLAY_AMOUNT = 0L; - inverse = FALSE; + inverse = false; UpdateDisplay(); last_input = DIGIT; // must set last to DIGIT after Update Display in order // not to get a display holding e.g. 0.000 @@ -445,7 +445,7 @@ void TQtCalculator::Or() eestate = false; if (inverse){ EnterStackFunction(2); // XOR - inverse = FALSE; + inverse = false; } else { EnterStackFunction(1); // OR @@ -467,7 +467,7 @@ void TQtCalculator::Shift() last_input = OPERATION; if (inverse){ EnterStackFunction(5); // Rsh - inverse = FALSE; + inverse = false; } else { EnterStackFunction(4); // Lsh @@ -510,7 +510,7 @@ void TQtCalculator::Mod() last_input = OPERATION; if (inverse){ EnterStackFunction(13); // InvMod - inverse = FALSE; + inverse = false; } else { EnterStackFunction(10); // Mod @@ -523,7 +523,7 @@ void TQtCalculator::Power() last_input = OPERATION; if (inverse){ EnterStackFunction(12); // InvPower - inverse = FALSE; + inverse = false; } else { EnterStackFunction(11); // Power @@ -544,7 +544,7 @@ void TQtCalculator::EnterStackFunction(int data) /* if (inverse ) { dummy = 3; - inverse = FALSE; + inverse = false; } else { dummy = 1; @@ -645,7 +645,7 @@ void TQtCalculator::EnterInt() } else { DISPLAY_AMOUNT = work_amount1; - inverse = FALSE; + inverse = false; } refresh_display = 1; @@ -693,7 +693,7 @@ void TQtCalculator::EnterSquare() else DISPLAY_AMOUNT = SQRT(DISPLAY_AMOUNT); refresh_display = 1; - inverse = FALSE; + inverse = false; last_input = OPERATION; UpdateDisplay(); @@ -885,7 +885,7 @@ void TQtCalculator::ComputeSin() DISPLAY_AMOUNT = ASINH( work_amount); if (errno == EDOM || errno == ERANGE) display_error = 1; - inverse = FALSE; // reset the inverse flag + inverse = false; // reset the inverse flag } } else { @@ -922,7 +922,7 @@ void TQtCalculator::ComputeSin() DISPLAY_AMOUNT = work_amount; if (errno == EDOM || errno == ERANGE) display_error = 1; - inverse = FALSE; // reset the inverse flag + inverse = false; // reset the inverse flag } } @@ -1015,7 +1015,7 @@ void TQtCalculator::ComputeCos() DISPLAY_AMOUNT = ACOSH( work_amount); if (errno == EDOM || errno == ERANGE) display_error = 1; - inverse = FALSE; // reset the inverse flag + inverse = false; // reset the inverse flag } } else { @@ -1054,7 +1054,7 @@ void TQtCalculator::ComputeCos() if (errno == EDOM || errno == ERANGE) display_error = 1; - inverse = FALSE; // reset the inverse flag + inverse = false; // reset the inverse flag } } @@ -1140,7 +1140,7 @@ void TQtCalculator::ComputeTan() DISPLAY_AMOUNT = ATANH( work_amount); if (errno == EDOM || errno == ERANGE) display_error = 1; - inverse = FALSE; // reset the inverse flag + inverse = false; // reset the inverse flag } } else { @@ -1181,7 +1181,7 @@ void TQtCalculator::ComputeTan() if (errno == EDOM || errno == ERANGE) display_error = 1; - inverse = FALSE; // reset the inverse flag + inverse = false; // reset the inverse flag } } @@ -1259,7 +1259,7 @@ void TQtCalculator::EnterLogr() } else if (inverse) { DISPLAY_AMOUNT = POW(10, DISPLAY_AMOUNT); refresh_display = 1; - inverse = FALSE; + inverse = false; UpdateDisplay(); } break; @@ -1311,7 +1311,7 @@ void TQtCalculator::EnterLogn() } else if (inverse) { DISPLAY_AMOUNT = EXP(DISPLAY_AMOUNT); refresh_display = 1; - inverse =FALSE; + inverse =false; UpdateDisplay(); } break; @@ -1442,7 +1442,7 @@ void TQtCalculator::EE() { if(inverse){ DISPLAY_AMOUNT = pi; - inverse = FALSE; + inverse = false; UpdateDisplay(); } else{ @@ -1477,7 +1477,7 @@ void TQtCalculator::Mplusminus() memory_num += DISPLAY_AMOUNT; else { memory_num -= DISPLAY_AMOUNT; - inverse = FALSE; + inverse = false; } } |
