LibreOffice Module vbahelper (master) 1
vbacolorformat.hxx
Go to the documentation of this file.
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 INCLUDED_VBAHELPER_SOURCE_VBAHELPER_VBACOLORFORMAT_HXX
20#define INCLUDED_VBAHELPER_SOURCE_VBAHELPER_VBACOLORFORMAT_HXX
21
22#include <com/sun/star/drawing/XShape.hpp>
23#include <ooo/vba/msforms/XColorFormat.hpp>
25#include "vbafillformat.hxx"
26
28
30{
31public:
32 const static sal_Int16 LINEFORMAT_FORECOLOR = 1;
33 const static sal_Int16 LINEFORMAT_BACKCOLOR = 2;
34 const static sal_Int16 FILLFORMAT_FORECOLOR = 3;
35 const static sal_Int16 FILLFORMAT_BACKCOLOR = 4;
36 const static sal_Int16 THREEDFORMAT_EXTRUSIONCOLOR = 5;
37};
38
40{
41 const static sal_Int32 HAPICOLOR_BLACK = 0;
42 const static sal_Int32 HAPICOLOR_WHITE = 16777215;
43 const static sal_Int32 HAPICOLOR_RED = 16711680;
44 const static sal_Int32 HAPICOLOR_BRIGHTGREEN = 65280;
45 const static sal_Int32 HAPICOLOR_BLUE = 255;
46 const static sal_Int32 HAPICOLOR_YELLOW = 16776960;
47 const static sal_Int32 HAPICOLOR_PINK = 16711935;
48 const static sal_Int32 HAPICOLOR_TURQUOISE = 65535;
49 const static sal_Int32 HAPICOLOR_DARKRED = 8388608;
50 const static sal_Int32 HAPICOLOR_GREEN = 32768;
51 const static sal_Int32 HAPICOLOR_DARKBLUE = 128;
52 const static sal_Int32 HAPICOLOR_DARKYELLOW = 8421376;
53 const static sal_Int32 HAPICOLOR_VIOLET = 8388736;
54 const static sal_Int32 HAPICOLOR_TEAL = 32896;
55 const static sal_Int32 HAPICOLOR_GRAY_25_PERCENT = 12632256;
56 const static sal_Int32 HAPICOLOR_GRAY_50_PERCENT = 8421504;
57 const static sal_Int32 HAPICOLOR_PERIWINCKLE = 10066431;
58 const static sal_Int32 HAPICOLOR_PLUM = 10040166;
59 const static sal_Int32 HAPICOLOR_IVORY = 16777164;
60 const static sal_Int32 HAPICOLOR_LIGHTTURQUOISE = 13434879;
61 const static sal_Int32 HAPICOLOR_DARKPRUPLE = 6684774;
62 const static sal_Int32 HAPICOLOR_CORAL = 16744576;
63 const static sal_Int32 HAPICOLOR_OCEANBLUE = 26316;
64 const static sal_Int32 HAPICOLOR_ICEBLUE = 13421823;
65 const static sal_Int32 HAPICOLOR_SKYBLUE = 52479;
66 const static sal_Int32 HAPICOLOR_LIGHTGREEN = 13434828;
67 const static sal_Int32 HAPICOLOR_LIGHTYELLOW = 16777113;
68 const static sal_Int32 HAPICOLOR_PALEBLUE = 10079487;
69 const static sal_Int32 HAPICOLOR_ROSE = 16751052;
70 const static sal_Int32 HAPICOLOR_LAVENDER = 13408767;
71 const static sal_Int32 HAPICOLOR_TAN = 16764057;
72 const static sal_Int32 HAPICOLOR_LIGHTBLUE = 3368703;
73 const static sal_Int32 HAPICOLOR_AQUA = 3394764;
74 const static sal_Int32 HAPICOLOR_LIME = 10079232;
75 const static sal_Int32 HAPICOLOR_GOLD = 16763904;
76 const static sal_Int32 HAPICOLOR_LIGHTORANGE = 16750848;
77 const static sal_Int32 HAPICOLOR_ORANGE = 16737792;
78 const static sal_Int32 HAPICOLOR_BLUEGRAY = 6710937;
79 const static sal_Int32 HAPICOLOR_GRAY_40_PERCENT = 9868950;
80 const static sal_Int32 HAPICOLOR_DARKTEAL = 13158;
81 const static sal_Int32 HAPICOLOR_SEAGREEN = 3381606;
82 const static sal_Int32 HAPICOLOR_NONAME = 13056;
83 const static sal_Int32 HAPICOLOR_OLIVEGREEN = 3355392;
84 const static sal_Int32 HAPICOLOR_BROWN = 10040064;
85 const static sal_Int32 HAPICOLOR_INDIGO = 3355545;
86 const static sal_Int32 HAPICOLOR_GRAY_80_PERCENT = 3355443;
87
88 static sal_Int32 getColorIndex( sal_Int32 nIndex );
89
90};
91
93{
94private:
95 css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
99protected:
100 virtual OUString getServiceImplName() override;
101 virtual css::uno::Sequence<OUString> getServiceNames() override;
102public:
103 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 );
104
105 // Attributes
106 virtual sal_Int32 SAL_CALL getRGB() override;
107 virtual void SAL_CALL setRGB( sal_Int32 _rgb ) override;
108 virtual sal_Int32 SAL_CALL getSchemeColor() override;
109 virtual void SAL_CALL setSchemeColor( sal_Int32 _schemecolor ) override;
110
111};
112
113#endif // INCLUDED_VBAHELPER_SOURCE_VBAHELPER_VBACOLORFORMAT_HXX
114
115/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static const sal_Int16 FILLFORMAT_FORECOLOR
static const sal_Int16 LINEFORMAT_FORECOLOR
static const sal_Int16 LINEFORMAT_BACKCOLOR
static const sal_Int16 THREEDFORMAT_EXTRUSIONCOLOR
static const sal_Int16 FILLFORMAT_BACKCOLOR
virtual sal_Int32 SAL_CALL getRGB() override
sal_Int32 m_nFillFormatBackColor
virtual void SAL_CALL setSchemeColor(sal_Int32 _schemecolor) override
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)
virtual OUString getServiceImplName() override
css::uno::Reference< css::beans::XPropertySet > m_xPropertySet
virtual css::uno::Sequence< OUString > getServiceNames() override
sal_Int16 m_nColorFormatType
virtual void SAL_CALL setRGB(sal_Int32 _rgb) override
virtual sal_Int32 SAL_CALL getSchemeColor() override
ScVbaFillFormat * m_pFillFormat
static const sal_Int32 HAPICOLOR_OLIVEGREEN
static const sal_Int32 HAPICOLOR_BROWN
static const sal_Int32 HAPICOLOR_DARKTEAL
static const sal_Int32 HAPICOLOR_GRAY_40_PERCENT
static const sal_Int32 HAPICOLOR_PERIWINCKLE
static const sal_Int32 HAPICOLOR_BLACK
static const sal_Int32 HAPICOLOR_TEAL
static const sal_Int32 HAPICOLOR_TURQUOISE
static const sal_Int32 HAPICOLOR_PLUM
static const sal_Int32 HAPICOLOR_GRAY_50_PERCENT
static const sal_Int32 HAPICOLOR_PINK
static const sal_Int32 HAPICOLOR_YELLOW
static const sal_Int32 HAPICOLOR_NONAME
static const sal_Int32 HAPICOLOR_SKYBLUE
static const sal_Int32 HAPICOLOR_INDIGO
static const sal_Int32 HAPICOLOR_LIGHTTURQUOISE
static const sal_Int32 HAPICOLOR_OCEANBLUE
static const sal_Int32 HAPICOLOR_LIGHTORANGE
static const sal_Int32 HAPICOLOR_IVORY
static const sal_Int32 HAPICOLOR_DARKYELLOW
static const sal_Int32 HAPICOLOR_DARKPRUPLE
static const sal_Int32 HAPICOLOR_RED
static const sal_Int32 HAPICOLOR_ROSE
static const sal_Int32 HAPICOLOR_GRAY_25_PERCENT
static const sal_Int32 HAPICOLOR_BRIGHTGREEN
static const sal_Int32 HAPICOLOR_SEAGREEN
static const sal_Int32 HAPICOLOR_WHITE
static const sal_Int32 HAPICOLOR_GOLD
static const sal_Int32 HAPICOLOR_LIME
static const sal_Int32 HAPICOLOR_GRAY_80_PERCENT
static const sal_Int32 HAPICOLOR_LIGHTGREEN
static const sal_Int32 HAPICOLOR_PALEBLUE
static const sal_Int32 HAPICOLOR_AQUA
static const sal_Int32 HAPICOLOR_VIOLET
static const sal_Int32 HAPICOLOR_TAN
static const sal_Int32 HAPICOLOR_ICEBLUE
static sal_Int32 getColorIndex(sal_Int32 nIndex)
static const sal_Int32 HAPICOLOR_BLUE
static const sal_Int32 HAPICOLOR_DARKBLUE
static const sal_Int32 HAPICOLOR_GREEN
static const sal_Int32 HAPICOLOR_CORAL
static const sal_Int32 HAPICOLOR_LAVENDER
static const sal_Int32 HAPICOLOR_LIGHTBLUE
static const sal_Int32 HAPICOLOR_ORANGE
static const sal_Int32 HAPICOLOR_DARKRED
static const sal_Int32 HAPICOLOR_LIGHTYELLOW
static const sal_Int32 HAPICOLOR_BLUEGRAY
InheritedHelperInterfaceWeakImpl< ov::msforms::XColorFormat > ScVbaColorFormat_BASE