summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-01-11 13:35:38 +0200
committerEike Rathke <erack@redhat.com>2015-01-13 15:24:04 +0000
commitc32a5a3b8e2e3a49ac9f1fd3f2872b00612676b7 (patch)
treecb2de3eab8dbbcff359d367177d91b67725e1b69 /extensions
parent86db1702d72a103ffeafc69dcaa63318539c147a (diff)
simplify Date/Time/DateTime conversion code
add constructors to Date/DateTime/Time, that take the css::util counterparts, to simplify code converting between these type Change-Id: I4b03da02c63f65b6ec18cb4d6ecc3859bdef1ff7 Reviewed-on: https://gerrit.libreoffice.org/13855 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 4e1c60037db1..cb542967eef0 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -87,8 +87,7 @@ namespace pcr
}
else
{
- ::tools::Time aTime( aUNOTime.Hours, aUNOTime.Minutes, aUNOTime.Seconds, aUNOTime.NanoSeconds );
- getTypedControlWindow()->SetTime( aTime );
+ getTypedControlWindow()->SetTime( ::tools::Time(aUNOTime) );
}
}
@@ -151,8 +150,7 @@ namespace pcr
if ( !getTypedControlWindow()->GetText().isEmpty() )
{
::Date aDate( getTypedControlWindow()->GetDate() );
- util::Date aUNODate( aDate.GetDay(), aDate.GetMonth(), aDate.GetYear() );
- aPropValue <<= aUNODate;
+ aPropValue <<= aDate.GetUNODate();
}
return aPropValue;
}