diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-08-13 14:49:13 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-08-13 17:39:18 +0200 |
commit | c69aadfec031535c5b6266dcb97d40225f40eb9b (patch) | |
tree | d2f64b702e0103d977981af3fa63589dd924047e | |
parent | ca7e81099b65a72762699791fe114df4743fca13 (diff) |
pre-select todays's date if the date is empty
Change-Id: If34dbb31d14512b7a7c2a76a3adeb99882a8c60c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120457
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | extensions/source/propctrlr/standardcontrol.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index f03c60b2bb4f..584c66889348 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -142,7 +142,13 @@ namespace pcr { if (!rToggle.get_active()) return; - m_xCalendarBox->set_date(m_xEntryFormatter->GetDate()); + ::Date aDate = m_xEntryFormatter->GetDate(); + if (aDate.IsEmpty()) + { + // with an empty date preselect today in the calendar + aDate = ::Date(::Date::SYSTEM); + } + m_xCalendarBox->set_date(aDate); } Any SAL_CALL ODateControl::getValue() |