[Libreoffice-commits] core.git: 4 commits - cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk filter/Library_pdffilter.mk filter/source filter/uiconfig include/sal include/vcl officecfg/registry

Tor Lillqvist tml at collabora.com
Tue Feb 17 00:47:52 PST 2015


 cui/Library_cui.mk                                         |    1 
 cui/UIConfig_cui.mk                                        |    1 
 cui/source/options/optinet2.cxx                            |   18 +
 cui/source/options/optinet2.hxx                            |    6 
 cui/source/options/optopencl.cxx                           |    3 
 cui/source/options/tsaurls.cxx                             |  120 ++++++
 cui/source/options/tsaurls.hxx                             |   40 ++
 cui/uiconfig/ui/optsecuritypage.ui                         |   75 ++++
 cui/uiconfig/ui/tsaurldialog.ui                            |  230 +++++++++++++
 filter/Library_pdffilter.mk                                |    4 
 filter/source/pdf/impdialog.cxx                            |   39 ++
 filter/source/pdf/impdialog.hxx                            |    3 
 filter/source/pdf/pdfexport.cxx                            |    3 
 filter/source/pdf/pdfexport.hxx                            |    1 
 filter/uiconfig/ui/pdfsignpage.ui                          |   28 +
 include/sal/log-areas.dox                                  |    1 
 include/vcl/pdfwriter.hxx                                  |    1 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |    5 
 18 files changed, 572 insertions(+), 7 deletions(-)

New commits:
commit d83e6e9cdb727b3ca2938048e115ba38886d4c70
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Feb 17 10:35:54 2015 +0200

    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

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index da79299..9ab990c 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -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();
 }
 
 
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 8ef6b18..dc4a787 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -153,6 +153,7 @@ protected:
     OUString             msSignContact;
     OUString             msSignReason;
     com::sun::star::uno::Reference< com::sun::star::security::XCertificate > maSignCertificate;
+    OUString             msSignTSA;
 
     OUString             maWatermarkText;
 
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 84c95b8..e2f5773 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -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 ));
diff --git a/filter/source/pdf/pdfexport.hxx b/filter/source/pdf/pdfexport.hxx
index 38a050d..5123bdc 100644
--- a/filter/source/pdf/pdfexport.hxx
+++ b/filter/source/pdf/pdfexport.hxx
@@ -108,6 +108,7 @@ private:
     OUString                msSignReason;
     OUString                msSignPassword;
     Reference< security::XCertificate > maSignCertificate;
+    OUString                msSignTSA;
 
     void                    ImplWriteWatermark( ::vcl::PDFWriter& rWriter, const Size& rPageSize );
 public:
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index f8c1ff5..d8c64c4 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -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?
commit b8b9d51b8cf1cafe1a94e1baf957f3f282abb32f
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Feb 16 18:07:47 2015 +0200

    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

diff --git a/filter/Library_pdffilter.mk b/filter/Library_pdffilter.mk
index b3a62d7..6de7d34 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 6767c54..da79299 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 42f5c2a..8ef6b18 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 4090c85..fe10e29 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>
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 783ef4d..2c7b898 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -176,6 +176,7 @@ certain functionality.
 @li @c filter.ms - escher import/export
 @li @c filter.odfflatxml
 @li @c filter.os2met
+ at li @c filter.pdf
 @li @c filter.pict
 @li @c filter.tiff
 @li @c filter.xslt - xslt import/export
commit 24ad0629ae9edad83514e329e7173b94a8680ea6
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Feb 16 14:02:23 2015 +0200

    tdf#88427: Add GUI to enter and maintain a list of Time Stamping Authorities
    
    It is just a simple list of entered URLs, accessed from the Security page. No
    sanity checks for now. No selection of a "default" one for now. Implementation
    is much simpler this way. The actual selection of one TSA (or none) is done
    when exporting to PDF.
    
    Change-Id: I0392eabc9b9629a6f0a767d1b2337622a61c120f

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 6df06f9..833af3c 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -168,6 +168,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
     cui/source/options/sdbcdriverenum \
     cui/source/options/securityoptions \
     cui/source/options/treeopt \
+    cui/source/options/tsaurls \
     cui/source/options/webconninfo \
     cui/source/tabpages/align \
     cui/source/tabpages/autocdlg \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index d8cd178..36f5942 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -197,6 +197,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
 	cui/uiconfig/ui/textflowpage \
 	cui/uiconfig/ui/thesaurus \
 	cui/uiconfig/ui/transparencytabpage \
+	cui/uiconfig/ui/tsaurldialog \
 	cui/uiconfig/ui/twolinespage \
 	cui/uiconfig/ui/wordcompletionpage \
 	cui/uiconfig/ui/zoomdialog \
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index e7cd019..50e8530 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -85,6 +85,7 @@
 #include "securityoptions.hxx"
 #include "webconninfo.hxx"
 #include "certpath.hxx"
+#include "tsaurls.hxx"
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -601,6 +602,8 @@ SvxSecurityTabPage::SvxSecurityTabPage(vcl::Window* pParent, const SfxItemSet& r
     get(m_pMacroSecPB, "macro");
     get(m_pCertFrame, "certificatepath");
     get(m_pCertPathPB, "cert");
+    get(m_pTSAURLsFrame, "tsaurls");
+    get(m_pTSAURLsPB, "tsas");
     m_sPasswordStoringDeactivateStr = get<FixedText>("nopasswordsave")->GetText();
 
     InitControls();
@@ -612,6 +615,7 @@ SvxSecurityTabPage::SvxSecurityTabPage(vcl::Window* pParent, const SfxItemSet& r
     m_pShowConnectionsPB->SetClickHdl( LINK( this, SvxSecurityTabPage, ShowPasswordsHdl ) );
     m_pMacroSecPB->SetClickHdl( LINK( this, SvxSecurityTabPage, MacroSecPBHdl ) );
     m_pCertPathPB->SetClickHdl( LINK( this, SvxSecurityTabPage, CertPathPBHdl ) );
+    m_pTSAURLsPB->SetClickHdl( LINK( this, SvxSecurityTabPage, TSAURLsPBHdl ) );
 
     ActivatePage( rSet );
 }
@@ -782,6 +786,20 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, CertPathPBHdl)
     return 0;
 }
 
+IMPL_LINK_NOARG(SvxSecurityTabPage, TSAURLsPBHdl)
+{
+    // Unlike the mpCertPathDlg, we *don't* keep the same dialog object around between
+    // invocations. Seems clearer to my little brain that way.
+
+    TSAURLsDialog* pTSAURLsDlg = new TSAURLsDialog(this);
+
+    pTSAURLsDlg->Execute();
+
+    delete pTSAURLsDlg;
+
+    return 0;
+}
+
 IMPL_LINK_NOARG(SvxSecurityTabPage, MacroSecPBHdl)
 {
     try
diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx
index c7d81b7..5bb9c05 100644
--- a/cui/source/options/optinet2.hxx
+++ b/cui/source/options/optinet2.hxx
@@ -123,9 +123,7 @@ protected:
 // class SvxSecurityTabPage ---------------------------------------------
 
 class SvtSecurityOptions;
-
 class CertPathDialog;
-
 class SvxSecurityTabPage : public SfxTabPage
 {
     using TabPage::ActivatePage;
@@ -147,6 +145,9 @@ private:
     VclContainer*       m_pCertFrame;
     PushButton*         m_pCertPathPB;
 
+    VclContainer*       m_pTSAURLsFrame;
+    PushButton*         m_pTSAURLsPB;
+
     SvtSecurityOptions*         mpSecOptions;
     svx::SecurityOptionsDialog* mpSecOptDlg;
 
@@ -161,6 +162,7 @@ private:
     DECL_LINK(ShowPasswordsHdl, void *);
     DECL_LINK(MacroSecPBHdl, void* );
     DECL_LINK(CertPathPBHdl, void* );
+    DECL_LINK(TSAURLsPBHdl, void* );
 
     void                InitControls();
 
diff --git a/cui/source/options/tsaurls.cxx b/cui/source/options/tsaurls.cxx
new file mode 100644
index 0000000..9db3801
--- /dev/null
+++ b/cui/source/options/tsaurls.cxx
@@ -0,0 +1,120 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <officecfg/Office/Common.hxx>
+#include <svx/svxdlg.hxx>
+#include <cuires.hrc>
+
+#include "tsaurls.hxx"
+
+#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
+
+using namespace ::com::sun::star;
+
+TSAURLsDialog::TSAURLsDialog(vcl::Window* pParent)
+    : ModalDialog(pParent, "TSAURLDialog", "cui/ui/tsaurldialog.ui")
+{
+    get(m_pAddBtn, "add");
+    get(m_pDeleteBtn, "delete");
+    get(m_pOKBtn, "ok");
+    get(m_pURLListBox, "urls");
+
+    m_pURLListBox->SetDropDownLineCount(8);
+    m_pURLListBox->set_width_request(m_pURLListBox->approximate_char_width() * 32);
+    m_pOKBtn->Disable();
+
+    m_pAddBtn->SetClickHdl( LINK( this, TSAURLsDialog, AddHdl_Impl ) );
+    m_pDeleteBtn->SetClickHdl( LINK( this, TSAURLsDialog, DeleteHdl_Impl ) );
+    m_pOKBtn->SetClickHdl( LINK( this, TSAURLsDialog, OKHdl_Impl ) );
+
+    try
+    {
+        css::uno::Sequence<OUString> aUserSetTSAURLs(officecfg::Office::Common::Security::Scripting::TSAURLs::get());
+
+        for (auto i = aUserSetTSAURLs.begin(); i != aUserSetTSAURLs.end(); ++i)
+        {
+            AddTSAURL(*i);
+        }
+    }
+    catch (const uno::Exception &e)
+    {
+        SAL_WARN("cui.options", "TSAURLsDialog::TSAURLsDialog(): caught exception" << e.Message);
+    }
+}
+
+IMPL_LINK_NOARG(TSAURLsDialog, OKHdl_Impl)
+{
+    std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
+
+    css::uno::Sequence<OUString> aNewValue(m_aURLs.size());
+    size_t n(0);
+
+    for (auto i = m_aURLs.cbegin(); i != m_aURLs.cend(); ++i)
+        aNewValue[n++] = *i;
+    officecfg::Office::Common::Security::Scripting::TSAURLs::set(aNewValue, batch);
+    batch->commit();
+
+    EndDialog(RET_OK);
+
+    return 0;
+}
+
+TSAURLsDialog::~TSAURLsDialog()
+{
+}
+
+void TSAURLsDialog::AddTSAURL(const OUString& rURL)
+{
+    m_aURLs.insert(rURL);
+
+    m_pURLListBox->SetUpdateMode(false);
+    m_pURLListBox->Clear();
+
+    for (auto i = m_aURLs.cbegin(); i != m_aURLs.cend(); ++i)
+    {
+        m_pURLListBox->InsertEntry(*i);
+    }
+
+    m_pURLListBox->SetUpdateMode(true);
+}
+
+IMPL_LINK_NOARG(TSAURLsDialog, AddHdl_Impl)
+{
+    OUString aURL;
+    OUString aDesc( get<FixedText>("enteraurl")->GetText() );
+
+    SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+    boost::scoped_ptr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog( m_pAddBtn, aURL, aDesc));
+
+    if ( pDlg->Execute() == RET_OK )
+    {
+        pDlg->GetName( aURL );
+
+        AddTSAURL(aURL);
+        m_pOKBtn->Enable();
+    }
+
+    return 0;
+}
+
+IMPL_LINK_NOARG(TSAURLsDialog, DeleteHdl_Impl)
+{
+    sal_Int32 nSel = m_pURLListBox->GetSelectEntryPos();
+
+    if (nSel == LISTBOX_ENTRY_NOTFOUND)
+        return 0;
+
+    m_aURLs.erase(m_pURLListBox->GetEntry(nSel));
+    m_pURLListBox->RemoveEntry(nSel);
+    m_pOKBtn->Enable();
+
+    return 0;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/tsaurls.hxx b/cui/source/options/tsaurls.hxx
new file mode 100644
index 0000000..aba7491
--- /dev/null
+++ b/cui/source/options/tsaurls.hxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_OPTIONS_TSAURLS_HXX
+#define INCLUDED_CUI_SOURCE_OPTIONS_TSAURLS_HXX
+
+#include <vcl/lstbox.hxx>
+#include <vcl/button.hxx>
+
+class TSAURLsDialog : public ModalDialog
+{
+private:
+    ListBox* m_pURLListBox;
+    PushButton* m_pAddBtn;
+    PushButton* m_pDeleteBtn;
+    OKButton*   m_pOKBtn;
+
+    DECL_LINK(AddHdl_Impl, void *);
+    DECL_LINK(DeleteHdl_Impl, void *);
+    DECL_LINK(OKHdl_Impl, void *);
+
+    std::set<OUString> m_aURLs;
+
+    void AddTSAURL(const OUString &rURL);
+
+public:
+    TSAURLsDialog(vcl::Window* pParent);
+    virtual ~TSAURLsDialog();
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/uiconfig/ui/optsecuritypage.ui b/cui/uiconfig/ui/optsecuritypage.ui
index 007bbc6..46b342a 100644
--- a/cui/uiconfig/ui/optsecuritypage.ui
+++ b/cui/uiconfig/ui/optsecuritypage.ui
@@ -8,6 +8,81 @@
     <property name="border_width">6</property>
     <property name="row_spacing">12</property>
     <child>
+      <object class="GtkFrame" id="tsaurls">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">none</property>
+        <child>
+          <object class="GtkAlignment" id="alignment5">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="top_padding">6</property>
+            <property name="left_padding">12</property>
+            <child>
+              <object class="GtkGrid" id="grid8">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="column_spacing">24</property>
+                <child>
+                  <object class="GtkLabel" id="label9">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Maintain a list of Time Stamping Authority (TSA) URLs to be optionally for digital signatures in PDF export.</property>
+                    <property name="wrap">True</property>
+                    <property name="max_width_chars">56</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="tsas">
+                    <property name="label" translatable="yes">_TSAs...</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="valign">center</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label10">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">TSAs</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">4</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
       <object class="GtkFrame" id="certificatepath">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
diff --git a/cui/uiconfig/ui/tsaurldialog.ui b/cui/uiconfig/ui/tsaurldialog.ui
new file mode 100644
index 0000000..37ed401
--- /dev/null
+++ b/cui/uiconfig/ui/tsaurldialog.ui
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+  <requires lib="gtk+" version="3.0"/>
+  <!-- interface-requires LibreOffice 1.0 -->
+  <object class="GtkDialog" id="TSAURLDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Time Stamping Authority URLs</property>
+    <property name="type_hint">normal</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="add">
+                <property name="label" translatable="yes">_Add...</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+                <property name="secondary">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="delete">
+                <property name="label" translatable="yes">_Delete...</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
+                <property name="secondary">True</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="frame1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">none</property>
+            <child>
+              <object class="GtkAlignment" id="alignment1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="top_padding">6</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkGrid" id="grid1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <property name="row_spacing">6</property>
+                    <child>
+                      <object class="GtkLabel" id="label2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="yalign">0</property>
+                        <property name="label" translatable="yes">Add or delete Time Stamp Authority URLs</property>
+                        <property name="use_underline">True</property>
+                        <property name="wrap">True</property>
+                        <property name="mnemonic_widget">paths</property>
+                        <property name="max_width_chars">60</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">0</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkGrid" id="grid2">
+                        <property name="can_focus">False</property>
+                        <property name="no_show_all">True</property>
+                        <child>
+                          <object class="GtkLabel" id="enteraurl">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="hexpand">True</property>
+                            <property name="label" translatable="yes">Enter a Time Stamp Authority URL</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">1</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hexpand">True</property>
+                        <property name="vexpand">True</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkTreeView" id="urls:border">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hexpand">True</property>
+                            <property name="vexpand">True</property>
+                            <child internal-child="selection">
+                              <object class="GtkTreeSelection" id="urls-selection"/>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">2</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">TSA URL</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">help</action-widget>
+      <action-widget response="0">add</action-widget>
+    </action-widgets>
+  </object>
+</interface>
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 4140ca5..d496c85 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -2510,6 +2510,11 @@
             <desc>Contains the path to the users NSS certificate directory.</desc>
           </info>
         </prop>
+        <prop oor:name="TSAURLs" oor:type="oor:string-list" oor:nillable="false">
+          <info>
+            <desc>Contains the URLs or Time Stamping Authority servers.</desc>
+          </info>
+        </prop>
         <prop oor:name="WarnPrintDoc" oor:type="xs:boolean" oor:nillable="false">
           <info>
             <desc>Specifies whether to warn when printing documents with
commit bd5d65e54976971ee30f597a125e43d275ec8e81
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Feb 13 15:21:01 2015 +0200

    Bin some superfluous vertical whitespace
    
    Change-Id: I237c90c6451ff0bd0e7a691516ec8ebe70437e4b

diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
index 9910d96..c43af1c 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -78,7 +78,6 @@ SvxOpenCLTabPage::SvxOpenCLTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
     HeaderBar &rBlBar = mpBlackList->GetTheHeaderBar();
     HeaderBar &rWiBar = mpWhiteList->GetTheHeaderBar();
 
-
     WinBits nHBits = HIB_LEFT | HIB_VCENTER | HIB_CLICKABLE;
     rBlBar.InsertItem( 1, mpOS->GetText(),         0, nHBits );
     rBlBar.InsertItem( 2, mpOSVersion->GetText(),  0, nHBits );
@@ -375,6 +374,4 @@ IMPL_LINK_NOARG(SvxOpenCLTabPage, EnableOpenCLHdl)
     return 0;
 }
 
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list