Kaydet (Commit) d83e6e9c authored tarafından Tor Lillqvist's avatar Tor Lillqvist

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
üst b8b9d51b
......@@ -435,7 +435,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 );
......@@ -499,6 +500,10 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
aRet[ nLength - nElementAdded ].Value <<= maSignCertificate;
nElementAdded--;
aRet[ nLength - nElementAdded ].Name = "SignatureTSA";
aRet[ nLength - nElementAdded ].Value <<= msSignTSA;
nElementAdded--;
return aRet;
}
......@@ -1626,7 +1631,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();
}
......
......@@ -153,6 +153,7 @@ protected:
OUString msSignContact;
OUString msSignReason;
com::sun::star::uno::Reference< com::sun::star::security::XCertificate > maSignCertificate;
OUString msSignTSA;
OUString maWatermarkText;
......
......@@ -556,6 +556,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);
......@@ -787,6 +789,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 ));
......
......@@ -108,6 +108,7 @@ private:
OUString msSignReason;
OUString msSignPassword;
Reference< security::XCertificate > maSignCertificate;
OUString msSignTSA;
void ImplWriteWatermark( ::vcl::PDFWriter& rWriter, const Size& rPageSize );
public:
......
......@@ -630,6 +630,7 @@ The following structure describes the permissions used in PDF security
// 0 here specifies a default handling
PDFWriter::ColorMode ColorMode;
com::sun::star::uno::Reference< com::sun::star::security::XCertificate> SignCertificate;
OUString SignTSA;
PDFWriterContext() :
RelFsys( false ), //i56629, i49415?, i64585?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment