summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-12-03 14:02:34 +0200
committerTor Lillqvist <tml@collabora.com>2014-12-03 15:51:20 +0200
commit24ffd0d942716b7652bb89d1a1a7d171b1bf7bfa (patch)
tree6b9cb67fc9950affccc0ee25640ee24e498f1e79
parent21f065e66743a0cbf0ac83cd368cd07636e638d4 (diff)
fdo#83939: Set error code if signing failed
Change-Id: I45f1077c744e20a369a73bf0b83c8dba04ddcda7
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 06a7fe0c51e8..1572b90735c3 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6966,7 +6966,13 @@ bool PDFWriterImpl::emit()
#if !defined(ANDROID) && !defined(IOS)
if (m_nSignatureObject != -1) // if document is signed, emit sigdict
- CHECK_RETURN( emitSignature() );
+ {
+ if( !emitSignature() )
+ {
+ m_aErrors.insert( PDFWriter::Error_Signature_Failed );
+ return false;
+ }
+ }
#endif
// emit trailer
@@ -6974,7 +6980,13 @@ bool PDFWriterImpl::emit()
#if !defined(ANDROID) && !defined(IOS)
if (m_nSignatureObject != -1) // finalize the signature
- CHECK_RETURN( finalizeSignature() );
+ {
+ if( !finalizeSignature() )
+ {
+ m_aErrors.insert( PDFWriter::Error_Signature_Failed );
+ return false;
+ }
+ }
#endif
m_aFile.close();