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: class5.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"
33 //#define VCL_NEED_BASETSD
39 // ---------------------------------------------------------------
41 void CGM::ImplDoClass5()
43 switch ( mnElementID
)
45 case 0x01 : ComOut( CGM_LEVEL1
, "Line Bundle Index" )
46 pElement
->pLineBundle
= (LineBundle
*)pElement
->GetBundleIndex( ImplGetI( pElement
->nIndexPrecision
), pElement
->aLineList
, pElement
->aLineBundle
);
48 case 0x02 : ComOut( CGM_LEVEL1
, "Line Type" )
50 if ( pElement
->nAspectSourceFlags
& ASF_LINETYPE
)
51 pElement
->pLineBundle
->eLineType
= (LineType
)ImplGetI( pElement
->nIndexPrecision
);
53 pElement
->aLineBundle
.eLineType
= (LineType
)ImplGetI( pElement
->nIndexPrecision
);
56 case 0x03 : ComOut( CGM_LEVEL1
, "Line Width" )
59 if ( pElement
->eLineWidthSpecMode
== SM_ABSOLUTE
)
61 if ( pElement
->eVDCType
== VDC_REAL
)
62 nWidth
= ImplGetFloat( pElement
->eVDCRealPrecision
, pElement
->nVDCRealSize
);
64 nWidth
= (double)ImplGetI( pElement
->nVDCIntegerPrecision
);
66 ImplMapDouble( nWidth
);
69 nWidth
= (sal_uInt32
)ImplGetFloat( pElement
->eRealPrecision
, pElement
->nRealSize
) * 25; // scaling in 1/4 mm
71 ( pElement
->nAspectSourceFlags
& ASF_LINEWIDTH
)
72 ? pElement
->aLineBundle
.nLineWidth
= nWidth
73 : pElement
->aLineBundle
.nLineWidth
= nWidth
;
76 case 0x04 : ComOut( CGM_LEVEL1
, "Line Color" )
78 if ( pElement
->nAspectSourceFlags
& ASF_LINECOLOR
)
79 pElement
->pLineBundle
->SetColor( ImplGetBitmapColor() );
81 pElement
->aLineBundle
.SetColor( ImplGetBitmapColor() );
84 case 0x05 : ComOut( CGM_LEVEL1
, "Marker Bundle Index" )
85 pElement
->pMarkerBundle
= (MarkerBundle
*)pElement
->GetBundleIndex( ImplGetI( pElement
->nIndexPrecision
), pElement
->aMarkerList
, pElement
->aMarkerBundle
);
87 case 0x06 : ComOut( CGM_LEVEL1
, "Marker Type" )
89 if ( pElement
->nAspectSourceFlags
& ASF_MARKERTYPE
)
90 pElement
->pMarkerBundle
->eMarkerType
= (MarkerType
)ImplGetI( pElement
->nIndexPrecision
);
92 pElement
->aMarkerBundle
.eMarkerType
= (MarkerType
)ImplGetI( pElement
->nIndexPrecision
);
95 case 0x07 : ComOut( CGM_LEVEL1
, "Marker Size" )
98 if ( pElement
->eMarkerSizeSpecMode
== SM_ABSOLUTE
)
100 if ( pElement
->eVDCType
== VDC_REAL
)
101 nWidth
= ImplGetFloat( pElement
->eVDCRealPrecision
, pElement
->nVDCRealSize
);
103 nWidth
= (double)ImplGetI( pElement
->nVDCIntegerPrecision
);
104 ImplMapDouble( nWidth
);
107 nWidth
= (sal_uInt32
)ImplGetFloat( pElement
->eRealPrecision
, pElement
->nRealSize
) * 25;
108 ( pElement
->nAspectSourceFlags
& ASF_MARKERSIZE
)
109 ? pElement
->aMarkerBundle
.nMarkerSize
= nWidth
110 : pElement
->aMarkerBundle
.nMarkerSize
= nWidth
;
113 case 0x08 : ComOut( CGM_LEVEL1
, "Marker Color" )
115 if ( pElement
->nAspectSourceFlags
& ASF_MARKERCOLOR
)
116 pElement
->pMarkerBundle
->SetColor( ImplGetBitmapColor() );
118 pElement
->aMarkerBundle
.SetColor( ImplGetBitmapColor() );
121 case 0x09 : ComOut( CGM_LEVEL1
, "Text Bundle Index" )
122 pElement
->pTextBundle
= (TextBundle
*)pElement
->GetBundleIndex( ImplGetI( pElement
->nIndexPrecision
), pElement
->aTextList
, pElement
->aTextBundle
);
124 case 0x0a : ComOut( CGM_LEVEL1
, "Text Font Index" )
126 if ( pElement
->nAspectSourceFlags
& ASF_TEXTFONTINDEX
)
127 pElement
->pTextBundle
->nTextFontIndex
= ImplGetI( pElement
->nIndexPrecision
);
129 pElement
->aTextBundle
.nTextFontIndex
= ImplGetI( pElement
->nIndexPrecision
);
132 case 0x0b : ComOut( CGM_LEVEL1
, "Text Precision" )
135 if ( pElement
->nAspectSourceFlags
& ASF_TEXTPRECISION
)
136 pBundle
= pElement
->pTextBundle
;
138 pBundle
= &pElement
->aTextBundle
;
139 switch( ImplGetUI16() )
141 case 0 : pBundle
->eTextPrecision
= TPR_STRING
; break;
142 case 1 : pBundle
->eTextPrecision
= TPR_CHARACTER
; break;
143 case 2 : pBundle
->eTextPrecision
= TPR_STROKE
; break;
144 default : pBundle
->eTextPrecision
= TPR_UNDEFINED
; break;
148 case 0x0c : ComOut( CGM_LEVEL1
, "Character Expansion Factor" )
150 if ( pElement
->nAspectSourceFlags
& ASF_CHARACTEREXPANSION
)
151 pElement
->pTextBundle
->nCharacterExpansion
= ImplGetFloat( pElement
->eRealPrecision
, pElement
->nRealSize
);
153 pElement
->aTextBundle
.nCharacterExpansion
= ImplGetFloat( pElement
->eRealPrecision
, pElement
->nRealSize
);
156 case 0x0d : ComOut( CGM_LEVEL1
, "Character Spacing" )
158 if ( pElement
->nAspectSourceFlags
& ASF_CHARACTERSPACING
)
159 pElement
->pTextBundle
->nCharacterSpacing
= ImplGetFloat( pElement
->eRealPrecision
, pElement
->nRealSize
);
161 pElement
->aTextBundle
.nCharacterSpacing
= ImplGetFloat( pElement
->eRealPrecision
, pElement
->nRealSize
);
164 case 0x0e : ComOut( CGM_LEVEL1
, "Text Color" )
166 if ( pElement
->nAspectSourceFlags
& ASF_TEXTCOLOR
)
167 pElement
->pTextBundle
->SetColor( ImplGetBitmapColor() );
169 pElement
->aTextBundle
.SetColor( ImplGetBitmapColor() );
172 case 0x0f : ComOut( CGM_LEVEL1
, "Character Height" )
174 if ( pElement
->eVDCType
== VDC_INTEGER
)
175 pElement
->nCharacterHeight
= ImplGetI( pElement
->nVDCIntegerPrecision
);
176 else // ->floating points
177 pElement
->nCharacterHeight
= ImplGetFloat( pElement
->eVDCRealPrecision
, pElement
->nVDCRealSize
);
178 ImplMapDouble( pElement
->nCharacterHeight
);
179 pElement
->nCharacterHeight
/= 18.0;
182 case 0x10 : ComOut( CGM_LEVEL1
, "Character Orientation" )
184 if ( pElement
->eVDCType
== VDC_INTEGER
)
186 pElement
->nCharacterOrientation
[0] = ImplGetI( pElement
->nVDCIntegerPrecision
);
187 pElement
->nCharacterOrientation
[1] = ImplGetI( pElement
->nVDCIntegerPrecision
);
188 pElement
->nCharacterOrientation
[2] = ImplGetI( pElement
->nVDCIntegerPrecision
);
189 pElement
->nCharacterOrientation
[3] = ImplGetI( pElement
->nVDCIntegerPrecision
);
191 else // ->floating points
193 pElement
->nCharacterOrientation
[0] = ImplGetFloat( pElement
->eVDCRealPrecision
, pElement
->nVDCRealSize
);
194 pElement
->nCharacterOrientation
[1] = ImplGetFloat( pElement
->eVDCRealPrecision
, pElement
->nVDCRealSize
);
195 pElement
->nCharacterOrientation
[2] = ImplGetFloat( pElement
->eVDCRealPrecision
, pElement
->nVDCRealSize
);
196 pElement
->nCharacterOrientation
[3] = ImplGetFloat( pElement
->eVDCRealPrecision
, pElement
->nVDCRealSize
);
200 case 0x11 : ComOut( CGM_LEVEL1
, "Text Path" )
202 switch( ImplGetUI16() )
204 case 0 : pElement
->eTextPath
= TPR_RIGHT
; break;
205 case 1 : pElement
->eTextPath
= TPR_LEFT
; break;
206 case 2 : pElement
->eTextPath
= TPR_UP
; break;
207 case 3 : pElement
->eTextPath
= TPR_DOWN
; break;
208 default : mbStatus
= sal_False
; break;
212 case 0x12 : ComOut( CGM_LEVEL1
, "Text Alignment" )
214 pElement
->eTextAlignmentH
= (TextAlignmentH
)ImplGetUI16();
215 pElement
->eTextAlignmentV
= (TextAlignmentV
)ImplGetUI16( 8 );
216 pElement
->nTextAlignmentHCont
= ImplGetFloat( pElement
->eRealPrecision
, pElement
->nRealSize
);
217 pElement
->nTextAlignmentVCont
= ImplGetFloat( pElement
->eRealPrecision
, pElement
->nRealSize
);
220 case 0x13 : ComOut( CGM_LEVEL1
| CGM_DRAWING_PLUS_CONTROL_SET
, "Character Set Index" )
221 pElement
->nCharacterSetIndex
= ImplGetI( pElement
->nIndexPrecision
);
223 case 0x14 : ComOut( CGM_LEVEL1
| CGM_DRAWING_PLUS_CONTROL_SET
, "Alternate Character Set Index" )
224 pElement
->nAlternateCharacterSetIndex
= ImplGetI( pElement
->nIndexPrecision
);
226 case 0x15 : ComOut( CGM_LEVEL1
, "Fill Bundle Index" )
227 pElement
->pFillBundle
= (FillBundle
*)pElement
->GetBundleIndex( ImplGetI( pElement
->nIndexPrecision
), pElement
->aFillList
, pElement
->aFillBundle
);
229 case 0x16 : ComOut( CGM_LEVEL1
, "Fill Interior Style" )
231 if ( pElement
->nAspectSourceFlags
& ASF_FILLINTERIORSTYLE
)
232 pElement
->pFillBundle
->eFillInteriorStyle
= (FillInteriorStyle
)ImplGetUI16();
234 pElement
->aFillBundle
.eFillInteriorStyle
= (FillInteriorStyle
)ImplGetUI16();
237 case 0x17 : ComOut( CGM_LEVEL1
, "Fill Color" )
239 if ( pElement
->nAspectSourceFlags
& ASF_FILLCOLOR
)
240 pElement
->pFillBundle
->SetColor( ImplGetBitmapColor() );
242 pElement
->aFillBundle
.SetColor( ImplGetBitmapColor() );
245 case 0x18 : ComOut( CGM_LEVEL1
, "Fill Hatch Index" )
247 if ( pElement
->nAspectSourceFlags
& ASF_HATCHINDEX
)
248 pElement
->pFillBundle
->nFillHatchIndex
= ImplGetI( pElement
->nIndexPrecision
);
250 pElement
->aFillBundle
.nFillHatchIndex
= ImplGetI( pElement
->nIndexPrecision
);
253 case 0x19 : ComOut( CGM_LEVEL1
, "Fill Pattern Index" )
255 if ( pElement
->nAspectSourceFlags
& ASF_PATTERNINDEX
)
256 pElement
->pFillBundle
->nFillPatternIndex
= ImplGetI( pElement
->nIndexPrecision
);
258 pElement
->aFillBundle
.nFillPatternIndex
= ImplGetI( pElement
->nIndexPrecision
);
261 case 0x1a : ComOut( CGM_LEVEL1
, "Edge Bundle Index" )
262 pElement
->pEdgeBundle
= (EdgeBundle
*)pElement
->GetBundleIndex( ImplGetI( pElement
->nIndexPrecision
), pElement
->aEdgeList
, pElement
->aEdgeBundle
);
264 case 0x1b : ComOut( CGM_LEVEL1
, "Edge Type" )
266 if ( pElement
->nAspectSourceFlags
& ASF_EDGETYPE
)
267 pElement
->pEdgeBundle
->eEdgeType
= (EdgeType
)ImplGetI( pElement
->nIndexPrecision
);
269 pElement
->aEdgeBundle
.eEdgeType
= (EdgeType
)ImplGetI( pElement
->nIndexPrecision
);
272 case 0x1c : ComOut( CGM_LEVEL1
, "Edge Width" )
275 if ( pElement
->eEdgeWidthSpecMode
== SM_ABSOLUTE
)
277 if ( pElement
->eVDCType
== VDC_REAL
)
278 nWidth
= ImplGetFloat( pElement
->eVDCRealPrecision
, pElement
->nVDCRealSize
);
280 nWidth
= (double)ImplGetI( pElement
->nVDCIntegerPrecision
);
282 ImplMapDouble( nWidth
);
285 nWidth
= (sal_uInt32
)ImplGetFloat( pElement
->eRealPrecision
, pElement
->nRealSize
) * 25;
286 ( pElement
->nAspectSourceFlags
& ASF_EDGEWIDTH
)
287 ? pElement
->aEdgeBundle
.nEdgeWidth
= nWidth
288 : pElement
->aEdgeBundle
.nEdgeWidth
= nWidth
;
291 case 0x1d : ComOut( CGM_LEVEL1
, "Edge Color" )
293 if ( pElement
->nAspectSourceFlags
& ASF_EDGECOLOR
)
294 pElement
->pEdgeBundle
->SetColor( ImplGetBitmapColor() );
296 pElement
->aEdgeBundle
.SetColor( ImplGetBitmapColor() );
299 case 0x1e : ComOut( CGM_LEVEL1
, "Edge Visibility" )
301 switch( ImplGetUI16() )
303 case 0 : pElement
->eEdgeVisibility
= EV_OFF
; break;
304 case 1 : pElement
->eEdgeVisibility
= EV_ON
; break;
305 default : mbStatus
= sal_False
;
309 case 0x1f : ComOut( CGM_LEVEL1
, "Fill Reference Point" )
310 ImplGetPoint( pElement
->aFillRefPoint
);
312 case 0x20 : ComOut( CGM_LEVEL1
, "Pattern Table" ) break;
313 case 0x21 : ComOut( CGM_LEVEL1
, "Pattern Size" ) break;
314 case 0x22 : ComOut( CGM_LEVEL1
, "Color Table" )
316 sal_uInt32 nColorStartIndex
= ImplGetUI( pElement
->nColorIndexPrecision
);
317 if ( ( nColorStartIndex
> 255 ) ||
318 ( ( ( mnElementSize
- pElement
->nColorIndexPrecision
) % ( pElement
->nColorPrecision
* 3 ) ) != 0 ) )
320 mbStatus
= sal_False
;
324 sal_uInt32 nColors
= ( mnElementSize
- pElement
->nColorIndexPrecision
) / ( 3 * pElement
->nColorPrecision
);
327 sal_uInt32 nMaxColorIndex
= nColorStartIndex
+ nColors
- 1;
329 if ( nMaxColorIndex
> 255 )
331 mbStatus
= sal_False
;
335 if ( pElement
->nLatestColorMaximumIndex
< nMaxColorIndex
)
336 pElement
->nLatestColorMaximumIndex
= nMaxColorIndex
;
338 for ( nIndex
= nColorStartIndex
; nIndex
<= nMaxColorIndex
; nIndex
++ )
340 pElement
->aLatestColorTable
[ nIndex
] = ImplGetBitmapColor( sal_True
);
343 pElement
->nColorMaximumIndex
= pElement
->nLatestColorMaximumIndex
;
344 for ( nIndex
= nColorStartIndex
; nIndex
<= nMaxColorIndex
; nIndex
++ )
346 if ( !pElement
->aColorTableEntryIs
[ nIndex
] )
348 pElement
->aColorTableEntryIs
[ nIndex
] = 1;
349 pElement
->aColorTable
[ nIndex
] = pElement
->aLatestColorTable
[ nIndex
];
356 case 0x23 : ComOut( CGM_LEVEL1
, "Aspect Source Flags" )
358 int nFlags
= mnElementSize
>> 2;
359 while ( nFlags
-- > 0 )
361 sal_uInt32 nFlag
= 0;
362 switch( ImplGetUI16() )
364 case 0 : nFlag
= ASF_LINETYPE
; break;
365 case 1 : nFlag
= ASF_LINEWIDTH
; break;
366 case 2 : nFlag
= ASF_LINECOLOR
; break;
367 case 3 : nFlag
= ASF_MARKERTYPE
; break;
368 case 4 : nFlag
= ASF_MARKERSIZE
; break;
369 case 5 : nFlag
= ASF_MARKERCOLOR
; break;
370 case 6 : nFlag
= ASF_FILLINTERIORSTYLE
; break;
371 case 7 : nFlag
= ASF_HATCHINDEX
; break;
372 case 8 : nFlag
= ASF_PATTERNINDEX
; break;
373 case 9 : nFlag
= ASF_BITMAPINDEX
; break;
374 case 10 : nFlag
= ASF_FILLCOLOR
; break;
375 case 11 : nFlag
= ASF_EDGETYPE
; break;
376 case 12 : nFlag
= ASF_EDGEWIDTH
; break;
377 case 13 : nFlag
= ASF_EDGECOLOR
; break;
378 case 14 : nFlag
= ASF_TEXTFONTINDEX
; break;
379 case 15 : nFlag
= ASF_TEXTPRECISION
; break;
380 case 16 : nFlag
= ASF_CHARACTEREXPANSION
; break;
381 case 17 : nFlag
= ASF_CHARACTERSPACING
; break;
382 case 18 : nFlag
= ASF_TEXTCOLOR
; break;
383 default : mbStatus
= sal_False
; break;
385 sal_uInt32 nASF
= ImplGetUI16();
388 case 0 : pElement
->nAspectSourceFlags
&= ~nFlag
; break; // INDIVIDUAL
389 case 1 : pElement
->nAspectSourceFlags
|= nFlag
; break; // BUNDLED
390 default : mbStatus
= sal_False
; break;
395 case 0x24 : ComOut( CGM_LEVEL2
, "Pick Identifier" ) break;
396 case 0x25 : ComOut( CGM_LEVEL3
, "Line Cap" )
398 switch( ImplGetUI16() )
400 case 0 : pElement
->eLineCapType
= LCT_BUTT
; break;
401 case 1 : pElement
->eLineCapType
= LCT_ROUND
; break;
402 case 2 : pElement
->eLineCapType
= LCT_SQUARE
; break;
403 case 3 : pElement
->eLineCapType
= LCT_TRIANGLE
; break;
404 case 4 : pElement
->eLineCapType
= LCT_ARROW
; break;
405 default : pElement
->eLineCapType
= LCT_NONE
; break;
409 case 0x26 : ComOut( CGM_LEVEL3
, "Line Join" )
411 switch( ImplGetUI16() )
413 case 0 : pElement
->eLineJoinType
= LJT_MITER
; break;
414 case 1 : pElement
->eLineJoinType
= LJT_ROUND
; break;
415 case 2 : pElement
->eLineJoinType
= LJT_BEVEL
; break;
416 default : pElement
->eLineJoinType
= LJT_NONE
; break;
420 case 0x27 : ComOut( CGM_LEVEL3
, "Line Type Continuation" ) break; // NS
421 case 0x28 : ComOut( CGM_LEVEL3
, "Line Type Initial Offset" ) break; // NS
422 case 0x29 : ComOut( CGM_LEVEL3
, "Text Score Type" ) break;
423 case 0x2a : ComOut( CGM_LEVEL3
, "Restricted Text Type" ) break;
424 case 0x2b : ComOut( CGM_LEVEL3
, "Interpolated interior" ) break;
425 case 0x2c : ComOut( CGM_LEVEL3
, "Edge Cap" ) break; // NS
426 case 0x2d : ComOut( CGM_LEVEL3
, "Edge Join" ) break;
427 case 0x2e : ComOut( CGM_LEVEL3
, "Edge Type Continuation" ) break; // NS
428 case 0x2f : ComOut( CGM_LEVEL3
, "Edge Type Initial Offset" ) break; // NS
429 case 0x30 : ComOut( CGM_LEVEL3
, "Symbol Library Index" ) break; // NS
430 case 0x31 : ComOut( CGM_LEVEL3
, "Symbol Color" ) break; // NS
431 case 0x32 : ComOut( CGM_LEVEL3
, "Symbol Size" ) break; // NS
432 case 0x33 : ComOut( CGM_LEVEL3
, "Symbol Orientation" ) break; // NS
433 case 0x50 : ComOut( CGM_UNKNOWN_LEVEL
, "Block Text Region Margins" ) break;
434 case 0x51 : ComOut( CGM_UNKNOWN_LEVEL
, "Block Text Region Expansion" ) break;
435 case 0x52 : ComOut( CGM_UNKNOWN_LEVEL
, "Block Text Region Anchor" ) break;
436 case 0x53 : ComOut( CGM_UNKNOWN_LEVEL
, "Block Text Paragraph Horizontal Alignment" ) break;
437 case 0x54 : ComOut( CGM_UNKNOWN_LEVEL
, "Block Text Paragraph Vertical Alignment" ) break;
438 case 0x55 : ComOut( CGM_UNKNOWN_LEVEL
, "Block Text Line Flow" ) break;
439 case 0x60 : ComOut( CGM_UNKNOWN_LEVEL
, "Block Text Paragraph Spacing" ) break;
440 case 0x61 : ComOut( CGM_UNKNOWN_LEVEL
, "Block Text Paragraph Indent" ) break;
441 case 0x62 : ComOut( CGM_UNKNOWN_LEVEL
, "Block Text Paragraph Tabs" ) break;
442 case 0x63 : ComOut( CGM_UNKNOWN_LEVEL
, "Block Text Paragraph Bullets" ) break;
443 case 0x64 : ComOut( CGM_UNKNOWN_LEVEL
, "Block Text Paragraph Bullet Level" ) break;
444 case 0x65 : ComOut( CGM_UNKNOWN_LEVEL
, "Block Text Paragraph Line Horizontal Alignment" ) break;
445 case 0x66 : ComOut( CGM_UNKNOWN_LEVEL
, "Block Text Paragraph Line Vertical Alignment" ) break;
446 case 0x67 : ComOut( CGM_UNKNOWN_LEVEL
, "Block Text Paragragh Line Spacing" ) break;
447 case 0x68 : ComOut( CGM_UNKNOWN_LEVEL
, "Block Text Paragraph Word Wrap" ) break;
448 case 0x70 : ComOut( CGM_UNKNOWN_LEVEL
, "Block Text Forward Advance Distance" ) break;
449 case 0x71 : ComOut( CGM_UNKNOWN_LEVEL
, "Word Spacing" ) break;
450 case 0x72 : ComOut( CGM_UNKNOWN_LEVEL
, "External Leading" ) break;
451 case 0x7a : ComOut( CGM_UNKNOWN_LEVEL
, "set Gradient Offset" )
453 long nHorzOffset
= ImplGetI( pElement
->nIndexPrecision
);
454 long nVertOffset
= ImplGetI( pElement
->nIndexPrecision
);
455 sal_uInt32 nType
= ImplGetUI16();
456 mpOutAct
->SetGradientOffset( nHorzOffset
, nVertOffset
, nType
);
457 mnAct4PostReset
|= ACT4_GRADIENT_ACTION
;
460 case 0x7b : ComOut( CGM_UNKNOWN_LEVEL
, "set Gradient Edge" )
462 mnAct4PostReset
|= ACT4_GRADIENT_ACTION
;
465 case 0x7c : ComOut( CGM_UNKNOWN_LEVEL
, "set Gradient Angle" )
467 mpOutAct
->SetGradientAngle( ImplGetI( pElement
->nIndexPrecision
) );
468 mnAct4PostReset
|= ACT4_GRADIENT_ACTION
;
471 case 0x7d : ComOut( CGM_UNKNOWN_LEVEL
, "set Gradient Description" )
473 ImplGetI( pElement
->nIndexPrecision
); // -Wall is this needed?
474 sal_uInt32 nNumberOfStages
= ImplGetI( pElement
->nIndexPrecision
);
475 sal_uInt32 i
, nColorFrom
= 0;
476 sal_uInt32 nColorTo
= 0xffffff;
478 //FIXME, does this loop actually do anything?
479 for ( i
= 0; i
< nNumberOfStages
; i
++ )
481 ImplGetFloat( pElement
->eRealPrecision
, pElement
->nRealSize
); // -Wall is this needed
484 for ( i
= 0; i
<= nNumberOfStages
; i
++ )
486 sal_uInt32 nPara
= mnParaSize
+ 24;
489 nColorTo
= ImplGetBitmapColor();
490 nColorFrom
= nColorTo
^ 0xffffff;
493 nColorFrom
= ImplGetBitmapColor();
496 if ( nNumberOfStages
> 1 )
497 mpOutAct
->SetGradientStyle( 0xff, 1 );
499 mpOutAct
->SetGradientDescriptor( nColorFrom
, nColorTo
);
500 mnAct4PostReset
|= ACT4_GRADIENT_ACTION
;
503 case 0x7e : ComOut( CGM_UNKNOWN_LEVEL
, "set Gradient Style" )
505 sal_uInt32 nStyle
= ImplGetUI16( 8 );
506 double fRatio
= ImplGetFloat( pElement
->eRealPrecision
, pElement
->nRealSize
);
507 mpOutAct
->SetGradientStyle( nStyle
, fRatio
);
508 mnAct4PostReset
|= ACT4_GRADIENT_ACTION
;
511 case 0xff : ComOut( CGM_GDSF_ONLY
, "inquire Font metrics" ) break;
512 case 0xfe : ComOut( CGM_GDSF_ONLY
, "inquire character widths" ) break;
513 case 0xfd : ComOut( CGM_GDSF_ONLY
, "set Text Font" ) break;
514 case 0xfc : ComOut( CGM_GDSF_ONLY
, "set current position" ) break;
515 case 0xfb : ComOut( CGM_GDSF_ONLY
, "set current position mode" ) break;
516 case 0xfa : ComOut( CGM_GDSF_ONLY
, "set character height mode" ) break;
517 case 0xf9 : ComOut( CGM_GDSF_ONLY
, "set Transform matrix 2D" ) break;
518 case 0xf8 : ComOut( CGM_GDSF_ONLY
, "set Transform matrix 3D" ) break;
519 case 0xf7 : ComOut( CGM_GDSF_ONLY
, "pop transformation state" ) break;
520 case 0xf6 : ComOut( CGM_GDSF_ONLY
, "clear transformation state" ) break;
521 case 0xf5 : ComOut( CGM_GDSF_ONLY
, "set character widths" ) break;
522 case 0xf4 : ComOut( CGM_GDSF_ONLY
, "set color name - for Pantone support" ) break;
523 default: ComOut( CGM_UNKNOWN_COMMAND
, "" ) break;