1 /**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_filter.hxx"
26 //#define VCL_NEED_BASETSD
27
28 #include <main.hxx>
29 #include <outact.hxx>
30
31
32 // ---------------------------------------------------------------
33
ImplDoClass5()34 void CGM::ImplDoClass5()
35 {
36 switch ( mnElementID )
37 {
38 case 0x01 : ComOut( CGM_LEVEL1, "Line Bundle Index" )
39 pElement->pLineBundle = (LineBundle*)pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aLineList, pElement->aLineBundle );
40 break;
41 case 0x02 : ComOut( CGM_LEVEL1, "Line Type" )
42 {
43 if ( pElement->nAspectSourceFlags & ASF_LINETYPE )
44 pElement->pLineBundle->eLineType = (LineType)ImplGetI( pElement->nIndexPrecision );
45 else
46 pElement->aLineBundle.eLineType = (LineType)ImplGetI( pElement->nIndexPrecision );
47 }
48 break;
49 case 0x03 : ComOut( CGM_LEVEL1, "Line Width" )
50 {
51 double nWidth;
52 if ( pElement->eLineWidthSpecMode == SM_ABSOLUTE )
53 {
54 if ( pElement->eVDCType == VDC_REAL )
55 nWidth = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize );
56 else
57 nWidth = (double)ImplGetI( pElement->nVDCIntegerPrecision );
58
59 ImplMapDouble( nWidth );
60 }
61 else
62 nWidth = (sal_uInt32)ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ) * 25; // scaling in 1/4 mm
63
64 ( pElement->nAspectSourceFlags & ASF_LINEWIDTH )
65 ? pElement->aLineBundle.nLineWidth = nWidth
66 : pElement->aLineBundle.nLineWidth = nWidth;
67 }
68 break;
69 case 0x04 : ComOut( CGM_LEVEL1, "Line Color" )
70 {
71 if ( pElement->nAspectSourceFlags & ASF_LINECOLOR )
72 pElement->pLineBundle->SetColor( ImplGetBitmapColor() );
73 else
74 pElement->aLineBundle.SetColor( ImplGetBitmapColor() );
75 }
76 break;
77 case 0x05 : ComOut( CGM_LEVEL1, "Marker Bundle Index" )
78 pElement->pMarkerBundle = (MarkerBundle*)pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aMarkerList, pElement->aMarkerBundle );
79 break;
80 case 0x06 : ComOut( CGM_LEVEL1, "Marker Type" )
81 {
82 if ( pElement->nAspectSourceFlags & ASF_MARKERTYPE )
83 pElement->pMarkerBundle->eMarkerType = (MarkerType)ImplGetI( pElement->nIndexPrecision );
84 else
85 pElement->aMarkerBundle.eMarkerType = (MarkerType)ImplGetI( pElement->nIndexPrecision );
86 }
87 break;
88 case 0x07 : ComOut( CGM_LEVEL1, "Marker Size" )
89 {
90 double nWidth;
91 if ( pElement->eMarkerSizeSpecMode == SM_ABSOLUTE )
92 {
93 if ( pElement->eVDCType == VDC_REAL )
94 nWidth = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize );
95 else
96 nWidth = (double)ImplGetI( pElement->nVDCIntegerPrecision );
97 ImplMapDouble( nWidth );
98 }
99 else
100 nWidth = (sal_uInt32)ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ) * 25;
101 ( pElement->nAspectSourceFlags & ASF_MARKERSIZE )
102 ? pElement->aMarkerBundle.nMarkerSize = nWidth
103 : pElement->aMarkerBundle.nMarkerSize = nWidth;
104 }
105 break;
106 case 0x08 : ComOut( CGM_LEVEL1, "Marker Color" )
107 {
108 if ( pElement->nAspectSourceFlags & ASF_MARKERCOLOR )
109 pElement->pMarkerBundle->SetColor( ImplGetBitmapColor() );
110 else
111 pElement->aMarkerBundle.SetColor( ImplGetBitmapColor() );
112 }
113 break;
114 case 0x09 : ComOut( CGM_LEVEL1, "Text Bundle Index" )
115 pElement->pTextBundle = (TextBundle*)pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aTextList, pElement->aTextBundle );
116 break;
117 case 0x0a : ComOut( CGM_LEVEL1, "Text Font Index" )
118 {
119 if ( pElement->nAspectSourceFlags & ASF_TEXTFONTINDEX )
120 pElement->pTextBundle->nTextFontIndex = ImplGetI( pElement->nIndexPrecision );
121 else
122 pElement->aTextBundle.nTextFontIndex = ImplGetI( pElement->nIndexPrecision );
123 }
124 break;
125 case 0x0b : ComOut( CGM_LEVEL1, "Text Precision" )
126 {
127 TextBundle* pBundle;
128 if ( pElement->nAspectSourceFlags & ASF_TEXTPRECISION )
129 pBundle = pElement->pTextBundle;
130 else
131 pBundle = &pElement->aTextBundle;
132 switch( ImplGetUI16() )
133 {
134 case 0 : pBundle->eTextPrecision = TPR_STRING; break;
135 case 1 : pBundle->eTextPrecision = TPR_CHARACTER; break;
136 case 2 : pBundle->eTextPrecision = TPR_STROKE; break;
137 default : pBundle->eTextPrecision = TPR_UNDEFINED; break;
138 }
139 }
140 break;
141 case 0x0c : ComOut( CGM_LEVEL1, "Character Expansion Factor" )
142 {
143 if ( pElement->nAspectSourceFlags & ASF_CHARACTEREXPANSION )
144 pElement->pTextBundle->nCharacterExpansion = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
145 else
146 pElement->aTextBundle.nCharacterExpansion = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
147 }
148 break;
149 case 0x0d : ComOut( CGM_LEVEL1, "Character Spacing" )
150 {
151 if ( pElement->nAspectSourceFlags & ASF_CHARACTERSPACING )
152 pElement->pTextBundle->nCharacterSpacing = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
153 else
154 pElement->aTextBundle.nCharacterSpacing = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
155 }
156 break;
157 case 0x0e : ComOut( CGM_LEVEL1, "Text Color" )
158 {
159 if ( pElement->nAspectSourceFlags & ASF_TEXTCOLOR )
160 pElement->pTextBundle->SetColor( ImplGetBitmapColor() );
161 else
162 pElement->aTextBundle.SetColor( ImplGetBitmapColor() );
163 }
164 break;
165 case 0x0f : ComOut( CGM_LEVEL1, "Character Height" )
166 {
167 if ( pElement->eVDCType == VDC_INTEGER )
168 pElement->nCharacterHeight = ImplGetI( pElement->nVDCIntegerPrecision );
169 else // ->floating points
170 pElement->nCharacterHeight = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize );
171 ImplMapDouble( pElement->nCharacterHeight );
172 pElement->nCharacterHeight /= 18.0;
173 }
174 break;
175 case 0x10 : ComOut( CGM_LEVEL1, "Character Orientation" )
176 {
177 if ( pElement->eVDCType == VDC_INTEGER )
178 {
179 pElement->nCharacterOrientation[0] = ImplGetI( pElement->nVDCIntegerPrecision );
180 pElement->nCharacterOrientation[1] = ImplGetI( pElement->nVDCIntegerPrecision );
181 pElement->nCharacterOrientation[2] = ImplGetI( pElement->nVDCIntegerPrecision );
182 pElement->nCharacterOrientation[3] = ImplGetI( pElement->nVDCIntegerPrecision );
183 }
184 else // ->floating points
185 {
186 pElement->nCharacterOrientation[0] = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize );
187 pElement->nCharacterOrientation[1] = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize );
188 pElement->nCharacterOrientation[2] = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize );
189 pElement->nCharacterOrientation[3] = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize );
190 }
191 }
192 break;
193 case 0x11 : ComOut( CGM_LEVEL1, "Text Path" )
194 {
195 switch( ImplGetUI16() )
196 {
197 case 0 : pElement->eTextPath = TPR_RIGHT; break;
198 case 1 : pElement->eTextPath = TPR_LEFT; break;
199 case 2 : pElement->eTextPath = TPR_UP; break;
200 case 3 : pElement->eTextPath = TPR_DOWN; break;
201 default : mbStatus = sal_False; break;
202 }
203 }
204 break;
205 case 0x12 : ComOut( CGM_LEVEL1, "Text Alignment" )
206 {
207 pElement->eTextAlignmentH = (TextAlignmentH)ImplGetUI16();
208 pElement->eTextAlignmentV = (TextAlignmentV)ImplGetUI16( 8 );
209 pElement->nTextAlignmentHCont = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
210 pElement->nTextAlignmentVCont = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
211 }
212 break;
213 case 0x13 : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Character Set Index" )
214 pElement->nCharacterSetIndex = ImplGetI( pElement->nIndexPrecision );
215 break;
216 case 0x14 : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Alternate Character Set Index" )
217 pElement->nAlternateCharacterSetIndex = ImplGetI( pElement->nIndexPrecision );
218 break;
219 case 0x15 : ComOut( CGM_LEVEL1, "Fill Bundle Index" )
220 pElement->pFillBundle = (FillBundle*)pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aFillList, pElement->aFillBundle );
221 break;
222 case 0x16 : ComOut( CGM_LEVEL1, "Fill Interior Style" )
223 {
224 if ( pElement->nAspectSourceFlags & ASF_FILLINTERIORSTYLE )
225 pElement->pFillBundle->eFillInteriorStyle = (FillInteriorStyle)ImplGetUI16();
226 else
227 pElement->aFillBundle.eFillInteriorStyle = (FillInteriorStyle)ImplGetUI16();
228 }
229 break;
230 case 0x17 : ComOut( CGM_LEVEL1, "Fill Color" )
231 {
232 if ( pElement->nAspectSourceFlags & ASF_FILLCOLOR )
233 pElement->pFillBundle->SetColor( ImplGetBitmapColor() );
234 else
235 pElement->aFillBundle.SetColor( ImplGetBitmapColor() );
236 }
237 break;
238 case 0x18 : ComOut( CGM_LEVEL1, "Fill Hatch Index" )
239 {
240 if ( pElement->nAspectSourceFlags & ASF_HATCHINDEX )
241 pElement->pFillBundle->nFillHatchIndex = ImplGetI( pElement->nIndexPrecision );
242 else
243 pElement->aFillBundle.nFillHatchIndex = ImplGetI( pElement->nIndexPrecision );
244 }
245 break;
246 case 0x19 : ComOut( CGM_LEVEL1, "Fill Pattern Index" )
247 {
248 if ( pElement->nAspectSourceFlags & ASF_PATTERNINDEX )
249 pElement->pFillBundle->nFillPatternIndex = ImplGetI( pElement->nIndexPrecision );
250 else
251 pElement->aFillBundle.nFillPatternIndex = ImplGetI( pElement->nIndexPrecision );
252 }
253 break;
254 case 0x1a : ComOut( CGM_LEVEL1, "Edge Bundle Index" )
255 pElement->pEdgeBundle = (EdgeBundle*)pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aEdgeList, pElement->aEdgeBundle );
256 break;
257 case 0x1b : ComOut( CGM_LEVEL1, "Edge Type" )
258 {
259 if ( pElement->nAspectSourceFlags & ASF_EDGETYPE )
260 pElement->pEdgeBundle->eEdgeType = (EdgeType)ImplGetI( pElement->nIndexPrecision );
261 else
262 pElement->aEdgeBundle.eEdgeType = (EdgeType)ImplGetI( pElement->nIndexPrecision );
263 }
264 break;
265 case 0x1c : ComOut( CGM_LEVEL1, "Edge Width" )
266 {
267 double nWidth;
268 if ( pElement->eEdgeWidthSpecMode == SM_ABSOLUTE )
269 {
270 if ( pElement->eVDCType == VDC_REAL )
271 nWidth = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize );
272 else
273 nWidth = (double)ImplGetI( pElement->nVDCIntegerPrecision );
274
275 ImplMapDouble( nWidth );
276 }
277 else
278 nWidth = (sal_uInt32)ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ) * 25;
279 ( pElement->nAspectSourceFlags & ASF_EDGEWIDTH )
280 ? pElement->aEdgeBundle.nEdgeWidth = nWidth
281 : pElement->aEdgeBundle.nEdgeWidth = nWidth;
282 }
283 break;
284 case 0x1d : ComOut( CGM_LEVEL1, "Edge Color" )
285 {
286 if ( pElement->nAspectSourceFlags & ASF_EDGECOLOR )
287 pElement->pEdgeBundle->SetColor( ImplGetBitmapColor() );
288 else
289 pElement->aEdgeBundle.SetColor( ImplGetBitmapColor() );
290 }
291 break;
292 case 0x1e : ComOut( CGM_LEVEL1, "Edge Visibility" )
293 {
294 switch( ImplGetUI16() )
295 {
296 case 0 : pElement->eEdgeVisibility = EV_OFF; break;
297 case 1 : pElement->eEdgeVisibility = EV_ON; break;
298 default : mbStatus = sal_False;
299 }
300 }
301 break;
302 case 0x1f : ComOut( CGM_LEVEL1, "Fill Reference Point" )
303 ImplGetPoint( pElement->aFillRefPoint );
304 break;
305 case 0x20 : ComOut( CGM_LEVEL1, "Pattern Table" ) break;
306 case 0x21 : ComOut( CGM_LEVEL1, "Pattern Size" ) break;
307 case 0x22 : ComOut( CGM_LEVEL1, "Color Table" )
308 {
309 sal_uInt32 nColorStartIndex = ImplGetUI( pElement->nColorIndexPrecision );
310 if ( ( nColorStartIndex > 255 ) ||
311 ( ( ( mnElementSize - pElement->nColorIndexPrecision ) % ( pElement->nColorPrecision * 3 ) ) != 0 ) )
312 {
313 mbStatus = sal_False;
314 }
315 else
316 {
317 sal_uInt32 nColors = ( mnElementSize - pElement->nColorIndexPrecision ) / ( 3 * pElement->nColorPrecision );
318 if ( nColors )
319 {
320 sal_uInt32 nMaxColorIndex = nColorStartIndex + nColors - 1;
321 sal_uInt32 nIndex;
322 if ( nMaxColorIndex > 255 )
323 {
324 mbStatus = sal_False;
325 }
326 else
327 {
328 if ( pElement->nLatestColorMaximumIndex < nMaxColorIndex )
329 pElement->nLatestColorMaximumIndex = nMaxColorIndex;
330
331 for ( nIndex = nColorStartIndex; nIndex <= nMaxColorIndex; nIndex++ )
332 {
333 pElement->aLatestColorTable[ nIndex ] = ImplGetBitmapColor( sal_True );
334 }
335 }
336 pElement->nColorMaximumIndex = pElement->nLatestColorMaximumIndex;
337 for ( nIndex = nColorStartIndex; nIndex <= nMaxColorIndex; nIndex++ )
338 {
339 if ( !pElement->aColorTableEntryIs[ nIndex ] )
340 {
341 pElement->aColorTableEntryIs[ nIndex ] = 1;
342 pElement->aColorTable[ nIndex ] = pElement->aLatestColorTable[ nIndex ];
343 }
344 }
345 }
346 }
347 }
348 break;
349 case 0x23 : ComOut( CGM_LEVEL1, "Aspect Source Flags" )
350 {
351 int nFlags = mnElementSize >> 2;
352 while ( nFlags-- > 0 )
353 {
354 sal_uInt32 nFlag = 0;
355 switch( ImplGetUI16() )
356 {
357 case 0 : nFlag = ASF_LINETYPE; break;
358 case 1 : nFlag = ASF_LINEWIDTH; break;
359 case 2 : nFlag = ASF_LINECOLOR; break;
360 case 3 : nFlag = ASF_MARKERTYPE; break;
361 case 4 : nFlag = ASF_MARKERSIZE; break;
362 case 5 : nFlag = ASF_MARKERCOLOR; break;
363 case 6 : nFlag = ASF_FILLINTERIORSTYLE; break;
364 case 7 : nFlag = ASF_HATCHINDEX; break;
365 case 8 : nFlag = ASF_PATTERNINDEX; break;
366 case 9 : nFlag = ASF_BITMAPINDEX; break;
367 case 10 : nFlag = ASF_FILLCOLOR; break;
368 case 11 : nFlag = ASF_EDGETYPE; break;
369 case 12 : nFlag = ASF_EDGEWIDTH; break;
370 case 13 : nFlag = ASF_EDGECOLOR; break;
371 case 14 : nFlag = ASF_TEXTFONTINDEX; break;
372 case 15 : nFlag = ASF_TEXTPRECISION; break;
373 case 16 : nFlag = ASF_CHARACTEREXPANSION; break;
374 case 17 : nFlag = ASF_CHARACTERSPACING; break;
375 case 18 : nFlag = ASF_TEXTCOLOR; break;
376 default : mbStatus = sal_False; break;
377 }
378 sal_uInt32 nASF = ImplGetUI16();
379 switch ( nASF )
380 {
381 case 0 : pElement->nAspectSourceFlags &= ~nFlag; break; // INDIVIDUAL
382 case 1 : pElement->nAspectSourceFlags |= nFlag; break; // BUNDLED
383 default : mbStatus = sal_False; break;
384 }
385 }
386 }
387 break;
388 case 0x24 : ComOut( CGM_LEVEL2, "Pick Identifier" ) break;
389 case 0x25 : ComOut( CGM_LEVEL3, "Line Cap" )
390 {
391 switch( ImplGetUI16() )
392 {
393 case 0 : pElement->eLineCapType = LCT_BUTT; break;
394 case 1 : pElement->eLineCapType = LCT_ROUND; break;
395 case 2 : pElement->eLineCapType = LCT_SQUARE; break;
396 case 3 : pElement->eLineCapType = LCT_TRIANGLE; break;
397 case 4 : pElement->eLineCapType = LCT_ARROW; break;
398 default : pElement->eLineCapType = LCT_NONE; break;
399 }
400 }
401 break;
402 case 0x26 : ComOut( CGM_LEVEL3, "Line Join" )
403 {
404 switch( ImplGetUI16() )
405 {
406 case 0 : pElement->eLineJoinType = LJT_MITER; break;
407 case 1 : pElement->eLineJoinType = LJT_ROUND; break;
408 case 2 : pElement->eLineJoinType = LJT_BEVEL; break;
409 default : pElement->eLineJoinType = LJT_NONE; break;
410 }
411 }
412 break;
413 case 0x27 : ComOut( CGM_LEVEL3, "Line Type Continuation" ) break; // NS
414 case 0x28 : ComOut( CGM_LEVEL3, "Line Type Initial Offset" ) break; // NS
415 case 0x29 : ComOut( CGM_LEVEL3, "Text Score Type" ) break;
416 case 0x2a : ComOut( CGM_LEVEL3, "Restricted Text Type" ) break;
417 case 0x2b : ComOut( CGM_LEVEL3, "Interpolated interior" ) break;
418 case 0x2c : ComOut( CGM_LEVEL3, "Edge Cap" ) break; // NS
419 case 0x2d : ComOut( CGM_LEVEL3, "Edge Join" ) break;
420 case 0x2e : ComOut( CGM_LEVEL3, "Edge Type Continuation" ) break; // NS
421 case 0x2f : ComOut( CGM_LEVEL3, "Edge Type Initial Offset" ) break; // NS
422 case 0x30 : ComOut( CGM_LEVEL3, "Symbol Library Index" ) break; // NS
423 case 0x31 : ComOut( CGM_LEVEL3, "Symbol Color" ) break; // NS
424 case 0x32 : ComOut( CGM_LEVEL3, "Symbol Size" ) break; // NS
425 case 0x33 : ComOut( CGM_LEVEL3, "Symbol Orientation" ) break; // NS
426 case 0x50 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Region Margins" ) break;
427 case 0x51 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Region Expansion" ) break;
428 case 0x52 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Region Anchor" ) break;
429 case 0x53 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Horizontal Alignment" ) break;
430 case 0x54 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Vertical Alignment" ) break;
431 case 0x55 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Line Flow" ) break;
432 case 0x60 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Spacing" ) break;
433 case 0x61 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Indent" ) break;
434 case 0x62 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Tabs" ) break;
435 case 0x63 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Bullets" ) break;
436 case 0x64 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Bullet Level" ) break;
437 case 0x65 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Line Horizontal Alignment" ) break;
438 case 0x66 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Line Vertical Alignment" ) break;
439 case 0x67 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragragh Line Spacing" ) break;
440 case 0x68 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Word Wrap" ) break;
441 case 0x70 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Forward Advance Distance" ) break;
442 case 0x71 : ComOut( CGM_UNKNOWN_LEVEL, "Word Spacing" ) break;
443 case 0x72 : ComOut( CGM_UNKNOWN_LEVEL, "External Leading" ) break;
444 case 0x7a : ComOut( CGM_UNKNOWN_LEVEL, "set Gradient Offset" )
445 {
446 long nHorzOffset = ImplGetI( pElement->nIndexPrecision );
447 long nVertOffset = ImplGetI( pElement->nIndexPrecision );
448 sal_uInt32 nType = ImplGetUI16();
449 mpOutAct->SetGradientOffset( nHorzOffset, nVertOffset, nType );
450 mnAct4PostReset |= ACT4_GRADIENT_ACTION;
451 }
452 break;
453 case 0x7b : ComOut( CGM_UNKNOWN_LEVEL, "set Gradient Edge" )
454 {
455 mnAct4PostReset |= ACT4_GRADIENT_ACTION;
456 }
457 break;
458 case 0x7c : ComOut( CGM_UNKNOWN_LEVEL, "set Gradient Angle" )
459 {
460 mpOutAct->SetGradientAngle( ImplGetI( pElement->nIndexPrecision ) );
461 mnAct4PostReset |= ACT4_GRADIENT_ACTION;
462 }
463 break;
464 case 0x7d : ComOut( CGM_UNKNOWN_LEVEL, "set Gradient Description" )
465 {
466 ImplGetI( pElement->nIndexPrecision ); // -Wall is this needed?
467 sal_uInt32 nNumberOfStages = ImplGetI( pElement->nIndexPrecision );
468 sal_uInt32 i, nColorFrom = 0;
469 sal_uInt32 nColorTo = 0xffffff;
470
471 //FIXME, does this loop actually do anything?
472 for ( i = 0; i < nNumberOfStages; i++ )
473 {
474 ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); // -Wall is this needed
475 }
476
477 for ( i = 0; i <= nNumberOfStages; i++ )
478 {
479 sal_uInt32 nPara = mnParaSize + 24;
480 if ( i == 0 )
481 {
482 nColorTo = ImplGetBitmapColor();
483 nColorFrom = nColorTo ^ 0xffffff;
484 }
485 else if ( i == 1 )
486 nColorFrom = ImplGetBitmapColor();
487 mnParaSize = nPara;
488 }
489 if ( nNumberOfStages > 1 )
490 mpOutAct->SetGradientStyle( 0xff, 1 );
491
492 mpOutAct->SetGradientDescriptor( nColorFrom, nColorTo );
493 mnAct4PostReset |= ACT4_GRADIENT_ACTION;
494 }
495 break;
496 case 0x7e : ComOut( CGM_UNKNOWN_LEVEL, "set Gradient Style" )
497 {
498 sal_uInt32 nStyle = ImplGetUI16( 8 );
499 double fRatio = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
500 mpOutAct->SetGradientStyle( nStyle, fRatio );
501 mnAct4PostReset |= ACT4_GRADIENT_ACTION;
502 }
503 break;
504 case 0xff : ComOut( CGM_GDSF_ONLY, "inquire Font metrics" ) break;
505 case 0xfe : ComOut( CGM_GDSF_ONLY, "inquire character widths" ) break;
506 case 0xfd : ComOut( CGM_GDSF_ONLY, "set Text Font" ) break;
507 case 0xfc : ComOut( CGM_GDSF_ONLY, "set current position" ) break;
508 case 0xfb : ComOut( CGM_GDSF_ONLY, "set current position mode" ) break;
509 case 0xfa : ComOut( CGM_GDSF_ONLY, "set character height mode" ) break;
510 case 0xf9 : ComOut( CGM_GDSF_ONLY, "set Transform matrix 2D" ) break;
511 case 0xf8 : ComOut( CGM_GDSF_ONLY, "set Transform matrix 3D" ) break;
512 case 0xf7 : ComOut( CGM_GDSF_ONLY, "pop transformation state" ) break;
513 case 0xf6 : ComOut( CGM_GDSF_ONLY, "clear transformation state" ) break;
514 case 0xf5 : ComOut( CGM_GDSF_ONLY, "set character widths" ) break;
515 case 0xf4 : ComOut( CGM_GDSF_ONLY, "set color name - for Pantone support" ) break;
516 default: ComOut( CGM_UNKNOWN_COMMAND, "" ) break;
517 }
518 };
519
520
521