diff options
| author | Mavridis Philippe <mavridisf@gmail.com> | 2024-04-05 20:19:23 +0300 |
|---|---|---|
| committer | Mavridis Philippe <mavridisf@gmail.com> | 2024-05-18 11:24:10 +0300 |
| commit | 979ee566e7adba689fad7760b7a25db1216d438f (patch) | |
| tree | 2441dd937de16dbd7b1fbce8c591d6dea84e4adc /kspread/valuecalc.h | |
| parent | 950f6aa09f2020beffe17aa367c096c2fed3e6b0 (diff) | |
| download | koffice-979ee566.tar.gz koffice-979ee566.zip | |
KSpread: Add natural comparison operators.
Natural comparison does not depend on the type of data (whether it's a string or a number).
Based on Calligra Sheets code originally from revision 551470.
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
(cherry picked from commit 4f21f4038f558fa330c307cc3745d6c3568b8b56)
Diffstat (limited to 'kspread/valuecalc.h')
| -rw-r--r-- | kspread/valuecalc.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/kspread/valuecalc.h b/kspread/valuecalc.h index 2d78211b2..5157fa4c6 100644 --- a/kspread/valuecalc.h +++ b/kspread/valuecalc.h @@ -106,7 +106,22 @@ class ValueCalc { /** numerical comparison */ bool lower (const Value &a, const Value &b); /** string comparison */ - bool strEqual (const Value &a, const Value &b); + bool strEqual (const Value &a, const Value &b, bool CS = true); + /** string comparison */ + bool strGreater (const Value &a, const Value &b, bool CS = true); + /** string comparison - greater or equal */ + bool strGequal (const Value &a, const Value &b, bool CS = true); + /** string comparison */ + bool strLower (const Value &a, const Value &b, bool CS = true); + /** string or numerical comparison */ + bool naturalEqual (const Value &a, const Value &b, bool CS = true); + /** string or numerical comparison */ + bool naturalGreater (const Value &a, const Value &b, bool CS = true); + /** string or numerical comparison - greater or equal */ + bool naturalGequal (const Value &a, const Value &b, bool CS = true); + /** string or numerical comparison */ + bool naturalLower (const Value &a, const Value &b, bool CS = true); + int sign (const Value &a); /** rounding */ |
