Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / svx / inc / palettes.hxx
blobfe88af7f2b5af78b91c87498528941d16e880118
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 * 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>
26 class SvFileStream;
28 typedef std::vector< NamedColor > ColorList;
30 // ASE = Adobe Swatch Exchange
32 class PaletteASE : public Palette
34 bool mbValidPalette;
35 OUString const maFPath;
36 OUString maASEPaletteName;
37 ColorList maColors;
39 void LoadPalette();
40 public:
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;
47 virtual void LoadColorSet( ColorValueSet& rColorSet ) override;
49 virtual bool IsValid() override;
52 // GPL - this is *not* GNU Public License, but is the Gimp PaLette
54 class PaletteGPL : public Palette
56 bool mbLoadedPalette;
57 bool mbValidPalette;
58 OUString const maFName;
59 OUString const maFPath;
60 OUString maGPLPaletteName;
61 ColorList maColors;
63 bool ReadPaletteHeader(SvFileStream& rFileStream);
64 void LoadPaletteHeader();
65 void LoadPalette();
66 public:
67 PaletteGPL( const OUString &rFPath, const OUString &rFName );
68 virtual ~PaletteGPL() override;
70 virtual const OUString& GetName() override;
71 virtual const OUString& GetPath() override;
72 virtual void LoadColorSet( SvxColorValueSet& rColorSet ) override;
73 virtual void LoadColorSet( ColorValueSet& rColorSet ) override;
75 virtual bool IsValid() override;
78 // SOC - Star Office Color-table
80 class PaletteSOC : public Palette
82 bool mbLoadedPalette;
83 OUString const maFPath;
84 OUString const maSOCPaletteName;
85 XColorListRef mpColorList;
86 public:
87 PaletteSOC( const OUString &rFPath, const OUString &rFName );
88 virtual ~PaletteSOC() override;
90 virtual const OUString& GetName() override;
91 virtual const OUString& GetPath() override;
92 virtual void LoadColorSet( SvxColorValueSet& rColorSet ) override;
93 virtual void LoadColorSet( ColorValueSet& rColorSet ) override;
95 virtual bool IsValid() override;
98 #endif // INCLUDED_SVX_INC_PALETTE_HXX
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */