Version 7.1.7.1, tag libreoffice-7.1.7.1
[LibreOffice.git] / svx / source / styles / ColorSets.cxx
blob2e7771caefac2f448afb36c67d4c30f7460d6d38
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 #include <svx/ColorSets.hxx>
13 namespace svx
16 ColorSet::ColorSet(OUString const & aColorSetName)
17 : maColorSetName(aColorSetName)
18 , maColors(12)
21 ColorSets::ColorSets()
24 ColorSets::~ColorSets()
27 void ColorSets::init()
30 ColorSet aColorSet("Breeze");
31 aColorSet.add(0, 0x232629);
32 aColorSet.add(1, 0xFCFCFC);
33 aColorSet.add(2, 0x31363B);
34 aColorSet.add(3, 0xEFF0F1);
35 aColorSet.add(4, 0xDA4453);
36 aColorSet.add(5, 0xF47750);
37 aColorSet.add(6, 0xFDBC4B);
38 aColorSet.add(7, 0xC9CE3B);
39 aColorSet.add(8, 0x1CDC9A);
40 aColorSet.add(9, 0x2ECC71);
41 aColorSet.add(10, 0x1D99F3);
42 aColorSet.add(11, 0x3DAEE9);
43 maColorSets.push_back(aColorSet);
46 ColorSet aColorSet("Material Blue");
47 aColorSet.add(0, 0x212121);
48 aColorSet.add(1, 0xFFFFFF);
49 aColorSet.add(2, 0x37474F);
50 aColorSet.add(3, 0xECEFF1);
51 aColorSet.add(4, 0x7986CB);
52 aColorSet.add(5, 0x303F9F);
53 aColorSet.add(6, 0x64B5F6);
54 aColorSet.add(7, 0x1976D2);
55 aColorSet.add(8, 0x4FC3F7);
56 aColorSet.add(9, 0x0277BD);
57 aColorSet.add(10, 0x4DD0E1);
58 aColorSet.add(11, 0x0097A7);
59 maColorSets.push_back(aColorSet);
62 ColorSet aColorSet("Material Red");
63 aColorSet.add(0, 0x212121);
64 aColorSet.add(1, 0xFFFFFF);
65 aColorSet.add(2, 0x424242);
66 aColorSet.add(3, 0xF5F5F5);
67 aColorSet.add(4, 0xFF9800);
68 aColorSet.add(5, 0xFF6D00);
69 aColorSet.add(6, 0xFF5722);
70 aColorSet.add(7, 0xDD2C00);
71 aColorSet.add(8, 0xF44336);
72 aColorSet.add(9, 0xD50000);
73 aColorSet.add(10, 0xE91E63);
74 aColorSet.add(11, 0xC51162);
75 maColorSets.push_back(aColorSet);
78 ColorSet aColorSet("Material Green");
79 aColorSet.add(0, 0x212121);
80 aColorSet.add(1, 0xFFFFFF);
81 aColorSet.add(2, 0x424242);
82 aColorSet.add(3, 0xF5F5F5);
83 aColorSet.add(4, 0x009688);
84 aColorSet.add(5, 0x00bfa5);
85 aColorSet.add(6, 0x4caf50);
86 aColorSet.add(7, 0x00c853);
87 aColorSet.add(8, 0x8bc34a);
88 aColorSet.add(9, 0x64dd17);
89 aColorSet.add(10, 0xcddc39);
90 aColorSet.add(11, 0xaeea00);
91 maColorSets.push_back(aColorSet);
95 const ColorSet& ColorSets::getColorSet(const OUString& rName)
97 for (const ColorSet & rColorSet : maColorSets)
99 if (rColorSet.getName() == rName)
100 return rColorSet;
102 return maColorSets[0];
105 } // end of namespace svx
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */