[Libreoffice-commits] .: svtools/inc svtools/source
Michael Meeks
michael at kemper.freedesktop.org
Mon Jul 18 03:20:03 PDT 2011
svtools/inc/svtools/ctrlbox.hxx | 3 ++-
svtools/source/control/ctrlbox.cxx | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 2f3170696931b4e86dcd20218d58dfdf06103a54
Author: Michael Meeks <michael.meeks at novell.com>
Date: Mon Jul 18 11:09:12 2011 +0100
add new InsertAutomaticEntryColor method
diff --git a/svtools/inc/svtools/ctrlbox.hxx b/svtools/inc/svtools/ctrlbox.hxx
index 90f52b6..e68d8f1 100644
--- a/svtools/inc/svtools/ctrlbox.hxx
+++ b/svtools/inc/svtools/ctrlbox.hxx
@@ -190,7 +190,8 @@ public:
sal_uInt16 nPos = LISTBOX_APPEND );
virtual sal_uInt16 InsertEntry( const Color& rColor, const XubString& rStr,
sal_uInt16 nPos = LISTBOX_APPEND );
- void InsertAutomaticEntry();
+ void InsertAutomaticEntryColor(const Color &rAutoColorValue);
+ bool IsAutomaticSelected() { return !GetSelectEntryPos(); }
using ListBox::RemoveEntry;
virtual void RemoveEntry( sal_uInt16 nPos );
virtual void Clear();
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index e714a92..d25a319 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -180,10 +180,10 @@ sal_uInt16 ColorListBox::InsertEntry( const Color& rColor, const XubString& rStr
// -----------------------------------------------------------------------
-void ColorListBox::InsertAutomaticEntry()
+void ColorListBox::InsertAutomaticEntryColor(const Color &rColor)
{
// insert the "Automatic"-entry always on the first position
- InsertEntry( Color( COL_AUTO ), SvtResId( STR_SVT_AUTOMATIC_COLOR ), 0 );
+ InsertEntry( rColor, SvtResId( STR_SVT_AUTOMATIC_COLOR ), 0 );
}
// -----------------------------------------------------------------------
More information about the Libreoffice-commits
mailing list