Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / svx / inc / palettes.hxx
blobda0cdd24e9b2f2e221c7e7853e3bb47475a07853
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>
24 class SvFileStream;
26 typedef std::vector< NamedColor > ColorList;
28 // ASE = Adobe Swatch Exchange
30 class SVX_DLLPUBLIC PaletteASE : public Palette
32 bool mbValidPalette;
33 OUString maFPath;
34 OUString maASEPaletteName;
35 ColorList maColors;
37 void LoadPalette();
38 public:
39 PaletteASE( const OUString &rFPath, const OUString &rFName );
40 virtual ~PaletteASE() override;
42 virtual const OUString& GetName() override;
43 virtual const OUString& GetPath() override;
44 virtual void LoadColorSet( SvxColorValueSet& rColorSet ) override;
45 virtual void LoadColorSet( ColorValueSet& rColorSet ) override;
47 virtual bool IsValid() override;
50 // GPL - this is *not* GNU Public License, but is the Gimp PaLette
52 class SVX_DLLPUBLIC PaletteGPL : public Palette
54 bool mbLoadedPalette;
55 bool mbValidPalette;
56 OUString maFName;
57 OUString maFPath;
58 OUString maGPLPaletteName;
59 ColorList maColors;
61 bool ReadPaletteHeader(SvFileStream& rFileStream);
62 void LoadPaletteHeader();
63 void LoadPalette();
64 public:
65 PaletteGPL( const OUString &rFPath, const OUString &rFName );
66 virtual ~PaletteGPL() override;
68 virtual const OUString& GetName() override;
69 virtual const OUString& GetPath() override;
70 virtual void LoadColorSet( SvxColorValueSet& rColorSet ) override;
71 virtual void LoadColorSet( ColorValueSet& rColorSet ) override;
73 virtual bool IsValid() override;
76 // SOC - Star Office Color-table
78 class SVX_DLLPUBLIC PaletteSOC : public Palette
80 bool mbLoadedPalette;
81 OUString maFPath;
82 OUString maSOCPaletteName;
83 XColorListRef mpColorList;
84 public:
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;
91 virtual void LoadColorSet( ColorValueSet& rColorSet ) override;
93 virtual bool IsValid() override;
96 #endif // INCLUDED_SVX_INC_PALETTE_HXX
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */