[Libreoffice-commits] core.git: 3 commits - basctl/inc include/svx svx/inc svx/source
Tor Lillqvist
tml at collabora.com
Tue Nov 22 20:47:08 UTC 2016
basctl/inc/pch/precompiled_basctl.hxx | 1
include/svx/Palette.hxx | 70 ------------------------
svx/inc/palettes.hxx | 95 +++++++++++++++++++++++++++++++++
svx/source/tbxctrls/Palette.cxx | 1
svx/source/tbxctrls/PaletteManager.cxx | 2
5 files changed, 99 insertions(+), 70 deletions(-)
New commits:
commit e4a0fa273165d63e82dec9319dbc746f3edbafe5
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Nov 22 20:38:05 2016 +0200
The Palette subclasses don't need to be public
Change-Id: I40f942c202ab3ba1ca13d1b24d0cd72a4c561868
diff --git a/include/svx/Palette.hxx b/include/svx/Palette.hxx
index 3ea15f7..64fde6f 100644
--- a/include/svx/Palette.hxx
+++ b/include/svx/Palette.hxx
@@ -24,10 +24,7 @@
#include <rtl/ustring.hxx>
#include <tools/color.hxx>
-class SvFileStream;
-
typedef std::pair<Color, OUString> NamedColor;
-typedef std::vector< NamedColor > ColorList;
class SVX_DLLPUBLIC Palette
{
@@ -41,71 +38,6 @@ public:
virtual bool IsValid() = 0;
};
-// ASE = Adobe Swatch Exchange
-
-class SVX_DLLPUBLIC PaletteASE : public Palette
-{
- bool mbValidPalette;
- OUString maFPath;
- OUString maASEPaletteName;
- ColorList maColors;
-
- void LoadPalette();
-public:
- PaletteASE( const OUString &rFPath, const OUString &rFName );
- virtual ~PaletteASE() override;
-
- virtual const OUString& GetName() override;
- virtual const OUString& GetPath() override;
- virtual void LoadColorSet( SvxColorValueSet& rColorSet ) override;
-
- virtual bool IsValid() override;
-};
-
-// GPL - this is *not* GNU Public License, but is the Gimp PaLette
-
-class SVX_DLLPUBLIC PaletteGPL : public Palette
-{
- bool mbLoadedPalette;
- bool mbValidPalette;
- OUString maFName;
- OUString maFPath;
- OUString maGPLPaletteName;
- ColorList maColors;
-
- bool ReadPaletteHeader(SvFileStream& rFileStream);
- void LoadPaletteHeader();
- void LoadPalette();
-public:
- PaletteGPL( const OUString &rFPath, const OUString &rFName );
- virtual ~PaletteGPL() override;
-
- virtual const OUString& GetName() override;
- virtual const OUString& GetPath() override;
- virtual void LoadColorSet( SvxColorValueSet& rColorSet ) override;
-
- virtual bool IsValid() override;
-};
-
-// SOC - Star Office Color-table
-
-class SVX_DLLPUBLIC PaletteSOC : public Palette
-{
- bool mbLoadedPalette;
- OUString maFPath;
- OUString maSOCPaletteName;
- XColorListRef mpColorList;
-public:
- PaletteSOC( const OUString &rFPath, const OUString &rFName );
- virtual ~PaletteSOC() override;
-
- virtual const OUString& GetName() override;
- virtual const OUString& GetPath() override;
- virtual void LoadColorSet( SvxColorValueSet& rColorSet ) override;
-
- virtual bool IsValid() override;
-};
-
#endif // INCLUDED_SVX_PALETTE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/inc/palettes.hxx b/svx/inc/palettes.hxx
new file mode 100644
index 0000000..8aa05b8
--- /dev/null
+++ b/svx/inc/palettes.hxx
@@ -0,0 +1,95 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_INC_PALETTE_HXX
+#define INCLUDED_SVX_INC_PALETTE_HXX
+
+#include <svx/Palette.hxx>
+
+class SvFileStream;
+
+typedef std::vector< NamedColor > ColorList;
+
+// ASE = Adobe Swatch Exchange
+
+class SVX_DLLPUBLIC PaletteASE : public Palette
+{
+ bool mbValidPalette;
+ OUString maFPath;
+ OUString maASEPaletteName;
+ ColorList maColors;
+
+ void LoadPalette();
+public:
+ PaletteASE( const OUString &rFPath, const OUString &rFName );
+ virtual ~PaletteASE() override;
+
+ virtual const OUString& GetName() override;
+ virtual const OUString& GetPath() override;
+ virtual void LoadColorSet( SvxColorValueSet& rColorSet ) override;
+
+ virtual bool IsValid() override;
+};
+
+// GPL - this is *not* GNU Public License, but is the Gimp PaLette
+
+class SVX_DLLPUBLIC PaletteGPL : public Palette
+{
+ bool mbLoadedPalette;
+ bool mbValidPalette;
+ OUString maFName;
+ OUString maFPath;
+ OUString maGPLPaletteName;
+ ColorList maColors;
+
+ bool ReadPaletteHeader(SvFileStream& rFileStream);
+ void LoadPaletteHeader();
+ void LoadPalette();
+public:
+ PaletteGPL( const OUString &rFPath, const OUString &rFName );
+ virtual ~PaletteGPL() override;
+
+ virtual const OUString& GetName() override;
+ virtual const OUString& GetPath() override;
+ virtual void LoadColorSet( SvxColorValueSet& rColorSet ) override;
+
+ virtual bool IsValid() override;
+};
+
+// SOC - Star Office Color-table
+
+class SVX_DLLPUBLIC PaletteSOC : public Palette
+{
+ bool mbLoadedPalette;
+ OUString maFPath;
+ OUString maSOCPaletteName;
+ XColorListRef mpColorList;
+public:
+ PaletteSOC( const OUString &rFPath, const OUString &rFName );
+ virtual ~PaletteSOC() override;
+
+ virtual const OUString& GetName() override;
+ virtual const OUString& GetPath() override;
+ virtual void LoadColorSet( SvxColorValueSet& rColorSet ) override;
+
+ virtual bool IsValid() override;
+};
+
+#endif // INCLUDED_SVX_INC_PALETTE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/tbxctrls/Palette.cxx b/svx/source/tbxctrls/Palette.cxx
index aecaf56..348079c 100644
--- a/svx/source/tbxctrls/Palette.cxx
+++ b/svx/source/tbxctrls/Palette.cxx
@@ -20,6 +20,7 @@
#include <svx/Palette.hxx>
#include <tools/stream.hxx>
+#include "palettes.hxx"
Palette::~Palette()
{
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx
index 7f1d5a1..1dc3a46 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -33,6 +33,8 @@
#include <cppu/unotype.hxx>
#include <officecfg/Office/Common.hxx>
+#include "palettes.hxx"
+
PaletteManager::PaletteManager() :
mnMaxRecentColors(Application::GetSettings().GetStyleSettings().GetColorValueSetColumnCount()),
mnNumOfPalettes(2),
commit 1daf867d72d60155cff49a7dfe98c36071ed994b
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Nov 22 20:34:42 2016 +0200
Add newline at end of file
Change-Id: I6c0a72c264fa967e10eca4816cea5385a5f86354
diff --git a/include/svx/Palette.hxx b/include/svx/Palette.hxx
index b881418..3ea15f7 100644
--- a/include/svx/Palette.hxx
+++ b/include/svx/Palette.hxx
@@ -108,4 +108,4 @@ public:
#endif // INCLUDED_SVX_PALETTE_HXX
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 5197e99fa6ca77b9d607072bc98c46eb559a2a8d
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Nov 22 20:29:37 2016 +0200
No use of <svx/Palette.hxx> here
Change-Id: I619f07d52d303bdd386383daa359b4dbeb0c70a6
diff --git a/basctl/inc/pch/precompiled_basctl.hxx b/basctl/inc/pch/precompiled_basctl.hxx
index ace1ace..2a097ac 100644
--- a/basctl/inc/pch/precompiled_basctl.hxx
+++ b/basctl/inc/pch/precompiled_basctl.hxx
@@ -440,7 +440,6 @@
#include <svtools/treelistentry.hxx>
#include <svtools/valueset.hxx>
#include <svtools/viewdataentry.hxx>
-#include <svx/Palette.hxx>
#include <svx/SvxColorValueSet.hxx>
#include <svx/XPropertyEntry.hxx>
#include <svx/grfcrop.hxx>
More information about the Libreoffice-commits
mailing list