diff options
author | Ursache Vladimir <ursache@collabora.co.uk> | 2015-02-14 02:46:47 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2015-02-14 01:51:54 +0100 |
commit | 50a36041e18dc2a595259b5414ded409687dc47b (patch) | |
tree | 2f61edb3336449a6649eb5defbd0ca50d5c966b8 /svx/source | |
parent | 1e475fef47fe6bd9dba6d830aaf0b6c12dc88881 (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 'svx/source')
-rw-r--r-- | svx/source/tbxctrls/PaletteManager.cxx | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/SvxColorValueSet.cxx | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index f5ad05161ae4..8d0a21147fe5 100644 --- a/svx/source/tbxctrls/PaletteManager.cxx +++ b/svx/source/tbxctrls/PaletteManager.cxx @@ -104,10 +104,10 @@ void PaletteManager::ReloadColorSet(SvxColorValueSet &rColorSet) else if( mnCurrentPalette == mnNumOfPalettes - 1 ) { // Add doc colors to palette - std::vector<Color> aColors = pDocSh->GetDocColors(); + std::set<Color> aColors = pDocSh->GetDocColors(); mnColorCount = aColors.size(); rColorSet.Clear(); - rColorSet.addEntriesForColorVector(aColors, SVX_RESSTR( RID_SVXSTR_DOC_COLOR_PREFIX ) + " " ); + rColorSet.addEntriesForColorSet(aColors, SVX_RESSTR( RID_SVXSTR_DOC_COLOR_PREFIX ) + " " ); } else { diff --git a/svx/source/tbxctrls/SvxColorValueSet.cxx b/svx/source/tbxctrls/SvxColorValueSet.cxx index 29b805675e97..e1bc89c12385 100644 --- a/svx/source/tbxctrls/SvxColorValueSet.cxx +++ b/svx/source/tbxctrls/SvxColorValueSet.cxx @@ -80,20 +80,20 @@ void SvxColorValueSet::addEntriesForXColorList(const XColorList& rXColorList, sa } } -void SvxColorValueSet::addEntriesForColorVector(const std::vector<Color>& rColorVector, const OUString& rNamePrefix, sal_uInt32 nStartIndex) +void SvxColorValueSet::addEntriesForColorSet(const std::set<Color>& rColorSet, const OUString& rNamePrefix, sal_uInt32 nStartIndex) { if(rNamePrefix.getLength() != 0) { - for(std::vector<Color>::const_iterator it = rColorVector.begin(); - it != rColorVector.end(); ++it, nStartIndex++) + for(std::set<Color>::const_iterator it = rColorSet.begin(); + it != rColorSet.end(); ++it, nStartIndex++) { InsertItem(nStartIndex, *it, rNamePrefix + OUString::number(nStartIndex)); } } else { - for(std::vector<Color>::const_iterator it = rColorVector.begin(); - it != rColorVector.end(); ++it, nStartIndex++) + for(std::set<Color>::const_iterator it = rColorSet.begin(); + it != rColorSet.end(); ++it, nStartIndex++) { InsertItem(nStartIndex, *it, ""); } |