summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-28 15:49:26 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-10-01 07:34:23 +0000
commitfc04f76336fdf8c96e35382cdeb497e2f939705c (patch)
tree70c9bbd054a34a9bca9d22bb7afbb9c4349beff0 /xmlsecurity
parenteb4811590c85895ce531674596bdd6afb3397725 (diff)
fdo#82577: Handle Time
Put the TOOLS Time class in the tools namespace. Avoids clash with the X11 Time typedef. Change-Id: Iac57d5aef35e81ace1ee0d5e6d76cb278f8ad866 Reviewed-on: https://gerrit.libreoffice.org/11684 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx4
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx4
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx2
-rw-r--r--xmlsecurity/source/dialogs/resourcemanager.cxx2
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper.cxx2
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx4
7 files changed, 11 insertions, 11 deletions
diff --git a/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
index 9ac22e37b5b9..827550f8df57 100644
--- a/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
+++ b/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
@@ -36,7 +36,7 @@
class XSecController;
class Date;
-class Time;
+namespace tools { class Time; }
namespace com {
namespace sun {
@@ -165,7 +165,7 @@ public:
void SetX509Certificate(sal_Int32 nSecurityId, const OUString& ouX509IssuerName,
const OUString& ouX509SerialNumber, const OUString& ouX509Cert);
- void SetDateTime( sal_Int32 nSecurityId, const Date& rDate, const Time& rTime );
+ void SetDateTime( sal_Int32 nSecurityId, const Date& rDate, const tools::Time& rTime );
void AddForSigning( sal_Int32 securityId, const OUString& uri, const OUString& objectURL, bool bBinary );
bool CreateAndWriteSignature( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler >& xDocumentHandler );
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index 2780bb241fae..38109b36c8eb 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -303,9 +303,9 @@ DocumentDigitalSignatures::ImplVerifySignatures(
if (!rSigInfo.Signer.is())
rSigInfo.Signer = xSecEnv->getCertificate( rInfo.ouX509IssuerName, xSerialNumberAdapter->toSequence( rInfo.ouX509SerialNumber ) );
- // Time support again (#i38744#)
+ // tools::Time support again (#i38744#)
Date aDate( rInfo.stDateTime.Day, rInfo.stDateTime.Month, rInfo.stDateTime.Year );
- Time aTime( rInfo.stDateTime.Hours, rInfo.stDateTime.Minutes,
+ tools::Time aTime( rInfo.stDateTime.Hours, rInfo.stDateTime.Minutes,
rInfo.stDateTime.Seconds, rInfo.stDateTime.NanoSeconds );
rSigInfo.SignatureDate = aDate.GetDate();
rSigInfo.SignatureTime = aTime.GetTime();
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 1016a5f99c94..7cfde0f8020e 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -446,7 +446,7 @@ IMPL_LINK_NOARG(DigitalSignaturesDialog, AddButtonHdl)
maSignatureHelper.AddForSigning( nSecurityId, aElements[n], aElements[n], bBinaryMode );
}
- maSignatureHelper.SetDateTime( nSecurityId, Date( Date::SYSTEM ), Time( Time::SYSTEM ) );
+ maSignatureHelper.SetDateTime( nSecurityId, Date( Date::SYSTEM ), tools::Time( tools::Time::SYSTEM ) );
// We open a signature stream in which the existing and the new
//signature is written. ImplGetSignatureInformation (later in this function) will
diff --git a/xmlsecurity/source/dialogs/resourcemanager.cxx b/xmlsecurity/source/dialogs/resourcemanager.cxx
index 6dc5703255ca..2d84e0fe1257 100644
--- a/xmlsecurity/source/dialogs/resourcemanager.cxx
+++ b/xmlsecurity/source/dialogs/resourcemanager.cxx
@@ -54,7 +54,7 @@ namespace XmlSec
{
return DateTime(
Date( _rDT.Day, _rDT.Month, _rDT.Year ),
- Time( _rDT.Hours, _rDT.Minutes, _rDT.Seconds, _rDT.NanoSeconds ) );
+ tools::Time( _rDT.Hours, _rDT.Minutes, _rDT.Seconds, _rDT.NanoSeconds ) );
}
OUString GetDateTimeString( const ::com::sun::star::util::DateTime& _rDT )
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index 2722ca4fa68e..931ded8c0265 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -121,7 +121,7 @@ void XMLSignatureHelper::SetX509Certificate(
ouX509Cert);
}
-void XMLSignatureHelper::SetDateTime( sal_Int32 nSecurityId, const Date& rDate, const 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();
diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
index 34e7e452b7ff..546d831c8b10 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
@@ -302,7 +302,7 @@ OUString SAL_CALL X509Certificate_MSCryptImpl :: getSubjectName() throw ( ::com:
{
if( FileTimeToSystemTime( &localFileTime, &explTime ) ) {
//Convert the time to readable local time
- dateTime.NanoSeconds = explTime.wMilliseconds * ::Time::nanoPerMilli ;
+ dateTime.NanoSeconds = explTime.wMilliseconds * ::tools::Time::nanoPerMilli ;
dateTime.Seconds = explTime.wSecond ;
dateTime.Minutes = explTime.wMinute ;
dateTime.Hours = explTime.wHour ;
@@ -328,7 +328,7 @@ OUString SAL_CALL X509Certificate_MSCryptImpl :: getSubjectName() throw ( ::com:
{
if( FileTimeToSystemTime( &localFileTime, &explTime ) ) {
//Convert the time to readable local time
- dateTime.NanoSeconds = explTime.wMilliseconds * ::Time::nanoPerMilli ;
+ dateTime.NanoSeconds = explTime.wMilliseconds * ::tools::Time::nanoPerMilli ;
dateTime.Seconds = explTime.wSecond ;
dateTime.Minutes = explTime.wMinute ;
dateTime.Hours = explTime.wHour ;
diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
index f8dc8f14a45f..decda16a2b6a 100644
--- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
@@ -107,7 +107,7 @@ OUString SAL_CALL X509Certificate_NssImpl :: getSubjectName() throw ( ::com::sun
//Convert the time to readable local time
PR_ExplodeTime( notBefore, PR_LocalTimeParameters, &explTime ) ;
- dateTime.NanoSeconds = static_cast< sal_Int32 >( explTime.tm_usec * ::Time::nanoPerMicro );
+ dateTime.NanoSeconds = static_cast< sal_Int32 >( explTime.tm_usec * ::tools::Time::nanoPerMicro );
dateTime.Seconds = static_cast< sal_Int16 >( explTime.tm_sec );
dateTime.Minutes = static_cast< sal_Int16 >( explTime.tm_min );
dateTime.Hours = static_cast< sal_Int16 >( explTime.tm_hour );
@@ -136,7 +136,7 @@ OUString SAL_CALL X509Certificate_NssImpl :: getSubjectName() throw ( ::com::sun
//Convert the time to readable local time
PR_ExplodeTime( notAfter, PR_LocalTimeParameters, &explTime ) ;
- dateTime.NanoSeconds = static_cast< sal_Int16 >( explTime.tm_usec * ::Time::nanoPerMicro );
+ dateTime.NanoSeconds = static_cast< sal_Int16 >( explTime.tm_usec * ::tools::Time::nanoPerMicro );
dateTime.Seconds = static_cast< sal_Int16 >( explTime.tm_sec );
dateTime.Minutes = static_cast< sal_Int16 >( explTime.tm_min );
dateTime.Hours = static_cast< sal_Int16 >( explTime.tm_hour );