[Libreoffice-commits] .: svtools/inc svtools/source

Sebastian Spaeth spaetz at kemper.freedesktop.org
Wed Nov 10 01:05:00 PST 2010


 svtools/inc/svtools/svtools.hrc    |    2 
 svtools/inc/svtools/svtreebx.hxx   |   48 +++++++-------
 svtools/source/contnr/svcontnr.src |   46 +------------
 svtools/source/contnr/svimpbox.cxx |   20 ++---
 svtools/source/contnr/svtreebx.cxx |  125 +++++++++++++++----------------------
 svtools/source/inc/svimpbox.hxx    |   90 ++++++++++----------------
 6 files changed, 122 insertions(+), 209 deletions(-)

New commits:
commit d367c6e100f7cbcbf5203a88289d818a61bcc385
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Tue Nov 9 20:11:15 2010 -0800

    Bitmap Tree Cleanup - libs-gui
    
    Removed all references to HIGHCONTRAST mode from svtools classes:
    	SvImpLBox
    	SvTreeListBox
    
    The reset is just fall out.

diff --git a/svtools/inc/svtools/svtools.hrc b/svtools/inc/svtools/svtools.hrc
index 5cdc75b..140cf38 100644
--- a/svtools/inc/svtools/svtools.hrc
+++ b/svtools/inc/svtools/svtools.hrc
@@ -341,8 +341,6 @@
 // images
 #define RID_IMG_TREENODE_COLLAPSED		(RID_SVTOOLS_START +  0)
 #define RID_IMG_TREENODE_EXPANDED		(RID_SVTOOLS_START +  1)
-#define RID_IMG_TREENODE_COLLAPSED_HC	(RID_SVTOOLS_START +  2)
-#define RID_IMG_TREENODE_EXPANDED_HC	(RID_SVTOOLS_START +  3)
 
 #define RID_IMG_PRINTERFONT 			(RID_SVTOOLS_START + 12)
 #define RID_IMG_BITMAPFONT				(RID_SVTOOLS_START + 13)
diff --git a/svtools/inc/svtools/svtreebx.hxx b/svtools/inc/svtools/svtreebx.hxx
index a9326c5..089d1ec 100644
--- a/svtools/inc/svtools/svtreebx.hxx
+++ b/svtools/inc/svtools/svtreebx.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -25,6 +25,7 @@
  * for a copy of the LGPLv3 License.
  *
  ************************************************************************/
+
 #ifndef _SVTREEBOX_HXX
 #define _SVTREEBOX_HXX
 
@@ -86,12 +87,12 @@ class SVT_DLLPUBLIC SvTreeListBox : public SvLBox
 #ifdef _SVTREEBX_CXX
     DECL_DLLPRIVATE_LINK( CheckButtonClick, SvLBoxButtonData * );
 
-    SVT_DLLPRIVATE short 			GetHeightOffset( const Image& rBmp, Size& rLogicSize);
-    SVT_DLLPRIVATE short 			GetHeightOffset( const Font& rFont, Size& rLogicSize);
+    SVT_DLLPRIVATE short 		GetHeightOffset( const Image& rBmp, Size& rLogicSize);
+    SVT_DLLPRIVATE short 		GetHeightOffset( const Font& rFont, Size& rLogicSize);
 
     SVT_DLLPRIVATE void			SetEntryHeight( SvLBoxEntry* pEntry );
     SVT_DLLPRIVATE void			AdjustEntryHeight( const Image& rBmp );
-    SVT_DLLPRIVATE void 			AdjustEntryHeight( const Font& rFont );
+    SVT_DLLPRIVATE void 		AdjustEntryHeight( const Font& rFont );
 
     SVT_DLLPRIVATE void			ImpEntryInserted( SvLBoxEntry* pEntry );
     SVT_DLLPRIVATE long			PaintEntry1( SvLBoxEntry*, long nLine,
@@ -99,7 +100,7 @@ class SVT_DLLPUBLIC SvTreeListBox : public SvLBox
                                 BOOL bHasClipRegion=FALSE );
 
     SVT_DLLPRIVATE void			InitTreeView( WinBits nWinStyle );
-    SVT_DLLPRIVATE SvLBoxItem*		GetItem_Impl( SvLBoxEntry*, long nX, SvLBoxTab** ppTab,
+    SVT_DLLPRIVATE SvLBoxItem*	GetItem_Impl( SvLBoxEntry*, long nX, SvLBoxTab** ppTab,
                         USHORT nEmptyWidth );
 #endif
 
@@ -182,25 +183,26 @@ public:
 
     void 			EnableCheckButton( SvLBoxButtonData* );
     void 			SetCheckButtonData( SvLBoxButtonData* );
-    void 			SetNodeBitmaps( const Image& rCollapsedNodeBmp, const Image& rExpandedNodeBmp, BmpColorMode _eMode = BMP_COLOR_NORMAL );
-    void			SetDontKnowNodeBitmap( const Image& rDontKnowBmp, BmpColorMode _eMode = BMP_COLOR_NORMAL );
+    void 			SetNodeBitmaps( const Image& rCollapsedNodeBmp, const Image& rExpandedNodeBmp );
 
     /** returns the default image which clients should use for expanded nodes, to have a consistent user
         interface experience in the whole product.
     */
-    static const Image&	GetDefaultExpandedNodeImage( BmpColorMode _eMode = BMP_COLOR_NORMAL );
+    static const Image&	GetDefaultExpandedNodeImage( );
 
     /** returns the default image which clients should use for expanded nodes, to have a consistent user
         interface experience in the whole product.
     */
-    static const Image&	GetDefaultCollapsedNodeImage( BmpColorMode _eMode = BMP_COLOR_NORMAL );
+    static const Image&	GetDefaultCollapsedNodeImage( );
 
     /** sets default bitmaps for collapsed and expanded nodes.
     */
     inline	void	SetNodeDefaultImages( )
     {
-        SetNodeBitmaps( GetDefaultCollapsedNodeImage( BMP_COLOR_NORMAL ), GetDefaultExpandedNodeImage( BMP_COLOR_NORMAL ), BMP_COLOR_NORMAL );
-        SetNodeBitmaps( GetDefaultCollapsedNodeImage( BMP_COLOR_HIGHCONTRAST ), GetDefaultExpandedNodeImage( BMP_COLOR_HIGHCONTRAST ), BMP_COLOR_HIGHCONTRAST );
+        SetNodeBitmaps(
+            GetDefaultCollapsedNodeImage( ),
+            GetDefaultExpandedNodeImage( )
+        );
     }
 
     virtual SvLBoxEntry*	InsertEntry( const XubString& rText, SvLBoxEntry* pParent = 0,
@@ -216,11 +218,11 @@ public:
                                          ULONG nPos = LIST_APPEND, void* pUserData = 0,
                                          SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
 
-    const Image&    GetDefaultExpandedEntryBmp( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
-    const Image&	GetDefaultCollapsedEntryBmp( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
+    const Image&    GetDefaultExpandedEntryBmp( ) const;
+    const Image&	GetDefaultCollapsedEntryBmp( ) const;
 
-    void			SetDefaultExpandedEntryBmp( const Image& rBmp, BmpColorMode _eMode = BMP_COLOR_NORMAL );
-    void          	SetDefaultCollapsedEntryBmp( const Image& rBmp, BmpColorMode _eMode = BMP_COLOR_NORMAL );
+    void			SetDefaultExpandedEntryBmp( const Image& rBmp );
+    void          	SetDefaultCollapsedEntryBmp( const Image& rBmp );
 
     void			SetCheckButtonState( SvLBoxEntry*, SvButtonState );
     SvButtonState 	GetCheckButtonState( SvLBoxEntry* ) const;
@@ -229,13 +231,13 @@ public:
     BOOL            IsExpandBitmapOnCursor() const 	{ return (BOOL)(aContextBmpMode & SVLISTENTRYFLAG_FOCUSED)!=0; }
 
     void			SetEntryText(SvLBoxEntry*, const XubString& );
-    void			SetExpandedEntryBmp( SvLBoxEntry* _pEntry, const Image& _rImage, BmpColorMode _eMode = BMP_COLOR_NORMAL );
-    void			SetCollapsedEntryBmp( SvLBoxEntry* _pEntry, const Image& _rImage, BmpColorMode _eMode = BMP_COLOR_NORMAL );
+    void			SetExpandedEntryBmp( SvLBoxEntry* _pEntry, const Image& _rImage );
+    void			SetCollapsedEntryBmp( SvLBoxEntry* _pEntry, const Image& _rImage );
 
     virtual	String	GetEntryText( SvLBoxEntry* pEntry ) const;
     String			SearchEntryText( SvLBoxEntry* pEntry ) const;
-    const Image&	GetExpandedEntryBmp(SvLBoxEntry* _pEntry, BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
-    const Image&	GetCollapsedEntryBmp(SvLBoxEntry* _pEntry, BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
+    const Image&	GetExpandedEntryBmp(SvLBoxEntry* _pEntry ) const;
+    const Image&	GetCollapsedEntryBmp(SvLBoxEntry* _pEntry ) const;
 
     void			SetCheckButtonHdl( const Link& rLink )	{ aCheckButtonHdl=rLink; }
     Link			GetCheckButtonHdl() const { return aCheckButtonHdl; }
@@ -305,10 +307,10 @@ public:
     virtual void	MakeVisible( SvLBoxEntry* );
     void			MakeVisible( SvLBoxEntry*, BOOL bMoveToTop );
 
-    void          	SetCollapsedNodeBmp( const Image&, BmpColorMode _eMode = BMP_COLOR_NORMAL );
-    void          	SetExpandedNodeBmp( const Image&, BmpColorMode _eMode = BMP_COLOR_NORMAL  );
-    Image          	GetCollapsedNodeBmp( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
-    Image          	GetExpandedNodeBmp( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
+    void          	SetCollapsedNodeBmp( const Image& );
+    void          	SetExpandedNodeBmp( const Image& );
+    Image          	GetCollapsedNodeBmp( ) const;
+    Image          	GetExpandedNodeBmp( ) const;
 
     void			SetFont( const Font& rFont );
 
diff --git a/svtools/source/contnr/svcontnr.src b/svtools/source/contnr/svcontnr.src
index aaf1343..82f0a75 100644
--- a/svtools/source/contnr/svcontnr.src
+++ b/svtools/source/contnr/svcontnr.src
@@ -1,7 +1,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -39,65 +39,29 @@ Image RID_IMG_TREENODE_EXPANDED
     MaskColor = Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; };
 };
 
-Image RID_IMG_TREENODE_COLLAPSED_HC
-{
-    ImageBitmap = Bitmap { File = "plus_sch.bmp"; } ;
-    MaskColor = Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; };
-};
-
-Image RID_IMG_TREENODE_EXPANDED_HC
-{
-    ImageBitmap = Bitmap { File = "minus_sch.bmp"; } ;
-    MaskColor = Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; };
-};
-
 // descriptions of accessible objects
 
 String STR_SVT_ACC_DESC_TABLISTBOX
 {
     Text [ en-US ] = "Row: %1, Column: %2";
 };
+
 String STR_SVT_ACC_DESC_FILEVIEW
 {
     Text [ en-US ] = ", Type: %1, URL: %2";
 };
+
 String STR_SVT_ACC_DESC_FOLDER
 {
     Text [ en-US ] = "Folder";
 };
+
 String STR_SVT_ACC_DESC_FILE
 {
     Text [ en-US ] = "File";
 };
+
 String STR_SVT_ACC_EMPTY_FIELD
 {
     Text [ en-US ] = "Empty Field";
 };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index a7a7bb6..8cd16df 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -56,8 +56,6 @@
 // #i27063# (pl), #i32300# (pb) never access VCL after DeInitVCL - also no destructors
 Image*	SvImpLBox::s_pDefCollapsed		= NULL;
 Image*	SvImpLBox::s_pDefExpanded		= NULL;
-Image*	SvImpLBox::s_pDefCollapsedHC	= NULL;
-Image*	SvImpLBox::s_pDefExpandedHC		= NULL;
 sal_Int32 SvImpLBox::s_nImageRefCount	= 0;
 
 SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits nWinStyle) :
@@ -140,8 +138,6 @@ SvImpLBox::~SvImpLBox()
     {
         DELETEZ(s_pDefCollapsed);
         DELETEZ(s_pDefExpanded);
-        DELETEZ(s_pDefCollapsedHC);
-        DELETEZ(s_pDefExpandedHC);
     }
 }
 
@@ -3568,24 +3564,22 @@ void SvImpLBox::implInitDefaultNodeImages()
         // assume that all or nothing is initialized
         return;
 
-    s_pDefCollapsed = new Image( SvtResId( RID_IMG_TREENODE_COLLAPSED ) );
-    s_pDefCollapsedHC = new Image( SvtResId( RID_IMG_TREENODE_COLLAPSED_HC ) );
-    s_pDefExpanded = new Image( SvtResId( RID_IMG_TREENODE_EXPANDED ) );
-    s_pDefExpandedHC = new Image( SvtResId( RID_IMG_TREENODE_EXPANDED_HC ) );
+    s_pDefCollapsed  = new Image( SvtResId( RID_IMG_TREENODE_COLLAPSED ) );
+    s_pDefExpanded   = new Image( SvtResId( RID_IMG_TREENODE_EXPANDED ) );
 }
 
 // -----------------------------------------------------------------------
-const Image& SvImpLBox::GetDefaultExpandedNodeImage( BmpColorMode _eMode )
+const Image& SvImpLBox::GetDefaultExpandedNodeImage( )
 {
     implInitDefaultNodeImages();
-    return ( BMP_COLOR_NORMAL == _eMode ) ? *s_pDefExpanded : *s_pDefExpandedHC;
+    return *s_pDefExpanded;
 }
 
 // -----------------------------------------------------------------------
-const Image& SvImpLBox::GetDefaultCollapsedNodeImage( BmpColorMode _eMode )
+const Image& SvImpLBox::GetDefaultCollapsedNodeImage( )
 {
     implInitDefaultNodeImages();
-    return ( BMP_COLOR_NORMAL == _eMode ) ? *s_pDefCollapsed : *s_pDefCollapsedHC;
+    return *s_pDefCollapsed;
 }
 
 // -----------------------------------------------------------------------
diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx
index 1b457e5..a02fd39 100644
--- a/svtools/source/contnr/svtreebx.cxx
+++ b/svtools/source/contnr/svtreebx.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -25,7 +25,6 @@
  * for a copy of the LGPLv3 License.
  *
  ************************************************************************/
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_svtools.hxx"
 
@@ -367,22 +366,22 @@ String SvTreeListBox::SearchEntryText( SvLBoxEntry* pEntry ) const
     return sRet;
 }
 
-const Image& SvTreeListBox::GetExpandedEntryBmp(SvLBoxEntry* pEntry, BmpColorMode _eMode) const
+const Image& SvTreeListBox::GetExpandedEntryBmp(SvLBoxEntry* pEntry) const
 {
     DBG_CHKTHIS(SvTreeListBox,0);
     DBG_ASSERT(pEntry,"Entry?");
     SvLBoxContextBmp* pItem = (SvLBoxContextBmp*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP));
     DBG_ASSERT(pItem,"GetContextBmp:Item not found");
-    return pItem->GetBitmap2( _eMode );
+    return pItem->GetBitmap2( );
 }
 
-const Image& SvTreeListBox::GetCollapsedEntryBmp( SvLBoxEntry* pEntry, BmpColorMode _eMode ) const
+const Image& SvTreeListBox::GetCollapsedEntryBmp( SvLBoxEntry* pEntry ) const
 {
     DBG_CHKTHIS(SvTreeListBox,0);
     DBG_ASSERT(pEntry,"Entry?");
     SvLBoxContextBmp* pItem = (SvLBoxContextBmp*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP));
     DBG_ASSERT(pItem,"GetContextBmp:Item not found");
-    return pItem->GetBitmap1( _eMode );
+    return pItem->GetBitmap1( );
 }
 
 IMPL_LINK_INLINE_START( SvTreeListBox, CheckButtonClick, SvLBoxButtonData *, pData )
@@ -394,9 +393,13 @@ IMPL_LINK_INLINE_START( SvTreeListBox, CheckButtonClick, SvLBoxButtonData *, pDa
 }
 IMPL_LINK_INLINE_END( SvTreeListBox, CheckButtonClick, SvLBoxButtonData *, pData )
 
-SvLBoxEntry* SvTreeListBox::InsertEntry( const XubString& aText,SvLBoxEntry* pParent,
-                                     BOOL bChildsOnDemand, ULONG nPos, void* pUser,
-                                     SvLBoxButtonKind eButtonKind )
+SvLBoxEntry* SvTreeListBox::InsertEntry(
+    const XubString& aText,
+    SvLBoxEntry* pParent,
+    BOOL bChildsOnDemand, ULONG nPos,
+    void* pUser,
+    SvLBoxButtonKind eButtonKind
+)
 {
     DBG_CHKTHIS(SvTreeListBox,0);
     nTreeFlags |= TREEFLAG_MANINS;
@@ -412,14 +415,6 @@ SvLBoxEntry* SvTreeListBox::InsertEntry( const XubString& aText,SvLBoxEntry* pPa
     InitEntry( pEntry, aText, rDefColBmp, rDefExpBmp, eButtonKind );
     pEntry->EnableChildsOnDemand( bChildsOnDemand );
 
-    // Add the HC versions of the default images
-    SvLBoxContextBmp* pBmpItem = static_cast< SvLBoxContextBmp* >( pEntry->GetFirstItem( SV_ITEM_ID_LBOXCONTEXTBMP ) );
-    if( pBmpItem )
-    {
-        pBmpItem->SetBitmap1( pImp->GetDefaultEntryColBmp( BMP_COLOR_HIGHCONTRAST ), BMP_COLOR_HIGHCONTRAST );
-        pBmpItem->SetBitmap2( pImp->GetDefaultEntryExpBmp( BMP_COLOR_HIGHCONTRAST ), BMP_COLOR_HIGHCONTRAST );
-    }
-
     if( !pParent )
         SvLBox::Insert( pEntry, nPos );
     else
@@ -473,13 +468,13 @@ void SvTreeListBox::SetEntryText( SvLBoxEntry* pEntry, const XubString& aStr)
     GetModel()->InvalidateEntry( pEntry );
 }
 
-void SvTreeListBox::SetExpandedEntryBmp( SvLBoxEntry* pEntry, const Image& aBmp, BmpColorMode _eMode )
+void SvTreeListBox::SetExpandedEntryBmp( SvLBoxEntry* pEntry, const Image& aBmp )
 {
     DBG_CHKTHIS(SvTreeListBox,0);
     SvLBoxContextBmp* pItem = (SvLBoxContextBmp*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP));
 
     DBG_ASSERT(pItem,"SetExpBmp:Item not found");
-    pItem->SetBitmap2( aBmp, _eMode );
+    pItem->SetBitmap2( aBmp );
 
     GetModel()->InvalidateEntry( pEntry );
     SetEntryHeight( pEntry );
@@ -492,13 +487,13 @@ void SvTreeListBox::SetExpandedEntryBmp( SvLBoxEntry* pEntry, const Image& aBmp,
     }
 }
 
-void SvTreeListBox::SetCollapsedEntryBmp(SvLBoxEntry* pEntry,const Image& aBmp, BmpColorMode _eMode )
+void SvTreeListBox::SetCollapsedEntryBmp(SvLBoxEntry* pEntry,const Image& aBmp )
 {
     DBG_CHKTHIS(SvTreeListBox,0);
     SvLBoxContextBmp* pItem = (SvLBoxContextBmp*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP));
 
     DBG_ASSERT(pItem,"SetExpBmp:Item not found");
-    pItem->SetBitmap1( aBmp, _eMode );
+    pItem->SetBitmap1( aBmp );
 
     GetModel()->InvalidateEntry( pEntry );
     SetEntryHeight( pEntry );
@@ -616,8 +611,8 @@ SvLBoxEntry* SvTreeListBox::CloneEntry( SvLBoxEntry* pSource )
     SvLBoxContextBmp* pBmpItem = (SvLBoxContextBmp*)(pSource->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP));
     if( pBmpItem )
     {
-        aCollEntryBmp = pBmpItem->GetBitmap1( BMP_COLOR_NORMAL );
-        aExpEntryBmp  = pBmpItem->GetBitmap2( BMP_COLOR_NORMAL );
+        aCollEntryBmp = pBmpItem->GetBitmap1( );
+        aExpEntryBmp  = pBmpItem->GetBitmap2( );
     }
     SvLBoxButton* pButtonItem = (SvLBoxButton*)(pSource->GetFirstItem(SV_ITEM_ID_LBOXBUTTON));
     if( pButtonItem )
@@ -628,16 +623,6 @@ SvLBoxEntry* SvTreeListBox::CloneEntry( SvLBoxEntry* pSource )
     pClone->EnableChildsOnDemand( pSource->HasChildsOnDemand() );
     pClone->SetUserData( pSource->GetUserData() );
 
-    if ( pBmpItem )
-    {
-        SvLBoxContextBmp* pCloneBitmap = static_cast< SvLBoxContextBmp* >( pClone->GetFirstItem( SV_ITEM_ID_LBOXCONTEXTBMP ) );
-        if ( pCloneBitmap )
-        {
-            pCloneBitmap->SetBitmap1( pBmpItem->GetBitmap1( BMP_COLOR_HIGHCONTRAST ), BMP_COLOR_HIGHCONTRAST );
-            pCloneBitmap->SetBitmap2( pBmpItem->GetBitmap2( BMP_COLOR_HIGHCONTRAST ), BMP_COLOR_HIGHCONTRAST );
-        }
-    }
-
     return pClone;
 }
 
@@ -659,17 +644,17 @@ void SvTreeListBox::SetIndent( short nNewIndent )
         Invalidate();
 }
 
-const Image& SvTreeListBox::GetDefaultExpandedEntryBmp( BmpColorMode _eMode ) const
+const Image& SvTreeListBox::GetDefaultExpandedEntryBmp( ) const
 {
-    return pImp->GetDefaultEntryExpBmp( _eMode );
+    return pImp->GetDefaultEntryExpBmp( );
 }
 
-const Image& SvTreeListBox::GetDefaultCollapsedEntryBmp( BmpColorMode _eMode ) const
+const Image& SvTreeListBox::GetDefaultCollapsedEntryBmp( ) const
 {
-    return pImp->GetDefaultEntryColBmp( _eMode );
+    return pImp->GetDefaultEntryColBmp( );
 }
 
-void SvTreeListBox::SetDefaultExpandedEntryBmp( const Image& aBmp, BmpColorMode _eMode )
+void SvTreeListBox::SetDefaultExpandedEntryBmp( const Image& aBmp )
 {
     DBG_CHKTHIS(SvTreeListBox,0);
     Size aSize = aBmp.GetSizePixel();
@@ -677,10 +662,10 @@ void SvTreeListBox::SetDefaultExpandedEntryBmp( const Image& aBmp, BmpColorMode
         nContextBmpWidthMax = (short)aSize.Width();
     SetTabs();
 
-    pImp->SetDefaultEntryExpBmp( aBmp, _eMode );
+    pImp->SetDefaultEntryExpBmp( aBmp );
 }
 
-void SvTreeListBox::SetDefaultCollapsedEntryBmp( const Image& aBmp, BmpColorMode _eMode )
+void SvTreeListBox::SetDefaultCollapsedEntryBmp( const Image& aBmp )
 {
     DBG_CHKTHIS(SvTreeListBox,0);
     Size aSize = aBmp.GetSizePixel();
@@ -688,7 +673,7 @@ void SvTreeListBox::SetDefaultCollapsedEntryBmp( const Image& aBmp, BmpColorMode
         nContextBmpWidthMax = (short)aSize.Width();
     SetTabs();
 
-    pImp->SetDefaultEntryColBmp( aBmp, _eMode );
+    pImp->SetDefaultEntryColBmp( aBmp );
 }
 
 void SvTreeListBox::EnableCheckButton( SvLBoxButtonData* pData )
@@ -716,29 +701,24 @@ void SvTreeListBox::SetCheckButtonData( SvLBoxButtonData* pData )
         pCheckButtonData = pData;
 }
 
-const Image& SvTreeListBox::GetDefaultExpandedNodeImage( BmpColorMode _eMode )
+const Image& SvTreeListBox::GetDefaultExpandedNodeImage( )
 {
-    return SvImpLBox::GetDefaultExpandedNodeImage( _eMode );
+    return SvImpLBox::GetDefaultExpandedNodeImage( );
 }
 
-const Image& SvTreeListBox::GetDefaultCollapsedNodeImage( BmpColorMode _eMode )
+const Image& SvTreeListBox::GetDefaultCollapsedNodeImage( )
 {
-    return SvImpLBox::GetDefaultCollapsedNodeImage( _eMode );
+    return SvImpLBox::GetDefaultCollapsedNodeImage( );
 }
 
-void SvTreeListBox::SetNodeBitmaps( const Image& rCollapsedNodeBmp, const Image& rExpandedNodeBmp, BmpColorMode _eMode )
+void SvTreeListBox::SetNodeBitmaps( const Image& rCollapsedNodeBmp, const Image& rExpandedNodeBmp )
 {
     DBG_CHKTHIS(SvTreeListBox,0);
-    SetExpandedNodeBmp( rExpandedNodeBmp, _eMode );
-    SetCollapsedNodeBmp( rCollapsedNodeBmp, _eMode );
+    SetExpandedNodeBmp( rExpandedNodeBmp );
+    SetCollapsedNodeBmp( rCollapsedNodeBmp );
     SetTabs();
 }
 
-void SvTreeListBox::SetDontKnowNodeBitmap( const Image& rDontKnowBmp, BmpColorMode _eMode )
-{
-    pImp->SetDontKnowNodeBmp( rDontKnowBmp, _eMode );
-}
-
 BOOL SvTreeListBox::EditingEntry( SvLBoxEntry*, Selection& )
 {
     DBG_CHKTHIS(SvTreeListBox,0);
@@ -1135,18 +1115,18 @@ void SvTreeListBox::ModelHasRemoved( SvListEntry* /* pEntry */ )
     pImp->EntryRemoved();
 }
 
-void SvTreeListBox::SetCollapsedNodeBmp( const Image& rBmp, BmpColorMode _eMode )
+void SvTreeListBox::SetCollapsedNodeBmp( const Image& rBmp)
 {
     DBG_CHKTHIS(SvTreeListBox,0);
     AdjustEntryHeight( rBmp );
-    pImp->SetCollapsedNodeBmp( rBmp, _eMode );
+    pImp->SetCollapsedNodeBmp( rBmp );
 }
 
-void SvTreeListBox::SetExpandedNodeBmp( const Image& rBmp, BmpColorMode _eMode )
+void SvTreeListBox::SetExpandedNodeBmp( const Image& rBmp )
 {
     DBG_CHKTHIS(SvTreeListBox,0);
     AdjustEntryHeight( rBmp );
-    pImp->SetExpandedNodeBmp( rBmp, _eMode );
+    pImp->SetExpandedNodeBmp( rBmp );
 }
 
 
@@ -1229,14 +1209,14 @@ void SvTreeListBox::SetCurEntry( SvLBoxEntry* pEntry )
     pImp->SetCurEntry( pEntry );
 }
 
-Image SvTreeListBox::GetCollapsedNodeBmp( BmpColorMode _eMode ) const
+Image SvTreeListBox::GetCollapsedNodeBmp( ) const
 {
-    return pImp->GetCollapsedNodeBmp( _eMode );
+    return pImp->GetCollapsedNodeBmp( );
 }
 
-Image SvTreeListBox::GetExpandedNodeBmp( BmpColorMode _eMode ) const
+Image SvTreeListBox::GetExpandedNodeBmp( ) const
 {
-    return pImp->GetExpandedNodeBmp( _eMode );
+    return pImp->GetExpandedNodeBmp( );
 }
 
 Point SvTreeListBox::GetEntryPosition( SvLBoxEntry* pEntry ) const
@@ -1511,7 +1491,6 @@ void SvTreeListBox::InvalidateEntry( SvLBoxEntry* pEntry )
     if( pEntry )
     {
         GetModel()->InvalidateEntry( pEntry );
-    //	pImp->InvalidateEntry( pEntry );
     }
 }
 
@@ -1768,20 +1747,17 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
                 aPos.X() += pImp->nNodeBmpTabDistance;
 
                 const Image* pImg = 0;
-                BmpColorMode eBitmapMode = BMP_COLOR_NORMAL;
-                if ( GetSettings().GetStyleSettings().GetHighContrastMode() )
-                    eBitmapMode = BMP_COLOR_HIGHCONTRAST;
 
                 if( IsExpanded(pEntry) )
-                    pImg = &pImp->GetExpandedNodeBmp( eBitmapMode );
+                    pImg = &pImp->GetExpandedNodeBmp( );
                 else
                 {
                     if( (!pEntry->HasChilds()) && pEntry->HasChildsOnDemand() &&
                         (!(pEntry->GetFlags() & SV_ENTRYFLAG_HAD_CHILDREN)) &&
                         pImp->GetDontKnowNodeBmp().GetSizePixel().Width() )
-                        pImg = &pImp->GetDontKnowNodeBmp( eBitmapMode );
+                        pImg = &pImp->GetDontKnowNodeBmp( );
                     else
-                        pImg = &pImp->GetCollapsedNodeBmp( eBitmapMode );
+                        pImg = &pImp->GetCollapsedNodeBmp( );
                 }
                 aPos.Y() += (nTempEntryHeight - pImg->GetSizePixel().Height()) / 2;
 
@@ -1803,12 +1779,14 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
                         aControlValue.setTristateVal( BUTTONVALUE_ON );//expanded node
                     else
                     {
-                        if( (!pEntry->HasChilds()) && pEntry->HasChildsOnDemand() &&
-                            (!(pEntry->GetFlags() & SV_ENTRYFLAG_HAD_CHILDREN)) &&
-                            pImp->GetDontKnowNodeBmp().GetSizePixel().Width() )
-                            aControlValue.setTristateVal( BUTTONVALUE_DONTKNOW );//dont know
+                        if( (!pEntry->HasChilds() )                              &&
+                              pEntry->HasChildsOnDemand()                        &&
+                             (!(pEntry->GetFlags() & SV_ENTRYFLAG_HAD_CHILDREN)) &&
+                            pImp->GetDontKnowNodeBmp().GetSizePixel().Width()
+                        )
+                            aControlValue.setTristateVal( BUTTONVALUE_DONTKNOW ); //dont know
                         else
-                            aControlValue.setTristateVal( BUTTONVALUE_OFF );//collapsed node
+                            aControlValue.setTristateVal( BUTTONVALUE_OFF ); //collapsed node
                     }
 
                     bNativeOK = DrawNativeControl( CTRL_LISTNODE, PART_ENTIRE_CONTROL,
@@ -1816,7 +1794,6 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
                 }
 
                 if( !bNativeOK) {
-                //non native
                     DrawImage( aPos, *pImg ,nStyle);
                 }
             }
diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx
index 160f846..39aea25 100644
--- a/svtools/source/inc/svimpbox.hxx
+++ b/svtools/source/inc/svimpbox.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -62,7 +62,7 @@ public:
     void 		CreateAnchor();
     void		DestroyAnchor();
     BOOL 		SetCursorAtPoint( const Point& rPoint,
-                    BOOL bDontSelectAtCursor=FALSE );
+    BOOL        bDontSelectAtCursor=FALSE );
     BOOL 		IsSelectionAtPoint( const Point& rPoint );
     void 		DeselectAtPoint( const Point& rPoint );
     void 		DeselectAll();
@@ -111,8 +111,6 @@ private:
 
     static Image*		s_pDefCollapsed;
     static Image*		s_pDefExpanded;
-    static Image*		s_pDefCollapsedHC;
-    static Image*		s_pDefExpandedHC;
     static oslInterlockedCount	s_nImageRefCount; /// When 0 all static images will be destroyed
 
     // Node Bitmaps
@@ -129,8 +127,6 @@ private:
 
     // all our images
     Image				m_aNodeAndEntryImages[ IT_IMAGE_COUNT ];
-    // plus the high contrast versions
-    Image				m_aNodeAndEntryImages_HC[ IT_IMAGE_COUNT ];
 
     // wg. kompat. hier
     Size    			aOutputSize;
@@ -315,24 +311,22 @@ public:
     void 				PaintDDCursor( SvLBoxEntry* );
 
     // Images
-    inline Image&		implGetImageLocation( const ImageType _eType, BmpColorMode _eMode );
-    inline Image&		implGetImageLocationWithFallback( const ImageType _eType, BmpColorMode _eMode ) const;
+    inline Image&		implGetImageLocation( const ImageType _eType );
 
-    inline void 		SetExpandedNodeBmp( const Image& _rImg, BmpColorMode _eMode = BMP_COLOR_NORMAL );
-    inline void 		SetCollapsedNodeBmp( const Image& _rImg, BmpColorMode _eMode = BMP_COLOR_NORMAL  );
-    inline void 		SetDontKnowNodeBmp( const Image& rImg, BmpColorMode _eMode = BMP_COLOR_NORMAL );
+    inline void 		SetExpandedNodeBmp(  const Image& _rImg );
+    inline void 		SetCollapsedNodeBmp( const Image& _rImg );
 
-    inline const Image& GetExpandedNodeBmp( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
-    inline const Image& GetCollapsedNodeBmp( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
-    inline const Image&	GetDontKnowNodeBmp( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
+    inline const Image& GetExpandedNodeBmp( );
+    inline const Image& GetCollapsedNodeBmp( );
+    inline const Image&	GetDontKnowNodeBmp( );
 
-    inline void			SetDefaultEntryExpBmp( const Image& _rImg, BmpColorMode _eMode = BMP_COLOR_NORMAL );
-    inline void			SetDefaultEntryColBmp( const Image& _rImg, BmpColorMode _eMode = BMP_COLOR_NORMAL );
-    inline const Image&	GetDefaultEntryExpBmp( BmpColorMode _eMode = BMP_COLOR_NORMAL );
-    inline const Image&	GetDefaultEntryColBmp( BmpColorMode _eMode = BMP_COLOR_NORMAL );
+    inline void			SetDefaultEntryExpBmp( const Image& _rImg );
+    inline void			SetDefaultEntryColBmp( const Image& _rImg );
+    inline const Image&	GetDefaultEntryExpBmp( );
+    inline const Image&	GetDefaultEntryColBmp( );
 
-    static const Image&	GetDefaultExpandedNodeImage( BmpColorMode _eMode = BMP_COLOR_NORMAL );
-    static const Image&	GetDefaultCollapsedNodeImage( BmpColorMode _eMode = BMP_COLOR_NORMAL );
+    static const Image&	GetDefaultExpandedNodeImage( );
+    static const Image&	GetDefaultCollapsedNodeImage( );
 
     const Size& 		GetOutputSize() const { return aOutputSize;}
     void 				KeyUp( BOOL bPageUp, BOOL bNotifyScroll = TRUE );
@@ -371,76 +365,60 @@ public:
     bool				IsSelectable( const SvLBoxEntry* pEntry );
 };
 
-inline Image& SvImpLBox::implGetImageLocation( const ImageType _eType, BmpColorMode _eMode )
+inline Image& SvImpLBox::implGetImageLocation( const ImageType _eType )
 {
-    DBG_ASSERT( ( BMP_COLOR_HIGHCONTRAST == _eMode ) || ( BMP_COLOR_NORMAL == _eMode ),
-        "SvImpLBox::implGetImageLocation: invalid mode!" );
     DBG_ASSERT( ( _eType >= 0 ) && ( _eType < IT_IMAGE_COUNT ),
         "SvImpLBox::implGetImageLocation: invalid image index (will crash)!" );
 
-    Image* _pSet = ( BMP_COLOR_HIGHCONTRAST == _eMode ) ? m_aNodeAndEntryImages_HC : m_aNodeAndEntryImages;
+    Image* _pSet = m_aNodeAndEntryImages;
     return *( _pSet + (sal_Int32)_eType );
 }
 
-inline Image& SvImpLBox::implGetImageLocationWithFallback( const ImageType _eType, BmpColorMode _eMode ) const
-{
-    Image& rImage = const_cast< SvImpLBox* >( this )->implGetImageLocation( _eType, _eMode );
-    if ( !rImage )
-        // fallback to normal images in case the one for the special mode has not been set
-        rImage = const_cast< SvImpLBox* >( this )->implGetImageLocation( _eType, BMP_COLOR_NORMAL );
-    return rImage;
-}
-
-inline void SvImpLBox::SetDontKnowNodeBmp( const Image& rImg, BmpColorMode _eMode )
-{
-    implGetImageLocation( itNodeDontKnow, _eMode ) = rImg;
-}
-
-inline void SvImpLBox::SetExpandedNodeBmp( const Image& rImg, BmpColorMode _eMode )
+inline void SvImpLBox::SetExpandedNodeBmp( const Image& rImg )
 {
-    implGetImageLocation( itNodeExpanded, _eMode ) = rImg;
+    implGetImageLocation( itNodeExpanded ) = rImg;
     SetNodeBmpYOffset( rImg );
 }
 
-inline void SvImpLBox::SetCollapsedNodeBmp( const Image& rImg, BmpColorMode _eMode )
+inline void SvImpLBox::SetCollapsedNodeBmp( const Image& rImg )
 {
-    implGetImageLocation( itNodeCollapsed, _eMode ) = rImg;
+    implGetImageLocation( itNodeCollapsed ) = rImg;
     SetNodeBmpYOffset( rImg );
 }
 
-inline const Image&	SvImpLBox::GetDontKnowNodeBmp( BmpColorMode _eMode ) const
+inline const Image&	SvImpLBox::GetDontKnowNodeBmp( )
 {
-    return implGetImageLocationWithFallback( itNodeDontKnow, _eMode );
+    return implGetImageLocation( itNodeDontKnow );
 }
 
-inline const Image& SvImpLBox::GetExpandedNodeBmp( BmpColorMode _eMode ) const
+inline const Image& SvImpLBox::GetExpandedNodeBmp( )
 {
-    return implGetImageLocationWithFallback( itNodeExpanded, _eMode );
+    return implGetImageLocation( itNodeExpanded );
 }
 
-inline const Image& SvImpLBox::GetCollapsedNodeBmp( BmpColorMode _eMode ) const
+inline const Image& SvImpLBox::GetCollapsedNodeBmp( )
 {
-    return implGetImageLocationWithFallback( itNodeCollapsed, _eMode );
+    return implGetImageLocation( itNodeCollapsed );
 }
 
-inline void SvImpLBox::SetDefaultEntryExpBmp( const Image& _rImg, BmpColorMode _eMode )
+inline void SvImpLBox::SetDefaultEntryExpBmp( const Image& _rImg )
 {
-    implGetImageLocation( itEntryDefExpanded, _eMode ) = _rImg;
+    implGetImageLocation( itEntryDefExpanded ) = _rImg;
 }
 
-inline void SvImpLBox::SetDefaultEntryColBmp( const Image& _rImg, BmpColorMode _eMode )
+inline void SvImpLBox::SetDefaultEntryColBmp( const Image& _rImg )
 {
-    implGetImageLocation( itEntryDefCollapsed, _eMode ) = _rImg;
+    implGetImageLocation( itEntryDefCollapsed ) = _rImg;
 }
 
-inline const Image&	SvImpLBox::GetDefaultEntryExpBmp( BmpColorMode _eMode )
+inline const Image&	SvImpLBox::GetDefaultEntryExpBmp( )
 {
-    return implGetImageLocationWithFallback( itEntryDefExpanded, _eMode );
+    return implGetImageLocation( itEntryDefExpanded );
 }
 
-inline const Image&	SvImpLBox::GetDefaultEntryColBmp( BmpColorMode _eMode )
+inline const Image&	SvImpLBox::GetDefaultEntryColBmp( )
 {
-    return implGetImageLocationWithFallback( itEntryDefCollapsed, _eMode );
+    return implGetImageLocation( itEntryDefCollapsed );
 }
 
 inline Point SvImpLBox::GetEntryPosition( SvLBoxEntry* pEntry ) const


More information about the Libreoffice-commits mailing list