[Libreoffice-commits] core.git: extensions/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Aug 13 15:39:52 UTC 2021
extensions/source/propctrlr/standardcontrol.cxx | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit c69aadfec031535c5b6266dcb97d40225f40eb9b
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Aug 13 14:49:13 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Aug 13 17:39:18 2021 +0200
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 at redhat.com>
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()
More information about the Libreoffice-commits
mailing list