summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-02-16 18:07:47 +0200
committerTor Lillqvist <tml@collabora.com>2015-02-17 10:46:24 +0200
commitb8b9d51b8cf1cafe1a94e1baf957f3f282abb32f (patch)
tree1d1179d403beb0b3bcd22166e4bf6699f8e1e9a4 /filter
parent24ad0629ae9edad83514e329e7173b94a8680ea6 (diff)
tdf#88428: Add GUI to select one of user-configured Time Stamp Authorities
Work in progress. The selection not used for anything yet. Change-Id: Ia86fa0f59dcfee8e9d332a028a3fad37f4019fe0
Diffstat (limited to 'filter')
-rw-r--r--filter/Library_pdffilter.mk4
-rw-r--r--filter/source/pdf/impdialog.cxx28
-rw-r--r--filter/source/pdf/impdialog.hxx2
-rw-r--r--filter/uiconfig/ui/pdfsignpage.ui28
4 files changed, 62 insertions, 0 deletions
diff --git a/filter/Library_pdffilter.mk b/filter/Library_pdffilter.mk
index b3a62d76f352..6de7d341367e 100644
--- a/filter/Library_pdffilter.mk
+++ b/filter/Library_pdffilter.mk
@@ -30,6 +30,10 @@ $(eval $(call gb_Library_set_include,pdffilter,\
$$(INCLUDE) \
))
+$(eval $(call gb_Library_use_custom_headers,pdffilter,\
+ officecfg/registry \
+))
+
$(eval $(call gb_Library_use_libraries,pdffilter,\
svt \
sfx \
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)
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 42f5c2ac3ec1..8ef6b18d57da 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -419,10 +419,12 @@ class ImpPDFTabSigningPage : public SfxTabPage
Edit* mpEdSignLocation;
Edit* mpEdSignContactInfo;
Edit* mpEdSignReason;
+ ListBox* mpLBSignTSA;
com::sun::star::uno::Reference< com::sun::star::security::XCertificate > maSignCertificate;
DECL_LINK( ClickmaPbSignCertSelect, void* );
DECL_LINK( ClickmaPbSignCertClear, void* );
+ DECL_LINK( SelectLBSignTSA, void* );
public:
ImpPDFTabSigningPage( vcl::Window* pParent,
diff --git a/filter/uiconfig/ui/pdfsignpage.ui b/filter/uiconfig/ui/pdfsignpage.ui
index 4090c8503157..fe10e299496a 100644
--- a/filter/uiconfig/ui/pdfsignpage.ui
+++ b/filter/uiconfig/ui/pdfsignpage.ui
@@ -151,6 +151,20 @@
</packing>
</child>
<child>
+ <object class="GtkComboBoxText" id="tsa">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_entry">False</property>
+ <items>
+ <item translatable="yes">None</item>
+ </items>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">4</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -206,6 +220,20 @@
<property name="top_attach">3</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Time Stamp Authority:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">reason</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>