summaryrefslogtreecommitdiff
path: root/include/sax
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2020-12-21 12:34:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-22 08:20:54 +0100
commitdb866805f3eee3a15bc96ffb5ba16aa77a02ddbd (patch)
tree48f8fe6da8cba68b0f4e262de519a42b355934bb /include/sax
parentdb9f13986fc7ef3d4b44d71459c58e9ea0ae8bcb (diff)
use string_view in ProcessAttribute
Change-Id: I81feb01bf6823d1d8fb5a7da08490959484ef533 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108095 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/sax')
-rw-r--r--include/sax/tools/converter.hxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/sax/tools/converter.hxx b/include/sax/tools/converter.hxx
index 07c2fb3207b1..0d3d68ba301c 100644
--- a/include/sax/tools/converter.hxx
+++ b/include/sax/tools/converter.hxx
@@ -206,6 +206,10 @@ public:
static bool convertDuration(double & rfTime,
std::u16string_view rString);
+ /** convert XMLSchema-2 "duration" string to double; negative durations allowed */
+ static bool convertDuration(double & rfTime,
+ std::string_view rString);
+
/** convert XMLSchema-2 "duration" string to util::Duration */
static bool convertDuration(css::util::Duration& rDuration,
std::u16string_view rString);
@@ -229,10 +233,18 @@ public:
static bool parseDateTime( css::util::DateTime& rDateTime,
std::u16string_view rString );
+ /** convert XMLSchema-2 "date" or "dateTime" string to util::DateTime */
+ static bool parseDateTime( css::util::DateTime& rDateTime,
+ std::string_view rString );
+
/** convert XMLSchema-2 "time" or "dateTime" string to util::DateTime */
static bool parseTimeOrDateTime(css::util::DateTime& rDateTime,
std::u16string_view rString);
+ /** convert XMLSchema-2 "time" or "dateTime" string to util::DateTime */
+ static bool parseTimeOrDateTime(css::util::DateTime& rDateTime,
+ std::string_view rString);
+
/** convert XMLSchema-2 "date" or "dateTime" string to util::DateTime or
util::Date */
static bool parseDateOrDateTime(
@@ -242,6 +254,15 @@ public:
std::optional<sal_Int16> * pTimeZoneOffset,
std::u16string_view rString );
+ /** convert XMLSchema-2 "date" or "dateTime" string to util::DateTime or
+ util::Date */
+ static bool parseDateOrDateTime(
+ css::util::Date * pDate,
+ css::util::DateTime & rDateTime,
+ bool & rbDateTime,
+ std::optional<sal_Int16> * pTimeZoneOffset,
+ std::string_view rString );
+
/** gets the position of the first comma after npos in the string
rStr. Commas inside '"' pairs are not matched */
static sal_Int32 indexOfComma( std::u16string_view rStr,