summaryrefslogtreecommitdiff
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
commit067739ebe567a53d270e994fcee54d285b075058 (patch)
tree77aba4000b87d25e611b8f37142d410f8c6ac720
parent7a1e293b35dfabfad0c887a5774609dbf442c9a9 (diff)
adapt to new InsertAutomaticEntryColor method, to show automatic color
-rw-r--r--cui/source/options/optcolor.cxx7
-rw-r--r--cui/source/tabpages/chardlg.cxx6
2 files changed, 7 insertions, 6 deletions
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 1308e3d8b..b41c11530 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);
@@ -944,7 +943,7 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe
aColorBoxes[0]->SetHelpId( aColorLBHids[0] );
- OSL_ENSURE( nCount < sal_Int32(sizeof(aColorLBHids)/sizeof(aColorLBHids[0])), "too few helpIDs for color listboxes" );
+ OSL_ENSURE( nCount < sal_Int32(sizeof(aColorLBHids)/sizeof(aColorLBHids[0])), "too few helpIDs for color listboxes" );
for( sal_Int32 i = 1; i < nCount; i++ )
{
if(aColorBoxes[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 3bdb44528..daf8b6d6d 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++ )