summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-06-26 22:20:19 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-06-27 09:22:52 +0200
commit9674704cb721f600d678788aa5d9392ad410c330 (patch)
treef8cc872450d0ce3bbb1c3126f93969957fb921be /xmlsecurity
parenta08c833a5d61ba806fe2875e7b84fd11b9856b58 (diff)
gpg4libre: Show error message when signing fails
Change-Id: I58f3febaaaaa225952e87ad3f092950ace37d15d Reviewed-on: https://gerrit.libreoffice.org/39283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx2
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.hrc1
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.src6
3 files changed, 9 insertions, 0 deletions
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 5f4464b8b957..3437b1255598 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -53,6 +53,7 @@
#include "resourcemanager.hxx"
#include <vcl/layout.hxx>
+#include <vcl/msgbox.hxx>
#include <unotools/configitem.hxx>
#include <comphelper/storagehelper.hxx>
@@ -434,6 +435,7 @@ IMPL_LINK_NOARG(DigitalSignaturesDialog, AddButtonHdl, Button*, void)
catch ( uno::Exception& )
{
OSL_FAIL( "Exception while adding a signature!" );
+ ScopedVclPtrInstance<ErrorBox>(this, XsResId(STR_XMLSECDLG_SIGNING_FAILED))->Execute();
// Don't keep invalid entries...
ImplGetSignatureInformations(/*bUseTempStream=*/true, /*bCacheLastSignature=*/false);
ImplFillSignaturesBox();
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.hrc b/xmlsecurity/source/dialogs/digitalsignaturesdialog.hrc
index 5409029f4033..b7867dd37a87 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.hrc
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.hrc
@@ -26,6 +26,7 @@
#define STR_XMLSECDLG_OLD_ODF_FORMAT RID_DIGITALSIGNATUREDLG_START
#define STR_XMLSECDLG_QUERY_REMOVEDOCSIGNBEFORESIGN (RID_DIGITALSIGNATUREDLG_START + 1)
#define STR_XMLSECDLG_QUERY_REALLYREMOVE (RID_DIGITALSIGNATUREDLG_START + 2)
+#define STR_XMLSECDLG_SIGNING_FAILED (RID_DIGITALSIGNATUREDLG_START + 3)
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.src b/xmlsecurity/source/dialogs/digitalsignaturesdialog.src
index 448d297d72e3..48f7cc3b478e 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.src
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.src
@@ -40,4 +40,10 @@ String STR_XMLSECDLG_QUERY_REALLYREMOVE
Text [ en-US ] = "Document signature cannot be restored, once removed.\n"
"Do you really want to remove selected signature?";
};
+
+String STR_XMLSECDLG_SIGNING_FAILED
+{
+ Text [ en-US ] = "An error occured while adding the signature.";
+};
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */