From ea8a56a59310d39fe912661dfa9ceaee1cc3de79 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Mon, 18 Jul 2011 11:09:12 +0100 Subject: add new InsertAutomaticEntryColor method --- svtools/inc/svtools/ctrlbox.hxx | 3 ++- svtools/source/control/ctrlbox.cxx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/svtools/inc/svtools/ctrlbox.hxx b/svtools/inc/svtools/ctrlbox.hxx index 56c69e0d078b..d346b3b6af85 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 14dae85f4ee8..e185705806be 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 ); } // ----------------------------------------------------------------------- -- cgit v1.2.3