diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-12-03 14:00:38 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-12-12 06:33:52 -0800 |
commit | 4ffc81782072148f8ffeb9793c4bf4421866eefe (patch) | |
tree | 64e2d4ea6a837f07878361ac8d799ecb7a330b0d /filter | |
parent | 975c0abd7c019f24b9a4887b78874dadb2e44287 (diff) |
PDF signing feature backported from 4.4
Cherry picked from:
840f75065918c4584fa9159fdc90242b5374ab37
1fe9ee73a758603ee0e1465931352c41ef8bd999
d8a8ff8177df628636d80c4dc1d8f597f6677dfc
bfa01d8a8248f7e44675de5ed1f85a1d17105022
bbb18f679f5a50e9c709520d6c3260d3d9db5aa9
c4cc31b5b55019aabad4045c8174b45e1b27073a
7e3c931786c3cbe83ee170b8b0746d141b520ce6
070c93af73df9aa4eb333265c81060d123b530b9
6e91763769a562b88882a4c2a94b1367c6ed4866
Change-Id: Ie8ac5e1e067f8e3b15e2f11389bd0517d348f1e3
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/pdf/impdialog.cxx | 18 | ||||
-rw-r--r-- | filter/source/pdf/impdialog.hrc | 4 | ||||
-rw-r--r-- | filter/source/pdf/impdialog.src | 10 | ||||
-rw-r--r-- | filter/source/pdf/pdfexport.cxx | 2 |
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 ); |