diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-05-24 08:16:57 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-05-24 15:00:25 +0200 |
commit | af353743dfe161e5289a7786a46bf3e8b1de43e3 (patch) | |
tree | 30fce5be4d3283e1a3ec99463038b18ff715bbda /sw/inc/formatcontentcontrol.hxx | |
parent | 912b8fa62f897fb6fdfd760108d87c4dd468b8ee (diff) |
sw content controls, date: add doc model & UNO API
This is meant to be a content control (providing rich text), which also
has a dropdown-like date picker button.
Add a new Date property to track this type, together with date format
and date language. This should be enough for the UI to generate a
correct date string when the file picker is used.
Change-Id: If5d46a804d771e903a688fd73cfaf2d2809b7ab9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134847
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/inc/formatcontentcontrol.hxx')
-rw-r--r-- | sw/inc/formatcontentcontrol.hxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx index be9fa682a847..6e3da73412ba 100644 --- a/sw/inc/formatcontentcontrol.hxx +++ b/sw/inc/formatcontentcontrol.hxx @@ -40,6 +40,7 @@ enum class SwContentControlType CHECKBOX, DROP_DOWN_LIST, PICTURE, + DATE, }; /// SfxPoolItem subclass that wraps an SwContentControl. @@ -127,6 +128,12 @@ class SW_DLLPUBLIC SwContentControl : public sw::BroadcastingModify bool m_bPicture = false; + bool m_bDate = false; + + OUString m_aDateFormat; + + OUString m_aDateLanguage; + /// Stores a list item index, in case the doc model is not yet updated. std::optional<size_t> m_oSelectedListItem; @@ -193,6 +200,18 @@ public: bool GetPicture() const { return m_bPicture; } + void SetDate(bool bDate) { m_bDate = bDate; } + + bool GetDate() const { return m_bDate; } + + void SetDateFormat(const OUString& rDateFormat) { m_aDateFormat = rDateFormat; } + + OUString GetDateFormat() const { return m_aDateFormat; } + + void SetDateLanguage(const OUString& rDateLanguage) { m_aDateLanguage = rDateLanguage; } + + OUString GetDateLanguage() const { return m_aDateLanguage; } + void SetSelectedListItem(std::optional<size_t> oSelectedListItem) { m_oSelectedListItem = oSelectedListItem; |