Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef _VCL_VCLENUM_HXX
30 : : #define _VCL_VCLENUM_HXX
31 : :
32 : : #include <sal/types.h>
33 : : #include <tools/solar.h>
34 : : #include <tools/fontenum.hxx>
35 : :
36 : : #ifndef ENUM_TIMEFIELDFORMAT_DECLARED
37 : : #define ENUM_TIMEFIELDFORMAT_DECLARED
38 : :
39 : : // By changes you must also change: rsc/vclrsc.hxx
40 : : enum TimeFieldFormat {TIMEF_NONE, TIMEF_SEC, TIMEF_100TH_SEC, TIMEF_SEC_CS, TimeFieldFormat_FORCE_EQUAL_SIZE=SAL_MAX_ENUM };
41 : :
42 : : #endif
43 : :
44 : : // ------------------------------------------------------------
45 : :
46 : : #ifndef ENUM_EXTTIMEFIELDFORMAT_DECLARED
47 : : #define ENUM_EXTTIMEFIELDFORMAT_DECLARED
48 : :
49 : : enum ExtTimeFieldFormat { EXTTIMEF_24H_SHORT, EXTTIMEF_24H_LONG,
50 : : EXTTIMEF_12H_SHORT, EXTTIMEF_12H_LONG,
51 : : EXTTIMEF_DURATION_SHORT, EXTTIMEF_DURATION_LONG };
52 : :
53 : : #endif
54 : :
55 : : // ------------------------------------------------------------
56 : :
57 : : #ifndef ENUM_EXTDATEFIELDFORMAT_DECLARED
58 : : #define ENUM_EXTDATEFIELDFORMAT_DECLARED
59 : :
60 : : enum ExtDateFieldFormat { XTDATEF_SYSTEM_SHORT, XTDATEF_SYSTEM_SHORT_YY, XTDATEF_SYSTEM_SHORT_YYYY,
61 : : XTDATEF_SYSTEM_LONG,
62 : : XTDATEF_SHORT_DDMMYY, XTDATEF_SHORT_MMDDYY, XTDATEF_SHORT_YYMMDD,
63 : : XTDATEF_SHORT_DDMMYYYY, XTDATEF_SHORT_MMDDYYYY, XTDATEF_SHORT_YYYYMMDD,
64 : : XTDATEF_SHORT_YYMMDD_DIN5008, XTDATEF_SHORT_YYYYMMDD_DIN5008, ExtDateFieldFormat_FORCE_EQUAL_SIZE=SAL_MAX_ENUM };
65 : :
66 : : #endif
67 : :
68 : : // ------------------------------------------------------------
69 : :
70 : : enum GradientStyle
71 : : {
72 : : GradientStyle_LINEAR = 0,
73 : : GradientStyle_AXIAL = 1,
74 : : GradientStyle_RADIAL = 2,
75 : : GradientStyle_ELLIPTICAL = 3,
76 : : GradientStyle_SQUARE = 4,
77 : : GradientStyle_RECT = 5,
78 : : GradientStyle_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
79 : : };
80 : :
81 : : // ------------------------------------------------------------
82 : :
83 : : // to avoid conflicts with enum's declared otherwise
84 : : #define HATCH_SINGLE HatchStyle_SINGLE
85 : : #define HATCH_DOUBLE HatchStyle_DOUBLE
86 : : #define HATCH_TRIPLE HatchStyle_TRIPLE
87 : : #define HATCH_FORCE_EQUAL_SIZE HatchStyle_FORCE_EQUAL_SIZE
88 : :
89 : : #ifndef ENUM_HATCHSTYLE_DECLARED
90 : : #define ENUM_HATCHSTYLE_DECLARED
91 : :
92 : : enum HatchStyle
93 : : {
94 : : HATCH_SINGLE = 0,
95 : : HATCH_DOUBLE = 1,
96 : : HATCH_TRIPLE = 2,
97 : : HatchStyle_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
98 : : };
99 : :
100 : : #endif
101 : :
102 : : // ------------------------------------------------------------
103 : :
104 : : // to avoid conflicts with enum's declared otherwise
105 : : #define LINE_NONE LineStyle_NONE
106 : : #define LINE_SOLID LineStyle_SOLID
107 : : #define LINE_DASH LineStyle_DASH
108 : : #define LINE_FORCE_EQUAL_SIZE LineStyle_FORCE_EQUAL_SIZE
109 : :
110 : : #ifndef ENUM_LINESTYLE_DECLARED
111 : : #define ENUM_LINESTYLE_DECLARED
112 : :
113 : : enum LineStyle
114 : : {
115 : : LINE_NONE = 0,
116 : : LINE_SOLID = 1,
117 : : LINE_DASH = 2,
118 : : LineStyle_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
119 : : };
120 : :
121 : : #endif
122 : :
123 : : // ------------------------------------------------------------
124 : :
125 : : #ifndef ENUM_RASTEROP_DECLARED
126 : : #define ENUM_RASTEROP_DECLARED
127 : :
128 : : enum RasterOp { ROP_OVERPAINT, ROP_XOR, ROP_0, ROP_1, ROP_INVERT };
129 : :
130 : : #endif
131 : :
132 : : // ------------------------------------------------------------
133 : :
134 : :
135 : : #ifndef ENUM_FONTAUTOHINT_DECLARED
136 : : #define ENUM_FONTAUTOHINT_DECLARED
137 : :
138 : : enum FontAutoHint { AUTOHINT_DONTKNOW, AUTOHINT_FALSE, AUTOHINT_TRUE };
139 : :
140 : : #endif
141 : :
142 : : #ifndef ENUM_FONTHINTING_DECLARED
143 : : #define ENUM_FONTHINTING_DECLARED
144 : :
145 : : enum FontHinting { HINTING_DONTKNOW, HINTING_FALSE, HINTING_TRUE };
146 : :
147 : : #endif
148 : :
149 : : #ifndef ENUM_FONTHINTSTYLE_DECLARED
150 : : #define ENUM_FONTHINTSTYLE_DECLARED
151 : :
152 : : enum FontHintStyle { HINT_NONE, HINT_SLIGHT, HINT_MEDIUM, HINT_FULL };
153 : :
154 : : #endif
155 : :
156 : : // ------------------------------------------------------------
157 : :
158 : : #ifndef ENUM_KEYFUNCTYPE_DECLARED
159 : : #define ENUM_KEYFUNCTYPE_DECLARED
160 : :
161 : : enum KeyFuncType { KEYFUNC_DONTKNOW, KEYFUNC_NEW, KEYFUNC_OPEN, KEYFUNC_SAVE,
162 : : KEYFUNC_SAVEAS, KEYFUNC_PRINT, KEYFUNC_CLOSE, KEYFUNC_QUIT,
163 : : KEYFUNC_CUT, KEYFUNC_COPY, KEYFUNC_PASTE, KEYFUNC_UNDO,
164 : : KEYFUNC_REDO, KEYFUNC_DELETE, KEYFUNC_REPEAT, KEYFUNC_FIND,
165 : : KEYFUNC_FINDBACKWARD, KEYFUNC_PROPERTIES, KEYFUNC_FRONT,
166 : : KeyFuncType_FORCE_EQUAL_SIZE=SAL_MAX_ENUM };
167 : :
168 : : #endif
169 : :
170 : : typedef sal_uInt32 sal_UCS4; // TODO: this should be moved to rtl
171 : :
172 : : #ifndef ENUM_OUTDEVSUPPORT_DECLARED
173 : : #define ENUM_OUTDEVSUPPORT_DECLARED
174 : :
175 : : enum OutDevSupportType { OutDevSupport_TransparentRect, OutDevSupport_B2DClip, OutDevSupport_B2DDraw };
176 : :
177 : : #endif
178 : :
179 : : struct ItalicMatrix
180 : : {
181 : : double xx, xy, yx, yy;
182 : 873787 : ItalicMatrix() : xx(1), xy(0), yx(0), yy(1) {}
183 : : };
184 : :
185 : : inline bool operator ==(const ItalicMatrix& a, const ItalicMatrix& b)
186 : : {
187 : : return a.xx == b.xx && a.xy == b.xy && a.yx == b.yx && a.yy == b.yy;
188 : : }
189 : :
190 : 1157505 : inline bool operator !=(const ItalicMatrix& a, const ItalicMatrix& b)
191 : : {
192 [ + - ][ + - ]: 1157505 : return a.xx != b.xx || a.xy != b.xy || a.yx != b.yx || a.yy != b.yy;
[ + - ][ - + ]
193 : : }
194 : :
195 : : #endif // _VCL_VCLENUM_HXX
196 : :
197 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|