1 --- svx/source/tbxctrls/tbcontrl.cxx
2 +++ svx/source/tbxctrls/tbcontrl.cxx
4 #define WB_NO_DIRECTSELECT ((WinBits)0x04000000)
9 +#define PALETTE_SIZE (PALETTE_X * PALETTE_Y)
11 SvxColorWindow_Impl::SvxColorWindow_Impl( USHORT nId, USHORT nSlotId,
12 const String& rWndTitle,
13 SfxBindings& rBindings ) :
15 SfxObjectShell* pDocSh = SfxObjectShell::Current();
16 const SfxPoolItem* pItem = NULL;
17 XColorTable* pColorTable = NULL;
18 - const Size aSize12( 12, 12 );
19 + const Size aSize12( 13, 13 );
22 if ( 0 != ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) )
24 Color aColWhite( COL_WHITE );
25 String aStrWhite( SVX_RES(RID_SVXITEMS_COLOR_WHITE) );
28 - // bei mehr als 80 Farben ScrollBar anzeigen
29 + if ( nCount > PALETTE_SIZE )
30 + // bei mehr als Max Farben ScrollBar anzeigen
31 aColorSet.SetStyle( aColorSet.GetStyle() | WB_VSCROLL );
33 for ( i = 0; i < nCount; i++ )
34 @@ -1061,17 +1065,17 @@
35 aColorSet.InsertItem( i+1, pEntry->GetColor(), pEntry->GetName() );
39 + while ( i < PALETTE_SIZE )
41 - // bei weniger als 80 Farben, mit Weiss auff"ullen
42 + // bei weniger als Max Farben, mit Weiss auff"ullen
43 aColorSet.InsertItem( i+1, aColWhite, aStrWhite );
48 aColorSet.SetSelectHdl( LINK( this, SvxColorWindow_Impl, SelectHdl ) );
49 - aColorSet.SetColCount( 8 );
50 - aColorSet.SetLineCount( 10 );
51 + aColorSet.SetColCount( PALETTE_X );
52 + aColorSet.SetLineCount( PALETTE_Y );
54 lcl_CalcSizeValueSet( *this, aColorSet, aSize12 );
58 // ScrollBar an oder aus
59 WinBits nBits = aColorSet.GetStyle();
61 + if ( nCount > PALETTE_SIZE )
66 aColorSet.SetItemText ( i + 1, pEntry->GetName() );
70 + while ( i < PALETTE_SIZE )
72 aColorSet.SetItemColor( i + 1, aColWhite );
73 aColorSet.SetItemText ( i + 1, aStrWhite );