summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-12-03 14:01:58 +0200
committerTor Lillqvist <tml@collabora.com>2014-12-03 15:51:09 +0200
commit21f065e66743a0cbf0ac83cd368cd07636e638d4 (patch)
treee6a49de50c7394516ede1e4cf21e7c6228091b3d
parent002cb3c4f7917ef52c1364743e52807ffbdc2fc0 (diff)
fdo#83939: Add new error code for failed PDF signing, and handle it
Change-Id: Ide6dc06d33faea795272d9d32fc028ac8d023c5a
-rw-r--r--filter/source/pdf/impdialog.cxx7
-rw-r--r--filter/source/pdf/impdialog.hrc4
-rw-r--r--filter/source/pdf/impdialog.src10
-rw-r--r--include/vcl/pdfwriter.hxx5
4 files changed, 25 insertions, 1 deletions
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 20e0350a80ac..b024d17dcefc 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -1496,6 +1496,13 @@ ImplErrorDialog::ImplErrorDialog(const std::set< vcl::PDFWriter::ErrorCode >& rE
m_pErrors->SetEntryData( nPos, new OUString( PDFFilterResId( STR_WARN_TRANSP_CONVERTED ) ) );
}
break;
+ case vcl::PDFWriter::Error_Signature_Failed:
+ {
+ sal_uInt16 nPos = m_pErrors->InsertEntry( OUString( PDFFilterResId( STR_ERR_SIGNATURE_FAILED ) ),
+ aErrImg );
+ m_pErrors->SetEntryData( nPos, new OUString( PDFFilterResId( STR_ERR_PDF_EXPORT_ABORTED ) ) );
+ }
+ break;
default:
break;
}
diff --git a/filter/source/pdf/impdialog.hrc b/filter/source/pdf/impdialog.hrc
index d55d59087fc2..57f1045c8974 100644
--- a/filter/source/pdf/impdialog.hrc
+++ b/filter/source/pdf/impdialog.hrc
@@ -19,6 +19,9 @@
#include <filter.hrc>
+#define STR_ERR_SIGNATURE_FAILED (RID_PDF_DIALOG_START + 0)
+#define STR_ERR_PDF_EXPORT_ABORTED (RID_PDF_DIALOG_START + 1)
+
#define STR_WARN_PASSWORD_PDFA (RID_PDF_DIALOG_START + 6)
//strings for PDF security, user password management
@@ -39,5 +42,6 @@
#define IMG_ERR (RID_PDF_DIALOG_START + 18)
//ATTENTION: maximum allowed value is (RID_PDF_DIALOG_START + 19)
+//(see filter/inc/filter.hrc)
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src
index 8bb05129f328..53ba8f22963e 100644
--- a/filter/source/pdf/impdialog.src
+++ b/filter/source/pdf/impdialog.src
@@ -78,6 +78,16 @@ String STR_WARN_TRANSP_CONVERTED_SHORT
Text [en-US] = "Transparencies removed";
};
+String STR_ERR_SIGNATURE_FAILED
+{
+ Text [en-US] = "Signature generation failed";
+};
+
+String STR_ERR_PDF_EXPORT_ABORTED
+{
+ Text [en-US] = "PDF export aborted";
+};
+
Bitmap IMG_WARN
{
File = "ballgreen_7.png";
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 880e2fa30949..5b4b35d0951e 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -216,7 +216,10 @@ public:
// transparent objects were converted to a bitmap in order
// to removetransparencies from the output
- Warning_Transparency_Converted
+ Warning_Transparency_Converted,
+
+ // signature generation failed
+ Error_Signature_Failed,
};
struct VCL_DLLPUBLIC AnyWidget