diff options
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/dialogs/resourcemanager.cxx | 4 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xmlsignaturehelper.cxx | 12 |
2 files changed, 4 insertions, 12 deletions
diff --git a/xmlsecurity/source/dialogs/resourcemanager.cxx b/xmlsecurity/source/dialogs/resourcemanager.cxx index 5407d3933ae7..ed2c02c8d9da 100644 --- a/xmlsecurity/source/dialogs/resourcemanager.cxx +++ b/xmlsecurity/source/dialogs/resourcemanager.cxx @@ -52,9 +52,7 @@ namespace XmlSec DateTime GetDateTime( const ::com::sun::star::util::DateTime& _rDT ) { - return DateTime( - Date( _rDT.Day, _rDT.Month, _rDT.Year ), - tools::Time( _rDT.Hours, _rDT.Minutes, _rDT.Seconds, _rDT.NanoSeconds ) ); + return DateTime(_rDT); } OUString GetDateTimeString( const ::com::sun::star::util::DateTime& _rDT ) diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx index 4ffe2c27d243..9f04c58c0b64 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx @@ -26,6 +26,7 @@ #include <tools/stream.hxx> #include <tools/debug.hxx> +#include <tools/datetime.hxx> #include <xmloff/attrlist.hxx> @@ -121,16 +122,9 @@ void XMLSignatureHelper::SetX509Certificate( ouX509Cert); } -void XMLSignatureHelper::SetDateTime( sal_Int32 nSecurityId, const Date& rDate, const tools::Time& rTime ) +void XMLSignatureHelper::SetDateTime( sal_Int32 nSecurityId, const ::Date& rDate, const tools::Time& rTime ) { - ::com::sun::star::util::DateTime stDateTime; - stDateTime.NanoSeconds = rTime.GetNanoSec(); - stDateTime.Seconds = (::sal_uInt16)rTime.GetSec(); - stDateTime.Minutes = (::sal_uInt16)rTime.GetMin(); - stDateTime.Hours = (::sal_uInt16)rTime.GetHour(); - stDateTime.Day = (::sal_uInt16)rDate.GetDay(); - stDateTime.Month = (::sal_uInt16)rDate.GetMonth(); - stDateTime.Year = (::sal_uInt16)rDate.GetYear(); + css::util::DateTime stDateTime = ::DateTime(rDate, rTime).GetUNODateTime(); mpXSecController->setDate( nSecurityId, stDateTime ); } |