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
;
41 PaletteASE( const OUString
&rFPath
, const OUString
&rFName
);
42 virtual ~PaletteASE() override
;
44 virtual const OUString
& GetName() override
;
45 virtual const OUString
& GetPath() override
;
46 virtual void LoadColorSet(SvxColorValueSet
& rColorSet
) override
;
48 virtual bool IsValid() override
;
51 // GPL - this is *not* GNU Public License, but is the Gimp PaLette
53 class PaletteGPL final
: public Palette
59 OUString maGPLPaletteName
;
62 bool ReadPaletteHeader(SvFileStream
& rFileStream
);
63 void LoadPaletteHeader();
66 PaletteGPL( const OUString
&rFPath
, const OUString
&rFName
);
67 virtual ~PaletteGPL() override
;
69 virtual const OUString
& GetName() override
;
70 virtual const OUString
& GetPath() override
;
71 virtual void LoadColorSet(SvxColorValueSet
& rColorSet
) override
;
73 virtual bool IsValid() override
;
76 // SOC - Star Office Color-table
78 class PaletteSOC final
: public Palette
82 OUString maSOCPaletteName
;
83 XColorListRef mpColorList
;
85 PaletteSOC( const OUString
&rFPath
, const OUString
&rFName
);
86 virtual ~PaletteSOC() override
;
88 virtual const OUString
& GetName() override
;
89 virtual const OUString
& GetPath() override
;
90 virtual void LoadColorSet(SvxColorValueSet
& rColorSet
) override
;
92 virtual bool IsValid() override
;
95 #endif // INCLUDED_SVX_INC_PALETTE_HXX
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */