summaryrefslogtreecommitdiffstats
path: root/include/svx/Palette.hxx
diff options
context:
space:
mode:
authorKrisztian Pinter <pin.terminator@gmail.com>2014-07-03 18:47:10 +0200
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2014-09-17 10:19:34 +0200
commite3fcf5591eb2ac28a96315fb089f5c88e0c6aa1f (patch)
treea222b9cf0839f156959f08d58c8468f5a7649726 /include/svx/Palette.hxx
parentAdd GIMP palette loading code (diff)
downloadcore-e3fcf5591eb2ac28a96315fb089f5c88e0c6aa1f.tar.gz
core-e3fcf5591eb2ac28a96315fb089f5c88e0c6aa1f.zip
Add PaletteManager, refactor palette code
Change-Id: I7e30fc895834318514b51bc648d32aa6d297bfae
Diffstat (limited to 'include/svx/Palette.hxx')
-rw-r--r--include/svx/Palette.hxx46
1 files changed, 46 insertions, 0 deletions
diff --git a/include/svx/Palette.hxx b/include/svx/Palette.hxx
new file mode 100644
index 000000000000..f7ced038c3e6
--- /dev/null
+++ b/include/svx/Palette.hxx
@@ -0,0 +1,46 @@
+/* -*- 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_PALETTE_HXX
+#define INCLUDED_SVX_PALETTE_HXX
+
+#include <rtl/ustring.hxx>
+#include <tools/color.hxx>
+
+class Palette
+{
+public:
+ typedef std::pair<Color, OString> NamedColor;
+ typedef std::vector< NamedColor > ColorList;
+private:
+ bool mbLoaded;
+ OUString maFname;
+ OString maName;
+ ColorList maColors;
+
+ void LoadPalette();
+public:
+ Palette(const OUString &rFname);
+
+ const OString& GetPaletteName();
+ const ColorList& GetPaletteColors();
+};
+
+#endif // INCLUDED_SVX_PALETTE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */