1*9e0fc027SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*9e0fc027SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*9e0fc027SAndrew Rist * or more contributor license agreements. See the NOTICE file
5*9e0fc027SAndrew Rist * distributed with this work for additional information
6*9e0fc027SAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*9e0fc027SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*9e0fc027SAndrew Rist * "License"); you may not use this file except in compliance
9*9e0fc027SAndrew Rist * with the License. You may obtain a copy of the License at
10*9e0fc027SAndrew Rist *
11*9e0fc027SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*9e0fc027SAndrew Rist *
13*9e0fc027SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*9e0fc027SAndrew Rist * software distributed under the License is distributed on an
15*9e0fc027SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*9e0fc027SAndrew Rist * KIND, either express or implied. See the License for the
17*9e0fc027SAndrew Rist * specific language governing permissions and limitations
18*9e0fc027SAndrew Rist * under the License.
19*9e0fc027SAndrew Rist *
20*9e0fc027SAndrew Rist *************************************************************/
21*9e0fc027SAndrew Rist
22*9e0fc027SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_filter.hxx"
26cdf0e10cSrcweir #include <main.hxx>
27cdf0e10cSrcweir #include <outact.hxx>
28cdf0e10cSrcweir
29cdf0e10cSrcweir // ---------------------------------------------------------------
30cdf0e10cSrcweir
ImplDoClass0()31cdf0e10cSrcweir void CGM::ImplDoClass0()
32cdf0e10cSrcweir {
33cdf0e10cSrcweir switch ( mnElementID )
34cdf0e10cSrcweir {
35cdf0e10cSrcweir case 0x01 : ComOut( CGM_LEVEL1, "Begin Metafile" )
36cdf0e10cSrcweir {
37cdf0e10cSrcweir ImplSetMapMode();
38cdf0e10cSrcweir mbMetaFile = sal_True;
39cdf0e10cSrcweir }
40cdf0e10cSrcweir break;
41cdf0e10cSrcweir case 0x02 : ComOut( CGM_LEVEL1, "End MetaFile" )
42cdf0e10cSrcweir {
43cdf0e10cSrcweir if ( mpBitmapInUse ) // vorhandene grafik verarbeiten,
44cdf0e10cSrcweir {
45cdf0e10cSrcweir CGMBitmapDescriptor* pBmpDesc = mpBitmapInUse->GetBitmap();
46cdf0e10cSrcweir // irgendetwas mit der Bitmap anfangen
47cdf0e10cSrcweir mpOutAct->DrawBitmap( pBmpDesc );
48cdf0e10cSrcweir delete mpBitmapInUse;
49cdf0e10cSrcweir mpBitmapInUse = NULL;
50cdf0e10cSrcweir }
51cdf0e10cSrcweir mbIsFinished = sal_True;
52cdf0e10cSrcweir mbPictureBody = sal_False;
53cdf0e10cSrcweir mbMetaFile = sal_False;
54cdf0e10cSrcweir }
55cdf0e10cSrcweir break;
56cdf0e10cSrcweir case 0x03 : ComOut( CGM_LEVEL1, "Begin Picture" )
57cdf0e10cSrcweir {
58cdf0e10cSrcweir ImplDefaultReplacement();
59cdf0e10cSrcweir ImplSetMapMode();
60cdf0e10cSrcweir if ( mbPicture )
61cdf0e10cSrcweir mbStatus = sal_False;
62cdf0e10cSrcweir else
63cdf0e10cSrcweir {
64cdf0e10cSrcweir *pCopyOfE = *pElement;
65cdf0e10cSrcweir mbPicture = mbFirstOutPut = sal_True;
66cdf0e10cSrcweir mbFigure = sal_False;
67cdf0e10cSrcweir mnAct4PostReset = 0;
68cdf0e10cSrcweir if ( mpChart == NULL ) // normal CGM Files determines "BeginPic"
69cdf0e10cSrcweir mpOutAct->InsertPage(); // as the next slide
70cdf0e10cSrcweir }
71cdf0e10cSrcweir }
72cdf0e10cSrcweir break;
73cdf0e10cSrcweir case 0x04 : ComOut( CGM_LEVEL1, "Begin Picture Body" )
74cdf0e10cSrcweir mbPictureBody = sal_True;
75cdf0e10cSrcweir break;
76cdf0e10cSrcweir case 0x05 : ComOut( CGM_LEVEL1, " End Picture" )
77cdf0e10cSrcweir {
78cdf0e10cSrcweir if ( mbPicture )
79cdf0e10cSrcweir {
80cdf0e10cSrcweir if ( mpBitmapInUse ) // vorhandene grafik verarbeiten,
81cdf0e10cSrcweir {
82cdf0e10cSrcweir CGMBitmapDescriptor* pBmpDesc = mpBitmapInUse->GetBitmap();
83cdf0e10cSrcweir // irgendetwas mit der Bitmap anfangen
84cdf0e10cSrcweir mpOutAct->DrawBitmap( pBmpDesc );
85cdf0e10cSrcweir delete mpBitmapInUse;
86cdf0e10cSrcweir mpBitmapInUse = NULL;
87cdf0e10cSrcweir }
88cdf0e10cSrcweir mpOutAct->EndFigure(); // eventuelle figuren schliessen
89cdf0e10cSrcweir mpOutAct->EndGrouping(); // eventuelle gruppierungen noch abschliessen
90cdf0e10cSrcweir *pElement = *pCopyOfE;
91cdf0e10cSrcweir mbFigure = mbFirstOutPut = mbPicture = mbPictureBody = sal_False;
92cdf0e10cSrcweir }
93cdf0e10cSrcweir else
94cdf0e10cSrcweir mbStatus = sal_False;
95cdf0e10cSrcweir }
96cdf0e10cSrcweir break;
97cdf0e10cSrcweir case 0x06 : ComOut( CGM_LEVEL2, "Begin Segment" )
98cdf0e10cSrcweir pElement->bSegmentCount = sal_True;
99cdf0e10cSrcweir break;
100cdf0e10cSrcweir case 0x07 : ComOut( CGM_LEVEL2, "End Segment" )
101cdf0e10cSrcweir pElement->bSegmentCount = sal_True;
102cdf0e10cSrcweir break;
103cdf0e10cSrcweir case 0x08 : ComOut( CGM_LEVEL2, "Begin Figure" )
104cdf0e10cSrcweir mbFigure = sal_True;
105cdf0e10cSrcweir mpOutAct->BeginFigure();
106cdf0e10cSrcweir break;
107cdf0e10cSrcweir case 0x09 : ComOut( CGM_LEVEL2, "End Figure" )
108cdf0e10cSrcweir mpOutAct->EndFigure();
109cdf0e10cSrcweir mbFigure = sal_False;
110cdf0e10cSrcweir break;
111cdf0e10cSrcweir case 0x0d : ComOut( CGM_LEVEL3, "Begin Protection Region" ) break;
112cdf0e10cSrcweir case 0x0e : ComOut( CGM_LEVEL3, "End Protection Region" ) break;
113cdf0e10cSrcweir case 0x0f : ComOut( CGM_LEVEL3, "Begin Compound Line" ) break;
114cdf0e10cSrcweir case 0x10 : ComOut( CGM_LEVEL3, "End Compound Line" ) break;
115cdf0e10cSrcweir case 0x11 : ComOut( CGM_LEVEL3, "Begin Compound Text Path" ) break;
116cdf0e10cSrcweir case 0x12 : ComOut( CGM_LEVEL3, "End Compound Text Path" ) break;
117cdf0e10cSrcweir case 0x13 : ComOut( CGM_LEVEL3, "Begin Tile Array" ) break; // NS
118cdf0e10cSrcweir case 0x14 : ComOut( CGM_LEVEL3, "End Tile Array" ) break; // NS
119cdf0e10cSrcweir case 0xff : ComOut( CGM_GDSF_ONLY, "Filter Setup" ) break;
120cdf0e10cSrcweir case 0xfe : ComOut( CGM_GDSF_ONLY, "Begin Block Text Region" ) break;
121cdf0e10cSrcweir case 0xfd : ComOut( CGM_GDSF_ONLY, "End Block Text Region" ) break;
122cdf0e10cSrcweir case 0xfc : ComOut( CGM_GDSF_ONLY, "Begin Group" )
123cdf0e10cSrcweir mpOutAct->BeginGroup();
124cdf0e10cSrcweir break;
125cdf0e10cSrcweir case 0xfb : ComOut( CGM_GDSF_ONLY, "End Group" )
126cdf0e10cSrcweir mpOutAct->EndGroup();
127cdf0e10cSrcweir break;
128cdf0e10cSrcweir case 0xfa : ComOut( CGM_GDSF_ONLY, "Begin Patch" ) break;
129cdf0e10cSrcweir case 0xf9 : ComOut( CGM_GDSF_ONLY, "Begin Patch" ) break;
130cdf0e10cSrcweir default: ComOut( CGM_UNKNOWN_COMMAND, "" ) break;
131cdf0e10cSrcweir }
132cdf0e10cSrcweir };
133cdf0e10cSrcweir
134cdf0e10cSrcweir
135