1 /*************************************************************************
3 * The Contents of this file are made available subject to the terms of
4 * either of the following licenses
6 * - GNU Lesser General Public License Version 2.1
7 * - Sun Industry Standards Source License Version 1.1
9 * Sun Microsystems Inc., October, 2000
11 * GNU Lesser General Public License Version 2.1
12 * =============================================
13 * Copyright 2000 by Sun Microsystems, Inc.
14 * 901 San Antonio Road, Palo Alto, CA 94303, USA
16 * This library is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU Lesser General Public
18 * License version 2.1, as published by the Free Software Foundation.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with this library; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
31 * Sun Industry Standards Source License Version 1.1
32 * =================================================
33 * The contents of this file are subject to the Sun Industry Standards
34 * Source License Version 1.1 (the "License"); You may not use this file
35 * except in compliance with the License. You may obtain a copy of the
36 * License at http://www.openoffice.org/license.html.
38 * Software provided under this License is provided on an "AS IS" basis,
39 * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
40 * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
41 * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
42 * See the License for the specific provisions governing your rights and
43 * obligations concerning the Software.
45 * The Initial Developer of the Original Code is: IBM Corporation
47 * Copyright: 2008 by IBM Corporation
49 * All Rights Reserved.
51 * Contributor(s): _______________________________________
54 ************************************************************************/
55 /*************************************************************************
57 * Backgound object of Wordpro.
58 ************************************************************************/
59 /*************************************************************************
61 * 2005-01-12 Create and implement.
62 ************************************************************************/
63 #ifndef _LWPBACKGROUNDSTUFF_HXX
64 #define _LWPBACKGROUNDSTUFF_HXX
65 #include "lwpcolor.hxx"
67 /* background patterns */
68 #define BACK_TRANSPARENT 0
70 #define BACK_PATTERN 2
71 #define BACK_10PCTDOTS 3
72 #define BACK_30PCTDOTS 4
73 #define BACK_50PCTDOTS 5
74 #define BACK_75PCTDOTS 6
75 #define BACK_90PCTDOTS 7
76 #define BACK_90PCTINVDOTS 8
77 #define BACK_75PCTINVDOTS 9
78 #define BACK_50PCTINVDOTS 10
79 #define BACK_30PCTINVDOTS 11
80 #define BACK_10PCTINVDOTS 12
81 #define BACK_MARBLES 13
82 #define BACK_STARRYNIGHT 14
83 #define BACK_DIAGTHICK 15
84 #define BACK_DIAGTHIN 16
85 #define BACK_DIAGDOUBLE 17
86 #define BACK_DIAGDOUBLENARROW 18
87 #define BACK_DIAGTRIPLE 19
88 #define BACK_DIAGSINGLEWIDE 20
89 #define BACK_DIAGTHICKINV 21
90 #define BACK_DIAGTHININV 22
91 #define BACK_DIAGDOUBLEINV 23
92 #define BACK_DIAGDOUBLENARROWINV 24
93 #define BACK_DIAGTRIPLEINV 25
94 #define BACK_DIAGSINGLEWIDEINV 26
95 #define BACK_CHAINLINKSMALLINV 27
96 #define BACK_CHAINLINKSMALL 28
97 #define BACK_CHAINLINKMEDIUM 29
98 #define BACK_CHAINLINKLARGE 30
99 #define BACK_HORZSTRIPE1 31
100 #define BACK_HORZSTRIPE2 32
101 #define BACK_HORZSTRIPE3 33
102 #define BACK_HORZSTRIPE4 34
103 #define BACK_VERTSTRIPE1 35
104 #define BACK_VERTSTRIPE2 36
105 #define BACK_VERTSTRIPE3 37
106 #define BACK_VERTSTRIPE4 38
107 #define BACK_GRIDSMALL 39
108 #define BACK_GRIDMEDIUM 40
109 #define BACK_GRIDLARGE 41
110 #define BACK_BOXDOT 42
111 #define BACK_GOLFGREEN 43
113 #define BACK_HORZWEAVE 45
114 #define BACK_APPLEPIE 46
115 #define BACK_BRICK 47
116 #define BACK_DIAGBRICK 48
117 #define BACK_CHECKER1 49
118 #define BACK_CHECKER2 50
119 #define BACK_CHECKER3 51
120 #define BACK_CHECKER4 52
121 #define BACK_CHECKER5 53
122 #define BACK_SNOWFLAKE 54
123 #define BACK_MARGARITA 55
124 #define BACK_SIDEHARP 56
125 #define BACK_SCALES 57
126 #define BACK_TAYLOR 58
127 #define BACK_BUBBLES 59
128 #define BACK_ARGYLE 60
129 #define BACK_INDIAN1 61
130 #define BACK_INDIAN3 62
131 #define BACK_PEACHPIE 63
132 #define BACK_GRADIENT1 64
133 #define BACK_GRADIENT2 65
134 #define BACK_GRADIENT3 66
135 #define BACK_GRADIENT4 67
136 #define BACK_GRADIENT5 68
137 #define BACK_GRADIENT6 69
138 #define BACK_GRADIENT7 70
139 #define BACK_GRADIENT8 71
142 class LwpBackgroundStuff
151 void GetPattern(sal_uInt16 btPttnIndex
, sal_uInt8
* pPttnArray
);
154 void Read(LwpObjectStream
*pStrm
);
155 LwpColor
* GetFillColor();
156 XFBGImage
* GetFillPattern();
158 inline sal_Bool
IsTransparent() {return (m_nID
== BACK_TRANSPARENT
);}
159 inline sal_Bool
IsPatternFill() { return (sal_Bool
)(m_nID
> 2 && m_nID
< 72); }
161 friend class LwpBackgroundOverride
;
164 LwpColor m_aFillColor
;
165 LwpColor m_aPatternColor
;