diff options
-rw-r--r-- | cui/source/customize/cfg.cxx | 3 | ||||
-rw-r--r-- | include/svtools/svlbitm.hxx | 2 | ||||
-rw-r--r-- | include/svtools/treelistbox.hxx | 1 | ||||
-rw-r--r-- | svtools/source/contnr/svlbitm.cxx | 11 | ||||
-rw-r--r-- | svtools/source/contnr/treelistbox.cxx | 11 |
5 files changed, 26 insertions, 2 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 5566dcea43de..b2386ceb8e1b 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -4606,6 +4606,9 @@ IMPL_LINK( SvxToolbarConfigPage, SelectToolbar, ListBox *, pBox ) SvTreeListEntry* pNewLBEntry = InsertEntryIntoUI( pEntry ); + if(pEntry->IsSeparator()) + aContentsListBox->SetCheckButtonInvisible( pNewLBEntry ); + if (pEntry->IsBinding()) { aContentsListBox->SetCheckButtonState( pNewLBEntry, diff --git a/include/svtools/svlbitm.hxx b/include/svtools/svlbitm.hxx index 14784835fa6b..78a1da0bb4a6 100644 --- a/include/svtools/svlbitm.hxx +++ b/include/svtools/svlbitm.hxx @@ -133,6 +133,7 @@ public: class SVT_DLLPUBLIC SvLBoxButton : public SvLBoxItem { + bool isVis; SvLBoxButtonData* pData; SvLBoxButtonKind eKind; sal_uInt16 nItemFlags; @@ -166,6 +167,7 @@ public: void SetStateUnchecked(); void SetStateTristate(); void SetStateHilighted( sal_Bool bHilight ); + void SetStateInvisible(); SvLBoxButtonKind GetKind() const { return eKind; } diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx index 9c06c58e4b67..4c09d74dcdea 100644 --- a/include/svtools/treelistbox.hxx +++ b/include/svtools/treelistbox.hxx @@ -629,6 +629,7 @@ public: void SetDefaultCollapsedEntryBmp( const Image& rBmp ); void SetCheckButtonState( SvTreeListEntry*, SvButtonState ); + void SetCheckButtonInvisible( SvTreeListEntry* ); SvButtonState GetCheckButtonState( SvTreeListEntry* ) const; void SetEntryText(SvTreeListEntry*, const XubString& ); diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx index bc349048c75e..ca3b3423659d 100644 --- a/svtools/source/contnr/svlbitm.cxx +++ b/svtools/source/contnr/svlbitm.cxx @@ -318,6 +318,7 @@ SvLBoxButton::SvLBoxButton( SvTreeListEntry* pEntry, SvLBoxButtonKind eTheKind, nItemFlags = 0; SetStateUnchecked(); pData = pBData; + isVis = true; } SvLBoxButton::SvLBoxButton() : SvLBoxItem() @@ -389,11 +390,12 @@ void SvLBoxButton::Paint( else if ( IsStateTristate() ) aControlValue.setTristateVal( BUTTONVALUE_MIXED ); - bNativeOK = rDev.DrawNativeControl( eCtrlType, PART_ENTIRE_CONTROL, + if( isVis) + bNativeOK = rDev.DrawNativeControl( eCtrlType, PART_ENTIRE_CONTROL, aCtrlRegion, nState, aControlValue, OUString() ); } - if( !bNativeOK) + if( !bNativeOK && isVis ) rDev.DrawImage( rPos, pData->aBmps[nIndex + nBaseOffs] ,nStyle); } @@ -459,6 +461,11 @@ bool SvLBoxButton::CheckModification() const return eKind == SvLBoxButtonKind_enabledCheckbox; } +void SvLBoxButton::SetStateInvisible() +{ + isVis = false; +} + // *************************************************************** // class SvLBoxContextBmp // *************************************************************** diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 1d4611df7d67..10c3c6588933 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -2012,6 +2012,17 @@ void SvTreeListBox::SetCheckButtonState( SvTreeListEntry* pEntry, SvButtonState } } +void SvTreeListBox::SetCheckButtonInvisible( SvTreeListEntry* pEntry) +{ + DBG_CHKTHIS(SvTreeListBox,0); + if( nTreeFlags & TREEFLAG_CHKBTN ) + { + SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON)); + pItem->SetStateInvisible(); + InvalidateEntry( pEntry ); + } +} + SvButtonState SvTreeListBox::GetCheckButtonState( SvTreeListEntry* pEntry ) const { DBG_CHKTHIS(SvTreeListBox,0); |