Bitmap Tree Cleanup - libs-core

Removed all references to HIGHCONTRAST mode from svtools classes:
	SvImpLBox
	SvTreeListBox

The reset is just fall out.
This commit is contained in:
Joseph Powers
2010-11-09 20:10:02 -08:00
committed by Sebastian Spaeth
parent 3f9a1181bd
commit dd68b67a4d
7 changed files with 17 additions and 51 deletions

View File

@@ -68,8 +68,6 @@
#define BMP_STR_OPEN 2
#define BMP_STR_END 3
#define BMP_STR_ERROR 4
#define BMP_STR_CLOSE_H 11
#define BMP_STR_OPEN_H 12
#define BMP_STR_END_H 13
#define BMP_STR_ERROR_H 14

View File

@@ -111,21 +111,11 @@ TabPage RID_FORMULATAB_STRUCT
ImageBitmap = Bitmap { File = "fapclose.bmp"; };
MaskColor = STD_MASKCOLOR;
};
Image BMP_STR_CLOSE_H
{
ImageBitmap = Bitmap { File = "fapclose_h.bmp"; };
MaskColor = STD_MASKCOLOR;
};
Image BMP_STR_OPEN
{
ImageBitmap = Bitmap { File = "fapopen.bmp"; };
MaskColor = STD_MASKCOLOR;
};
Image BMP_STR_OPEN_H
{
ImageBitmap = Bitmap { File = "fapopen_h.bmp"; };
MaskColor = STD_MASKCOLOR;
};
Image BMP_STR_END
{
ImageBitmap = Bitmap { File = "fapok.bmp"; };

View File

@@ -117,10 +117,8 @@ StructPage::StructPage(Window* pParent):
WB_HASBUTTONS|WB_HSCROLL|WB_NOINITIALSELECTION);
aTlbStruct.SetNodeDefaultImages();
aTlbStruct.SetDefaultExpandedEntryBmp( Image( ModuleRes( BMP_STR_OPEN ) ) );
aTlbStruct.SetDefaultExpandedEntryBmp( Image( ModuleRes( BMP_STR_OPEN ) ) );
aTlbStruct.SetDefaultCollapsedEntryBmp( Image( ModuleRes( BMP_STR_CLOSE ) ) );
aTlbStruct.SetDefaultExpandedEntryBmp( Image( ModuleRes( BMP_STR_OPEN_H ) ), BMP_COLOR_HIGHCONTRAST );
aTlbStruct.SetDefaultCollapsedEntryBmp( Image( ModuleRes( BMP_STR_CLOSE_H ) ), BMP_COLOR_HIGHCONTRAST );
FreeResource();

View File

@@ -1323,39 +1323,37 @@ USHORT SfxOrganizeListBox_Impl::GetLevelCount_Impl(SvLBoxEntry* pParent) const
//-------------------------------------------------------------------------
SvLBoxEntry* SfxOrganizeListBox_Impl::InsertEntryByBmpType( const XubString& rText, BMPTYPE eBmpType,
SvLBoxEntry* pParent, BOOL bChildsOnDemand, ULONG nPos, void* pUserData )
SvLBoxEntry* SfxOrganizeListBox_Impl::InsertEntryByBmpType(
const XubString& rText,
BMPTYPE eBmpType,
SvLBoxEntry* pParent,
BOOL bChildsOnDemand,
ULONG nPos,
void* pUserData
)
{
SvLBoxEntry* pEntry = NULL;
const Image* pExp = NULL;
const Image* pCol = NULL;
const Image* pExpHC = NULL;
const Image* pColHC = NULL;
switch( eBmpType )
{
case BMPTYPE_FOLDER:
pExp = &aOpenedFolderBmp;
pCol = &aClosedFolderBmp;
pExpHC = &aOpenedFolderBmpHC;
pColHC = &aClosedFolderBmpHC;
break;
default:
DBG_ERROR( "SfxOrganizeListBox_Impl::InsertEntryByBmpType(): something forgotten?!" );
case BMPTYPE_DOC:
pExp = &aOpenedDocBmp;
pCol = &aClosedDocBmp;
pExpHC = &aOpenedDocBmpHC;
pColHC = &aClosedDocBmpHC;
break;
default:
DBG_ERROR( "SfxOrganizeListBox_Impl::InsertEntryByBmpType(): something forgotten?!" );
}
pEntry = SvTreeListBox::InsertEntry( rText, *pExp, *pCol, pParent, bChildsOnDemand, nPos, pUserData );
SetExpandedEntryBmp( pEntry, *pExpHC, BMP_COLOR_HIGHCONTRAST );
SetCollapsedEntryBmp( pEntry, *pColHC, BMP_COLOR_HIGHCONTRAST );
return pEntry;
}

View File

@@ -1092,8 +1092,6 @@ RecoveryDialog::RecoveryDialog(Window* pParent,
sName += impl_getStatusString( rInfo );
SvLBoxEntry* pEntry = m_aFileListLB.InsertEntry(sName, rInfo.StandardImage, rInfo.StandardImage);
pEntry->SetUserData((void*)&rInfo);
m_aFileListLB.SetExpandedEntryBmp (pEntry, rInfo.HCImage, BMP_COLOR_HIGHCONTRAST);
m_aFileListLB.SetCollapsedEntryBmp(pEntry, rInfo.HCImage, BMP_COLOR_HIGHCONTRAST);
}
// mark first item

View File

@@ -1163,8 +1163,7 @@ FmFilterNavigator::FmFilterNavigator( Window* pParent )
ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) );
SetNodeBitmaps(
aNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE ),
aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE ),
BMP_COLOR_NORMAL
aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE )
);
}
@@ -1565,12 +1564,7 @@ void FmFilterNavigator::Insert(FmFilterData* pItem, sal_Int32 nPos)
// insert the item
SvLBoxEntry* pParentEntry = FindEntry( pParent );
SvLBoxEntry* pNewEntry = InsertEntry(pItem->GetText(), pItem->GetImage(), pItem->GetImage(), pParentEntry, sal_False, nPos, pItem );
if ( pNewEntry )
{
SetExpandedEntryBmp( pNewEntry, pItem->GetImage( BMP_COLOR_HIGHCONTRAST ), BMP_COLOR_HIGHCONTRAST );
SetCollapsedEntryBmp( pNewEntry, pItem->GetImage( BMP_COLOR_HIGHCONTRAST ), BMP_COLOR_HIGHCONTRAST );
}
InsertEntry( pItem->GetText(), pItem->GetImage(), pItem->GetImage(), pParentEntry, sal_False, nPos, pItem );
if ( pParentEntry )
Expand( pParentEntry );
}

View File

@@ -207,8 +207,7 @@ namespace svxform
SetNodeBitmaps(
m_aNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE ),
m_aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE ),
BMP_COLOR_NORMAL
m_aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE )
);
SetDragDropMode(0xFFFF);
@@ -662,11 +661,8 @@ namespace svxform
SvLBoxEntry* pEntry = FindEntry( pData );
if (pEntry)
{ // das Image neu setzen
SetCollapsedEntryBmp( pEntry, pData->GetNormalImage(), BMP_COLOR_NORMAL );
SetExpandedEntryBmp( pEntry, pData->GetNormalImage(), BMP_COLOR_NORMAL );
SetCollapsedEntryBmp( pEntry, pData->GetHCImage(), BMP_COLOR_HIGHCONTRAST );
SetExpandedEntryBmp( pEntry, pData->GetHCImage(), BMP_COLOR_HIGHCONTRAST );
SetCollapsedEntryBmp( pEntry, pData->GetNormalImage() );
SetExpandedEntryBmp( pEntry, pData->GetNormalImage() );
}
}
@@ -720,12 +716,6 @@ namespace svxform
pEntryData->GetNormalImage(), pEntryData->GetNormalImage(),
pParentEntry, sal_False, nRelPos, pEntryData );
if ( pNewEntry )
{
SetExpandedEntryBmp( pNewEntry, pEntryData->GetHCImage(), BMP_COLOR_HIGHCONTRAST );
SetCollapsedEntryBmp( pNewEntry, pEntryData->GetHCImage(), BMP_COLOR_HIGHCONTRAST );
}
//////////////////////////////////////////////////////////////////////
// Wenn Root-Eintrag Root expandieren
if( !pParentEntry )