[Libreoffice-commits] core.git: xmlsecurity/inc xmlsecurity/source
Takeshi Abe
tabe at fixedpoint.jp
Thu May 24 11:28:33 UTC 2018
xmlsecurity/inc/xmlsignaturehelper.hxx | 5 ++---
xmlsecurity/source/helper/documentsignaturemanager.cxx | 6 ++----
xmlsecurity/source/helper/xmlsignaturehelper.cxx | 6 ++----
3 files changed, 6 insertions(+), 11 deletions(-)
New commits:
commit b4960947db5652382710e817ed1412eeb9132be6
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Wed May 23 22:10:22 2018 +0900
xmlsecurity: Ask current datetime only once
... and pass it as the sole argument to XMLSignatureHelper::SetDateTime().
Change-Id: I7f3e8dc90bb34ca347a1ad5a79717a338af3bed9
Reviewed-on: https://gerrit.libreoffice.org/54706
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/xmlsecurity/inc/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsignaturehelper.hxx
index c41179d4805c..02128bb4f6a8 100644
--- a/xmlsecurity/inc/xmlsignaturehelper.hxx
+++ b/xmlsecurity/inc/xmlsignaturehelper.hxx
@@ -37,8 +37,7 @@
#include <com/sun/star/xml/crypto/sax/XSignatureCreationResultListener.hpp>
#include <com/sun/star/xml/crypto/sax/XSignatureVerifyResultListener.hpp>
-class Date;
-namespace tools { class Time; }
+class DateTime;
namespace com {
namespace sun {
@@ -128,7 +127,7 @@ public:
void SetGpgCertificate(sal_Int32 nSecurityId, const OUString& ouGpgCertDigest,
const OUString& ouGpgCert, const OUString& ouGpgOwner);
- void SetDateTime( sal_Int32 nSecurityId, const Date& rDate, const tools::Time& rTime );
+ void SetDateTime( sal_Int32 nSecurityId, const DateTime& rDateTime );
void SetDescription(sal_Int32 nSecurityId, const OUString& rDescription);
void SetSignatureLineId(sal_Int32 nSecurityId, const OUString& rSignatureLineId);
void
diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx
index f302f1a64955..c88c18964b22 100644
--- a/xmlsecurity/source/helper/documentsignaturemanager.cxx
+++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx
@@ -35,8 +35,7 @@
#include <comphelper/storagehelper.hxx>
#include <rtl/ustrbuf.hxx>
#include <sax/tools/converter.hxx>
-#include <tools/date.hxx>
-#include <tools/time.hxx>
+#include <tools/datetime.hxx>
#include <o3tl/make_unique.hxx>
#include <certificate.hxx>
@@ -385,8 +384,7 @@ bool DocumentSignatureManager::add(
maSignatureHelper.AddForSigning(nSecurityId, aElements[n], bBinaryMode, bAdESCompliant);
}
- maSignatureHelper.SetDateTime(nSecurityId, Date(Date::SYSTEM),
- tools::Time(tools::Time::SYSTEM));
+ maSignatureHelper.SetDateTime(nSecurityId, DateTime(DateTime::SYSTEM));
maSignatureHelper.SetDescription(nSecurityId, rDescription);
if (!rSignatureLineId.isEmpty())
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index e754bb3368f6..40c0f19a8fdf 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -44,8 +44,6 @@
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/io/XSeekable.hpp>
-#include <tools/date.hxx>
-#include <tools/time.hxx>
#include <comphelper/ofopxmlhelper.hxx>
#include <comphelper/sequence.hxx>
#include <tools/diagnose_ex.h>
@@ -139,9 +137,9 @@ void XMLSignatureHelper::SetGpgCertificate(sal_Int32 nSecurityId,
ouGpgOwner);
}
-void XMLSignatureHelper::SetDateTime( sal_Int32 nSecurityId, const ::Date& rDate, const tools::Time& rTime )
+void XMLSignatureHelper::SetDateTime( sal_Int32 nSecurityId, const ::DateTime& rDateTime )
{
- css::util::DateTime stDateTime = ::DateTime(rDate, rTime).GetUNODateTime();
+ css::util::DateTime stDateTime = rDateTime.GetUNODateTime();
mpXSecController->setDate( nSecurityId, stDateTime );
}
More information about the Libreoffice-commits
mailing list