summaryrefslogtreecommitdiff
path: root/oox/inc
diff options
context:
space:
mode:
authorSarper Akdemir <sarper.akdemir@collabora.com>2021-05-09 19:46:21 +0300
committerMiklos Vajna <vmiklos@collabora.com>2021-06-14 12:06:10 +0200
commitb2869ca51c2e30128456cbdee7e526bacd9cc905 (patch)
tree0fa2dbe51398482240794eb6d9779b326eeaade5 /oox/inc
parentc71520d7e7d8e9c669411d6a1beb788e1cba43a1 (diff)
tdf#59323: ooxml import: add OOXML to LO datetime helper
Added static helper functions getLOTimeFormat and getLODateFormat to TextField class for mapping datetime field types to SvxDateFomat and SvxTimeFormat. Change-Id: I9c1553cc89d47855dc7af06a8ea995de01692ded Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117001 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'oox/inc')
-rw-r--r--oox/inc/drawingml/textfield.hxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/oox/inc/drawingml/textfield.hxx b/oox/inc/drawingml/textfield.hxx
index f365238bd54b..c26a8518c509 100644
--- a/oox/inc/drawingml/textfield.hxx
+++ b/oox/inc/drawingml/textfield.hxx
@@ -23,6 +23,9 @@
#include <drawingml/textrun.hxx>
#include <drawingml/textparagraphproperties.hxx>
+enum class SvxTimeFormat;
+enum class SvxDateFormat;
+
namespace oox::drawingml {
struct TextCharacterProperties;
@@ -48,6 +51,16 @@ public:
const TextCharacterProperties& rTextCharacterStyle,
float nDefaultCharHeight) const override;
+ /** Gets the corresponding LO Date format for given OOXML datetime field type
+ *
+ * @param rDateTimeType PPTX datetime field type e.g. datetime3
+ */
+ static SvxDateFormat getLODateFormat( std::u16string_view rDateTimeType );
+ /** Gets the corresponding LO Time format for given OOXML datetime field type
+ *
+ * @param rDateTimeType PPTX datetime field type e.g. datetime3
+ */
+ static SvxTimeFormat getLOTimeFormat( std::u16string_view rDateTimeType );
private:
TextParagraphProperties maTextParagraphProperties;
OUString msType;