Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / svx / inc / palettes.hxx
blobabeccf0fe243f7a3f578c88fabe80518d4d24d8b
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 final : public Palette
34 bool mbValidPalette;
35 OUString maFPath;
36 OUString maASEPaletteName;
37 ColorList maColors;
39 void LoadPalette();
40 PaletteASE(const PaletteASE&) = default;
41 public:
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
58 bool mbLoadedPalette;
59 bool mbValidPalette;
60 OUString maFName;
61 OUString maFPath;
62 OUString maGPLPaletteName;
63 ColorList maColors;
65 bool ReadPaletteHeader(SvFileStream& rFileStream);
66 void LoadPaletteHeader();
67 void LoadPalette();
68 PaletteGPL(const PaletteGPL&) = default;
69 public:
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
86 bool mbLoadedPalette;
87 OUString maFPath;
88 OUString maSOCPaletteName;
89 XColorListRef mpColorList;
90 PaletteSOC(const PaletteSOC&) = default;
91 public:
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: */