summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/objsh.hxx3
-rw-r--r--include/svx/SvxColorValueSet.hxx3
-rw-r--r--include/tools/color.hxx5
3 files changed, 9 insertions, 2 deletions
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index edf424810d71..90e7cfe669ac 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -35,6 +35,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/document/CmisVersion.hpp>
#include <boost/shared_ptr.hpp>
+#include <set>
#include <vcl/timer.hxx>
#include <svl/poolitem.hxx>
@@ -489,7 +490,7 @@ public:
#define CONTENT_MACRO 2
- virtual std::vector<Color> GetDocColors();
+ virtual std::set<Color> GetDocColors();
virtual void LoadStyles( SfxObjectShell &rSource );
void ReadNote( INote * );
diff --git a/include/svx/SvxColorValueSet.hxx b/include/svx/SvxColorValueSet.hxx
index 351116a01bae..33409db00da3 100644
--- a/include/svx/SvxColorValueSet.hxx
+++ b/include/svx/SvxColorValueSet.hxx
@@ -21,6 +21,7 @@
#include <svtools/valueset.hxx>
#include <svx/svxdllapi.h>
+#include <set>
class XColorList;
@@ -36,7 +37,7 @@ public:
sal_uInt32 getColumnCount() const;
void addEntriesForXColorList(const XColorList& rXColorList, sal_uInt32 nStartIndex = 1);
- void addEntriesForColorVector(const std::vector<Color>& rColorVector, const OUString& rNamePrefix, sal_uInt32 nStartIndex = 1);
+ void addEntriesForColorSet(const std::set<Color>& rColorSet, const OUString& rNamePrefix, sal_uInt32 nStartIndex = 1);
Size layoutAllVisible(sal_uInt32 nEntryCount);
Size layoutToGivenHeight(sal_uInt32 nHeight, sal_uInt32 nEntryCount);
};
diff --git a/include/tools/color.hxx b/include/tools/color.hxx
index ea921878e48c..92ea21011dbb 100644
--- a/include/tools/color.hxx
+++ b/include/tools/color.hxx
@@ -112,6 +112,11 @@ public:
sal_uInt8((rBColor.getBlue() * 255.0) + 0.5));
}
+ bool operator<(const Color& b) const
+ {
+ return mnColor < b.GetColor();
+ }
+
void SetRed( sal_uInt8 nRed );
sal_uInt8 GetRed() const { return COLORDATA_RED( mnColor ); }
void SetGreen( sal_uInt8 nGreen );