summaryrefslogtreecommitdiff
path: root/filter/source/pdf/impdialog.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'filter/source/pdf/impdialog.cxx')
-rw-r--r--filter/source/pdf/impdialog.cxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 6767c5434253..da7929902de8 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -21,6 +21,7 @@
#include "impdialog.hxx"
#include "impdialog.hrc"
+#include <officecfg/Office/Common.hxx>
#include <vcl/layout.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
@@ -1537,10 +1538,12 @@ ImpPDFTabSigningPage::ImpPDFTabSigningPage(vcl::Window* pParent, const SfxItemSe
get(mpEdSignLocation, "location");
get(mpEdSignContactInfo, "contact");
get(mpEdSignReason, "reason");
+ get(mpLBSignTSA, "tsa");
mpPbSignCertSelect->Enable( true );
mpPbSignCertSelect->SetClickHdl( LINK( this, ImpPDFTabSigningPage, ClickmaPbSignCertSelect ) );
mpPbSignCertClear->SetClickHdl( LINK( this, ImpPDFTabSigningPage, ClickmaPbSignCertClear ) );
+ mpLBSignTSA->SetSelectHdl( LINK( this, ImpPDFTabSigningPage, SelectLBSignTSA ) );
}
@@ -1565,6 +1568,24 @@ IMPL_LINK_NOARG( ImpPDFTabSigningPage, ClickmaPbSignCertSelect )
mpEdSignPassword->Enable( true );
mpEdSignContactInfo->Enable( true );
mpEdSignReason->Enable( true );
+
+ try
+ {
+ css::uno::Sequence<OUString> aTSAURLs(officecfg::Office::Common::Security::Scripting::TSAURLs::get());
+
+ for (auto i = aTSAURLs.begin(); i != aTSAURLs.end(); ++i)
+ {
+ mpLBSignTSA->InsertEntry( *i );
+ }
+ }
+ catch (const uno::Exception &e)
+ {
+ SAL_INFO("filter.pdf", "TSAURLsDialog::TSAURLsDialog(): caught exception" << e.Message);
+ }
+
+ // If more than only the "None" entry is there, enable the ListBox
+ if (mpLBSignTSA->GetEntryCount() > 1)
+ mpLBSignTSA->Enable();
}
return 0;
@@ -1579,11 +1600,17 @@ IMPL_LINK_NOARG( ImpPDFTabSigningPage, ClickmaPbSignCertClear )
mpEdSignPassword->Enable( false );
mpEdSignContactInfo->Enable( false );
mpEdSignReason->Enable( false );
+ mpLBSignTSA->Enable( false );
return 0;
}
+IMPL_LINK_NOARG( ImpPDFTabSigningPage, SelectLBSignTSA )
+{
+ return 0;
+}
+
SfxTabPage* ImpPDFTabSigningPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet)
{
@@ -1610,6 +1637,7 @@ void ImpPDFTabSigningPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent
mpEdSignPassword->Enable( false );
mpEdSignContactInfo->Enable( false );
mpEdSignReason->Enable( false );
+ mpLBSignTSA->Enable( false );
mpPbSignCertClear->Enable( false );
if (paParent->mbSignPDF)