adapt to new InsertAutomaticEntryColor method, to show automatic color

This commit is contained in:
Michael Meeks 2011-07-18 11:09:34 +01:00
parent 06bbf75ced
commit 3887175b87
2 changed files with 6 additions and 5 deletions

View file

@ -935,7 +935,6 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe
}
XColorTable aColorTable( SvtPathOptions().GetPalettePath() );
aColorBoxes[0]->InsertAutomaticEntry();
for( sal_Int32 i = 0; i < aColorTable.Count(); i++ )
{
XColorEntry* pEntry = aColorTable.GetColor(i);
@ -952,8 +951,10 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe
aColorBoxes[i]->CopyEntries( *aColorBoxes[0] );
if( i < sal_Int32(sizeof(aColorLBHids)/sizeof(aColorLBHids[0])) )
aColorBoxes[i]->SetHelpId( aColorLBHids[i] );
aColorBoxes[i]->InsertAutomaticEntryColor(ColorConfig::GetDefaultColor((ColorConfigEntry) i));
}
}
aColorBoxes[0]->InsertAutomaticEntryColor(ColorConfig::GetDefaultColor((ColorConfigEntry) 0));
}
ColorConfigWindow_Impl::~ColorConfigWindow_Impl()
@ -1414,7 +1415,7 @@ IMPL_LINK(ColorConfigCtrl_Impl, ColorHdl, ColorListBox*, pBox)
if(pBox && aScrollWindow.aColorBoxes[i] == pBox)
{
ColorConfigValue aColorEntry = pColorConfig->GetColorValue(ColorConfigEntry(i));
if(!pBox->GetSelectEntryPos())
if(pBox->IsAutomaticSelected())
{
aColorEntry.nColor = COL_AUTO;
if(aScrollWindow.aWindows[i])

View file

@ -1553,9 +1553,9 @@ void SvxCharEffectsPage::Initialize()
if ( !pFrame ||
SFX_ITEM_DEFAULT > pFrame->GetBindings().QueryState( SID_ATTR_AUTO_COLOR_INVALID, pDummy ) )
{
m_aUnderlineColorLB.InsertAutomaticEntry();
m_aOverlineColorLB.InsertAutomaticEntry();
m_aFontColorLB.InsertAutomaticEntry();
m_aUnderlineColorLB.InsertAutomaticEntryColor( Color( COL_AUTO ) );
m_aOverlineColorLB.InsertAutomaticEntryColor( Color( COL_AUTO ) );
m_aFontColorLB.InsertAutomaticEntryColor( Color( COL_AUTO ) );
}
}
for ( long i = 0; i < pColorTable->Count(); i++ )