summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2020-07-02 20:49:56 +0200
committerMichael Meeks <michael.meeks@collabora.com>2020-07-04 09:12:33 +0100
commit537a0e9f102ee8d67c4d50e9771bdb863e31a9e6 (patch)
treef1d3c76ed24b24dc9d47a74ee4fc71f112d3e23f /include
parent49f31495b98f386bd9ae2eb30352c413cb9ac89d (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 (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 5839c7faa636..8091c2faea71 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,