From 62a06cd0a9ab053d6560f7395a4b0f339c2fbe58 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 24 Nov 2014 13:03:52 +0200 Subject: Add MIN and MAX tests Change-Id: Ia8d5fdeb1e03009035136edeab991442b7d91c4b --- sc/source/ui/optdlg/calcoptionsdlg.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sc') diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index 1d7c6f1529be..ebaf2ed44cfd 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -1367,6 +1367,18 @@ IMPL_LINK( ScCalcOptionsDialog, TestClickHdl, PushButton*, ) return (nAccum * nArg); })); + pTestDocument->addTest(Reduction("Min", "MIN", 500, DBL_MAX, -1000, 1000, 0, + [] (double nAccum, double nArg) + { + return std::min(nAccum, nArg); + })); + + pTestDocument->addTest(Reduction("Max", "MAX", 500, -DBL_MAX, -1000, 1000, 0, + [] (double nAccum, double nArg) + { + return std::max(nAccum, nArg); + })); + return 0; } -- cgit