Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
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/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
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 .
18 : : */
19 : : #ifndef SC_VBA_XCOLORFORMAT_HXX
20 : : #define SC_VBA_XCOLORFORMAT_HXX
21 : :
22 : : #include <com/sun/star/drawing/XShape.hpp>
23 : : #include <ooo/vba/msforms/XColorFormat.hpp>
24 : : #include <ooo/vba/msforms/XFillFormat.hpp>
25 : : #include <vbahelper/vbahelperinterface.hxx>
26 : : #include "vbafillformat.hxx"
27 : :
28 : : typedef InheritedHelperInterfaceImpl1< ov::msforms::XColorFormat > ScVbaColorFormat_BASE;
29 : :
30 : : class ColorFormatType
31 : : {
32 : : public:
33 : : const static sal_Int16 LINEFORMAT_FORECOLOR = 1;
34 : : const static sal_Int16 LINEFORMAT_BACKCOLOR = 2;
35 : : const static sal_Int16 FILLFORMAT_FORECOLOR = 3;
36 : : const static sal_Int16 FILLFORMAT_BACKCOLOR = 4;
37 : : const static sal_Int16 THREEDFORMAT_EXTRUSIONCOLOR = 5;
38 : : };
39 : :
40 : : struct MsoColorIndizes
41 : : {
42 : : const static sal_Int32 HAPICOLOR_BLACK = 0;
43 : : const static sal_Int32 HAPICOLOR_WITHE = 16777215;
44 : : const static sal_Int32 HAPICOLOR_RED = 16711680;
45 : : const static sal_Int32 HAPICOLOR_BRIGHTGREEN = 65280;
46 : : const static sal_Int32 HAPICOLOR_BLUE = 255;
47 : : const static sal_Int32 HAPICOLOR_YELLOW = 16776960;
48 : : const static sal_Int32 HAPICOLOR_PINK = 16711935;
49 : : const static sal_Int32 HAPICOLOR_TURQUOISE = 65535;
50 : : const static sal_Int32 HAPICOLOR_DARKRED = 8388608;
51 : : const static sal_Int32 HAPICOLOR_GREEN = 32768;
52 : : const static sal_Int32 HAPICOLOR_DARKBLUE = 128;
53 : : const static sal_Int32 HAPICOLOR_DARKYELLOW = 8421376;
54 : : const static sal_Int32 HAPICOLOR_VIOLET = 8388736;
55 : : const static sal_Int32 HAPICOLOR_TEAL = 32896;
56 : : const static sal_Int32 HAPICOLOR_GRAY_25_PERCENT = 12632256;
57 : : const static sal_Int32 HAPICOLOR_GRAY_50_PERCENT = 8421504;
58 : : const static sal_Int32 HAPICOLOR_PERIWINCKLE = 10066431;
59 : : const static sal_Int32 HAPICOLOR_PLUM = 10040166;
60 : : const static sal_Int32 HAPICOLOR_IVORY = 16777164;
61 : : const static sal_Int32 HAPICOLOR_LIGHTTURQUOISE = 13434879;
62 : : const static sal_Int32 HAPICOLOR_DARKPRUPLE = 6684774;
63 : : const static sal_Int32 HAPICOLOR_CORAL = 16744576;
64 : : const static sal_Int32 HAPICOLOR_OCEANBLUE = 26316;
65 : : const static sal_Int32 HAPICOLOR_ICEBLUE = 13421823;
66 : : const static sal_Int32 HAPICOLOR_SKYBLUE = 52479;
67 : : const static sal_Int32 HAPICOLOR_LIGHTGREEN = 13434828;
68 : : const static sal_Int32 HAPICOLOR_LIGHTYELLOW = 16777113;
69 : : const static sal_Int32 HAPICOLOR_PALEBLUE = 10079487;
70 : : const static sal_Int32 HAPICOLOR_ROSE = 16751052;
71 : : const static sal_Int32 HAPICOLOR_LAVENDER = 13408767;
72 : : const static sal_Int32 HAPICOLOR_TAN = 16764057;
73 : : const static sal_Int32 HAPICOLOR_LIGHTBLUE = 3368703;
74 : : const static sal_Int32 HAPICOLOR_AQUA = 3394764;
75 : : const static sal_Int32 HAPICOLOR_LIME = 10079232;
76 : : const static sal_Int32 HAPICOLOR_GOLD = 16763904;
77 : : const static sal_Int32 HAPICOLOR_LIGHTORANGE = 16750848;
78 : : const static sal_Int32 HAPICOLOR_ORANGE = 16737792;
79 : : const static sal_Int32 HAPICOLOR_BLUEGRAY = 6710937;
80 : : const static sal_Int32 HAPICOLOR_GRAY_40_PERCENT = 9868950;
81 : : const static sal_Int32 HAPICOLOR_DARKTEAL = 13158;
82 : : const static sal_Int32 HAPICOLOR_SEAGREEN = 3381606;
83 : : const static sal_Int32 HAPICOLOR_NONAME = 13056;
84 : : const static sal_Int32 HAPICOLOR_OLIVEGREEN = 3355392;
85 : : const static sal_Int32 HAPICOLOR_BROWN = 10040064;
86 : : const static sal_Int32 HAPICOLOR_INDIGO = 3355545;
87 : : const static sal_Int32 HAPICOLOR_GRAY_80_PERCENT = 3355443;
88 : :
89 : : static sal_Int32 getColorIndex( sal_Int32 nIndex );
90 : :
91 : : };
92 : :
93 [ # # ]: 0 : class ScVbaColorFormat : public ScVbaColorFormat_BASE
94 : : {
95 : : private:
96 : : css::uno::Reference< ov::XHelperInterface > m_xInternalParent;
97 : : css::uno::Reference< css::drawing::XShape > m_xShape;
98 : : css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
99 : : ScVbaFillFormat *m_pFillFormat;
100 : : sal_Int16 m_nColorFormatType;
101 : : sal_Int32 m_nFillFormatBackColor;
102 : : protected:
103 : : virtual rtl::OUString getServiceImplName();
104 : : virtual css::uno::Sequence<rtl::OUString> getServiceNames();
105 : : public:
106 : : ScVbaColorFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XHelperInterface > xInternalParent, const css::uno::Reference< css::drawing::XShape > xShape, const sal_Int16 nColorFormatType );
107 : :
108 : : // Attributes
109 : : virtual sal_Int32 SAL_CALL getRGB() throw (css::uno::RuntimeException);
110 : : virtual void SAL_CALL setRGB( sal_Int32 _rgb ) throw (css::uno::RuntimeException);
111 : : virtual sal_Int32 SAL_CALL getSchemeColor() throw (css::uno::RuntimeException);
112 : : virtual void SAL_CALL setSchemeColor( sal_Int32 _schemecolor ) throw (css::uno::RuntimeException);
113 : :
114 : : };
115 : :
116 : : #endif//SC_VBA_XCOLORFORMAT_HXX
117 : :
118 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|