summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comphelper/Library_comphelper.mk1
-rw-r--r--comphelper/source/misc/xmlsechelper.cxx (renamed from xmlsecurity/source/dialogs/resourcemanager.cxx)33
-rw-r--r--cui/source/dialogs/SignSignatureLineDialog.cxx10
-rw-r--r--include/comphelper/xmlsechelper.hxx47
-rw-r--r--include/unotools/datetime.hxx5
-rw-r--r--solenv/clang-format/blacklist3
-rw-r--r--unotools/source/misc/datetime.cxx23
-rw-r--r--xmlsecurity/Library_xmlsecurity.mk1
-rw-r--r--xmlsecurity/inc/resourcemanager.hxx32
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx1
-rw-r--r--xmlsecurity/source/dialogs/certificatechooser.cxx12
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx29
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx9
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx10
14 files changed, 126 insertions, 90 deletions
diff --git a/comphelper/Library_comphelper.mk b/comphelper/Library_comphelper.mk
index 04b333db9af9..a5275f971be4 100644
--- a/comphelper/Library_comphelper.mk
+++ b/comphelper/Library_comphelper.mk
@@ -143,6 +143,7 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\
comphelper/source/misc/types \
comphelper/source/misc/weak \
comphelper/source/misc/weakeventlistener \
+ comphelper/source/misc/xmlsechelper \
comphelper/source/officeinstdir/officeinstallationdirectories \
comphelper/source/processfactory/processfactory \
comphelper/source/property/ChainablePropertySet \
diff --git a/xmlsecurity/source/dialogs/resourcemanager.cxx b/comphelper/source/misc/xmlsechelper.cxx
index 16ca346bcbc3..84ccd203092f 100644
--- a/xmlsecurity/source/dialogs/resourcemanager.cxx
+++ b/comphelper/source/misc/xmlsechelper.cxx
@@ -18,7 +18,7 @@
*/
-#include <resourcemanager.hxx>
+#include <comphelper/xmlsechelper.hxx>
#include <vcl/svapp.hxx>
#include <vcl/fixed.hxx>
@@ -30,34 +30,10 @@
using namespace std;
-namespace XmlSec
+namespace comphelper
+{
+namespace xmlsec
{
- const LocaleDataWrapper& GetLocaleData()
- {
- static SvtSysLocale ourSysLocale;
-
- return ourSysLocale.GetLocaleData();
- }
-
- DateTime GetDateTime( const css::util::DateTime& _rDT )
- {
- return DateTime(_rDT);
- }
-
- OUString GetDateTimeString( const css::util::DateTime& _rDT )
- {
- // String with date and time information (#i20172#)
- DateTime aDT( GetDateTime( _rDT ) );
- const LocaleDataWrapper& rLoDa = GetLocaleData();
-
- return rLoDa.getDate( aDT ) + " " + rLoDa.getTime( aDT );
- }
-
- OUString GetDateString( const css::util::DateTime& _rDT )
- {
- return GetLocaleData().getDate( GetDateTime( _rDT ) );
- }
-
OUString GetCertificateKind( const css::security::CertificateKind &rKind )
{
switch (rKind)
@@ -354,5 +330,6 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
return aStr.makeStringAndClear();
}
}
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/dialogs/SignSignatureLineDialog.cxx b/cui/source/dialogs/SignSignatureLineDialog.cxx
index a6e5ae4d6642..a3230eedcfb2 100644
--- a/cui/source/dialogs/SignSignatureLineDialog.cxx
+++ b/cui/source/dialogs/SignSignatureLineDialog.cxx
@@ -16,6 +16,7 @@
#include <strings.hrc>
#include <comphelper/processfactory.hxx>
+#include <comphelper/xmlsechelper.hxx>
#include <tools/stream.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/streamwrap.hxx>
@@ -40,6 +41,7 @@
#include <com/sun/star/text/XTextContent.hpp>
#include <com/sun/star/text/XTextDocument.hpp>
+using namespace comphelper;
using namespace css;
using namespace css::uno;
using namespace css::beans;
@@ -138,7 +140,8 @@ IMPL_LINK_NOARG(SignSignatureLineDialog, chooseCertificate, weld::Button&, void)
if (xSignCertificate.is())
{
m_xSelectedCertifate = xSignCertificate;
- m_xBtnChooseCertificate->set_label(xSignCertificate->getIssuerName());
+ m_xBtnChooseCertificate->set_label(
+ xmlsec::GetContentPart(xSignCertificate->getIssuerName()));
}
ValidateFields();
}
@@ -175,8 +178,9 @@ SignSignatureLineDialog::getSignedGraphic(bool bValid)
aSvgImage = aSvgImage.replaceAll("[SIGNER_TITLE]", getCDataString(m_aSuggestedSignerTitle));
aSvgImage = aSvgImage.replaceAll("[SIGNATURE]", getCDataString(m_xEditName->get_text()));
- OUString aIssuerLine = CuiResId(RID_SVXSTR_SIGNATURELINE_SIGNED_BY)
- .replaceFirst("%1", m_xSelectedCertifate->getIssuerName());
+ OUString aIssuerLine
+ = CuiResId(RID_SVXSTR_SIGNATURELINE_SIGNED_BY)
+ .replaceFirst("%1", xmlsec::GetContentPart(m_xSelectedCertifate->getIssuerName()));
aSvgImage = aSvgImage.replaceAll("[SIGNED_BY]", getCDataString(aIssuerLine));
if (bValid)
aSvgImage = aSvgImage.replaceAll("[INVALID_SIGNATURE]", "");
diff --git a/include/comphelper/xmlsechelper.hxx b/include/comphelper/xmlsechelper.hxx
new file mode 100644
index 000000000000..ba702fa683c6
--- /dev/null
+++ b/include/comphelper/xmlsechelper.hxx
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_COMPHELPER_XMLSECHELPER_HXX
+#define INCLUDED_COMPHELPER_XMLSECHELPER_HXX
+
+#include <comphelper/comphelperdllapi.h>
+
+#include <com/sun/star/security/CertificateKind.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+
+#include <vector>
+
+namespace comphelper
+{
+namespace xmlsec
+{
+COMPHELPER_DLLPUBLIC OUString GetCertificateKind(const css::security::CertificateKind& rKind);
+
+COMPHELPER_DLLPUBLIC std::vector<std::pair<OUString, OUString>> parseDN(const OUString& rRawString);
+COMPHELPER_DLLPUBLIC std::pair<OUString, OUString>
+GetDNForCertDetailsView(const OUString& rRawString);
+COMPHELPER_DLLPUBLIC OUString GetContentPart(const OUString& _rRawString);
+
+COMPHELPER_DLLPUBLIC OUString GetHexString(const css::uno::Sequence<sal_Int8>& _rSeq,
+ const char* _pSep, sal_uInt16 _nLineBreak = 0xFFFF);
+}
+}
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/unotools/datetime.hxx b/include/unotools/datetime.hxx
index dcae945188be..bd630e2ffca2 100644
--- a/include/unotools/datetime.hxx
+++ b/include/unotools/datetime.hxx
@@ -31,9 +31,14 @@ namespace com { namespace sun { namespace star { namespace util { struct Time; }
class Date;
class DateTime;
+class LocaleDataWrapper;
namespace utl
{
+ UNOTOOLS_DLLPUBLIC const LocaleDataWrapper& GetLocaleData();
+ UNOTOOLS_DLLPUBLIC DateTime GetDateTime(const css::util::DateTime& _rDT);
+ UNOTOOLS_DLLPUBLIC OUString GetDateTimeString(const css::util::DateTime& _rDT);
+ UNOTOOLS_DLLPUBLIC OUString GetDateString(const css::util::DateTime& _rDT);
UNOTOOLS_DLLPUBLIC void typeConvert(const Date& _rDate, css::util::Date& _rOut);
UNOTOOLS_DLLPUBLIC void typeConvert(const css::util::Date& _rDate, Date& _rOut);
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index fe9aecae089e..b8eac28b471d 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -1651,6 +1651,7 @@ comphelper/source/misc/threadpool.cxx
comphelper/source/misc/types.cxx
comphelper/source/misc/weak.cxx
comphelper/source/misc/weakeventlistener.cxx
+comphelper/source/misc/xmlsechelper.cxx
comphelper/source/officeinstdir/officeinstallationdirectories.cxx
comphelper/source/officeinstdir/officeinstallationdirectories.hxx
comphelper/source/processfactory/processfactory.cxx
@@ -19444,7 +19445,6 @@ xmlsecurity/inc/pch/precompiled_xsec_gpg.cxx
xmlsecurity/inc/pch/precompiled_xsec_gpg.hxx
xmlsecurity/inc/pch/precompiled_xsec_xmlsec.cxx
xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx
-xmlsecurity/inc/resourcemanager.hxx
xmlsecurity/inc/xmlsec-wrapper.h
xmlsecurity/inc/xmlsec/errorcallback.hxx
xmlsecurity/inc/xmlsec/saxhelper.hxx
@@ -19469,7 +19469,6 @@ xmlsecurity/source/dialogs/certificatechooser.cxx
xmlsecurity/source/dialogs/certificateviewer.cxx
xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
xmlsecurity/source/dialogs/macrosecurity.cxx
-xmlsecurity/source/dialogs/resourcemanager.cxx
xmlsecurity/source/framework/buffernode.cxx
xmlsecurity/source/framework/buffernode.hxx
xmlsecurity/source/framework/elementcollector.cxx
diff --git a/unotools/source/misc/datetime.cxx b/unotools/source/misc/datetime.cxx
index 55c61988c8c8..979db79e13cd 100644
--- a/unotools/source/misc/datetime.cxx
+++ b/unotools/source/misc/datetime.cxx
@@ -18,12 +18,14 @@
*/
#include <unotools/datetime.hxx>
+#include <unotools/syslocale.hxx>
#include <tools/date.hxx>
#include <tools/time.hxx>
#include <tools/datetime.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
#include <osl/diagnose.h>
+#include <vcl/svapp.hxx>
#include <sstream>
namespace
@@ -193,6 +195,27 @@ namespace
namespace utl
{
+const LocaleDataWrapper& GetLocaleData()
+{
+ static SvtSysLocale ourSysLocale;
+ return ourSysLocale.GetLocaleData();
+}
+
+DateTime GetDateTime(const css::util::DateTime& _rDT) { return DateTime(_rDT); }
+
+OUString GetDateTimeString(const css::util::DateTime& _rDT)
+{
+ // String with date and time information (#i20172#)
+ DateTime aDT(GetDateTime(_rDT));
+ const LocaleDataWrapper& rLoDa = GetLocaleData();
+
+ return rLoDa.getDate(aDT) + " " + rLoDa.getTime(aDT);
+}
+
+OUString GetDateString(const css::util::DateTime& _rDT)
+{
+ return GetLocaleData().getDate(GetDateTime(_rDT));
+}
void typeConvert(const Date& _rDate, css::util::Date& _rOut)
{
diff --git a/xmlsecurity/Library_xmlsecurity.mk b/xmlsecurity/Library_xmlsecurity.mk
index a6f4e09d0c45..9a65dd2152a9 100644
--- a/xmlsecurity/Library_xmlsecurity.mk
+++ b/xmlsecurity/Library_xmlsecurity.mk
@@ -51,7 +51,6 @@ $(eval $(call gb_Library_add_exception_objects,xmlsecurity,\
xmlsecurity/source/dialogs/certificateviewer \
xmlsecurity/source/dialogs/digitalsignaturesdialog \
xmlsecurity/source/dialogs/macrosecurity \
- xmlsecurity/source/dialogs/resourcemanager \
xmlsecurity/source/framework/buffernode \
xmlsecurity/source/framework/elementcollector \
xmlsecurity/source/framework/elementmark \
diff --git a/xmlsecurity/inc/resourcemanager.hxx b/xmlsecurity/inc/resourcemanager.hxx
index d621c4bc7328..3640db40a63f 100644
--- a/xmlsecurity/inc/resourcemanager.hxx
+++ b/xmlsecurity/inc/resourcemanager.hxx
@@ -21,38 +21,8 @@
#define INCLUDED_XMLSECURITY_SOURCE_DIALOGS_RESOURCEMANAGER_HXX
#include <unotools/resmgr.hxx>
-#include <tools/datetime.hxx>
-#include <com/sun/star/security/CertificateKind.hpp>
-#include <com/sun/star/util/DateTime.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <vector>
-
-class FixedImage;
-class Control;
-class LocaleDataWrapper;
-
-namespace XmlSec
-{
- const LocaleDataWrapper& GetLocaleData();
- DateTime GetDateTime( const css::util::DateTime& _rDT );
- OUString GetDateTimeString( const css::util::DateTime& _rDT );
- OUString GetDateString( const css::util::DateTime& _rDT );
- OUString GetCertificateKind( const css::security::CertificateKind& rKind );
-
- std::vector< std::pair< OUString, OUString> >
- parseDN(const OUString& rRawString);
- std::pair< OUString, OUString> GetDNForCertDetailsView(
- const OUString & rRawString);
- OUString GetContentPart( const OUString& _rRawString );
-
- OUString GetHexString( const css::uno::Sequence< sal_Int8 >& _rSeq, const char* _pSep, sal_uInt16 _nLineBreak = 0xFFFF );
-}
-
-inline OUString XsResId(const char* pId)
-{
- return Translate::get(pId, Translate::Create("xsc"));
-}
+inline OUString XsResId(const char* pId) { return Translate::get(pId, Translate::Create("xsc")); }
#endif
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index 19f46e45e23d..c67d893b0624 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -46,6 +46,7 @@
#include <comphelper/documentconstants.hxx>
#include <comphelper/propertyvalue.hxx>
#include <comphelper/sequence.hxx>
+#include <comphelper/xmlsechelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <sal/log.hxx>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index 4c891abae5f3..fc230658e491 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -23,14 +23,16 @@
#include <biginteger.hxx>
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#include <comphelper/sequence.hxx>
+#include <comphelper/xmlsechelper.hxx>
#include <com/sun/star/security/NoPasswordException.hpp>
#include <com/sun/star/security/CertificateCharacters.hpp>
-#include <resourcemanager.hxx>
#include <vcl/treelistentry.hxx>
+#include <unotools/datetime.hxx>
#include <unotools/useroptions.hxx>
+using namespace comphelper;
using namespace css;
CertificateChooser::CertificateChooser(vcl::Window* _pParent,
@@ -229,11 +231,11 @@ void CertificateChooser::ImplInitialize()
userData->xSecurityEnvironment = secEnvironment;
mvUserData.push_back(userData);
- OUString sIssuer = XmlSec::GetContentPart( xCerts[ nC ]->getIssuerName() );
- SvTreeListEntry* pEntry = m_pCertLB->InsertEntry( XmlSec::GetContentPart( xCerts[ nC ]->getSubjectName() )
+ OUString sIssuer = xmlsec::GetContentPart( xCerts[ nC ]->getIssuerName() );
+ SvTreeListEntry* pEntry = m_pCertLB->InsertEntry( xmlsec::GetContentPart( xCerts[ nC ]->getSubjectName() )
+ "\t" + sIssuer
- + "\t" + XmlSec::GetCertificateKind( xCerts[ nC ]->getCertificateKind() )
- + "\t" + XmlSec::GetDateString( xCerts[ nC ]->getNotValidAfter() )
+ + "\t" + xmlsec::GetCertificateKind( xCerts[ nC ]->getCertificateKind() )
+ + "\t" + utl::GetDateString( xCerts[ nC ]->getNotValidAfter() )
+ "\t" + UsageInClearText( xCerts[ nC ]->getCertificateUsage() ) );
pEntry->SetUserData( userData.get() );
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 3f262bf46580..ceefb55c03bc 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -31,11 +31,14 @@
#include <strings.hrc>
#include <resourcemanager.hxx>
+#include <comphelper/xmlsechelper.hxx>
#include <svtools/controldims.hxx>
+#include <tools/datetime.hxx>
#include <bitmaps.hlst>
#include <vcl/settings.hxx>
+using namespace comphelper;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -128,12 +131,12 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP( vcl::Window* _pParent, C
// insert data
css::uno::Reference< css::security::XCertificate > xCert = mpDlg->mxCert;
- OUString sSubjectName(XmlSec::GetContentPart(xCert->getSubjectName()));
+ OUString sSubjectName(xmlsec::GetContentPart(xCert->getSubjectName()));
if (!sSubjectName.isEmpty())
m_pIssuedToFT->SetText(sSubjectName);
else
m_pIssuedToLabelFT->Hide();
- OUString sIssuerName(XmlSec::GetContentPart(xCert->getIssuerName()));
+ OUString sIssuerName(xmlsec::GetContentPart(xCert->getIssuerName()));
if (!sIssuerName.isEmpty())
m_pIssuedByFT->SetText(sIssuerName);
else
@@ -263,12 +266,12 @@ CertificateViewerDetailsTP::CertificateViewerDetailsTP( vcl::Window* _pParent, C
aLBEntry = "V" + OUString::number( xCert->getVersion() + 1 );
InsertElement( XsResId( STR_VERSION ), aLBEntry, aLBEntry );
Sequence< sal_Int8 > aSeq = xCert->getSerialNumber();
- aLBEntry = XmlSec::GetHexString( aSeq, pHexSep );
- aDetails = XmlSec::GetHexString( aSeq, pHexSep, nLineBreak );
+ aLBEntry = xmlsec::GetHexString( aSeq, pHexSep );
+ aDetails = xmlsec::GetHexString( aSeq, pHexSep, nLineBreak );
InsertElement( XsResId( STR_SERIALNUM ), aLBEntry, aDetails, true );
std::pair< OUString, OUString> pairIssuer =
- XmlSec::GetDNForCertDetailsView(xCert->getIssuerName());
+ xmlsec::GetDNForCertDetailsView(xCert->getIssuerName());
aLBEntry = pairIssuer.first;
aDetails = pairIssuer.second;
InsertElement( XsResId( STR_ISSUER ), aLBEntry, aDetails );
@@ -286,7 +289,7 @@ CertificateViewerDetailsTP::CertificateViewerDetailsTP( vcl::Window* _pParent, C
InsertElement( XsResId( STR_VALIDTO ), aLBEntry, aLBEntry );
std::pair< OUString, OUString > pairSubject =
- XmlSec::GetDNForCertDetailsView(xCert->getSubjectName());
+ xmlsec::GetDNForCertDetailsView(xCert->getSubjectName());
aLBEntry = pairSubject.first;
aDetails = pairSubject.second;
InsertElement( XsResId( STR_SUBJECT ), aLBEntry, aDetails );
@@ -294,8 +297,8 @@ CertificateViewerDetailsTP::CertificateViewerDetailsTP( vcl::Window* _pParent, C
aLBEntry = aDetails = xCert->getSubjectPublicKeyAlgorithm();
InsertElement( XsResId( STR_SUBJECT_PUBKEY_ALGO ), aLBEntry, aDetails );
aSeq = xCert->getSubjectPublicKeyValue();
- aLBEntry = XmlSec::GetHexString( aSeq, pHexSep );
- aDetails = XmlSec::GetHexString( aSeq, pHexSep, nLineBreak );
+ aLBEntry = xmlsec::GetHexString( aSeq, pHexSep );
+ aDetails = xmlsec::GetHexString( aSeq, pHexSep, nLineBreak );
InsertElement( XsResId( STR_SUBJECT_PUBKEY_VAL ), aLBEntry, aDetails, true );
aLBEntry = aDetails = xCert->getSignatureAlgorithm();
@@ -309,13 +312,13 @@ CertificateViewerDetailsTP::CertificateViewerDetailsTP( vcl::Window* _pParent, C
}
aSeq = xCert->getSHA1Thumbprint();
- aLBEntry = XmlSec::GetHexString( aSeq, pHexSep );
- aDetails = XmlSec::GetHexString( aSeq, pHexSep, nLineBreak );
+ aLBEntry = xmlsec::GetHexString( aSeq, pHexSep );
+ aDetails = xmlsec::GetHexString( aSeq, pHexSep, nLineBreak );
InsertElement( XsResId( STR_THUMBPRINT_SHA1 ), aLBEntry, aDetails, true );
aSeq = xCert->getMD5Thumbprint();
- aLBEntry = XmlSec::GetHexString( aSeq, pHexSep );
- aDetails = XmlSec::GetHexString( aSeq, pHexSep, nLineBreak );
+ aLBEntry = xmlsec::GetHexString( aSeq, pHexSep );
+ aDetails = xmlsec::GetHexString( aSeq, pHexSep, nLineBreak );
InsertElement( XsResId( STR_THUMBPRINT_MD5 ), aLBEntry, aDetails, true );
m_pElementsLB->SetSelectHdl( LINK( this, CertificateViewerDetailsTP, ElementSelectHdl ) );
@@ -426,7 +429,7 @@ void CertificateViewerCertPathTP::ActivatePage()
for (i = nCnt-1; i >= 0; i--)
{
const Reference< security::XCertificate > rCert = pCertPath[ i ];
- OUString sName = XmlSec::GetContentPart( rCert->getSubjectName() );
+ OUString sName = xmlsec::GetContentPart( rCert->getSubjectName() );
//Verify the certificate
sal_Int32 certStatus = mpDlg->mxSecurityEnvironment->verifyCertificate(rCert,
Sequence<Reference<css::security::XCertificate> >());
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 926b74371faa..d7ea836e2e71 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -48,14 +48,17 @@
#include <tools/date.hxx>
#include <tools/time.hxx>
+#include <unotools/datetime.hxx>
#include <vcl/treelistentry.hxx>
#include <strings.hrc>
#include <resourcemanager.hxx>
+#include <comphelper/xmlsechelper.hxx>
#include <vcl/weld.hxx>
#include <unotools/configitem.hxx>
+using namespace comphelper;
using namespace css::security;
using namespace css::uno;
using namespace css;
@@ -587,8 +590,8 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
bCertValid = false;
}
- aSubject = XmlSec::GetContentPart( xCert->getSubjectName() );
- aIssuer = XmlSec::GetContentPart( xCert->getIssuerName() );
+ aSubject = xmlsec::GetContentPart( xCert->getSubjectName() );
+ aIssuer = xmlsec::GetContentPart( xCert->getIssuerName() );
}
else if (!rInfo.ouGpgCertificate.isEmpty())
{
@@ -596,7 +599,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
aIssuer = rInfo.ouGpgOwner;
}
- aDateTimeStr = XmlSec::GetDateTimeString( rInfo.stDateTime );
+ aDateTimeStr = utl::GetDateTimeString( rInfo.stDateTime );
aDescription = rInfo.ouDescription;
// Decide type string.
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index 1188ad4a015e..e38456f4782b 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -33,16 +33,18 @@
#include <comphelper/sequence.hxx>
#include <sfx2/filedlghelper.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/xmlsechelper.hxx>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <tools/urlobj.hxx>
+#include <unotools/datetime.hxx>
#include <vcl/treelistentry.hxx>
#include <strings.hrc>
-#include <resourcemanager.hxx>
+using namespace comphelper;
using namespace ::com::sun::star;
@@ -328,9 +330,9 @@ void MacroSecurityTrustedSourcesTP::FillCertLB()
// create from RawData
xCert = mpDlg->mxSecurityEnvironment->createCertificateFromAscii( rEntry[ 2 ] );
- SvTreeListEntry* pLBEntry = m_pTrustCertLB->InsertEntry( XmlSec::GetContentPart( xCert->getSubjectName() ) );
- m_pTrustCertLB->SetEntryText( XmlSec::GetContentPart( xCert->getIssuerName() ), pLBEntry, 1 );
- m_pTrustCertLB->SetEntryText( XmlSec::GetDateTimeString( xCert->getNotValidAfter() ), pLBEntry, 2 );
+ SvTreeListEntry* pLBEntry = m_pTrustCertLB->InsertEntry( xmlsec::GetContentPart( xCert->getSubjectName() ) );
+ m_pTrustCertLB->SetEntryText( xmlsec::GetContentPart( xCert->getIssuerName() ), pLBEntry, 1 );
+ m_pTrustCertLB->SetEntryText( utl::GetDateTimeString( xCert->getNotValidAfter() ), pLBEntry, 2 );
pLBEntry->SetUserData( reinterpret_cast<void*>(nEntry) ); // misuse user data as index
}
}