diff options
author | Eike Rathke <erack@redhat.com> | 2020-07-02 20:49:56 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2020-07-02 23:54:09 +0200 |
commit | f106bb4471b6d3627311980ed727459b2da8e448 (patch) | |
tree | 0f9b61850701db67c64075e7a5855736b6664c9b /include/svl | |
parent | f4c126da920b06d273ddd375d7f77faa39f01cb5 (diff) |
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
Diffstat (limited to 'include/svl')
-rw-r--r-- | include/svl/zforlist.hxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx index 244121d4afe7..2cc857b5e6cb 100644 --- a/include/svl/zforlist.hxx +++ b/include/svl/zforlist.hxx @@ -377,6 +377,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; @@ -536,7 +546,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, |