summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2011-07-18 11:09:12 +0100
committerMichael Meeks <michael.meeks@novell.com>2011-07-18 11:12:19 +0100
commitea8a56a59310d39fe912661dfa9ceaee1cc3de79 (patch)
treedaa86ac7b996a9ec5cf2b3f95d25b592e1080d50 /svtools
parent7cc4502556b94a3ad3eb486ad176c8291c9c8615 (diff)
add new InsertAutomaticEntryColor method
Diffstat (limited to 'svtools')
-rw-r--r--svtools/inc/svtools/ctrlbox.hxx3
-rw-r--r--svtools/source/control/ctrlbox.cxx4
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 );
}
// -----------------------------------------------------------------------