diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-02-17 10:35:54 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-03-05 16:50:55 +0100 |
commit | 46868c9eebc5909f40f813414d74b9b5ea484a99 (patch) | |
tree | 190c3c88b3da79acc6483195064406e245969dd5 /filter | |
parent | c9a6547e5daa9ac8b47eb955af5399653b6c84c0 (diff) |
tdf#88431: Pass the selected Time Stamp Authority, if any, along to vcl
Work in progress. If a TSA is selected, pass it along to the signature
generation in vcl.
Change-Id: Ibe105b6d02ab9241b93dd66ab3cb1fa8c6d10093
(cherry picked from commit d83e6e9cdb727b3ca2938048e115ba38886d4c70)
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/pdf/impdialog.cxx | 11 | ||||
-rw-r--r-- | filter/source/pdf/impdialog.hxx | 1 | ||||
-rw-r--r-- | filter/source/pdf/pdfexport.cxx | 3 | ||||
-rw-r--r-- | filter/source/pdf/pdfexport.hxx | 1 |
4 files changed, 14 insertions, 2 deletions
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 7cffddd06350..63e446f36fa0 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -433,7 +433,8 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData() Sequence< PropertyValue > aRet( maConfigItem.GetFilterData() ); - int nElementAdded = 11; + // OMG, this is horrible coding style... + int nElementAdded = 12; aRet.realloc( aRet.getLength() + nElementAdded ); @@ -497,6 +498,10 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData() aRet[ nLength - nElementAdded ].Value <<= maSignCertificate; nElementAdded--; + aRet[ nLength - nElementAdded ].Name = "SignatureTSA"; + aRet[ nLength - nElementAdded ].Value <<= msSignTSA; + nElementAdded--; + return aRet; } @@ -1598,7 +1603,9 @@ void ImpPDFTabSigningPage::GetFilterConfigItem( ImpPDFTabDialog* paParent ) paParent->msSignPassword = mpEdSignPassword->GetText(); paParent->msSignContact = mpEdSignContactInfo->GetText(); paParent->msSignReason = mpEdSignReason->GetText(); - + // Entry 0 is 'None' + if (mpLBSignTSA->GetSelectEntryPos() >= 1) + paParent->msSignTSA = mpLBSignTSA->GetSelectEntry(); } diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx index c8a317b2b920..c6238ea3de02 100644 --- a/filter/source/pdf/impdialog.hxx +++ b/filter/source/pdf/impdialog.hxx @@ -153,6 +153,7 @@ protected: OUString msSignContact; OUString msSignReason; com::sun::star::uno::Reference< com::sun::star::security::XCertificate > maSignCertificate; + OUString msSignTSA; OUString maWatermarkText; diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 164eff9cd2de..ae396a4ac0ac 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -557,6 +557,8 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >& rFilterData[ nData ].Value >>= msSignPassword; else if ( rFilterData[ nData ].Name == "SignatureCertificate" ) rFilterData[ nData ].Value >>= maSignCertificate; + else if ( rFilterData[ nData ].Name == "SignatureTSA" ) + rFilterData[ nData ].Value >>= msSignTSA; } aContext.URL = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI); @@ -788,6 +790,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >& aContext.SignReason = msSignReason; aContext.SignPassword = msSignPassword; aContext.SignCertificate = maSignCertificate; + aContext.SignTSA = msSignTSA; // all context data set, time to create the printing device boost::scoped_ptr<PDFWriter> pPDFWriter(new PDFWriter( aContext, xEnc )); diff --git a/filter/source/pdf/pdfexport.hxx b/filter/source/pdf/pdfexport.hxx index 38a050d0d759..5123bdc6c897 100644 --- a/filter/source/pdf/pdfexport.hxx +++ b/filter/source/pdf/pdfexport.hxx @@ -108,6 +108,7 @@ private: OUString msSignReason; OUString msSignPassword; Reference< security::XCertificate > maSignCertificate; + OUString msSignTSA; void ImplWriteWatermark( ::vcl::PDFWriter& rWriter, const Size& rPageSize ); public: |