[Libreoffice-commits] core.git: 2 commits - vcl/source xmlsecurity/inc xmlsecurity/source xmlsecurity/uiconfig xmlsecurity/UI_xmlsec.mk

Caolán McNamara caolanm at redhat.com
Thu Feb 14 09:01:39 PST 2013


 vcl/source/window/builder.cxx                          |    6 
 xmlsecurity/UI_xmlsec.mk                               |    1 
 xmlsecurity/inc/xmlsecurity/macrosecurity.hxx          |   25 -
 xmlsecurity/source/dialogs/dialogs.hrc                 |   37 -
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |    4 
 xmlsecurity/source/dialogs/helpids.hrc                 |    1 
 xmlsecurity/source/dialogs/macrosecurity.cxx           |  136 +++---
 xmlsecurity/source/dialogs/macrosecurity.src           |   95 ----
 xmlsecurity/uiconfig/ui/macrosecuritydialog.ui         |  268 -------------
 xmlsecurity/uiconfig/ui/securitytrustpage.ui           |  348 +++++++++++++++++
 10 files changed, 447 insertions(+), 474 deletions(-)

New commits:
commit 772e231a92044b5613b4ae3545b2110a5e13ed99
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 14 15:16:13 2013 +0000

    split out trust page and adapt code
    
    Change-Id: I79067df7174f5ae9bff51d997128cb033477aa6f

diff --git a/xmlsecurity/UI_xmlsec.mk b/xmlsecurity/UI_xmlsec.mk
index 69f1b2b..e07a558 100644
--- a/xmlsecurity/UI_xmlsec.mk
+++ b/xmlsecurity/UI_xmlsec.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_UI_UI,xmlsec))
 $(eval $(call gb_UI_add_uifiles,xmlsec,\
 	xmlsecurity/uiconfig/ui/digitalsignaturesdialog \
 	xmlsecurity/uiconfig/ui/securitylevelpage \
+	xmlsecurity/uiconfig/ui/securitytrustpage \
 	xmlsecurity/uiconfig/ui/selectcertificatedialog \
 	xmlsecurity/uiconfig/ui/macrosecuritydialog \
 ))
diff --git a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
index 4611f05..a61b9a1 100644
--- a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
+++ b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
@@ -124,19 +124,15 @@ public:
 class MacroSecurityTrustedSourcesTP : public MacroSecurityTP
 {
 private:
-    FixedLine           maTrustCertFL;
-    ReadOnlyImage       maTrustCertROFI;
-    SvxSimpleTableContainer m_aTrustCertLBContainer;
-    SvxSimpleTable      maTrustCertLB;
-    PushButton          maAddCertPB;
-    PushButton          maViewCertPB;
-    PushButton          maRemoveCertPB;
-    FixedLine           maTrustFileLocFL;
-    ReadOnlyImage       maTrustFileROFI;
-    FixedInfo           maTrustFileLocFI;
-    ListBox             maTrustFileLocLB;
-    PushButton          maAddLocPB;
-    PushButton          maRemoveLocPB;
+    FixedImage*         m_pTrustCertROFI;
+    SvxSimpleTable*     m_pTrustCertLB;
+    PushButton*         m_pAddCertPB;
+    PushButton*         m_pViewCertPB;
+    PushButton*         m_pRemoveCertPB;
+    FixedImage*         m_pTrustFileROFI;
+    ListBox*            m_pTrustFileLocLB;
+    PushButton*         m_pAddLocPB;
+    PushButton*         m_pRemoveLocPB;
 
     cssu::Sequence< SvtSecurityOptions::Certificate > maTrustedAuthors;
 
@@ -154,7 +150,8 @@ private:
     void                ImplCheckButtons();
 
 public:
-                        MacroSecurityTrustedSourcesTP( Window* pParent, MacroSecurity* _pDlg );
+    MacroSecurityTrustedSourcesTP(Window* pParent, MacroSecurity* _pDlg);
+    ~MacroSecurityTrustedSourcesTP();
 
     virtual void        ActivatePage();
     virtual void        ClosePage( void );
diff --git a/xmlsecurity/source/dialogs/dialogs.hrc b/xmlsecurity/source/dialogs/dialogs.hrc
index cfc4acd..e2224f29 100644
--- a/xmlsecurity/source/dialogs/dialogs.hrc
+++ b/xmlsecurity/source/dialogs/dialogs.hrc
@@ -175,43 +175,6 @@
 #define MS_COL_G                        (MS_COL_F-RSC_SP_CTRL_X)
 #define MS_COL_H                        (MS_COL_G-RSC_CD_PUSHBUTTON_WIDTH)
 
-// --------- tab page trusted sources ---------
-
-#define FL_TRUSTCERT                    1
-#define LB_TRUSTCERT                    2
-#define PB_ADD_TRUSTCERT                3
-#define PB_VIEW_TRUSTCERT               4
-#define PB_REMOVE_TRUSTCERT             5
-#define FL_TRUSTFILELOC                 6
-#define FI_TRUSTFILELOC                 7
-#define LB_TRUSTFILELOC                 8
-#define FL_ADD_TRUSTFILELOC             9
-#define FL_REMOVE_TRUSTFILELOC          10
-#define FI_TRUSTCERT_RO                 11
-#define FI_TRUSTFILE_RO                 12
-
-#define TS_COL_0                        RSC_SP_TBPG_INNERBORDER_LEFT
-#define TS_COL_1                        (TS_COL_0+RSC_SP_FLGR_SPACE_X)
-#define TS_COL_8                        (TP_WIDTH-RSC_SP_TBPG_INNERBORDER_RIGHT)
-#define TS_COL_7                        (TS_COL_8-RSC_SP_FLGR_SPACE_X)
-#define TS_COL_6                        (TS_COL_7-RSC_CD_PUSHBUTTON_WIDTH)
-#define TS_COL_5                        (TS_COL_6-RSC_SP_CTRL_GROUP_X)
-#define TS_COL_4                        (TS_COL_5-RSC_CD_PUSHBUTTON_WIDTH)
-#define TS_COL_3                        (TS_COL_4-RSC_SP_CTRL_GROUP_X)
-#define TS_COL_2                        (TS_COL_3-RSC_CD_PUSHBUTTON_WIDTH)
-
-#define RSC_CD_TABLISTBOX_HEIGHT        6*RSC_BS_CHARHEIGHT
-#define TS_ROW_0                        RSC_SP_TBPG_INNERBORDER_TOP
-#define TS_ROW_1                        (TS_ROW_0+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_FLGR_SPACE_Y)
-#define TS_ROW_2                        (TS_ROW_1+RSC_CD_TABLISTBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y)
-#define TS_ROW_3                        (TS_ROW_2+RSC_CD_PUSHBUTTON_HEIGHT+RSC_SP_FLGR_SPACE_Y)
-#define TS_ROW_4                        (TS_ROW_3+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_FLGR_SPACE_Y)
-#define TS_ROW_5                        (TS_ROW_4+3*RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_FLGR_SPACE_Y)
-
-#define TS_ROW_8                        (TP_HEIGHT-RSC_SP_TBPG_INNERBORDER_BOTTOM)
-#define TS_ROW_7                        (TS_ROW_8-RSC_CD_PUSHBUTTON_HEIGHT)
-#define TS_ROW_6                        (TS_ROW_7-RSC_SP_FLGR_SPACE_Y)
-
 // --------- signed macro warning ---------
 
 #define FI_DOCNAME                      1
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 03b8fbf..fbdc2c5 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -206,8 +206,8 @@ DigitalSignaturesDialog::DigitalSignaturesDialog(
     m_pSignaturesLB = new SvxSimpleTable(*pSignatures);
     // #i48253# the tablistbox needs its own unique id
     m_pSignaturesLB->Window::SetUniqueId( HID_XMLSEC_TREE_SIGNATURESDLG );
-    static long nTabs[] = { 4, 0, 6*nControlWidth/100, 36*nControlWidth/100, 74*nControlWidth/100 };
-    m_pSignaturesLB->SetTabs( &nTabs[ 0 ] );
+    static long aTabs[] = { 4, 0, 6*nControlWidth/100, 36*nControlWidth/100, 74*nControlWidth/100 };
+    m_pSignaturesLB->SetTabs(aTabs);
 
     OUStringBuffer sHeader;
     sHeader.append("\t").append(get<FixedText>("signed")->GetText())
diff --git a/xmlsecurity/source/dialogs/helpids.hrc b/xmlsecurity/source/dialogs/helpids.hrc
index 0818b82..3e33443 100644
--- a/xmlsecurity/source/dialogs/helpids.hrc
+++ b/xmlsecurity/source/dialogs/helpids.hrc
@@ -24,7 +24,6 @@
 // Help-Ids --------------------------------------------------------------
 
 #define HID_XMLSEC_TP_MACROSEC                         "XMLSECURITY_HID_XMLSEC_TP_MACROSEC"
-#define HID_XMLSEC_TP_TRUSTSOURCES                     "XMLSECURITY_HID_XMLSEC_TP_TRUSTSOURCES"
 #define HID_XMLSEC_DLG_CERTVIEWER                      "XMLSECURITY_HID_XMLSEC_DLG_CERTVIEWER"
 #define HID_XMLSEC_TP_GENERAL                          "XMLSECURITY_HID_XMLSEC_TP_GENERAL"
 #define HID_XMLSEC_TP_DETAILS                          "XMLSECURITY_HID_XMLSEC_TP_DETAILS"
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index 53df445..b4c8b41 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -183,20 +183,20 @@ void MacroSecurityLevelTP::ClosePage( void )
 
 void MacroSecurityTrustedSourcesTP::ImplCheckButtons()
 {
-    bool bCertSelected = maTrustCertLB.FirstSelected() != NULL;
-    maViewCertPB.Enable( bCertSelected );
-    maRemoveCertPB.Enable( bCertSelected && !mbAuthorsReadonly);
+    bool bCertSelected = m_pTrustCertLB->FirstSelected() != NULL;
+    m_pViewCertPB->Enable( bCertSelected );
+    m_pRemoveCertPB->Enable( bCertSelected && !mbAuthorsReadonly);
 
-    bool bLocationSelected = maTrustFileLocLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND;
-    maRemoveLocPB.Enable( bLocationSelected && !mbURLsReadonly);
+    bool bLocationSelected = m_pTrustFileLocLB->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND;
+    m_pRemoveLocPB->Enable( bLocationSelected && !mbURLsReadonly);
 }
 
 
 IMPL_LINK_NOARG(MacroSecurityTrustedSourcesTP, ViewCertPBHdl)
 {
-    if( maTrustCertLB.FirstSelected() )
+    if( m_pTrustCertLB->FirstSelected() )
     {
-        sal_uInt16 nSelected = sal_uInt16( sal_uIntPtr( maTrustCertLB.FirstSelected()->GetUserData() ) );
+        sal_uInt16 nSelected = sal_uInt16( sal_uIntPtr( m_pTrustCertLB->FirstSelected()->GetUserData() ) );
 
         uno::Reference< dcss::security::XSerialNumberAdapter > xSerialNumberAdapter =
             ::com::sun::star::security::SerialNumberAdapter::create(mpDlg->mxCtx);
@@ -220,9 +220,9 @@ IMPL_LINK_NOARG(MacroSecurityTrustedSourcesTP, ViewCertPBHdl)
 
 IMPL_LINK_NOARG(MacroSecurityTrustedSourcesTP, RemoveCertPBHdl)
 {
-    if( maTrustCertLB.FirstSelected() )
+    if( m_pTrustCertLB->FirstSelected() )
     {
-        sal_uInt16 nAuthor = sal_uInt16( sal_uIntPtr( maTrustCertLB.FirstSelected()->GetUserData() ) );
+        sal_uInt16 nAuthor = sal_uInt16( sal_uIntPtr( m_pTrustCertLB->FirstSelected()->GetUserData() ) );
         ::comphelper::removeElementAt( maTrustedAuthors, nAuthor );
 
         FillCertLB();
@@ -257,9 +257,9 @@ IMPL_LINK_NOARG(MacroSecurityTrustedSourcesTP, AddLocPBHdl)
         if ( osl::FileBase::getSystemPathFromFileURL( aSystemFileURL, aSystemFileURL ) == osl::FileBase::E_None )
             aNewPathStr = aSystemFileURL;
 
-        if( maTrustFileLocLB.GetEntryPos( aNewPathStr ) == LISTBOX_ENTRY_NOTFOUND )
+        if( m_pTrustFileLocLB->GetEntryPos( aNewPathStr ) == LISTBOX_ENTRY_NOTFOUND )
         {
-            maTrustFileLocLB.InsertEntry( aNewPathStr );
+            m_pTrustFileLocLB->InsertEntry( aNewPathStr );
         }
 
         ImplCheckButtons();
@@ -274,18 +274,18 @@ IMPL_LINK_NOARG(MacroSecurityTrustedSourcesTP, AddLocPBHdl)
 
 IMPL_LINK_NOARG(MacroSecurityTrustedSourcesTP, RemoveLocPBHdl)
 {
-    sal_uInt16  nSel = maTrustFileLocLB.GetSelectEntryPos();
+    sal_uInt16  nSel = m_pTrustFileLocLB->GetSelectEntryPos();
     if( nSel != LISTBOX_ENTRY_NOTFOUND )
     {
-        maTrustFileLocLB.RemoveEntry( nSel );
+        m_pTrustFileLocLB->RemoveEntry( nSel );
         // Trusted Path could not be removed (#i33584#)
         // after remove an entry, select another one if exists
-        sal_uInt16 nNewCount = maTrustFileLocLB.GetEntryCount();
+        sal_uInt16 nNewCount = m_pTrustFileLocLB->GetEntryCount();
         if ( nNewCount > 0 )
         {
             if ( nSel >= nNewCount )
                 nSel = nNewCount - 1;
-            maTrustFileLocLB.SelectEntryPos( nSel );
+            m_pTrustFileLocLB->SelectEntryPos( nSel );
         }
         ImplCheckButtons();
     }
@@ -307,7 +307,7 @@ IMPL_LINK_NOARG(MacroSecurityTrustedSourcesTP, TrustFileLocLBSelectHdl)
 
 void MacroSecurityTrustedSourcesTP::FillCertLB( void )
 {
-    maTrustCertLB.Clear();
+    m_pTrustCertLB->Clear();
 
     sal_uInt32 nEntries = maTrustedAuthors.getLength();
 
@@ -321,70 +321,90 @@ void MacroSecurityTrustedSourcesTP::FillCertLB( void )
             // create from RawData
             xCert = mpDlg->mxSecurityEnvironment->createCertificateFromAscii( rEntry[ 2 ] );
 
-            SvTreeListEntry*    pLBEntry = maTrustCertLB.InsertEntry( XmlSec::GetContentPart( xCert->getSubjectName() ) );
-            maTrustCertLB.SetEntryText( XmlSec::GetContentPart( xCert->getIssuerName() ), pLBEntry, 1 );
-            maTrustCertLB.SetEntryText( XmlSec::GetDateTimeString( xCert->getNotValidAfter() ), pLBEntry, 2 );
+            SvTreeListEntry*    pLBEntry = m_pTrustCertLB->InsertEntry( XmlSec::GetContentPart( xCert->getSubjectName() ) );
+            m_pTrustCertLB->SetEntryText( XmlSec::GetContentPart( xCert->getIssuerName() ), pLBEntry, 1 );
+            m_pTrustCertLB->SetEntryText( XmlSec::GetDateTimeString( xCert->getNotValidAfter() ), pLBEntry, 2 );
             pLBEntry->SetUserData( ( void* ) (sal_IntPtr)nEntry );      // missuse user data as index
         }
     }
 }
 
-MacroSecurityTrustedSourcesTP::MacroSecurityTrustedSourcesTP( Window* _pParent, MacroSecurity* _pDlg )
-    :MacroSecurityTP    ( _pParent, XMLSEC_RES( RID_XMLSECTP_TRUSTSOURCES ), _pDlg )
-    ,maTrustCertFL      ( this, XMLSEC_RES( FL_TRUSTCERT ) )
-    ,maTrustCertROFI    ( this, XMLSEC_RES( FI_TRUSTCERT_RO ) )
-    ,m_aTrustCertLBContainer(this, XMLSEC_RES(LB_TRUSTCERT))
-    ,maTrustCertLB(m_aTrustCertLBContainer)
-    ,maAddCertPB        ( this, XMLSEC_RES( PB_ADD_TRUSTCERT ) )
-    ,maViewCertPB       ( this, XMLSEC_RES( PB_VIEW_TRUSTCERT ) )
-    ,maRemoveCertPB     ( this, XMLSEC_RES( PB_REMOVE_TRUSTCERT ) )
-    ,maTrustFileLocFL   ( this, XMLSEC_RES( FL_TRUSTFILELOC ) )
-    ,maTrustFileROFI    ( this, XMLSEC_RES( FI_TRUSTFILE_RO ) )
-    ,maTrustFileLocFI   ( this, XMLSEC_RES( FI_TRUSTFILELOC ) )
-    ,maTrustFileLocLB   ( this, XMLSEC_RES( LB_TRUSTFILELOC ) )
-    ,maAddLocPB         ( this, XMLSEC_RES( FL_ADD_TRUSTFILELOC ) )
-    ,maRemoveLocPB      ( this, XMLSEC_RES( FL_REMOVE_TRUSTFILELOC ) )
+class TrustCertLB : public SvxSimpleTable
 {
-    static long nTabs[] = { 3, 0, 35*CS_LB_WIDTH/100, 70*CS_LB_WIDTH/100 };
-    maTrustCertLB.SetTabs( &nTabs[ 0 ] );
-    maTrustCertLB.InsertHeaderEntry( XMLSEC_RES( STR_HEADERBAR ) );
-
-    FreeResource();
-
-    maTrustCertLB.SetSelectHdl( LINK( this, MacroSecurityTrustedSourcesTP, TrustCertLBSelectHdl ) );
-    maAddCertPB.Hide();     // not used in the moment...
-    maViewCertPB.SetClickHdl( LINK( this, MacroSecurityTrustedSourcesTP, ViewCertPBHdl ) );
-    maViewCertPB.Disable();
-    maRemoveCertPB.SetClickHdl( LINK( this, MacroSecurityTrustedSourcesTP, RemoveCertPBHdl ) );
-    maRemoveCertPB.Disable();
+public:
+    TrustCertLB(SvxSimpleTableContainer &rContainer)
+        : SvxSimpleTable(rContainer, 0)
+    {
+    }
+    virtual void Resize()
+    {
+        SvxSimpleTable::Resize();
+        const long nControlWidth = GetSizePixel().Width();
+        long aTabLocs[] = { 3, 0, 35*nControlWidth/100, 70*nControlWidth/100 };
+        SvxSimpleTable::SetTabs(aTabLocs, MAP_PIXEL);
+    }
+};
 
-    maTrustFileLocLB.SetSelectHdl( LINK( this, MacroSecurityTrustedSourcesTP, TrustFileLocLBSelectHdl ) );
-    maAddLocPB.SetClickHdl( LINK( this, MacroSecurityTrustedSourcesTP, AddLocPBHdl ) );
-    maRemoveLocPB.SetClickHdl( LINK( this, MacroSecurityTrustedSourcesTP, RemoveLocPBHdl ) );
-    maRemoveLocPB.Disable();
+MacroSecurityTrustedSourcesTP::MacroSecurityTrustedSourcesTP(Window* _pParent, MacroSecurity* _pDlg)
+    : MacroSecurityTP(_pParent, "SecurityTrustPage", "xmlsec/ui/securitytrustpage.ui", _pDlg)
+{
+    get(m_pTrustCertROFI, "lockcertimg");
+    get(m_pViewCertPB, "viewcert");
+    get(m_pRemoveCertPB, "removecert");
+    get(m_pTrustFileROFI, "lockfileimg");
+    get(m_pTrustFileLocLB, "locations");
+    m_pTrustFileLocLB->SetDropDownLineCount(6);
+    get(m_pAddLocPB, "addfile");
+    get(m_pRemoveLocPB, "removefile");
+
+    SvxSimpleTableContainer *pCertificates = get<SvxSimpleTableContainer>("certificates");
+    m_pTrustCertLB = new TrustCertLB(*pCertificates);
+    static long aTabs[] = { 3, 0, 0, 0 };
+    m_pTrustCertLB->SetTabs( aTabs );
+
+    OUStringBuffer aBuf(get<FixedText>("to")->GetText());
+    aBuf.append("\t").append(get<FixedText>("by")->GetText())
+        .append("\t").append(get<FixedText>("date")->GetText());
+    m_pTrustCertLB->InsertHeaderEntry(aBuf.makeStringAndClear());
+
+    m_pTrustCertLB->SetSelectHdl( LINK( this, MacroSecurityTrustedSourcesTP, TrustCertLBSelectHdl ) );
+    m_pViewCertPB->SetClickHdl( LINK( this, MacroSecurityTrustedSourcesTP, ViewCertPBHdl ) );
+    m_pViewCertPB->Disable();
+    m_pRemoveCertPB->SetClickHdl( LINK( this, MacroSecurityTrustedSourcesTP, RemoveCertPBHdl ) );
+    m_pRemoveCertPB->Disable();
+
+    m_pTrustFileLocLB->SetSelectHdl( LINK( this, MacroSecurityTrustedSourcesTP, TrustFileLocLBSelectHdl ) );
+    m_pAddLocPB->SetClickHdl( LINK( this, MacroSecurityTrustedSourcesTP, AddLocPBHdl ) );
+    m_pRemoveLocPB->SetClickHdl( LINK( this, MacroSecurityTrustedSourcesTP, RemoveLocPBHdl ) );
+    m_pRemoveLocPB->Disable();
 
     maTrustedAuthors = mpDlg->maSecOptions.GetTrustedAuthors();
     mbAuthorsReadonly = mpDlg->maSecOptions.IsReadOnly( SvtSecurityOptions::E_MACRO_TRUSTEDAUTHORS );
-    maTrustCertROFI.Show( mbAuthorsReadonly );
-    mbAuthorsReadonly ? maTrustCertLB.DisableTable() : maTrustCertLB.EnableTable();
+    m_pTrustCertROFI->Show( mbAuthorsReadonly );
+    mbAuthorsReadonly ? m_pTrustCertLB->DisableTable() : m_pTrustCertLB->EnableTable();
 
     FillCertLB();
 
     cssu::Sequence< rtl::OUString > aSecureURLs = mpDlg->maSecOptions.GetSecureURLs();
     mbURLsReadonly = mpDlg->maSecOptions.IsReadOnly( SvtSecurityOptions::E_SECUREURLS );
-    maTrustFileROFI.Show( mbURLsReadonly );
-    maTrustFileLocLB.Enable( !mbURLsReadonly );
-    maAddLocPB      .Enable( !mbURLsReadonly );
+    m_pTrustFileROFI->Show( mbURLsReadonly );
+    m_pTrustFileLocLB->Enable( !mbURLsReadonly );
+    m_pAddLocPB->Enable( !mbURLsReadonly );
 
     sal_Int32 nEntryCnt = aSecureURLs.getLength();
     for( sal_Int32 i = 0 ; i < nEntryCnt ; ++i )
     {
         ::rtl::OUString aSystemFileURL( aSecureURLs[ i ] );
         osl::FileBase::getSystemPathFromFileURL( aSystemFileURL, aSystemFileURL );
-        maTrustFileLocLB.InsertEntry( aSystemFileURL );
+        m_pTrustFileLocLB->InsertEntry( aSystemFileURL );
     }
 }
 
+MacroSecurityTrustedSourcesTP::~MacroSecurityTrustedSourcesTP()
+{
+    delete m_pTrustCertLB;
+}
+
 void MacroSecurityTrustedSourcesTP::ActivatePage()
 {
     mpDlg->EnableReset( false );
@@ -393,13 +413,13 @@ void MacroSecurityTrustedSourcesTP::ActivatePage()
 
 void MacroSecurityTrustedSourcesTP::ClosePage( void )
 {
-    sal_uInt16  nEntryCnt = maTrustFileLocLB.GetEntryCount();
+    sal_uInt16  nEntryCnt = m_pTrustFileLocLB->GetEntryCount();
     if( nEntryCnt )
     {
         cssu::Sequence< rtl::OUString > aSecureURLs( nEntryCnt );
         for( sal_uInt16 i = 0 ; i < nEntryCnt ; ++i )
         {
-            ::rtl::OUString aURL( maTrustFileLocLB.GetEntry( i ) );
+            ::rtl::OUString aURL( m_pTrustFileLocLB->GetEntry( i ) );
             osl::FileBase::getFileURLFromSystemPath( aURL, aURL );
             aSecureURLs[ i ] = aURL;
         }
diff --git a/xmlsecurity/source/dialogs/macrosecurity.src b/xmlsecurity/source/dialogs/macrosecurity.src
index a1a6fcd..eaece23 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.src
+++ b/xmlsecurity/source/dialogs/macrosecurity.src
@@ -72,104 +72,11 @@ TabDialog RID_XMLSECTP_MACROSEC
     };
 };
 
-TabPage RID_XMLSECTP_TRUSTSOURCES
-{
-    HelpId = HID_XMLSEC_TP_TRUSTSOURCES;
-    Size = MAP_APPFONT( TP_WIDTH, TP_HEIGHT );
-    OutputSize = TRUE;
-    Hide = TRUE;
-    SVLook = TRUE;
-    FixedLine FL_TRUSTCERT
-    {
-        Pos = MAP_APPFONT( TS_COL_0, TS_ROW_0 );
-        Size = MAP_APPFONT( TS_COL_8-TS_COL_0, RSC_CD_FIXEDLINE_HEIGHT );
-        Text [ en-US ] = "Trusted certificates";
-    };
-    FixedImage FI_TRUSTCERT_RO
-    {
-        Pos = MAP_APPFONT( TS_COL_1 - 7, TS_ROW_1 );
-        Size = MAP_APPFONT( 6, 6 );
-    };
-    Control LB_TRUSTCERT
-    {
-        HelpId = HID_XMLSEC_CTRL_TRUSTSOURCES;
-        Pos = MAP_APPFONT( TS_COL_1, TS_ROW_1 );
-        Size = MAP_APPFONT( TS_COL_7-TS_COL_1, RSC_CD_TABLISTBOX_HEIGHT );
-        SVLook = TRUE;
-        Border = TRUE;
-    };
-    String STR_HEADERBAR
-    {
-        Text [ en-US ] = "Issued to\tIssued by\tExpiration date";
-    };
-    PushButton PB_ADD_TRUSTCERT
-    {
-        HelpID = "xmlsecurity:PushButton:RID_XMLSECTP_TRUSTSOURCES:PB_ADD_TRUSTCERT";
-        Pos = MAP_APPFONT( TS_COL_2, TS_ROW_2 );
-        Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
-        Text [ en-US ] = "Add...";
-    };
-    PushButton PB_VIEW_TRUSTCERT
-    {
-        HelpID = "xmlsecurity:PushButton:RID_XMLSECTP_TRUSTSOURCES:PB_VIEW_TRUSTCERT";
-        Pos = MAP_APPFONT( TS_COL_4, TS_ROW_2 );
-        Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
-        Text [ en-US ] = "View...";
-    };
-    PushButton PB_REMOVE_TRUSTCERT
-    {
-        HelpID = "xmlsecurity:PushButton:RID_XMLSECTP_TRUSTSOURCES:PB_REMOVE_TRUSTCERT";
-        Pos = MAP_APPFONT( TS_COL_6, TS_ROW_2 );
-        Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
-        Text [ en-US ] = "Remove";
-    };
-    FixedLine FL_TRUSTFILELOC
-    {
-        Pos = MAP_APPFONT( TS_COL_0, TS_ROW_3 );
-        Size = MAP_APPFONT( TS_COL_8-TS_COL_0, RSC_CD_FIXEDLINE_HEIGHT );
-        Text [ en-US ] = "Trusted file locations";
-    };
-    FixedText FI_TRUSTFILELOC
-    {
-        Pos = MAP_APPFONT( TS_COL_1, TS_ROW_4 );
-        Size = MAP_APPFONT( TS_COL_7-TS_COL_1, 3*RSC_CD_FIXEDLINE_HEIGHT );
-        WordBreak = TRUE;
-        Text [ en-US ] = "Document macros are always executed if they have been opened from one of the following locations.";
-    };
-    FixedImage FI_TRUSTFILE_RO
-    {
-        Pos = MAP_APPFONT( TS_COL_1 - 7, TS_ROW_5 );
-        Size = MAP_APPFONT( 6, 6 );
-    };
-    ListBox LB_TRUSTFILELOC
-    {
-        HelpID = "xmlsecurity:ListBox:RID_XMLSECTP_TRUSTSOURCES:LB_TRUSTFILELOC";
-        Pos = MAP_APPFONT( TS_COL_1, TS_ROW_5 );
-        Size = MAP_APPFONT( TS_COL_7-TS_COL_1, TS_ROW_6-TS_ROW_5 );
-        SVLook = TRUE;
-        Border = TRUE;
-        VScroll = TRUE;
-        Sort = TRUE;
-    };
-    PushButton FL_ADD_TRUSTFILELOC
-    {
-        HelpID = "xmlsecurity:PushButton:RID_XMLSECTP_TRUSTSOURCES:FL_ADD_TRUSTFILELOC";
-        Pos = MAP_APPFONT( TS_COL_4, TS_ROW_7 );
-        Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
-        Text [ en-US ] = "Add...";
-    };
-    PushButton FL_REMOVE_TRUSTFILELOC
-    {
-        HelpID = "xmlsecurity:PushButton:RID_XMLSECTP_TRUSTSOURCES:FL_REMOVE_TRUSTFILELOC";
-        Pos = MAP_APPFONT( TS_COL_6, TS_ROW_7 );
-        Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
-        Text [ en-US ] = "Remove";
-    };
-};
 String RID_XMLSECTP_READONLY_CONFIG_TIP
 {
     Text [ en-US ] = "This setting is protected by the Administrator";
 };
+
 Image RID_XMLSECTP_LOCK
 {
     ImageBitmap = Bitmap
diff --git a/xmlsecurity/uiconfig/ui/macrosecuritydialog.ui b/xmlsecurity/uiconfig/ui/macrosecuritydialog.ui
index 7d803d0..dd48926 100644
--- a/xmlsecurity/uiconfig/ui/macrosecuritydialog.ui
+++ b/xmlsecurity/uiconfig/ui/macrosecuritydialog.ui
@@ -96,273 +96,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkBox" id="box2">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="border_width">6</property>
-                <property name="orientation">vertical</property>
-                <property name="spacing">6</property>
-                <child>
-                  <object class="GtkFrame" id="frame1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</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="left_padding">12</property>
-                        <child>
-                          <object class="GtkGrid" id="grid1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="margin_top">6</property>
-                            <property name="row_spacing">6</property>
-                            <property name="column_spacing">6</property>
-                            <child>
-                              <object class="GtkScrolledWindow" id="scrolledwindow1">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="shadow_type">in</property>
-                                <child>
-                                  <placeholder/>
-                                </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="GtkButtonBox" id="buttonbox1">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="spacing">12</property>
-                                <property name="layout_style">end</property>
-                                <child>
-                                  <object class="GtkButton" id="button5">
-                                    <property name="label" translatable="yes">~View...</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">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="button6">
-                                    <property name="label">gtk-remove</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>
-                              </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>
-                            <child>
-                              <object class="GtkGrid" id="grid2">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <child>
-                                  <object class="GtkLabel" id="label5">
-                                    <property name="width_request">150</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Issued to</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="GtkLabel" id="label6">
-                                    <property name="width_request">150</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">issued by</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>
-                                <child>
-                                  <object class="GtkLabel" id="label7">
-                                    <property name="width_request">150</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Expiration date</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">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="label3">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Trusted certificates</property>
-                      </object>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkFrame" id="frame2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label_xalign">0</property>
-                    <property name="shadow_type">none</property>
-                    <child>
-                      <object class="GtkAlignment" id="alignment2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <object class="GtkGrid" id="grid3">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="margin_top">6</property>
-                            <property name="row_spacing">12</property>
-                            <child>
-                              <object class="GtkLabel" id="label8">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">Document macros are always executed if they have been opened from one of the
-following locations.</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="GtkScrolledWindow" id="scrolledwindow2">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="shadow_type">in</property>
-                                <child>
-                                  <placeholder/>
-                                </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="GtkButtonBox" id="buttonbox2">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="spacing">12</property>
-                                <property name="layout_style">end</property>
-                                <child>
-                                  <object class="GtkButton" id="button7">
-                                    <property name="label">gtk-add</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">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkButton" id="button8">
-                                    <property name="label">gtk-remove</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>
-                              </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>
-                    <child type="label">
-                      <object class="GtkLabel" id="label4">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Trusted file locations</property>
-                      </object>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="position">1</property>
-              </packing>
+              <placeholder/>
             </child>
             <child type="tab">
               <object class="GtkLabel" id="label2">
diff --git a/xmlsecurity/uiconfig/ui/securitytrustpage.ui b/xmlsecurity/uiconfig/ui/securitytrustpage.ui
new file mode 100644
index 0000000..a750141
--- /dev/null
+++ b/xmlsecurity/uiconfig/ui/securitytrustpage.ui
@@ -0,0 +1,348 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkBox" id="SecurityTrustPage">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="orientation">vertical</property>
+    <property name="spacing">12</property>
+    <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="margin_top">6</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="row_spacing">6</property>
+                <property name="column_spacing">6</property>
+                <child>
+                  <object class="GtkButtonBox" id="buttonbox1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="spacing">12</property>
+                    <property name="layout_style">end</property>
+                    <child>
+                      <object class="GtkButton" id="viewcert">
+                        <property name="label" translatable="yes">_View...</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">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">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="removecert">
+                        <property name="label">gtk-remove</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>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</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="to">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Issued to</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="GtkLabel" id="by">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Issued by</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>
+                    <child>
+                      <object class="GtkLabel" id="date">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Expiration date</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">1</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="svxcorelo:SvxSimpleTableContainer" id="certificates">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <object class="GtkImage" id="lockcertimg">
+                    <property name="can_focus">False</property>
+                    <property name="no_show_all">True</property>
+                    <property name="pixbuf">res/lock.png</property>
+                  </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>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Trusted certificates</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">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkFrame" id="frame2">
+        <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="alignment2">
+            <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="grid3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_top">6</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="row_spacing">12</property>
+                <property name="column_spacing">6</property>
+                <child>
+                  <object class="GtkLabel" id="label8">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Document macros are always executed if they have been opened from one of the following locations.</property>
+                    <property name="wrap">True</property>
+                    <property name="max_width_chars">56</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>
+                <child>
+                  <object class="GtkButtonBox" id="buttonbox2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="spacing">12</property>
+                    <property name="layout_style">end</property>
+                    <child>
+                      <object class="GtkButton" id="addfile">
+                        <property name="label">A_dd...</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">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">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="removefile">
+                        <property name="label">gtk-remove</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>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow2">
+                    <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="locations: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="treeview-selection1"/>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkImage" id="lockfileimg">
+                    <property name="can_focus">False</property>
+                    <property name="no_show_all">True</property>
+                    <property name="pixbuf">res/lock.png</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>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label4">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Trusted file locations</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>
+  <object class="GtkSizeGroup" id="sizegroup1">
+    <widgets>
+      <widget name="viewcert"/>
+      <widget name="addfile"/>
+    </widgets>
+  </object>
+  <object class="GtkSizeGroup" id="sizegroup2">
+    <property name="mode">vertical</property>
+    <widgets>
+      <widget name="certificates"/>
+      <widget name="locations:border"/>
+    </widgets>
+  </object>
+</interface>
commit ebe10cdf9186fa6b6b1a55194d6a32ff6cbca223
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 14 16:35:32 2013 +0000

    teach radiogroup loader about custom properties
    
    Change-Id: I318d9bace6f2c6aa9c10a592cb2134ba1c0d914e

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 1f6d7d5..13251a4 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -680,7 +680,11 @@ bool VclBuilder::extractGroup(const OString &id, stringmap &rMap)
     VclBuilder::stringmap::iterator aFind = rMap.find(OString("group"));
     if (aFind != rMap.end())
     {
-        m_pParserState->m_aGroupMaps.push_back(RadioButtonGroupMap(id, aFind->second));
+        OString sID = aFind->second;
+        sal_Int32 nDelim = sID.indexOf(':');
+        if (nDelim != -1)
+            sID = sID.copy(0, nDelim);
+        m_pParserState->m_aGroupMaps.push_back(RadioButtonGroupMap(id, sID));
         rMap.erase(aFind);
         return true;
     }


More information about the Libreoffice-commits mailing list