summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-12-03 14:00:38 +0200
committerAndras Timar <andras.timar@collabora.com>2014-12-12 06:33:52 -0800
commit4ffc81782072148f8ffeb9793c4bf4421866eefe (patch)
tree64e2d4ea6a837f07878361ac8d799ecb7a330b0d /filter
parent975c0abd7c019f24b9a4887b78874dadb2e44287 (diff)
PDF signing feature backported from 4.4
Diffstat (limited to 'filter')
-rw-r--r--filter/source/pdf/impdialog.cxx18
-rw-r--r--filter/source/pdf/impdialog.hrc4
-rw-r--r--filter/source/pdf/impdialog.src10
-rw-r--r--filter/source/pdf/pdfexport.cxx2
4 files changed, 23 insertions, 11 deletions
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 0825ea035d6c..7cffddd06350 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -251,11 +251,6 @@ ImpPDFTabDialog::ImpPDFTabDialog(Window* pParent, Sequence< PropertyValue >& rFi
mnInterfacePageId = AddTabPage("userinterface", ImpPDFTabViewerPage::Create, 0);
mnViewPageId = AddTabPage("initialview", ImpPDFTabOpnFtrPage::Create, 0);
-//remove tabpage if experimentalmode is not set
- SvtMiscOptions aMiscOptions;
- if (!aMiscOptions.IsExperimentalMode())
- RemoveTabPage(mnSigningPageId);
-
//last queued is the first to be displayed (or so it seems..)
mnGeneralPageId = AddTabPage("general", ImpPDFTabGeneralPage::Create, 0 );
@@ -322,11 +317,7 @@ ImpPDFTabDialog::~ImpPDFTabDialog()
RemoveTabPage(mnViewPageId);
RemoveTabPage(mnLinksPage);
RemoveTabPage(mnSecurityPageId);
-
-//remove tabpage if experimentalmode is set
- SvtMiscOptions aMiscOptions;
- if (aMiscOptions.IsExperimentalMode())
- RemoveTabPage(mnSigningPageId);
+ RemoveTabPage(mnSigningPageId);
}
@@ -1495,6 +1486,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 0927cb00d654..3b0350362360 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 RID_PDF_WARNPDFAPASSWORD (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 32d81a490486..1aee2df94540 100644
--- a/filter/source/pdf/impdialog.src
+++ b/filter/source/pdf/impdialog.src
@@ -79,6 +79,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/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 8aceae6e9307..164eff9cd2de 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -915,7 +915,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
if( bRet )
{
pPDFExtOutDevData->PlayGlobalActions( *pPDFWriter );
- pPDFWriter->Emit();
+ bRet = pPDFWriter->Emit();
aErrors = pPDFWriter->GetErrors();
}
pOut->SetExtOutDevData( NULL );