Line
Link Here
|
0 |
-- svx/source/tbxctrls/tbcontrl.cxx |
0 |
++ svx/source/tbxctrls/tbcontrl.cxx |
Lines 1008-1013
Link Here
|
1008 |
#define WB_NO_DIRECTSELECT ((WinBits)0x04000000) |
1008 |
#define WB_NO_DIRECTSELECT ((WinBits)0x04000000) |
1009 |
#endif |
1009 |
#endif |
1010 |
|
1010 |
|
|
|
1011 |
#define PALETTE_X 10 |
1012 |
#define PALETTE_Y 10 |
1013 |
#define PALETTE_SIZE (PALETTE_X * PALETTE_Y) |
1014 |
|
1011 |
SvxColorWindow_Impl::SvxColorWindow_Impl( USHORT nId, USHORT nSlotId, |
1015 |
SvxColorWindow_Impl::SvxColorWindow_Impl( USHORT nId, USHORT nSlotId, |
1012 |
const String& rWndTitle, |
1016 |
const String& rWndTitle, |
1013 |
SfxBindings& rBindings ) : |
1017 |
SfxBindings& rBindings ) : |
Lines 1021-1027
Link Here
|
1021 |
SfxObjectShell* pDocSh = SfxObjectShell::Current(); |
1025 |
SfxObjectShell* pDocSh = SfxObjectShell::Current(); |
1022 |
const SfxPoolItem* pItem = NULL; |
1026 |
const SfxPoolItem* pItem = NULL; |
1023 |
XColorTable* pColorTable = NULL; |
1027 |
XColorTable* pColorTable = NULL; |
1024 |
const Size aSize12( 12, 12 ); |
1028 |
const Size aSize12( 13, 13 ); |
1025 |
|
1029 |
|
1026 |
if ( pDocSh ) |
1030 |
if ( pDocSh ) |
1027 |
if ( 0 != ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) ) |
1031 |
if ( 0 != ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) ) |
Lines 1051-1058
Link Here
|
1051 |
Color aColWhite( COL_WHITE ); |
1055 |
Color aColWhite( COL_WHITE ); |
1052 |
String aStrWhite( SVX_RES(RID_SVXITEMS_COLOR_WHITE) ); |
1056 |
String aStrWhite( SVX_RES(RID_SVXITEMS_COLOR_WHITE) ); |
1053 |
|
1057 |
|
1054 |
if ( nCount > 80 ) |
1058 |
if ( nCount > PALETTE_SIZE ) |
1055 |
// bei mehr als 80 Farben ScrollBar anzeigen |
1059 |
// bei mehr als Max Farben ScrollBar anzeigen |
1056 |
aColorSet.SetStyle( aColorSet.GetStyle() | WB_VSCROLL ); |
1060 |
aColorSet.SetStyle( aColorSet.GetStyle() | WB_VSCROLL ); |
1057 |
|
1061 |
|
1058 |
for ( i = 0; i < nCount; i++ ) |
1062 |
for ( i = 0; i < nCount; i++ ) |
Lines 1061-1077
Link Here
|
1061 |
aColorSet.InsertItem( i+1, pEntry->GetColor(), pEntry->GetName() ); |
1065 |
aColorSet.InsertItem( i+1, pEntry->GetColor(), pEntry->GetName() ); |
1062 |
} |
1066 |
} |
1063 |
|
1067 |
|
1064 |
while ( i < 80 ) |
1068 |
while ( i < PALETTE_SIZE ) |
1065 |
{ |
1069 |
{ |
1066 |
// bei weniger als 80 Farben, mit Weiss auff"ullen |
1070 |
// bei weniger als Max Farben, mit Weiss auff"ullen |
1067 |
aColorSet.InsertItem( i+1, aColWhite, aStrWhite ); |
1071 |
aColorSet.InsertItem( i+1, aColWhite, aStrWhite ); |
1068 |
i++; |
1072 |
i++; |
1069 |
} |
1073 |
} |
1070 |
} |
1074 |
} |
1071 |
|
1075 |
|
1072 |
aColorSet.SetSelectHdl( LINK( this, SvxColorWindow_Impl, SelectHdl ) ); |
1076 |
aColorSet.SetSelectHdl( LINK( this, SvxColorWindow_Impl, SelectHdl ) ); |
1073 |
aColorSet.SetColCount( 8 ); |
1077 |
aColorSet.SetColCount( PALETTE_X ); |
1074 |
aColorSet.SetLineCount( 10 ); |
1078 |
aColorSet.SetLineCount( PALETTE_Y ); |
1075 |
|
1079 |
|
1076 |
lcl_CalcSizeValueSet( *this, aColorSet, aSize12 ); |
1080 |
lcl_CalcSizeValueSet( *this, aColorSet, aSize12 ); |
1077 |
|
1081 |
|
Lines 1163-1169
Link Here
|
1163 |
|
1167 |
|
1164 |
// ScrollBar an oder aus |
1168 |
// ScrollBar an oder aus |
1165 |
WinBits nBits = aColorSet.GetStyle(); |
1169 |
WinBits nBits = aColorSet.GetStyle(); |
1166 |
if ( nCount > 80 ) |
1170 |
if ( nCount > PALETTE_SIZE ) |
1167 |
nBits &= ~WB_VSCROLL; |
1171 |
nBits &= ~WB_VSCROLL; |
1168 |
else |
1172 |
else |
1169 |
nBits |= WB_VSCROLL; |
1173 |
nBits |= WB_VSCROLL; |
Lines 1176-1182
Link Here
|
1176 |
aColorSet.SetItemText ( i + 1, pEntry->GetName() ); |
1180 |
aColorSet.SetItemText ( i + 1, pEntry->GetName() ); |
1177 |
} |
1181 |
} |
1178 |
|
1182 |
|
1179 |
while ( i < 80 ) |
1183 |
while ( i < PALETTE_SIZE ) |
1180 |
{ |
1184 |
{ |
1181 |
aColorSet.SetItemColor( i + 1, aColWhite ); |
1185 |
aColorSet.SetItemColor( i + 1, aColWhite ); |
1182 |
aColorSet.SetItemText ( i + 1, aStrWhite ); |
1186 |
aColorSet.SetItemText ( i + 1, aStrWhite ); |