14#include <unordered_set>
29 static std::optional<ColorSets> sColorSet;
156 if (rColorSet.getName() == rName)
164OUString findUniqueName(std::unordered_set<OUString>
const& rNames, OUString
const& rNewName)
166 auto iterator = rNames.find(rNewName);
167 if (iterator == rNames.cend())
174 aName = rNewName +
"_" + OUString::number(i);
176 iterator = rNames.find(aName);
177 }
while (iterator != rNames.cend());
190 if (rColorSet.getName() == rNewColorSet.
getName())
192 rColorSet = rNewColorSet;
201 std::unordered_set<OUString> aNames;
203 aNames.insert(rColorSet.getName());
205 OUString
aName = findUniqueName(aNames, rNewColorSet.
getName());
void setName(OUString const &rName)
void add(model::ThemeColorType Type, Color aColorData)
const OUString & getName() const
std::vector< model::ColorSet > maColorSets
const model::ColorSet & getColorSet(sal_uInt32 nIndex) const
void insert(model::ColorSet const &rColorSet, IdenticalNameAction eAction=IdenticalNameAction::Overwrite)