summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorUrsache Vladimir <ursache@collabora.co.uk>2015-02-14 02:46:47 +0200
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2015-02-14 01:51:54 +0100
commit50a36041e18dc2a595259b5414ded409687dc47b (patch)
tree2f61edb3336449a6649eb5defbd0ca50d5c966b8 /include
parent1e475fef47fe6bd9dba6d830aaf0b6c12dc88881 (diff)
related tdf#89004 move to std:set instead of std::vector
Conflicts: sc/source/core/data/document10.cxx sw/source/core/doc/docfmt.cxx Change-Id: I1312f476607ea3a78b162a7e59323b0a142f6629
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 );