]>
Commit | Line | Data |
---|---|---|
f6bd72df | 1 | --- svx/source/tbxctrls/tbcontrl.cxx |
2 | +++ svx/source/tbxctrls/tbcontrl.cxx | |
3 | @@ -1008,6 +1008,10 @@ | |
4 | #define WB_NO_DIRECTSELECT ((WinBits)0x04000000) | |
5 | #endif | |
6 | ||
7 | +#define PALETTE_X 10 | |
8 | +#define PALETTE_Y 10 | |
9 | +#define PALETTE_SIZE (PALETTE_X * PALETTE_Y) | |
10 | + | |
11 | SvxColorWindow_Impl::SvxColorWindow_Impl( USHORT nId, USHORT nSlotId, | |
12 | const String& rWndTitle, | |
13 | SfxBindings& rBindings ) : | |
14 | @@ -1021,7 +1025,7 @@ | |
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 ); | |
20 | ||
21 | if ( pDocSh ) | |
22 | if ( 0 != ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) ) | |
23 | @@ -1051,8 +1055,8 @@ | |
24 | Color aColWhite( COL_WHITE ); | |
25 | String aStrWhite( SVX_RES(RID_SVXITEMS_COLOR_WHITE) ); | |
26 | ||
27 | - if ( nCount > 80 ) | |
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 ); | |
32 | ||
33 | for ( i = 0; i < nCount; i++ ) | |
34 | @@ -1061,17 +1065,17 @@ | |
35 | aColorSet.InsertItem( i+1, pEntry->GetColor(), pEntry->GetName() ); | |
36 | } | |
37 | ||
38 | - while ( i < 80 ) | |
39 | + while ( i < PALETTE_SIZE ) | |
40 | { | |
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 ); | |
44 | i++; | |
45 | } | |
46 | } | |
47 | ||
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 ); | |
53 | ||
54 | lcl_CalcSizeValueSet( *this, aColorSet, aSize12 ); | |
55 | ||
56 | @@ -1163,7 +1167,7 @@ | |
57 | ||
58 | // ScrollBar an oder aus | |
59 | WinBits nBits = aColorSet.GetStyle(); | |
60 | - if ( nCount > 80 ) | |
61 | + if ( nCount > PALETTE_SIZE ) | |
62 | nBits &= ~WB_VSCROLL; | |
63 | else | |
64 | nBits |= WB_VSCROLL; | |
65 | @@ -1176,7 +1180,7 @@ | |
66 | aColorSet.SetItemText ( i + 1, pEntry->GetName() ); | |
67 | } | |
68 | ||
69 | - while ( i < 80 ) | |
70 | + while ( i < PALETTE_SIZE ) | |
71 | { | |
72 | aColorSet.SetItemColor( i + 1, aColWhite ); | |
73 | aColorSet.SetItemText ( i + 1, aStrWhite ); |