summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorJacobo Aragunde PĂ©rez <jaragunde@igalia.com>2013-10-01 14:11:59 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-10-16 10:22:30 +0000
commit09edaa05cd605372ac2d2da0e010fde79f56efc8 (patch)
tree21c417c83d9e7dd39227ccd2b08a2e3319bdfe62 /cui
parent764432e36a19f8fd45538f5506f043a624ce2f5c (diff)
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@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optfltr.cxx12
-rw-r--r--cui/source/options/optfltr.hxx2
2 files changed, 12 insertions, 2 deletions
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index dc5440e79ac4..d6ec2973974b 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 5d2bc064f841..a81d5c698378 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: