summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorGökçen Eraslan <gokcen.eraslan@gmail.com>2012-07-09 10:16:17 +0300
committerGökçen Eraslan <gokcen.eraslan@gmail.com>2012-07-09 10:16:17 +0300
commit9c8dc01d3a40ec905c9d816c733ceb5d621e0426 (patch)
treeed4182827ad2645a621fcde32887f6d0c5248740 /filter
parentf8f2296a510612381fc86273d0380133d5929bf0 (diff)
parent9ba7fda79cd36a20732fee663f52bdb4946cb2cf (diff)
Merge branch 'feature/pdf-signing'
Diffstat (limited to 'filter')
-rw-r--r--filter/inc/filter.hrc1
-rw-r--r--filter/source/pdf/impdialog.cxx155
-rw-r--r--filter/source/pdf/impdialog.hrc13
-rw-r--r--filter/source/pdf/impdialog.hxx39
-rw-r--r--filter/source/pdf/impdialog.src90
-rw-r--r--filter/source/pdf/pdfexport.cxx20
-rw-r--r--filter/source/pdf/pdfexport.hxx8
7 files changed, 324 insertions, 2 deletions
diff --git a/filter/inc/filter.hrc b/filter/inc/filter.hrc
index dc1c348bcc05..0aac90775665 100644
--- a/filter/inc/filter.hrc
+++ b/filter/inc/filter.hrc
@@ -37,6 +37,7 @@
#define HID_FILTER_PDF_USER_INTERFACE "HID_FILTER_PDF_USER_INTERFACE"
#define HID_FILTER_PDF_SECURITY "HID_FILTER_PDF_SECURITY"
#define HID_FILTER_PDF_LINKS "HID_FILTER_PDF_LINKS"
+#define HID_FILTER_PDF_SIGNING "HID_FILTER_PDF_SIGNING"
#endif
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 03de7492d46a..f6f9b158864f 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -32,6 +32,8 @@
#include "vcl/svapp.hxx"
#include "vcl/msgbox.hxx"
#include "sfx2/passwd.hxx"
+#include "svtools/miscopt.hxx"
+//#include "xmlsecurity/certificatechooser.hxx"
#include "comphelper/storagehelper.hxx"
@@ -40,6 +42,7 @@
#include "com/sun/star/container/XIndexAccess.hpp"
#include "com/sun/star/frame/XController.hpp"
#include "com/sun/star/view/XSelectionSupplier.hpp"
+#include "com/sun/star/security/XDocumentDigitalSignatures.hpp"
#include <boost/shared_ptr.hpp>
@@ -124,7 +127,10 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
mbExportRelativeFsysLinks( sal_False ),
mnViewPDFMode( 0 ),
mbConvertOOoTargets( sal_False ),
- mbExportBmkToPDFDestination( sal_False )
+ mbExportBmkToPDFDestination( sal_False ),
+
+ mbSignPDF( sal_False )
+
{
FreeResource();
// check for selection
@@ -241,12 +247,21 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
mbConvertOOoTargets = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ConvertOOoTargetToPDFTarget" ) ), sal_False );
mbExportBmkToPDFDestination = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarksToPDFDestination" ) ), sal_False );
+//prepare values for digital signatures
+ mbSignPDF = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "SignPDF" ) ), sal_False );
+
//queue the tab pages for later creation (created when first shown)
+ AddTabPage( RID_PDF_TAB_SIGNING, ImpPDFTabSigningPage::Create, 0 );
AddTabPage( RID_PDF_TAB_SECURITY, ImpPDFTabSecurityPage::Create, 0 );
AddTabPage( RID_PDF_TAB_LINKS, ImpPDFTabLinksPage::Create, 0 );
AddTabPage( RID_PDF_TAB_VPREFER, ImpPDFTabViewerPage::Create, 0 );
AddTabPage( RID_PDF_TAB_OPNFTR, ImpPDFTabOpnFtrPage::Create, 0 );
+//remove tabpage if experimentalmode is not set
+ SvtMiscOptions aMiscOptions;
+ if (!aMiscOptions.IsExperimentalMode())
+ RemoveTabPage( RID_PDF_TAB_SIGNING );
+
//last queued is the first to be displayed (or so it seems..)
AddTabPage( RID_PDF_TAB_GENER, ImpPDFTabGeneralPage::Create, 0 );
@@ -281,6 +296,11 @@ ImpPDFTabDialog::~ImpPDFTabDialog()
RemoveTabPage( RID_PDF_TAB_OPNFTR );
RemoveTabPage( RID_PDF_TAB_LINKS );
RemoveTabPage( RID_PDF_TAB_SECURITY );
+
+//remove tabpage if experimentalmode is set
+ SvtMiscOptions aMiscOptions;
+ if (aMiscOptions.IsExperimentalMode())
+ RemoveTabPage( RID_PDF_TAB_SIGNING );
}
// -----------------------------------------------------------------------------
@@ -304,6 +324,9 @@ void ImpPDFTabDialog::PageCreated( sal_uInt16 _nId,
case RID_PDF_TAB_SECURITY:
( ( ImpPDFTabSecurityPage* )&_rPage )->SetFilterConfigItem( this );
break;
+ case RID_PDF_TAB_SIGNING:
+ ( ( ImpPDFTabSigningPage* )&_rPage )->SetFilterConfigItem( this );
+ break;
}
}
@@ -329,6 +352,8 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
( ( ImpPDFTabLinksPage* )GetTabPage( RID_PDF_TAB_LINKS ) )->GetFilterConfigItem( this );
if( GetTabPage( RID_PDF_TAB_SECURITY ) )
( ( ImpPDFTabSecurityPage* )GetTabPage( RID_PDF_TAB_SECURITY ) )->GetFilterConfigItem( this );
+ if( GetTabPage( RID_PDF_TAB_SIGNING ) )
+ ( ( ImpPDFTabSigningPage* )GetTabPage( RID_PDF_TAB_SIGNING ) )->GetFilterConfigItem( this );
//prepare the items to be returned
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "UseLosslessCompression" ) ), mbUseLosslessCompression );
@@ -379,6 +404,8 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ConvertOOoTargetToPDFTarget" ) ), mbConvertOOoTargets );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarksToPDFDestination" ) ), mbExportBmkToPDFDestination );
+ maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "SignPDF" ) ), mbSignPDF );
+
maConfigItem.WriteInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "Printing" ) ), mnPrint );
maConfigItem.WriteInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "Changes" ) ), mnChangesAllowed );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "EnableCopyingOfContent" ) ), mbCanCopyOrExtract );
@@ -386,7 +413,7 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
Sequence< PropertyValue > aRet( maConfigItem.GetFilterData() );
- int nElementAdded = 6;
+ int nElementAdded = 11;
aRet.realloc( aRet.getLength() + nElementAdded );
@@ -421,13 +448,35 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
{
aRet[ nLength - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) );
aRet[ nLength - nElementAdded ].Value <<= OUString( msPageRange );
+ nElementAdded--;
}
else if( mbSelectionIsChecked )
{
aRet[ nLength - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "Selection" ) );
aRet[ nLength - nElementAdded ].Value <<= maSelection;
+ nElementAdded--;
}
+ aRet[ nLength - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "SignatureLocation" ) );
+ aRet[ nLength - nElementAdded ].Value <<= msSignLocation;
+ nElementAdded--;
+
+ aRet[ nLength - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "SignatureReason" ) );
+ aRet[ nLength - nElementAdded ].Value <<= msSignReason;
+ nElementAdded--;
+
+ aRet[ nLength - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "SignatureContactInfo" ) );
+ aRet[ nLength - nElementAdded ].Value <<= msSignContact;
+ nElementAdded--;
+
+ aRet[ nLength - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "SignaturePassword" ) );
+ aRet[ nLength - nElementAdded ].Value <<= msSignPassword;
+ nElementAdded--;
+
+ aRet[ nLength - nElementAdded ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "SignatureCertificate" ) );
+ aRet[ nLength - nElementAdded ].Value <<= maSignCertificate;
+ nElementAdded--;
+
return aRet;
}
@@ -1626,4 +1675,106 @@ IMPL_LINK_NOARG(ImplErrorDialog, SelectHdl)
return 0;
}
+////////////////////////////////////////////////////////
+// The digital signatures tab page
+// -----------------------------------------------------------------------------
+ImpPDFTabSigningPage::ImpPDFTabSigningPage( Window* pParent,
+ const SfxItemSet& rCoreSet ) :
+ SfxTabPage( pParent, PDFFilterResId( RID_PDF_TAB_SIGNING ), rCoreSet ),
+
+ maCbSignPDF( this, PDFFilterResId( CB_SIGN_PDF ) ),
+ maFtSignPassword( this, PDFFilterResId( FT_SIGN_PASSWORD ) ),
+ maEdSignPassword( this, PDFFilterResId( ED_SIGN_PASSWORD ) ),
+ maFtSignLocation( this, PDFFilterResId( FT_SIGN_LOCATION ) ),
+ maEdSignLocation( this, PDFFilterResId( ED_SIGN_LOCATION ) ),
+ maFtSignContactInfo( this, PDFFilterResId( FT_SIGN_CONTACT ) ),
+ maEdSignContactInfo( this, PDFFilterResId( ED_SIGN_CONTACT ) ),
+ maFtSignReason( this, PDFFilterResId( FT_SIGN_REASON ) ),
+ maEdSignReason( this, PDFFilterResId( ED_SIGN_REASON ) ),
+ maPbSignSelectCert( this, PDFFilterResId( BTN_SIGN_SELECT_CERT ) ),
+ maSignCertificate()
+{
+ FreeResource();
+
+ maPbSignSelectCert.SetClickHdl( LINK( this, ImpPDFTabSigningPage, ClickmaPbSignSelectCert ) );
+}
+
+// -----------------------------------------------------------------------------
+ImpPDFTabSigningPage::~ImpPDFTabSigningPage()
+{
+}
+
+IMPL_LINK_NOARG( ImpPDFTabSigningPage, ClickmaPbSignSelectCert )
+{
+
+ uno::Sequence< uno::Any > aArgs( 2 );
+ aArgs[0] <<= rtl::OUString("1.2");
+ aArgs[1] <<= sal_False;
+
+ Reference< security::XDocumentDigitalSignatures > xSigner(
+ comphelper::getProcessServiceFactory()->createInstanceWithArguments(
+ rtl::OUString( "com.sun.star.security.DocumentDigitalSignatures" ), aArgs ),
+ uno::UNO_QUERY );
+
+ if ( !xSigner.is() )
+ return 0;
+
+ maSignCertificate = xSigner->chooseCertificate();
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------------
+SfxTabPage* ImpPDFTabSigningPage::Create( Window* pParent,
+ const SfxItemSet& rAttrSet)
+{
+ return ( new ImpPDFTabSigningPage( pParent, rAttrSet ) );
+}
+
+// -----------------------------------------------------------------------------
+void ImpPDFTabSigningPage::GetFilterConfigItem( ImpPDFTabDialog* paParent )
+{
+ paParent->mbSignPDF = maCbSignPDF.IsChecked();
+ paParent->msSignLocation = maEdSignLocation.GetText();
+ paParent->msSignPassword = maEdSignPassword.GetText();
+ paParent->msSignContact = maEdSignContactInfo.GetText();
+ paParent->msSignReason = maEdSignReason.GetText();
+ paParent->maSignCertificate = maSignCertificate;
+
+}
+
+// -----------------------------------------------------------------------------
+void ImpPDFTabSigningPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent )
+{
+
+ maCbSignPDF.SetToggleHdl( LINK( this, ImpPDFTabSigningPage, ToggleSignPDFHdl ) );
+ maEdSignLocation.Enable( false );
+ maEdSignPassword.Enable( false );
+ maEdSignContactInfo.Enable( false );
+ maEdSignReason.Enable( false );
+ maPbSignSelectCert.Enable( false );
+
+ if (paParent->mbSignPDF)
+ {
+ maCbSignPDF.Check();
+ maEdSignPassword.SetText(paParent->msSignPassword);
+ maEdSignLocation.SetText(paParent->msSignLocation);
+ maEdSignContactInfo.SetText(paParent->msSignContact);
+ maEdSignReason.SetText(paParent->msSignReason);
+ maSignCertificate = paParent->maSignCertificate;
+ }
+}
+
+// -----------------------------------------------------------------------------
+IMPL_LINK_NOARG(ImpPDFTabSigningPage, ToggleSignPDFHdl)
+{
+ maEdSignPassword.Enable( maCbSignPDF.IsChecked() );
+ maEdSignLocation.Enable( maCbSignPDF.IsChecked() );
+ maEdSignContactInfo.Enable( maCbSignPDF.IsChecked() );
+ maEdSignReason.Enable( maCbSignPDF.IsChecked() );
+ maPbSignSelectCert.Enable( maCbSignPDF.IsChecked() );
+
+ return 0;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/pdf/impdialog.hrc b/filter/source/pdf/impdialog.hrc
index 7a4630ed833f..110bae0e94bd 100644
--- a/filter/source/pdf/impdialog.hrc
+++ b/filter/source/pdf/impdialog.hrc
@@ -24,6 +24,7 @@
#define RID_PDF_TAB_OPNFTR (RID_PDF_DIALOG_START + 3)
#define RID_PDF_TAB_SECURITY (RID_PDF_DIALOG_START + 4)
#define RID_PDF_TAB_LINKS (RID_PDF_DIALOG_START + 12)
+#define RID_PDF_TAB_SIGNING (RID_PDF_DIALOG_START + 13)
#define RID_PDF_WARNPDFAPASSWORD (RID_PDF_DIALOG_START + 6)
//strings
@@ -177,3 +178,15 @@
#define FL_INITVIEW_VERTICAL 158
#define FL_VPREFER_VERTICAL 158
#define FL_SECURITY_VERTICAL 160
+
+//controls for digital signatures tab page
+#define CB_SIGN_PDF 170
+#define FT_SIGN_PASSWORD 171
+#define ED_SIGN_PASSWORD 172
+#define FT_SIGN_LOCATION 173
+#define ED_SIGN_LOCATION 174
+#define FT_SIGN_CONTACT 175
+#define ED_SIGN_CONTACT 176
+#define FT_SIGN_REASON 177
+#define ED_SIGN_REASON 178
+#define BTN_SIGN_SELECT_CERT 179
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index acbedaffcc42..45747fd5c6d0 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -148,6 +148,14 @@ protected:
sal_Int32 mnViewPDFMode;
sal_Bool mbConvertOOoTargets;
sal_Bool mbExportBmkToPDFDestination;
+
+ sal_Bool mbSignPDF;
+ ::rtl::OUString msSignPassword;
+ ::rtl::OUString msSignLocation;
+ ::rtl::OUString msSignContact;
+ ::rtl::OUString msSignReason;
+ com::sun::star::uno::Reference< com::sun::star::security::XCertificate > maSignCertificate;
+
::rtl::OUString maWatermarkText;
public:
@@ -157,6 +165,7 @@ public:
friend class ImpPDFTabOpnFtrPage;
friend class ImpPDFTabSecurityPage;
friend class ImpPDFTabLinksPage;
+ friend class ImpPDFTabSigningPage;
ImpPDFTabDialog( Window* pParent,
Sequence< PropertyValue >& rFilterData,
@@ -429,6 +438,36 @@ public:
void ImplPDFALinkControl( sal_Bool bEnableLaunch );
};
+//class to implement the digital signing
+class ImpPDFTabSigningPage : public SfxTabPage
+{
+ CheckBox maCbSignPDF;
+ FixedText maFtSignPassword;
+ Edit maEdSignPassword;
+ FixedText maFtSignLocation;
+ Edit maEdSignLocation;
+ FixedText maFtSignContactInfo;
+ Edit maEdSignContactInfo;
+ FixedText maFtSignReason;
+ Edit maEdSignReason;
+ PushButton maPbSignSelectCert;
+ com::sun::star::uno::Reference< com::sun::star::security::XCertificate > maSignCertificate;
+
+ DECL_LINK( ToggleSignPDFHdl, void* );
+ DECL_LINK( ClickmaPbSignSelectCert, void* );
+
+public:
+ ImpPDFTabSigningPage( Window* pParent,
+ const SfxItemSet& rSet );
+
+ ~ImpPDFTabSigningPage();
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet );
+
+ void GetFilterConfigItem( ImpPDFTabDialog* paParent);
+ void SetFilterConfigItem( const ImpPDFTabDialog* paParent );
+};
+
#endif // IMPDIALOG_HXX
diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src
index 8c73d20690d9..afae67e7eab1 100644
--- a/filter/source/pdf/impdialog.src
+++ b/filter/source/pdf/impdialog.src
@@ -817,6 +817,91 @@ TabPage RID_PDF_TAB_SECURITY
};
//----------------------------------------------------------
+//tab page for PDF Export, digital signatures
+TabPage RID_PDF_TAB_SIGNING
+{
+ HelpId = HID_FILTER_PDF_SIGNING ;
+ Text [ en-US ] = "Digital Signatures";
+ TAB_PDF_SIZE;
+ Hide = TRUE;
+
+ CheckBox CB_SIGN_PDF
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 164 , 16 ) ;
+ TabStop = TRUE ;
+ WordBreak = TRUE ;
+ Text[ en-US ] = "Sign PDF file" ;
+ };
+
+ PushButton BTN_SIGN_SELECT_CERT
+ {
+ TabStop = TRUE ;
+ Disable = TRUE ;
+ Pos = MAP_APPFONT ( 12, 17 ) ;
+ Size = MAP_APPFONT ( 120 , 13 ) ;
+ Text[ en-US ] = "Select c~ertificate...";
+ };
+
+ FixedText FT_SIGN_PASSWORD
+ {
+ Pos = MAP_APPFONT( 12, 35 );
+ Size = MAP_APPFONT( 109, 10 );
+ Text[ en-US ] = "Certificate Password";
+ };
+
+ Edit ED_SIGN_PASSWORD
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 102, 35 ) ;
+ Size = MAP_APPFONT ( 68 , 12 ) ;
+ };
+
+ FixedText FT_SIGN_LOCATION
+ {
+ Pos = MAP_APPFONT( 12, 48 );
+ Size = MAP_APPFONT( 109, 10 );
+ Text[ en-US ] = "Location";
+ };
+
+ Edit ED_SIGN_LOCATION
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 102, 48 ) ;
+ Size = MAP_APPFONT ( 68 , 12 ) ;
+ };
+
+ FixedText FT_SIGN_CONTACT
+ {
+ Pos = MAP_APPFONT( 12, 61 );
+ Size = MAP_APPFONT( 109, 10 );
+ Text[ en-US ] = "Contact Information";
+ };
+
+ Edit ED_SIGN_CONTACT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 102, 61 ) ;
+ Size = MAP_APPFONT ( 68 , 12 ) ;
+ };
+
+ FixedText FT_SIGN_REASON
+ {
+ Pos = MAP_APPFONT( 12, 74 );
+ Size = MAP_APPFONT( 109, 10 );
+ Text[ en-US ] = "Reason";
+ };
+
+ Edit ED_SIGN_REASON
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 102, 74 ) ;
+ Size = MAP_APPFONT ( 68 , 12 ) ;
+ };
+
+};
+
+//----------------------------------------------------------
//tab page for PDF Export, links management
TabPage RID_PDF_TAB_LINKS
{
@@ -930,6 +1015,11 @@ TabDialog RID_PDF_EXPORT_DLG
Identifier = RID_PDF_TAB_SECURITY;
Text [ en-US ] = "Security";
};
+ PageItem
+ {
+ Identifier = RID_PDF_TAB_SIGNING;
+ Text [ en-US ] = "Digital Signatures";
+ };
};
};
};
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index db93010d1ee1..30727c6773f1 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -554,6 +554,18 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
rFilterData[ nData ].Value >>= mbExportHiddenSlides;
else if ( rFilterData[ nData ].Name == "OpenBookmarkLevels" )
rFilterData[ nData ].Value >>= mnOpenBookmarkLevels;
+ else if ( rFilterData[ nData ].Name == "SignPDF" )
+ rFilterData[ nData ].Value >>= mbSignPDF;
+ else if ( rFilterData[ nData ].Name == "SignatureLocation" )
+ rFilterData[ nData ].Value >>= msSignLocation;
+ else if ( rFilterData[ nData ].Name == "SignatureReason" )
+ rFilterData[ nData ].Value >>= msSignReason;
+ else if ( rFilterData[ nData ].Name == "SignatureContactInfo" )
+ rFilterData[ nData ].Value >>= msSignContact;
+ else if ( rFilterData[ nData ].Name == "SignaturePassword" )
+ rFilterData[ nData ].Value >>= msSignPassword;
+ else if ( rFilterData[ nData ].Name == "SignatureCertificate" )
+ rFilterData[ nData ].Value >>= maSignCertificate;
}
aContext.URL = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI);
@@ -781,6 +793,14 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
aContext.ForcePDFAction = sal_False;
}
}
+
+ aContext.SignPDF = mbSignPDF;
+ aContext.SignLocation = msSignLocation;
+ aContext.SignContact = msSignContact;
+ aContext.SignReason = msSignReason;
+ aContext.SignPassword = msSignPassword;
+ aContext.SignCertificate = maSignCertificate;
+
// all context data set, time to create the printing device
PDFWriter* pPDFWriter = new PDFWriter( aContext, xEnc );
OutputDevice* pOut = pPDFWriter->GetReferenceDevice();
diff --git a/filter/source/pdf/pdfexport.hxx b/filter/source/pdf/pdfexport.hxx
index a571cd44dbe6..4c884ee5d568 100644
--- a/filter/source/pdf/pdfexport.hxx
+++ b/filter/source/pdf/pdfexport.hxx
@@ -111,6 +111,14 @@ private:
sal_Bool mbExportBmkToDest;
sal_Bool ImplExportPage( ::vcl::PDFWriter& rWriter, ::vcl::PDFExtOutDevData& rPDFExtOutDevData,
const GDIMetaFile& rMtf );
+
+ sal_Bool mbSignPDF;
+ OUString msSignLocation;
+ OUString msSignContact;
+ OUString msSignReason;
+ OUString msSignPassword;
+ Reference< security::XCertificate > maSignCertificate;
+
void ImplWriteWatermark( ::vcl::PDFWriter& rWriter, const Size& rPageSize );
public: