diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-11-09 16:42:16 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-11-12 14:52:09 +0100 |
commit | 9c5d3e5c59a9d0ffcb5fd99f5d4c98b0f6b5560e (patch) | |
tree | 21e1f2cd8b791414812a484f7df8691ac4e2e594 /cui/source/dialogs/SignSignatureLineDialog.cxx | |
parent | 3d885f20269dd4b7485fbe09c70014646e799366 (diff) |
tdf#118581 Correctly display issuer name in signature line
Move the xmlsec helper methods to comphelper so that we can use them in cui
Change-Id: If9b10cfff5f5abd6b16e48f043af7959edbb1142
Reviewed-on: https://gerrit.libreoffice.org/63198
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'cui/source/dialogs/SignSignatureLineDialog.cxx')
-rw-r--r-- | cui/source/dialogs/SignSignatureLineDialog.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
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]", ""); |