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: class3.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 void CGM::ImplDoClass3()
43 switch ( mnElementID
)
45 case 0x01 : ComOut( CGM_LEVEL1
, "VDC Integer Precision" )
47 switch( ImplGetI( pElement
->nIntegerPrecision
) )
49 case 16 : pElement
->nVDCIntegerPrecision
= 2; break;
50 case 32 : pElement
->nVDCIntegerPrecision
= 4; break;
51 default : mbStatus
= sal_False
; break;
55 case 0x02 : ComOut( CGM_LEVEL1
, "VDC Real Precision" )
57 nUInteger
= ImplGetUI16();
58 nI0
= ImplGetI( pElement
->nIntegerPrecision
); // exponent
59 nI1
= ImplGetI( pElement
->nIntegerPrecision
); // mantisse
63 pElement
->eVDCRealPrecision
= RP_FLOAT
;
69 pElement
->nVDCRealSize
= 4;
74 pElement
->nVDCRealSize
= 8;
82 pElement
->eVDCRealPrecision
= RP_FIXED
;
86 pElement
->nVDCRealSize
= 4;
88 pElement
->nVDCRealSize
= 8;
93 mbStatus
= sal_False
; break;
97 case 0x03 : ComOut( CGM_LEVEL1
, "Auxiliary Colour" )
99 pElement
->nAuxiliaryColor
= ImplGetBitmapColor();
102 case 0x04 : ComOut( CGM_LEVEL1
, "Transparency" )
104 switch( ImplGetUI16() )
106 case 0 : pElement
->eTransparency
= T_OFF
; break;
107 case 1 : pElement
->eTransparency
= T_ON
; break;
108 default : mbStatus
= sal_False
; break;
112 case 0x05 : ComOut( CGM_LEVEL1
, "Clip Rectangle" )
113 ImplGetRectangle( pElement
->aClipRect
);
115 case 0x06 : ComOut( CGM_LEVEL1
, "Clip Indicator" )
117 switch( ImplGetUI16() )
119 case 0 : pElement
->eClipIndicator
= CI_OFF
; break;
120 case 1 : pElement
->eClipIndicator
= CI_ON
; break;
121 default : mbStatus
= sal_False
; break;
125 case 0x07 : ComOut( CGM_LEVEL2
, "Line Clipping Mode" ) break; // NS
126 case 0x08 : ComOut( CGM_LEVEL2
, "Marker Clipping Mode" ) break; // NS
127 case 0x09 : ComOut( CGM_LEVEL2
, "Edge Clipping Mode" ) break; // NS
128 case 0x0a : ComOut( CGM_LEVEL2
, "New Region" )
129 mpOutAct
->NewRegion();
131 case 0x0b : ComOut( CGM_LEVEL2
, "Save Primitive Context" ) break; // NS
132 case 0x0c : ComOut( CGM_LEVEL2
, "Restore Primitive Context" ) break; // NS
133 case 0x11 : ComOut( CGM_LEVEL3
, "Protection Region Indicator" ) break;
134 case 0x12 : ComOut( CGM_LEVEL3
, "Generalized Text Path Mode" ) break; // NS
135 case 0x13 : ComOut( CGM_LEVEL3
, "Mitre Limit" )
136 pElement
->nMitreLimit
= ImplGetFloat( pElement
->eRealPrecision
, pElement
->nRealSize
);
138 case 0x14 : ComOut( CGM_LEVEL3
, "Transparent Cell Color" ) break; // NS
139 case 0xfc : ComOut( CGM_GDSF_ONLY
, "Text Path Alignment Modes" ) break;
140 case 0xfd : ComOut( CGM_GDSF_ONLY
, "Pop Transformation Stack" ) break;
141 case 0xfe : ComOut( CGM_GDSF_ONLY
, "Push Transformation Stack" ) break;
142 case 0xff : ComOut( CGM_GDSF_ONLY
, "Set Patch ID" ) break;
143 default: ComOut( CGM_UNKNOWN_COMMAND
, "" ) break;