summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2020-07-02 20:49:56 +0200
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2020-07-03 01:56:59 +0200
commit07987dc9aefdd48010edd0934dde5239c0dc8019 (patch)
tree2b82187871502bf72df2e8bd90214de0212786fd /include
parenttdf#132172 Qt5 just handle visible widget's focus (diff)
downloadcore-07987dc9aefdd48010edd0934dde5239c0dc8019.tar.gz
core-07987dc9aefdd48010edd0934dde5239c0dc8019.zip
Resolves: tdf#134455 Let TIMEVALUE() use lax time recognition
... to accept minutes or seconds >59 Prepare SvNumInputOptions as enum class in case further options would be needed for anything else. Change-Id: Ie9ae62adf68f9948e23f55ac32c09a6b992a36e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97784 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit f106bb4471b6d3627311980ed727459b2da8e448) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97793 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'include')
-rw-r--r--include/svl/zforlist.hxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index adbde81c9315..852be1f7435a 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -373,6 +373,16 @@ public:
typedef std::vector< OUString > NfWSStringsDtor;
+/** Input options to be used with IsNumberFormat() */
+enum class SvNumInputOptions : sal_uInt16
+{
+ NONE = 0,
+ LAX_TIME = 1 ///< allow input of minutes or seconds >59
+};
+namespace o3tl {
+ template<> struct typed_flags<SvNumInputOptions> : is_typed_flags<SvNumInputOptions, 0x0001> {};
+}
+
class SvNumberFormatterRegistry_Impl;
class NfCurrencyTable;
@@ -532,7 +542,8 @@ public:
returned in fOutNumber
<FALSE/> if input is not a number
*/
- bool IsNumberFormat( const OUString& sString, sal_uInt32& F_Index, double& fOutNumber );
+ bool IsNumberFormat( const OUString& sString, sal_uInt32& F_Index, double& fOutNumber,
+ SvNumInputOptions eInputOptions = SvNumInputOptions::NONE );
/// Format a number according to a format index, return string and color
void GetOutputString( const double& fOutNumber, sal_uInt32 nFIndex,