diff options
author | Stephan Bergmann <sb@openoffice.org> | 2002-07-03 14:59:32 +0000 |
---|---|---|
committer | Stephan Bergmann <sb@openoffice.org> | 2002-07-03 14:59:32 +0000 |
commit | df378db6cec70ed423e3ae6eca93688c5ece7809 (patch) | |
tree | c9929646f86d103d1522979308463ade90c609a0 /basctl/source/basicide/moduldl2.cxx | |
parent | 8f3bc6cb9c61b6e51488a0535b2d0065697ea62b (diff) |
#99748# #99750# #99752# #99753# Merged in 1.32.6.2.
Diffstat (limited to 'basctl/source/basicide/moduldl2.cxx')
-rw-r--r-- | basctl/source/basicide/moduldl2.cxx | 56 |
1 files changed, 15 insertions, 41 deletions
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index f80c2e73b209..f51b2e3e763d 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: moduldl2.cxx,v $ * - * $Revision: 1.34 $ + * $Revision: 1.35 $ * - * last change: $Author: tbe $ $Date: 2002-04-25 14:56:47 $ + * last change: $Author: sb $ $Date: 2002-07-03 15:59:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -239,15 +239,7 @@ void __EXPORT BasicCheckBox::CheckButtonHdl() void BasicCheckBox::Init() { - BasicCheckBoxBitmaps theBmps; - - pCheckButton = new SvLBoxButtonData; - pCheckButton->aBmps[SV_BMP_UNCHECKED] = theBmps.GetUncheckedBmp(); - pCheckButton->aBmps[SV_BMP_CHECKED] = theBmps.GetCheckedBmp(); - pCheckButton->aBmps[SV_BMP_HICHECKED] = theBmps.GetHiCheckedBmp(); - pCheckButton->aBmps[SV_BMP_HIUNCHECKED] = theBmps.GetHiUncheckedBmp(); - pCheckButton->aBmps[SV_BMP_TRISTATE] = theBmps.GetTriStateBmp(); - pCheckButton->aBmps[SV_BMP_HITRISTATE] = theBmps.GetHiTriStateBmp(); + pCheckButton = new SvLBoxButtonData(this); if ( nMode == LIBMODE_CHOOSER ) EnableCheckButton( pCheckButton ); @@ -476,21 +468,6 @@ BOOL __EXPORT BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNe } //---------------------------------------------------------------------------- - -BasicCheckBoxBitmaps::BasicCheckBoxBitmaps() : - Resource ( ResId( RID_RES_CHECKBITMAPS ) ), - aUncheckedBmp ( ResId( CHKBTN_UNCHECKED ) ), - aCheckedBmp ( ResId( CHKBTN_CHECKED ) ), - aHiCheckedBmp ( ResId( CHKBTN_HICHECKED ) ), - aHiUncheckedBmp ( ResId( CHKBTN_HIUNCHECKED ) ), - aTriStateBmp ( ResId( CHKBTN_TRISTATE ) ), - aHiTriStateBmp ( ResId( CHKBTN_HITRISTATE ) ) -{ - FreeResource(); -} - - -//---------------------------------------------------------------------------- // NewObjectDialog //---------------------------------------------------------------------------- @@ -1434,17 +1411,21 @@ SvLBoxEntry* LibPage::ImpInsertLibEntry( const String& rLibName, ULONG nPos ) } } - if ( bProtected ) - { - Image aImg = Image( IDEResId( RID_IMG_LOCKED ) ); - Size aSz = aImg.GetSizePixel(); - aLibBox.SetDefaultExpandedEntryBmp( aImg ); - aLibBox.SetDefaultCollapsedEntryBmp( aImg ); - } - SvLBoxEntry* pNewEntry = aLibBox.InsertEntry( rLibName, nPos ); pNewEntry->SetUserData( new BasicLibUserData( pShell ) ); + if (bProtected) + { + Image aImage(IDEResId(RID_IMG_LOCKED)); + aLibBox.SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); + aLibBox.SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); + aImage = Image(IDEResId(RID_IMG_LOCKED_HC)); + aLibBox.SetExpandedEntryBmp(pNewEntry, aImage, + BMP_COLOR_HIGHCONTRAST); + aLibBox.SetCollapsedEntryBmp(pNewEntry, aImage, + BMP_COLOR_HIGHCONTRAST); + } + // check, if library is link if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryLink( aOULibName ) ) { @@ -1475,13 +1456,6 @@ SvLBoxEntry* LibPage::ImpInsertLibEntry( const String& rLibName, ULONG nPos ) //aLibBox.CheckEntryPos( nLib, pBasicManager->IsLibLoaded( nLib ) ); - if ( bProtected ) - { - Image aImg; // Default zuruecksetzen - aLibBox.SetDefaultExpandedEntryBmp( aImg ); - aLibBox.SetDefaultCollapsedEntryBmp( aImg ); - } - return pNewEntry; } |