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

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
üst 24ad0629
...@@ -30,6 +30,10 @@ $(eval $(call gb_Library_set_include,pdffilter,\ ...@@ -30,6 +30,10 @@ $(eval $(call gb_Library_set_include,pdffilter,\
$$(INCLUDE) \ $$(INCLUDE) \
)) ))
$(eval $(call gb_Library_use_custom_headers,pdffilter,\
officecfg/registry \
))
$(eval $(call gb_Library_use_libraries,pdffilter,\ $(eval $(call gb_Library_use_libraries,pdffilter,\
svt \ svt \
sfx \ sfx \
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "impdialog.hxx" #include "impdialog.hxx"
#include "impdialog.hrc" #include "impdialog.hrc"
#include <officecfg/Office/Common.hxx>
#include <vcl/layout.hxx> #include <vcl/layout.hxx>
#include <vcl/settings.hxx> #include <vcl/settings.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
...@@ -1537,10 +1538,12 @@ ImpPDFTabSigningPage::ImpPDFTabSigningPage(vcl::Window* pParent, const SfxItemSe ...@@ -1537,10 +1538,12 @@ ImpPDFTabSigningPage::ImpPDFTabSigningPage(vcl::Window* pParent, const SfxItemSe
get(mpEdSignLocation, "location"); get(mpEdSignLocation, "location");
get(mpEdSignContactInfo, "contact"); get(mpEdSignContactInfo, "contact");
get(mpEdSignReason, "reason"); get(mpEdSignReason, "reason");
get(mpLBSignTSA, "tsa");
mpPbSignCertSelect->Enable( true ); mpPbSignCertSelect->Enable( true );
mpPbSignCertSelect->SetClickHdl( LINK( this, ImpPDFTabSigningPage, ClickmaPbSignCertSelect ) ); mpPbSignCertSelect->SetClickHdl( LINK( this, ImpPDFTabSigningPage, ClickmaPbSignCertSelect ) );
mpPbSignCertClear->SetClickHdl( LINK( this, ImpPDFTabSigningPage, ClickmaPbSignCertClear ) ); mpPbSignCertClear->SetClickHdl( LINK( this, ImpPDFTabSigningPage, ClickmaPbSignCertClear ) );
mpLBSignTSA->SetSelectHdl( LINK( this, ImpPDFTabSigningPage, SelectLBSignTSA ) );
} }
...@@ -1565,6 +1568,24 @@ IMPL_LINK_NOARG( ImpPDFTabSigningPage, ClickmaPbSignCertSelect ) ...@@ -1565,6 +1568,24 @@ IMPL_LINK_NOARG( ImpPDFTabSigningPage, ClickmaPbSignCertSelect )
mpEdSignPassword->Enable( true ); mpEdSignPassword->Enable( true );
mpEdSignContactInfo->Enable( true ); mpEdSignContactInfo->Enable( true );
mpEdSignReason->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; return 0;
...@@ -1579,11 +1600,17 @@ IMPL_LINK_NOARG( ImpPDFTabSigningPage, ClickmaPbSignCertClear ) ...@@ -1579,11 +1600,17 @@ IMPL_LINK_NOARG( ImpPDFTabSigningPage, ClickmaPbSignCertClear )
mpEdSignPassword->Enable( false ); mpEdSignPassword->Enable( false );
mpEdSignContactInfo->Enable( false ); mpEdSignContactInfo->Enable( false );
mpEdSignReason->Enable( false ); mpEdSignReason->Enable( false );
mpLBSignTSA->Enable( false );
return 0; return 0;
} }
IMPL_LINK_NOARG( ImpPDFTabSigningPage, SelectLBSignTSA )
{
return 0;
}
SfxTabPage* ImpPDFTabSigningPage::Create( vcl::Window* pParent, SfxTabPage* ImpPDFTabSigningPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet) const SfxItemSet* rAttrSet)
{ {
...@@ -1610,6 +1637,7 @@ void ImpPDFTabSigningPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent ...@@ -1610,6 +1637,7 @@ void ImpPDFTabSigningPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent
mpEdSignPassword->Enable( false ); mpEdSignPassword->Enable( false );
mpEdSignContactInfo->Enable( false ); mpEdSignContactInfo->Enable( false );
mpEdSignReason->Enable( false ); mpEdSignReason->Enable( false );
mpLBSignTSA->Enable( false );
mpPbSignCertClear->Enable( false ); mpPbSignCertClear->Enable( false );
if (paParent->mbSignPDF) if (paParent->mbSignPDF)
......
...@@ -419,10 +419,12 @@ class ImpPDFTabSigningPage : public SfxTabPage ...@@ -419,10 +419,12 @@ class ImpPDFTabSigningPage : public SfxTabPage
Edit* mpEdSignLocation; Edit* mpEdSignLocation;
Edit* mpEdSignContactInfo; Edit* mpEdSignContactInfo;
Edit* mpEdSignReason; Edit* mpEdSignReason;
ListBox* mpLBSignTSA;
com::sun::star::uno::Reference< com::sun::star::security::XCertificate > maSignCertificate; com::sun::star::uno::Reference< com::sun::star::security::XCertificate > maSignCertificate;
DECL_LINK( ClickmaPbSignCertSelect, void* ); DECL_LINK( ClickmaPbSignCertSelect, void* );
DECL_LINK( ClickmaPbSignCertClear, void* ); DECL_LINK( ClickmaPbSignCertClear, void* );
DECL_LINK( SelectLBSignTSA, void* );
public: public:
ImpPDFTabSigningPage( vcl::Window* pParent, ImpPDFTabSigningPage( vcl::Window* pParent,
......
...@@ -150,6 +150,20 @@ ...@@ -150,6 +150,20 @@
<property name="top_attach">3</property> <property name="top_attach">3</property>
</packing> </packing>
</child> </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> <child>
<object class="GtkLabel" id="label7"> <object class="GtkLabel" id="label7">
<property name="visible">True</property> <property name="visible">True</property>
...@@ -206,6 +220,20 @@ ...@@ -206,6 +220,20 @@
<property name="top_attach">3</property> <property name="top_attach">3</property>
</packing> </packing>
</child> </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> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
......
...@@ -176,6 +176,7 @@ certain functionality. ...@@ -176,6 +176,7 @@ certain functionality.
@li @c filter.ms - escher import/export @li @c filter.ms - escher import/export
@li @c filter.odfflatxml @li @c filter.odfflatxml
@li @c filter.os2met @li @c filter.os2met
@li @c filter.pdf
@li @c filter.pict @li @c filter.pict
@li @c filter.tiff @li @c filter.tiff
@li @c filter.xslt - xslt import/export @li @c filter.xslt - xslt import/export
......
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