1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SVX_INC_PALETTE_HXX
20 #define INCLUDED_SVX_INC_PALETTE_HXX
22 #include <svx/Palette.hxx>
23 #include <svx/SvxColorValueSet.hxx>
24 #include <svx/xtable.hxx>
28 typedef std::vector
< NamedColor
> ColorList
;
30 // ASE = Adobe Swatch Exchange
32 class PaletteASE final
: public Palette
36 OUString maASEPaletteName
;
40 PaletteASE(const PaletteASE
&) = default;
42 PaletteASE( OUString aFPath
, OUString aFName
);
43 virtual ~PaletteASE() override
;
45 virtual const OUString
& GetName() override
;
46 virtual const OUString
& GetPath() override
;
47 virtual void LoadColorSet(SvxColorValueSet
& rColorSet
) override
;
49 virtual bool IsValid() override
;
51 virtual Palette
* Clone() const override
;
54 // GPL - this is *not* GNU Public License, but is the Gimp PaLette
56 class PaletteGPL final
: public Palette
62 OUString maGPLPaletteName
;
65 bool ReadPaletteHeader(SvFileStream
& rFileStream
);
66 void LoadPaletteHeader();
68 PaletteGPL(const PaletteGPL
&) = default;
70 PaletteGPL( OUString aFPath
, OUString aFName
);
71 virtual ~PaletteGPL() override
;
73 virtual const OUString
& GetName() override
;
74 virtual const OUString
& GetPath() override
;
75 virtual void LoadColorSet(SvxColorValueSet
& rColorSet
) override
;
77 virtual bool IsValid() override
;
79 virtual Palette
* Clone() const override
;
82 // SOC - Star Office Color-table
84 class PaletteSOC final
: public Palette
88 OUString maSOCPaletteName
;
89 XColorListRef mpColorList
;
90 PaletteSOC(const PaletteSOC
&) = default;
92 PaletteSOC( OUString aFPath
, OUString aFName
);
93 virtual ~PaletteSOC() override
;
95 virtual const OUString
& GetName() override
;
96 virtual const OUString
& GetPath() override
;
97 virtual void LoadColorSet(SvxColorValueSet
& rColorSet
) override
;
99 virtual bool IsValid() override
;
101 virtual Palette
* Clone() const override
;
104 #endif // INCLUDED_SVX_INC_PALETTE_HXX
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */