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 : :
30 : : #include <main.hxx>
31 : : #include <outact.hxx>
32 : :
33 : : // ---------------------------------------------------------------
34 : :
35 : 0 : void CGM::ImplDoClass3()
36 : : {
37 : : sal_uInt32 nUInteger;
38 : : long nI0, nI1;
39 : 0 : switch ( mnElementID )
40 : : {
41 : : case 0x01 : /*VDC Integer Precision*/
42 : : {
43 : 0 : switch( ImplGetI( pElement->nIntegerPrecision ) )
44 : : {
45 : 0 : case 16 : pElement->nVDCIntegerPrecision = 2; break;
46 : 0 : case 32 : pElement->nVDCIntegerPrecision = 4; break;
47 : 0 : default : mbStatus = sal_False; break;
48 : : }
49 : : }
50 : 0 : break;
51 : : case 0x02 : /*VDC Real Precision*/
52 : : {
53 : 0 : nUInteger = ImplGetUI16();
54 : 0 : nI0 = ImplGetI( pElement->nIntegerPrecision ); // exponent
55 : 0 : nI1 = ImplGetI( pElement->nIntegerPrecision ); // mantisse
56 : 0 : switch( nUInteger )
57 : : {
58 : : case 0 :
59 : 0 : pElement->eVDCRealPrecision = RP_FLOAT;
60 : 0 : switch ( nI0 )
61 : : {
62 : : case 9 :
63 : 0 : if ( nI1 != 23 )
64 : 0 : mbStatus = sal_False;
65 : 0 : pElement->nVDCRealSize = 4;
66 : 0 : break;
67 : : case 12 :
68 : 0 : if ( nI1 != 52 )
69 : 0 : mbStatus =sal_False;
70 : 0 : pElement->nVDCRealSize = 8;
71 : 0 : break;
72 : : default:
73 : 0 : mbStatus = sal_False;
74 : 0 : break;
75 : : }
76 : 0 : break;
77 : : case 1 :
78 : 0 : pElement->eVDCRealPrecision = RP_FIXED;
79 : 0 : if ( nI0 != nI1 )
80 : 0 : mbStatus = sal_False;
81 : 0 : if ( nI0 == 16 )
82 : 0 : pElement->nVDCRealSize = 4;
83 : 0 : else if ( nI0 == 32 )
84 : 0 : pElement->nVDCRealSize = 8;
85 : : else
86 : 0 : mbStatus = sal_False;
87 : 0 : break;
88 : : default :
89 : 0 : mbStatus = sal_False; break;
90 : : }
91 : : }
92 : 0 : break;
93 : : case 0x03 : /*Auxiliary Colour*/
94 : : {
95 : 0 : pElement->nAuxiliaryColor = ImplGetBitmapColor();
96 : : }
97 : 0 : break;
98 : : case 0x04 : /*Transparency*/
99 : : {
100 : 0 : switch( ImplGetUI16() )
101 : : {
102 : 0 : case 0 : pElement->eTransparency = T_OFF; break;
103 : 0 : case 1 : pElement->eTransparency = T_ON; break;
104 : 0 : default : mbStatus = sal_False; break;
105 : : }
106 : : }
107 : 0 : break;
108 : : case 0x05 : /*Clip Rectangle*/
109 : 0 : ImplGetRectangle( pElement->aClipRect );
110 : 0 : break;
111 : : case 0x06 : /*Clip Indicator*/
112 : : {
113 : 0 : switch( ImplGetUI16() )
114 : : {
115 : 0 : case 0 : pElement->eClipIndicator = CI_OFF; break;
116 : 0 : case 1 : pElement->eClipIndicator = CI_ON; break;
117 : 0 : default : mbStatus = sal_False; break;
118 : : }
119 : : }
120 : 0 : break;
121 : 0 : case 0x07 : /*Line Clipping Mode */break; // NS
122 : 0 : case 0x08 : /*Marker Clipping Mode */break; // NS
123 : 0 : case 0x09 : /*Edge Clipping Mode */break; // NS
124 : : case 0x0a : /*New Region*/
125 : 0 : mpOutAct->NewRegion();
126 : 0 : break;
127 : 0 : case 0x0b : /*Save Primitive Context */break; // NS
128 : 0 : case 0x0c : /*Restore Primitive Context */break; // NS
129 : 0 : case 0x11 : /*Protection Region Indicator */break;
130 : 0 : case 0x12 : /*Generalized Text Path Mode */break; // NS
131 : : case 0x13 : /*Mitre Limit*/
132 : 0 : pElement->nMitreLimit = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
133 : 0 : break; // NS
134 : 0 : case 0x14 : /*Transparent Cell Color */break; // NS
135 : 0 : case 0xfc : /*Text Path Alignment Modes */break;
136 : 0 : case 0xfd : /*Pop Transformation Stack */break;
137 : 0 : case 0xfe : /*Push Transformation Stack */break;
138 : 0 : case 0xff : /*Set Patch ID */break;
139 : 0 : default: break;
140 : : }
141 : 0 : };
142 : :
143 : :
144 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|