1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: classx.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_goodies.hxx"
37 // ---------------------------------------------------------------
39 #define ImplSetUnderlineMode() \
41 sal_uInt32 nMode = ImplGetUI16(); \
44 case 1 : pElement->eUnderlineMode = UM_LOW; break; \
45 case 2 : pElement->eUnderlineMode = UM_HIGH; break; \
46 case 4 : pElement->eUnderlineMode = UM_STRIKEOUT; break;\
47 case 8 : pElement->eUnderlineMode = UM_OVERSCORE; break;\
48 default: pElement->eUnderlineMode = UM_OFF; break; \
50 pElement->nUnderlineColor = ImplGetBitmapColor();
52 // ---------------------------------------------------------------
54 void CGM::ImplDoClass6()
56 switch ( mnElementID
)
58 case 0x01 : ComOut( CGM_LEVEL1
, "Escape" )
60 long nIdentifier
= ImplGetI( pElement
->nIntegerPrecision
);
61 switch ( nIdentifier
)
63 case 0 : ComOut( CGM_DESCRIPTION
, "inquire function support" ) break;
64 case -1 : ComOut( CGM_DESCRIPTION
, "set underline mode" )
66 ImplSetUnderlineMode()
69 case -2 : ComOut( CGM_DESCRIPTION
, "set script mode" ) break;
70 case -3 : ComOut( CGM_DESCRIPTION
, "set shadow mode" ) break;
71 case -6 : ComOut( CGM_DESCRIPTION
, "inquire origin offset" ) break;
72 case -8 : ComOut( CGM_DESCRIPTION
, "set media size" ) break;
73 case -10 : ComOut( CGM_DESCRIPTION
, "set character mode" ) break;
74 case -14 : ComOut( CGM_DESCRIPTION
, "resolution mode" ) break;
75 case -17 : ComOut( CGM_DESCRIPTION
, "line cap" ) break;
76 case -18 : ComOut( CGM_DESCRIPTION
, "line join" ) break;
77 case -19 : ComOut( CGM_DESCRIPTION
, "edge join" ) break;
78 case -30 : ComOut( CGM_DESCRIPTION
, "media type" ) break;
79 case -31 : ComOut( CGM_DESCRIPTION
, "number of copies" ) break;
80 case -32 : ComOut( CGM_DESCRIPTION
, "orientation" ) break;
81 case -33 : ComOut( CGM_DESCRIPTION
, "device color representation" ) break;
82 case -34 : ComOut( CGM_DESCRIPTION
, "device font list" ) break;
83 case -35 : ComOut( CGM_DESCRIPTION
, "color reversal mode" ) break;
84 case -36 : ComOut( CGM_DESCRIPTION
, "line cap attributes" ) break;
85 case -37 : ComOut( CGM_DESCRIPTION
, "begin effect" ) break;
86 case -38 : ComOut( CGM_DESCRIPTION
, "end effect" ) break;
87 case -39 : ComOut( CGM_DESCRIPTION
, "begin effect definition" ) break;
88 case -40 : ComOut( CGM_DESCRIPTION
, "end effect definition" ) break;
89 case -41 : ComOut( CGM_DESCRIPTION
, "end style definition" ) break;
90 case -42 : ComOut( CGM_DESCRIPTION
, "begin eps data" ) break;
91 case -43 : ComOut( CGM_DESCRIPTION
, "eps data" ) break;
92 case -44 : ComOut( CGM_DESCRIPTION
, "end eps data" ) break;
93 case -45 : ComOut( CGM_DESCRIPTION
, "set background style" ) break;
94 case -46 : ComOut( CGM_DESCRIPTION
, "set eps mode" ) break;
95 case -47 : ComOut( CGM_DESCRIPTION
, "fill mode" ) break;
96 case -48 : ComOut( CGM_DESCRIPTION
, "begin symbol" ) break;
97 case -49 : ComOut( CGM_DESCRIPTION
, "end symbol" ) break;
98 case -50 : ComOut( CGM_DESCRIPTION
, "begin layer" ) break;
99 case -51 : ComOut( CGM_DESCRIPTION
, "end layer" ) break;
100 case -52 : ComOut( CGM_DESCRIPTION
, "layer visibility" ) break;
101 case -53 : ComOut( CGM_DESCRIPTION
, "inquire foreign data" ) break;
102 case -54 : ComOut( CGM_DESCRIPTION
, "set text offset" ) break;
103 case -55 : ComOut( CGM_DESCRIPTION
, "begin group" ) break;
104 case -56 : ComOut( CGM_DESCRIPTION
, "end group" ) break;
105 case -100 : ComOut( CGM_DESCRIPTION
, "begin patch" ) break;
106 case -101 : ComOut( CGM_DESCRIPTION
, "end patch" ) break;
107 case -102 : ComOut( CGM_DESCRIPTION
, "begin block text region" ) break;
108 case -103 : ComOut( CGM_DESCRIPTION
, "end block text region" ) break;
109 case -120 : ComOut( CGM_DESCRIPTION
, "region margins" ) break;
110 case -121 : ComOut( CGM_DESCRIPTION
, "region expansions" ) break;
111 case -122 : ComOut( CGM_DESCRIPTION
, "region anchor" ) break;
112 case -123 : ComOut( CGM_DESCRIPTION
, "paragraph horizontal align" ) break;
113 case -124 : ComOut( CGM_DESCRIPTION
, "paragraph vertical align" ) break;
114 case -125 : ComOut( CGM_DESCRIPTION
, "region line flow" ) break;
115 case -130 : ComOut( CGM_DESCRIPTION
, "paragraph spacing" ) break;
116 case -131 : ComOut( CGM_DESCRIPTION
, "paragraph identation" ) break;
117 case -132 : ComOut( CGM_DESCRIPTION
, "paragraph tabs" ) break;
118 case -133 : ComOut( CGM_DESCRIPTION
, "paragraph bullet" ) break;
119 case -134 : ComOut( CGM_DESCRIPTION
, "paragraph bulet level" ) break;
120 case -135 : ComOut( CGM_DESCRIPTION
, "line horuzontal align" ) break;
121 case -136 : ComOut( CGM_DESCRIPTION
, "line vertical align" ) break;
122 case -137 : ComOut( CGM_DESCRIPTION
, "line spacing" ) break;
123 case -138 : ComOut( CGM_DESCRIPTION
, "word wrap" ) break;
124 case -150 : ComOut( CGM_DESCRIPTION
, "forward advance distance" ) break;
125 case -151 : ComOut( CGM_DESCRIPTION
, "word spacing" ) break;
126 case -152 : ComOut( CGM_DESCRIPTION
, "external leading" ) break;
127 case -160 : ComOut( CGM_DESCRIPTION
, "set gradient offset" ) break;
128 case -161 : ComOut( CGM_DESCRIPTION
, "set gradient edge" ) break;
129 case -162 : ComOut( CGM_DESCRIPTION
, "set gradient angle" ) break;
130 case -163 : ComOut( CGM_DESCRIPTION
, "set gradient description" ) break;
131 case -164 : ComOut( CGM_DESCRIPTION
, "set gradient style" ) break;
132 case -165 : ComOut( CGM_DESCRIPTION
, "set back ground style" ) break;
133 case -170 : ComOut( CGM_DESCRIPTION
, "geometric pattern draw style" ) break;
134 case -190 : ComOut( CGM_DESCRIPTION
, "set character width" ) break;
135 case -191 : ComOut( CGM_DESCRIPTION
, "hyperlink definitions" ) break;
136 case -192 : ComOut( CGM_DESCRIPTION
, "set color name for pantone" ) break;
137 case -32746 : ComOut( CGM_DESCRIPTION
, "set text font" ) break;
138 case -32747 : ComOut( CGM_DESCRIPTION
, "font selection mode" ) break;
139 case -32752 : ComOut( CGM_DESCRIPTION
, "connecting edge" ) break;
140 case -32753 : ComOut( CGM_DESCRIPTION
, "set drawing mode" ) break;
141 case -32754 : ComOut( CGM_DESCRIPTION
, "inquire clip rectangle" ) break;
142 case -32755 : ComOut( CGM_DESCRIPTION
, "protection region indicator" ) break;
143 case -32756 : ComOut( CGM_DESCRIPTION
, "end protection region" ) break;
144 case -32757 : ComOut( CGM_DESCRIPTION
, "begin protection region" ) break;
145 case -32758 : ComOut( CGM_DESCRIPTION
, "geometric pattern definition" ) break;
146 case -32759 : ComOut( CGM_DESCRIPTION
, "hatch style definition" ) break;
147 case -32760 : ComOut( CGM_DESCRIPTION
, "close figure" ) break;
148 case -32761 : ComOut( CGM_DESCRIPTION
, "end figure" )
150 mpOutAct
->EndFigure();
151 mbFigure
= sal_False
;
154 case -32762 : ComOut( CGM_DESCRIPTION
, "begin figure" )
157 mpOutAct
->BeginFigure();
160 case -32763 : ComOut( CGM_DESCRIPTION
, "pop transformatin" ) break;
161 case -32764 : ComOut( CGM_DESCRIPTION
, "push transformation" ) break;
162 case -32765 : ComOut( CGM_DESCRIPTION
, "copy segment" ) break;
163 case -32766 : ComOut( CGM_DESCRIPTION
, "endseg" ) break;
164 case -32767 : ComOut( CGM_DESCRIPTION
, "begin segment" ) break;
165 default : ComOut( CGM_DESCRIPTION
, "????????????????????????????????" ) break;
167 mnParaSize
= mnElementSize
;
170 case 0x02 : ComOut( CGM_LEVEL1
, "Get Escape" ) break;
171 case 0x11 : ComOut( CGM_GDSF_ONLY
, "Set Underline Mode" )
173 ImplSetUnderlineMode();
176 case 0x12 : ComOut( CGM_GDSF_ONLY
, "Set Script Mode" ) break;
177 case 0x13 : ComOut( CGM_GDSF_ONLY
, "Set Shadow Mode" ) break;
178 case 0x18 : ComOut( CGM_GDSF_ONLY
, "Set Media Size" ) break;
179 case 0x20 : ComOut( CGM_GDSF_ONLY
, "Set Character Mode" ) break;
180 case 0x24 : ComOut( CGM_GDSF_ONLY
, "Resolution Mode" ) break;
181 case 0x27 : ComOut( CGM_GDSF_ONLY
, "Line Cap" ) break;
182 case 0x28 : ComOut( CGM_GDSF_ONLY
, "Line Join" ) break;
183 case 0x29 : ComOut( CGM_GDSF_ONLY
, "Edge Join" ) break;
184 case 0x40 : ComOut( CGM_GDSF_ONLY
, "Media Type" ) break;
185 case 0x41 : ComOut( CGM_GDSF_ONLY
, "Number of Copies" ) break;
186 case 0x42 : ComOut( CGM_GDSF_ONLY
, "Origin" ) break;
187 case 0x45 : ComOut( CGM_GDSF_ONLY
, "Color Reversal Mode" ) break;
188 case 0x46 : ComOut( CGM_GDSF_ONLY
, "Line Cap Attributes" ) break;
189 case 0x49 : ComOut( CGM_GDSF_ONLY
, "Begin Effect Definition" ) break;
190 case 0x50 : ComOut( CGM_GDSF_ONLY
, "End Effect Definition" ) break;
191 case 0x51 : ComOut( CGM_GDSF_ONLY
, "Line End Style Attributes" ) break;
192 case 0x52 : ComOut( CGM_GDSF_ONLY
, "Begin Data" ) break;
193 case 0x53 : ComOut( CGM_GDSF_ONLY
, "Data" ) break;
194 case 0x54 : ComOut( CGM_GDSF_ONLY
, "End Data" ) break;
195 case 0x55 : ComOut( CGM_GDSF_ONLY
, "Set Background Style" ) break;
196 case 0x56 : ComOut( CGM_GDSF_ONLY
, "Set EPS Mode" ) break;
197 case 0x57 : ComOut( CGM_GDSF_ONLY
, "Fill Mode" ) break;
198 case 0x58 : ComOut( CGM_GDSF_ONLY
, "Begin Symbol" ) break;
199 case 0x59 : ComOut( CGM_GDSF_ONLY
, "End Symbol" ) break;
200 case 0x60 : ComOut( CGM_GDSF_ONLY
, "Begin Layer" ) break;
201 case 0x61 : ComOut( CGM_GDSF_ONLY
, "End Layer" ) break;
202 case 0x62 : ComOut( CGM_GDSF_ONLY
, "Layer Visibility" ) break;
203 case 0x64 : ComOut( CGM_GDSF_ONLY
, "Set Text Offset" ) break;
204 case 0xFF : ComOut( CGM_GDSF_ONLY
, "Inquire Function Support" ) break;
205 case 0xFE : ComOut( CGM_GDSF_ONLY
, "Inquire Origin" ) break;
206 case 0xFD : ComOut( CGM_GDSF_ONLY
, "Inquire Foreign Data Mode" ) break;
207 case 0xFC : ComOut( CGM_GDSF_ONLY
, "Inquire Text Extent" ) break;
208 case 0xFB : ComOut( CGM_GDSF_ONLY
, "Inquire DPI" ) break;
209 default: ComOut( CGM_UNKNOWN_COMMAND
, "" ) break;
213 // ---------------------------------------------------------------
215 void CGM::ImplDoClass8()
217 switch ( mnElementID
)
219 case 0x01 : ComOut( CGM_LEVEL2
, "Copy Segment" ) break; // NS
220 case 0x02 : ComOut( CGM_LEVEL2
, "Inheritance Filter" ) break; // NS
221 case 0x03 : ComOut( CGM_LEVEL2
, "Clip Inheritance" ) break; // NS
222 case 0x04 : ComOut( CGM_LEVEL2
, "Segment Transformation" ) break;
223 case 0x05 : ComOut( CGM_LEVEL2
, "Segment HighLighting" ) break; // NS
224 case 0x06 : ComOut( CGM_LEVEL2
, "Segment Display Priority" ) break; // NS
225 case 0x07 : ComOut( CGM_LEVEL2
, "Segment Pick Priority" ) break; // NS
226 case 0xfe : ComOut( CGM_GDSF_ONLY
, "INQ Current Position" ) break;
227 case 0xff : ComOut( CGM_GDSF_ONLY
, "INQ Inserted Object Extent" ) break;
228 default: ComOut( CGM_UNKNOWN_COMMAND
, "" ) break; // NS
232 // ---------------------------------------------------------------
234 void CGM::ImplDoClass9()
236 switch ( mnElementID
)
238 case 0x01 : ComOut( CGM_UNKNOWN_LEVEL
, "Pixel Array" ) break; // NS
239 case 0x02 : ComOut( CGM_UNKNOWN_LEVEL
, "Create Bitmap" ) break; // NS
240 case 0x03 : ComOut( CGM_UNKNOWN_LEVEL
, "Delete Bitmap" ) break; // NS
241 case 0x04 : ComOut( CGM_UNKNOWN_LEVEL
, "Select Drawing Bitmap" ) break; // NS
242 case 0x05 : ComOut( CGM_UNKNOWN_LEVEL
, "Display Bitmap" ) break; // NS
243 case 0x06 : ComOut( CGM_UNKNOWN_LEVEL
, "Drawing Mode" ) break;
244 case 0x07 : ComOut( CGM_UNKNOWN_LEVEL
, "Mapped Bitmap ForeGrnd Color" ) break; // NS
245 case 0x08 : ComOut( CGM_UNKNOWN_LEVEL
, "Fill Bitmap" ) break; // NS
246 case 0x09 : ComOut( CGM_UNKNOWN_LEVEL
, "Two Operand BitBlt" ) break; // NS
247 case 0x0a : ComOut( CGM_UNKNOWN_LEVEL
, "Three Operand BitBlt" ) break; // NS
248 default: ComOut( CGM_UNKNOWN_COMMAND
, "" ) break;
252 // ---------------------------------------------------------------
254 void CGM::ImplDoClass15()
256 switch ( mnElementID
)
258 case 0x01 : ComOut( CGM_UNKNOWN_LEVEL
, "Inquire Error Stack" ) break;
259 case 0x02 : ComOut( CGM_UNKNOWN_LEVEL
, "Pop Error Stack" ) break;
260 case 0x03 : ComOut( CGM_UNKNOWN_LEVEL
, "Empty Error Stack" ) break;
261 default: ComOut( CGM_UNKNOWN_COMMAND
, "" ) break;
265 // ---------------------------------------------------------------