[Libreoffice-commits] core.git: cui/source

Jacobo Aragunde Pérez jaragunde at igalia.com
Wed Oct 16 03:22:48 PDT 2013


 cui/source/options/optfltr.cxx |   12 ++++++++++--
 cui/source/options/optfltr.hxx |    2 ++
 2 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 09edaa05cd605372ac2d2da0e010fde79f56efc8
Author: Jacobo Aragunde Pérez <jaragunde at igalia.com>
Date:   Tue Oct 1 14:11:59 2013 +0200

    cui: allow lines in MS filter section to have independently enabled checkboxes
    
    An extra InsertEntry method is added with parameters to enable or disable the
    load and save checkboxes independently.
    
    Change-Id: I49233ce31e2eaf361310f89887dcede86dec0edc
    Reviewed-on: https://gerrit.libreoffice.org/6137
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index dc5440e..d6ec297 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -278,15 +278,23 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet& )
 
 void OfaMSFilterTabPage2::InsertEntry( const OUString& _rTxt, sal_IntPtr _nType )
 {
+    InsertEntry( _rTxt, _nType, true, true );
+}
+
+void OfaMSFilterTabPage2::InsertEntry( const OUString& _rTxt, sal_IntPtr _nType,
+                                       sal_Bool loadEnabled, sal_Bool saveEnabled )
+{
     SvTreeListEntry* pEntry = new SvTreeListEntry;
 
     if( !pCheckButtonData )
         pCheckButtonData = new SvLBoxButtonData( m_pCheckLB );
 
     pEntry->AddItem( new SvLBoxContextBmp( pEntry, 0, Image(), Image(), 0));
-    pEntry->AddItem( new SvLBoxButton( pEntry, SvLBoxButtonKind_enabledCheckbox,
+    pEntry->AddItem( new SvLBoxButton( pEntry, loadEnabled? SvLBoxButtonKind_enabledCheckbox :
+                                                            SvLBoxButtonKind_disabledCheckbox,
                                        0, pCheckButtonData ) );
-    pEntry->AddItem( new SvLBoxButton( pEntry, SvLBoxButtonKind_enabledCheckbox,
+    pEntry->AddItem( new SvLBoxButton( pEntry, saveEnabled? SvLBoxButtonKind_enabledCheckbox :
+                                                            SvLBoxButtonKind_disabledCheckbox,
                                        0, pCheckButtonData ) );
     pEntry->AddItem( new SvLBoxString( pEntry, 0, _rTxt ) );
 
diff --git a/cui/source/options/optfltr.hxx b/cui/source/options/optfltr.hxx
index 5d2bc06..a81d5c6 100644
--- a/cui/source/options/optfltr.hxx
+++ b/cui/source/options/optfltr.hxx
@@ -86,6 +86,8 @@ class OfaMSFilterTabPage2 : public SfxTabPage
     virtual ~OfaMSFilterTabPage2();
 
     void                InsertEntry( const OUString& _rTxt, sal_IntPtr _nType );
+    void                InsertEntry( const OUString& _rTxt, sal_IntPtr _nType,
+                                     sal_Bool loadEnabled, sal_Bool saveEnabled );
     SvTreeListEntry*    GetEntry4Type( sal_IntPtr _nType ) const;
 
 public:


More information about the Libreoffice-commits mailing list