LibreOffice Module svx (master) 1
ColorSets.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 */
10
11#ifndef INCLUDED_SVX_COLORSETS_HXX
12#define INCLUDED_SVX_COLORSETS_HXX
13
14#include <rtl/ustring.hxx>
15#include <sal/log.hxx>
16#include <svx/svxdllapi.h>
18#include <optional>
19
20namespace svx
21{
22
24{
25private:
26 std::vector<model::ColorSet> maColorSets;
27 ColorSets();
28 void init();
29public:
30 enum class IdenticalNameAction { Overwrite, AutoRename };
31 static ColorSets& get();
32
33 const std::vector<model::ColorSet>& getColorSetVector() const
34 {
35 return maColorSets;
36 }
37
38 const model::ColorSet& getColorSet(sal_uInt32 nIndex) const
39 {
40 return maColorSets[nIndex];
41 }
42
43 model::ColorSet const* getColorSet(std::u16string_view rName) const;
44
45 void insert(model::ColorSet const& rColorSet, IdenticalNameAction eAction = IdenticalNameAction::Overwrite);
46};
47
48} // end of namespace svx
49
50#endif // INCLUDED_SVX_COLORSETS_HXX
51
52/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
FILE * init(int, char **)
std::vector< model::ColorSet > maColorSets
Definition: ColorSets.hxx:26
const model::ColorSet & getColorSet(sal_uInt32 nIndex) const
Definition: ColorSets.hxx:38
const std::vector< model::ColorSet > & getColorSetVector() const
Definition: ColorSets.hxx:33
sal_Int32 nIndex
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35