blob: da48d3824cedc3dc93fe34f76f5888f6fbd6d185 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: vbacolorformat.hxx,v $
* $Revision: 1.3.146.1 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef SC_VBA_XCOLORFORMAT_HXX
#define SC_VBA_XCOLORFORMAT_HXX
#include <com/sun/star/drawing/XShape.hpp>
#include <org/openoffice/msforms/XColorFormat.hpp>
#include <org/openoffice/msforms/XFillFormat.hpp>
#include "vbahelperinterface.hxx"
#include "vbafillformat.hxx"
typedef InheritedHelperInterfaceImpl1< oo::msforms::XColorFormat > ScVbaColorFormat_BASE;
class ColorFormatType
{
public:
const static sal_Int16 LINEFORMAT_FORECOLOR = 1;
const static sal_Int16 LINEFORMAT_BACKCOLOR = 2;
const static sal_Int16 FILLFORMAT_FORECOLOR = 3;
const static sal_Int16 FILLFORMAT_BACKCOLOR = 4;
const static sal_Int16 THREEDFORMAT_EXTRUSIONCOLOR = 5;
};
struct MsoColorIndizes
{
const static sal_Int32 HAPICOLOR_BLACK = 0;
const static sal_Int32 HAPICOLOR_WITHE = 16777215;
const static sal_Int32 HAPICOLOR_RED = 16711680;
const static sal_Int32 HAPICOLOR_BRIGHTGREEN = 65280;
const static sal_Int32 HAPICOLOR_BLUE = 255;
const static sal_Int32 HAPICOLOR_YELLOW = 16776960;
const static sal_Int32 HAPICOLOR_PINK = 16711935;
const static sal_Int32 HAPICOLOR_TURQUOISE = 65535;
const static sal_Int32 HAPICOLOR_DARKRED = 8388608;
const static sal_Int32 HAPICOLOR_GREEN = 32768;
const static sal_Int32 HAPICOLOR_DARKBLUE = 128;
const static sal_Int32 HAPICOLOR_DARKYELLOW = 8421376;
const static sal_Int32 HAPICOLOR_VIOLET = 8388736;
const static sal_Int32 HAPICOLOR_TEAL = 32896;
const static sal_Int32 HAPICOLOR_GRAY_25_PERCENT = 12632256;
const static sal_Int32 HAPICOLOR_GRAY_50_PERCENT = 8421504;
const static sal_Int32 HAPICOLOR_PERIWINCKLE = 10066431;
const static sal_Int32 HAPICOLOR_PLUM = 10040166;
const static sal_Int32 HAPICOLOR_IVORY = 16777164;
const static sal_Int32 HAPICOLOR_LIGHTTURQUOISE = 13434879;
const static sal_Int32 HAPICOLOR_DARKPRUPLE = 6684774;
const static sal_Int32 HAPICOLOR_CORAL = 16744576;
const static sal_Int32 HAPICOLOR_OCEANBLUE = 26316;
const static sal_Int32 HAPICOLOR_ICEBLUE = 13421823;
const static sal_Int32 HAPICOLOR_SKYBLUE = 52479;
const static sal_Int32 HAPICOLOR_LIGHTGREEN = 13434828;
const static sal_Int32 HAPICOLOR_LIGHTYELLOW = 16777113;
const static sal_Int32 HAPICOLOR_PALEBLUE = 10079487;
const static sal_Int32 HAPICOLOR_ROSE = 16751052;
const static sal_Int32 HAPICOLOR_LAVENDER = 13408767;
const static sal_Int32 HAPICOLOR_TAN = 16764057;
const static sal_Int32 HAPICOLOR_LIGHTBLUE = 3368703;
const static sal_Int32 HAPICOLOR_AQUA = 3394764;
const static sal_Int32 HAPICOLOR_LIME = 10079232;
const static sal_Int32 HAPICOLOR_GOLD = 16763904;
const static sal_Int32 HAPICOLOR_LIGHTORANGE = 16750848;
const static sal_Int32 HAPICOLOR_ORANGE = 16737792;
const static sal_Int32 HAPICOLOR_BLUEGRAY = 6710937;
const static sal_Int32 HAPICOLOR_GRAY_40_PERCENT = 9868950;
const static sal_Int32 HAPICOLOR_DARKTEAL = 13158;
const static sal_Int32 HAPICOLOR_SEAGREEN = 3381606;
const static sal_Int32 HAPICOLOR_NONAME = 13056;
const static sal_Int32 HAPICOLOR_OLIVEGREEN = 3355392;
const static sal_Int32 HAPICOLOR_BROWN = 10040064;
const static sal_Int32 HAPICOLOR_INDIGO = 3355545;
const static sal_Int32 HAPICOLOR_GRAY_80_PERCENT = 3355443;
static sal_Int32 getColorIndex( sal_Int32 nIndex );
};
class ScVbaColorFormat : public ScVbaColorFormat_BASE
{
private:
css::uno::Reference< oo::vba::XHelperInterface > m_xInternalParent;
css::uno::Reference< css::drawing::XShape > m_xShape;
css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
ScVbaFillFormat *m_pFillFormat;
sal_Int16 m_nColorFormatType;
sal_Int32 m_nFillFormatBackColor;
protected:
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
void setColorFormat( sal_Int16 nType );
public:
ScVbaColorFormat( const css::uno::Reference< oo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< oo::vba::XHelperInterface > xInternalParent, const css::uno::Reference< css::drawing::XShape > xShape, const sal_Int16 nColorFormatType );
// Attributes
virtual sal_Int32 SAL_CALL getRGB() throw (css::uno::RuntimeException);
virtual void SAL_CALL setRGB( sal_Int32 _rgb ) throw (css::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getSchemeColor() throw (css::uno::RuntimeException);
virtual void SAL_CALL setSchemeColor( sal_Int32 _schemecolor ) throw (css::uno::RuntimeException);
};
#endif//SC_VBA_XCOLORFORMAT_HXX
|