[Libreoffice-commits] .: cui/source

Michael Meeks michael at kemper.freedesktop.org
Mon Jul 18 03:19:59 PDT 2011


 cui/source/options/optcolor.cxx |    7 ++++---
 cui/source/tabpages/chardlg.cxx |    6 +++---
 2 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 067739ebe567a53d270e994fcee54d285b075058
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Mon Jul 18 11:09:34 2011 +0100

    adapt to new InsertAutomaticEntryColor method, to show automatic color

diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 1308e3d..b41c115 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 3bdb445..daf8b6d 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++ )


More information about the Libreoffice-commits mailing list