diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-05-25 09:58:28 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-05-25 11:52:02 +0200 |
commit | ce5d609da9d20b3c91f6f8eb4ee88451cbd55a9d (patch) | |
tree | 2aba1fb0c225d7b89d67e244e56d68220b041135 /sw/uiconfig | |
parent | d77db907465547f8704fd32b2c90165b54873dba (diff) |
sw content controls, date: show a date picker on click
- add a new SwContentControl::GetDateString() that knows how to produce
a formatted date, taking the language and the date format into account
- add a new SwDateContentControlButton that knows how to open popup a
calendar on click and that puts the selected date into
SwContentControl::m_oSelectedDate
- extend SwWrtShell::GotoContentControl() to consume that selected date
& update the document text accordingly
- in case SwSelPaintRects::HighlightContentControl() notices a date
content control, create an instance of this newly introduced
SwDateContentControlButton
Change-Id: Ia2cb0fa3aefbf543b8dc2e96bcebb41408eb12c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134926
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/uiconfig')
-rw-r--r-- | sw/uiconfig/swriter/ui/contentcontrolcalendar.ui | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sw/uiconfig/swriter/ui/contentcontrolcalendar.ui b/sw/uiconfig/swriter/ui/contentcontrolcalendar.ui new file mode 100644 index 000000000000..e5355f723621 --- /dev/null +++ b/sw/uiconfig/swriter/ui/contentcontrolcalendar.ui @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.38.2 --> +<interface domain="sw"> + <requires lib="gtk+" version="3.20"/> + <object class="GtkPopover" id="Calendar"> + <property name="can-focus">False</property> + <property name="position">bottom</property> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkCalendar" id="date"> + <property name="visible">True</property> + <property name="can-focus">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + </child> + </object> +</interface> |