summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2011-07-18 11:09:34 +0100
committerMichael Meeks <michael.meeks@novell.com>2011-07-18 11:11:09 +0100
commit3887175b872b0d1a37c36c5fad626e92e6ff914e (patch)
tree58fb83b546d44072f487b036ba50bfb7926361fb /cui
parent06bbf75cedc388006a145f6a7ac8cbad617d05a4 (diff)
adapt to new InsertAutomaticEntryColor method, to show automatic color
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optcolor.cxx5
-rw-r--r--cui/source/tabpages/chardlg.cxx6
2 files changed, 6 insertions, 5 deletions
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 7180cd6b241c..3fda1758996a 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -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])
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 7400d3d2ea30..517ae4c0bfcc 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -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++ )