Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / include / svx / ColorSets.hxx
blobf95859044b2871227c46e8e0990c10d39dbaae98
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 */
11 #ifndef INCLUDED_SVX_COLORSETS_HXX
12 #define INCLUDED_SVX_COLORSETS_HXX
14 #include <rtl/ustring.hxx>
15 #include <sal/log.hxx>
16 #include <svx/svxdllapi.h>
17 #include <docmodel/theme/ColorSet.hxx>
18 #include <optional>
20 namespace svx
23 class SVXCORE_DLLPUBLIC ColorSets
25 private:
26 std::vector<model::ColorSet> maColorSets;
27 ColorSets();
28 void init();
29 public:
30 enum class IdenticalNameAction { Overwrite, AutoRename };
31 static ColorSets& get();
33 const std::vector<model::ColorSet>& getColorSetVector() const
35 return maColorSets;
38 const model::ColorSet& getColorSet(sal_uInt32 nIndex) const
40 return maColorSets[nIndex];
43 model::ColorSet const* getColorSet(std::u16string_view rName) const;
45 void insert(model::ColorSet const& rColorSet, IdenticalNameAction eAction = IdenticalNameAction::Overwrite);
48 } // end of namespace svx
50 #endif // INCLUDED_SVX_COLORSETS_HXX
52 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */