LibreOffice Module svx (master) 1
palettes.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 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#ifndef INCLUDED_SVX_INC_PALETTE_HXX
20#define INCLUDED_SVX_INC_PALETTE_HXX
21
22#include <svx/Palette.hxx>
24#include <svx/xtable.hxx>
25
26class SvFileStream;
27
28typedef std::vector< NamedColor > ColorList;
29
30// ASE = Adobe Swatch Exchange
31
32class PaletteASE final : public Palette
33{
35 OUString maFPath;
38
39 void LoadPalette();
40 PaletteASE(const PaletteASE&) = default;
41public:
42 PaletteASE( OUString aFPath, OUString aFName );
43 virtual ~PaletteASE() override;
44
45 virtual const OUString& GetName() override;
46 virtual const OUString& GetPath() override;
47 virtual void LoadColorSet(SvxColorValueSet& rColorSet) override;
48
49 virtual bool IsValid() override;
50
51 virtual Palette* Clone() const override;
52};
53
54// GPL - this is *not* GNU Public License, but is the Gimp PaLette
55
56class PaletteGPL final : public Palette
57{
60 OUString maFName;
61 OUString maFPath;
64
65 bool ReadPaletteHeader(SvFileStream& rFileStream);
66 void LoadPaletteHeader();
67 void LoadPalette();
68 PaletteGPL(const PaletteGPL&) = default;
69public:
70 PaletteGPL( OUString aFPath, OUString aFName );
71 virtual ~PaletteGPL() override;
72
73 virtual const OUString& GetName() override;
74 virtual const OUString& GetPath() override;
75 virtual void LoadColorSet(SvxColorValueSet& rColorSet) override;
76
77 virtual bool IsValid() override;
78
79 virtual Palette* Clone() const override;
80};
81
82// SOC - Star Office Color-table
83
84class PaletteSOC final : public Palette
85{
87 OUString maFPath;
90 PaletteSOC(const PaletteSOC&) = default;
91public:
92 PaletteSOC( OUString aFPath, OUString aFName );
93 virtual ~PaletteSOC() override;
94
95 virtual const OUString& GetName() override;
96 virtual const OUString& GetPath() override;
97 virtual void LoadColorSet(SvxColorValueSet& rColorSet) override;
98
99 virtual bool IsValid() override;
100
101 virtual Palette* Clone() const override;
102};
103
104#endif // INCLUDED_SVX_INC_PALETTE_HXX
105
106/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
PaletteASE(const PaletteASE &)=default
virtual ~PaletteASE() override
Definition: Palette.cxx:30
virtual const OUString & GetName() override
Definition: Palette.cxx:53
OUString maASEPaletteName
Definition: palettes.hxx:36
bool mbValidPalette
Definition: palettes.hxx:34
ColorList maColors
Definition: palettes.hxx:37
virtual void LoadColorSet(SvxColorValueSet &rColorSet) override
Definition: Palette.cxx:42
OUString maFPath
Definition: palettes.hxx:35
virtual Palette * Clone() const override
Definition: Palette.cxx:174
void LoadPalette()
Definition: Palette.cxx:81
virtual const OUString & GetPath() override
Definition: Palette.cxx:58
virtual bool IsValid() override
Definition: Palette.cxx:63
void LoadPaletteHeader()
Definition: Palette.cxx:246
OUString maFName
Definition: palettes.hxx:60
bool ReadPaletteHeader(SvFileStream &rFileStream)
Definition: Palette.cxx:224
void LoadPalette()
Definition: Palette.cxx:252
virtual Palette * Clone() const override
Definition: Palette.cxx:294
virtual void LoadColorSet(SvxColorValueSet &rColorSet) override
Definition: Palette.cxx:206
virtual bool IsValid() override
Definition: Palette.cxx:219
ColorList maColors
Definition: palettes.hxx:63
virtual const OUString & GetPath() override
Definition: Palette.cxx:201
OUString maFPath
Definition: palettes.hxx:61
virtual const OUString & GetName() override
Definition: Palette.cxx:196
virtual ~PaletteGPL() override
Definition: Palette.cxx:192
PaletteGPL(const PaletteGPL &)=default
bool mbValidPalette
Definition: palettes.hxx:59
OUString maGPLPaletteName
Definition: palettes.hxx:62
bool mbLoadedPalette
Definition: palettes.hxx:58
virtual ~PaletteSOC() override
Definition: Palette.cxx:343
virtual bool IsValid() override
Definition: Palette.cxx:370
virtual const OUString & GetPath() override
Definition: Palette.cxx:352
OUString maFPath
Definition: palettes.hxx:87
bool mbLoadedPalette
Definition: palettes.hxx:86
virtual Palette * Clone() const override
Definition: Palette.cxx:375
XColorListRef mpColorList
Definition: palettes.hxx:89
PaletteSOC(const PaletteSOC &)=default
virtual const OUString & GetName() override
Definition: Palette.cxx:347
OUString maSOCPaletteName
Definition: palettes.hxx:88
virtual void LoadColorSet(SvxColorValueSet &rColorSet) override
Definition: Palette.cxx:357
std::vector< NamedColor > ColorList
Definition: palettes.hxx:26