summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-07-16 15:53:00 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-07-17 21:17:03 +0200
commitecf901685ac0c6c7b27b81096bea96cdc3d2c2ca (patch)
treead492eca10199edf81d4e2bdef92248e88bdb654
parent9e626a6d2a55a7159e4fd05d72275c7fe8bb0380 (diff)
Related: tdf#143357 set blank label for no date
instead of current system date Change-Id: Ic504b34990a8ea5151ec653de2db860c1cd4b8ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119079 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 2307d0bf01f4..7cbca1c276b4 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -97,15 +97,18 @@ namespace pcr
void SAL_CALL ODateControl::setValue( const Any& _rValue )
{
+ SvtCalendarBox* pCalendarBox = getTypedControlWindow();
+
util::Date aUNODate;
if ( !( _rValue >>= aUNODate ) )
{
- getTypedControlWindow()->set_date(::Date(::Date::SYSTEM));
+ pCalendarBox->set_date(::Date(::Date::SYSTEM));
+ pCalendarBox->set_label("");
}
else
{
::Date aDate( aUNODate.Day, aUNODate.Month, aUNODate.Year );
- getTypedControlWindow()->set_date(aDate);
+ pCalendarBox->set_date(aDate);
}
}