1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_filter.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include <main.hxx> 32*cdf0e10cSrcweir #include <chart.hxx> 33*cdf0e10cSrcweir #include <outact.hxx> 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir // --------------------------------------------------------------- 36*cdf0e10cSrcweir 37*cdf0e10cSrcweir void CGM::ImplDoClass7() 38*cdf0e10cSrcweir { 39*cdf0e10cSrcweir switch ( mnElementID ) 40*cdf0e10cSrcweir { 41*cdf0e10cSrcweir case 0x01 : ComOut( CGM_LEVEL1, "Message" ) break; 42*cdf0e10cSrcweir case 0x02 : 43*cdf0e10cSrcweir { 44*cdf0e10cSrcweir sal_uInt8* pAppData = mpSource + 12; 45*cdf0e10cSrcweir sal_uInt16* pTemp = (sal_uInt16*)mpSource; 46*cdf0e10cSrcweir sal_uInt16 nOpcode = pTemp[ 4 ]; 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir if ( mpChart || ( nOpcode == 0 ) ) 49*cdf0e10cSrcweir { 50*cdf0e10cSrcweir switch ( nOpcode ) 51*cdf0e10cSrcweir { 52*cdf0e10cSrcweir case 0x000 : ComOut( CGM_LEVEL1, "AppData - Beginning of File Opcodes" ) 53*cdf0e10cSrcweir { 54*cdf0e10cSrcweir if ( mpChart == NULL ) 55*cdf0e10cSrcweir mpChart = new CGMChart( *this ); 56*cdf0e10cSrcweir mpChart->mnCurrentFileType = pAppData[ 3 ]; 57*cdf0e10cSrcweir } 58*cdf0e10cSrcweir break; 59*cdf0e10cSrcweir case 0x001 : ComOut( CGM_LEVEL1, "AppData - End of File Opcodes" ) break; 60*cdf0e10cSrcweir case 0x190 : ComOut( CGM_LEVEL1, "AppData - FDESC" ) break; 61*cdf0e10cSrcweir case 0x192 : ComOut( CGM_LEVEL1, "AppData - FNOTES" ) break; 62*cdf0e10cSrcweir case 0x1F4 : ComOut( CGM_LEVEL1, "AppData - BOGENFILE" ) break; 63*cdf0e10cSrcweir case 0x1F5 : ComOut( CGM_LEVEL1, "AppData - EOGENFILE" ) break; 64*cdf0e10cSrcweir case 0x1F8 : ComOut( CGM_LEVEL1, "AppData - BOCHTGROUP" ) break; 65*cdf0e10cSrcweir case 0x1F9 : ComOut( CGM_LEVEL1, "AppData - EOCHTGROUP" ) break; 66*cdf0e10cSrcweir case 0x1FC : ComOut( CGM_LEVEL1, "AppData - BOCHTDATA" ) break; 67*cdf0e10cSrcweir case 0x1FD : ComOut( CGM_LEVEL1, "AppData - EOCHTDATA" ) 68*cdf0e10cSrcweir { 69*cdf0e10cSrcweir mpOutAct->DrawChart(); 70*cdf0e10cSrcweir } 71*cdf0e10cSrcweir break; 72*cdf0e10cSrcweir case 0x200 : ComOut( CGM_LEVEL1, "AppData - BOSYMGROUP" ) break; 73*cdf0e10cSrcweir case 0x201 : ComOut( CGM_LEVEL1, "AppData - EOSYMGROUP" ) break; 74*cdf0e10cSrcweir case 0x204 : ComOut( CGM_LEVEL1, "AppData - BEGSYMBOL" ) break; 75*cdf0e10cSrcweir case 0x205 : ComOut( CGM_LEVEL1, "AppData - ENDSYMBOL" ) break; 76*cdf0e10cSrcweir case 0x208 : ComOut( CGM_LEVEL1, "AppData - BOSHWGROUP" ) break; 77*cdf0e10cSrcweir case 0x209 : ComOut( CGM_LEVEL1, "AppData - EOSHWGROUP" ) break; 78*cdf0e10cSrcweir case 0x260 : ComOut( CGM_LEVEL1, "AppData - BEGGROUP" ) break; 79*cdf0e10cSrcweir case 0x262 : ComOut( CGM_LEVEL1, "AppData - ENDGROUP" ) break; 80*cdf0e10cSrcweir case 0x264 : ComOut( CGM_LEVEL1, "AppData - DATANODE" ) 81*cdf0e10cSrcweir { 82*cdf0e10cSrcweir mpChart->mDataNode[ 0 ] = *(DataNode*)( pAppData ); 83*cdf0e10cSrcweir sal_Int8 nZoneEnum = mpChart->mDataNode[ 0 ].nZoneEnum; 84*cdf0e10cSrcweir if ( nZoneEnum && ( nZoneEnum <= 6 ) ) 85*cdf0e10cSrcweir mpChart->mDataNode[ nZoneEnum ] = *(DataNode*)( pAppData ); 86*cdf0e10cSrcweir } 87*cdf0e10cSrcweir break; 88*cdf0e10cSrcweir case 0x2BE : ComOut( CGM_LEVEL1, "AppData - SHWSLIDEREC" ) 89*cdf0e10cSrcweir { 90*cdf0e10cSrcweir if ( mnMode & CGM_EXPORT_IMPRESS ) 91*cdf0e10cSrcweir { 92*cdf0e10cSrcweir if ( pAppData[ 16 ] == 0 ) // a blank template ? 93*cdf0e10cSrcweir { 94*cdf0e10cSrcweir if ( pAppData[ 2 ] == 46 ) 95*cdf0e10cSrcweir { 96*cdf0e10cSrcweir // this starts the document -> maybe we could insert a new document 97*cdf0e10cSrcweir } 98*cdf0e10cSrcweir else if ( pAppData[ 2 ] & 0x80 ) 99*cdf0e10cSrcweir { 100*cdf0e10cSrcweir // this is a template 101*cdf0e10cSrcweir } 102*cdf0e10cSrcweir else 103*cdf0e10cSrcweir { 104*cdf0e10cSrcweir mpOutAct->InsertPage(); 105*cdf0e10cSrcweir } 106*cdf0e10cSrcweir } 107*cdf0e10cSrcweir mpChart->ResetAnnotation(); 108*cdf0e10cSrcweir } 109*cdf0e10cSrcweir } 110*cdf0e10cSrcweir break; 111*cdf0e10cSrcweir case 0x2C0 : ComOut( CGM_LEVEL1, "AppData - SHWKEYTABLE" ) break; 112*cdf0e10cSrcweir case 0x2C2 : ComOut( CGM_LEVEL1, "AppData - SHWBUTTONTAB" ) break; 113*cdf0e10cSrcweir case 0x2C4 : ComOut( CGM_LEVEL1, "AppData - SHWGLOBAL" ) break; 114*cdf0e10cSrcweir case 0x2C6 : ComOut( CGM_LEVEL1, "AppData - SHWTITLE" ) break; 115*cdf0e10cSrcweir case 0x2CA : ComOut( CGM_LEVEL1, "AppData - SHWAPP" ) break; 116*cdf0e10cSrcweir case 0x320 : ComOut( CGM_LEVEL1, "AppData - TEXT" ) 117*cdf0e10cSrcweir { 118*cdf0e10cSrcweir TextEntry* pTextEntry = new TextEntry; 119*cdf0e10cSrcweir pTextEntry->nTypeOfText = *((sal_uInt16*)( pAppData ) ); 120*cdf0e10cSrcweir pTextEntry->nRowOrLineNum = *((sal_uInt16*)( pAppData + 2 ) ); 121*cdf0e10cSrcweir pTextEntry->nColumnNum = *((sal_uInt16*)( pAppData + 4 ) ); 122*cdf0e10cSrcweir sal_uInt16 nAttributes = *( (sal_uInt16*)( pAppData + 6 ) ); 123*cdf0e10cSrcweir pTextEntry->nZoneSize = nAttributes & 0xff; 124*cdf0e10cSrcweir pTextEntry->nLineType = ( nAttributes >> 8 ) & 0xf; 125*cdf0e10cSrcweir nAttributes >>= 12; 126*cdf0e10cSrcweir pTextEntry->nAttributes = nAttributes; 127*cdf0e10cSrcweir pAppData += 8; 128*cdf0e10cSrcweir sal_uInt32 nLen = strlen( (char*)( pAppData ) ) + 1; 129*cdf0e10cSrcweir pTextEntry->pText = new char[ nLen ]; 130*cdf0e10cSrcweir memcpy( pTextEntry->pText, pAppData, nLen ); 131*cdf0e10cSrcweir pAppData += nLen; 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir TextAttribute* pTextOld = 0; 134*cdf0e10cSrcweir for ( sal_uInt16 i = 0; i < nAttributes; i++ ) 135*cdf0e10cSrcweir { 136*cdf0e10cSrcweir TextAttribute* pTextAttr = new TextAttribute; 137*cdf0e10cSrcweir 138*cdf0e10cSrcweir *pTextAttr = *(TextAttribute*)( pAppData ); 139*cdf0e10cSrcweir 140*cdf0e10cSrcweir pTextAttr->pNextAttribute = NULL; 141*cdf0e10cSrcweir if ( i == 0 ) 142*cdf0e10cSrcweir pTextEntry->pAttribute = pTextAttr; 143*cdf0e10cSrcweir else 144*cdf0e10cSrcweir pTextOld->pNextAttribute = pTextAttr; 145*cdf0e10cSrcweir 146*cdf0e10cSrcweir pAppData += sizeof( TextAttribute ) - 4; 147*cdf0e10cSrcweir pTextOld = pTextAttr; 148*cdf0e10cSrcweir } 149*cdf0e10cSrcweir mpChart->InsertTextEntry( pTextEntry ); 150*cdf0e10cSrcweir } 151*cdf0e10cSrcweir break; 152*cdf0e10cSrcweir case 0x321 : ComOut( CGM_LEVEL1, "AppData - IOC_TABS" ) break; 153*cdf0e10cSrcweir case 0x322 : ComOut( CGM_LEVEL1, "AppData - CHARTZONE" ) 154*cdf0e10cSrcweir { 155*cdf0e10cSrcweir mpChart->mChartZone = *( ChartZone* )( pAppData ); 156*cdf0e10cSrcweir } 157*cdf0e10cSrcweir break; 158*cdf0e10cSrcweir case 0x324 : ComOut( CGM_LEVEL1, "AppData - TITLEZONE" ) break; 159*cdf0e10cSrcweir case 0x328 : ComOut( CGM_LEVEL1, "AppData - FOOTNOTEZONE" ) break; 160*cdf0e10cSrcweir case 0x32A : ComOut( CGM_LEVEL1, "AppData - LEGENDZONE" ) break; 161*cdf0e10cSrcweir case 0x330 : ComOut( CGM_LEVEL1, "AppData - PAGEORIENTDIM" ) 162*cdf0e10cSrcweir { 163*cdf0e10cSrcweir mpChart->mPageOrientDim = *( PageOrientDim*)( pAppData ); 164*cdf0e10cSrcweir } 165*cdf0e10cSrcweir break; 166*cdf0e10cSrcweir case 0x334 : ComOut( CGM_LEVEL1, "AppData - CHTZONEOPTN" ) 167*cdf0e10cSrcweir { 168*cdf0e10cSrcweir mpChart->mZoneOption = *( ZoneOption*)( pAppData ); 169*cdf0e10cSrcweir } 170*cdf0e10cSrcweir break; 171*cdf0e10cSrcweir case 0x336 : ComOut( CGM_LEVEL1, "AppData - CHTINTL" ) 172*cdf0e10cSrcweir { 173*cdf0e10cSrcweir mpChart->mIntSettings = *( IntSettings*)( pAppData ); 174*cdf0e10cSrcweir } 175*cdf0e10cSrcweir break; 176*cdf0e10cSrcweir case 0x338 : ComOut( CGM_LEVEL1, "AppData - CHTLINESPC" ) break; 177*cdf0e10cSrcweir case 0x384 : ComOut( CGM_LEVEL1, "AppData - ORGGRIDSTATE" ) break; 178*cdf0e10cSrcweir case 0x386 : ComOut( CGM_LEVEL1, "AppData - ORGSCRSTATE" ) break; 179*cdf0e10cSrcweir case 0x388 : ComOut( CGM_LEVEL1, "AppData - ORGTREESTATE" ) break; 180*cdf0e10cSrcweir case 0x38A : ComOut( CGM_LEVEL1, "AppData - ORGTEXTOPTN" ) break; 181*cdf0e10cSrcweir case 0x38E : ComOut( CGM_LEVEL1, "AppData - ORGBOXOPTN" ) break; 182*cdf0e10cSrcweir case 0x390 : ComOut( CGM_LEVEL1, "AppData - ORGBOXDIM" ) break; 183*cdf0e10cSrcweir case 0x392 : ComOut( CGM_LEVEL1, "AppData - ORGBOX" ) break; 184*cdf0e10cSrcweir case 0x3EA : ComOut( CGM_LEVEL1, "AppData - TTLTEXTOPTN" ) break; 185*cdf0e10cSrcweir case 0x3EE : ComOut( CGM_LEVEL1, "AppData - TTLAUTOBUILD" ) break; 186*cdf0e10cSrcweir case 0x44E : ComOut( CGM_LEVEL1, "AppData - BULTEXTOPTN" ) break; 187*cdf0e10cSrcweir case 0x452 : ComOut( CGM_LEVEL1, "AppData - BULLETOPTN" ) 188*cdf0e10cSrcweir { 189*cdf0e10cSrcweir mpChart->mBulletOption = *( BulletOption*)( pAppData ); 190*cdf0e10cSrcweir } 191*cdf0e10cSrcweir break; 192*cdf0e10cSrcweir case 0x454 : ComOut( CGM_LEVEL1, "AppData - BULLETLINES" ) 193*cdf0e10cSrcweir { 194*cdf0e10cSrcweir mpChart->mBulletLines = *( BulletLines*)( pAppData ); 195*cdf0e10cSrcweir } 196*cdf0e10cSrcweir break; 197*cdf0e10cSrcweir case 0x456 : ComOut( CGM_LEVEL1, "AppData - BULAUTOBUILD" ) break; 198*cdf0e10cSrcweir case 0x4B2 : ComOut( CGM_LEVEL1, "AppData - TBLTEXTOPTN" ) break; 199*cdf0e10cSrcweir case 0x4B6 : ComOut( CGM_LEVEL1, "AppData - TBLOPTN" ) break; 200*cdf0e10cSrcweir case 0x4B8 : ComOut( CGM_LEVEL1, "AppData - TBLCOLOPTN" ) break; 201*cdf0e10cSrcweir case 0x4BA : ComOut( CGM_LEVEL1, "AppData - TBLLEGENDOPTN" ) break; 202*cdf0e10cSrcweir case 0x4BC : ComOut( CGM_LEVEL1, "AppData - TBLRANGEOPTN" ) break; 203*cdf0e10cSrcweir case 0x4BE : ComOut( CGM_LEVEL1, "AppData - TBLROWOPTN" ) break; 204*cdf0e10cSrcweir case 0x4C0 : ComOut( CGM_LEVEL1, "AppData - TBLAUTOBUILD" ) break; 205*cdf0e10cSrcweir case 0x518 : ComOut( CGM_LEVEL1, "AppData - PIECHARTOPTN" ) break; 206*cdf0e10cSrcweir case 0x51A : ComOut( CGM_LEVEL1, "AppData - PIELEGENDOPTN" ) break; 207*cdf0e10cSrcweir case 0x51C : ComOut( CGM_LEVEL1, "AppData - PIETEXTOPTN" ) break; 208*cdf0e10cSrcweir case 0x51E : ComOut( CGM_LEVEL1, "AppData - PIEOPTN" ) break; 209*cdf0e10cSrcweir case 0x520 : ComOut( CGM_LEVEL1, "AppData - PIEPCTLABOPTN" ) break; 210*cdf0e10cSrcweir case 0x522 : ComOut( CGM_LEVEL1, "AppData - PIEVALLABOPTN" ) break; 211*cdf0e10cSrcweir case 0x524 : ComOut( CGM_LEVEL1, "AppData - PIESLICE" ) break; 212*cdf0e10cSrcweir case 0x57A : ComOut( CGM_LEVEL1, "AppData - XYAXISOPTN" ) break; 213*cdf0e10cSrcweir case 0x57C : ComOut( CGM_LEVEL1, "AppData - XYGRIDOPTN" ) break; 214*cdf0e10cSrcweir case 0x57D : ComOut( CGM_LEVEL1, "AppData - XYGRIDSHOWFILL" ) break; 215*cdf0e10cSrcweir case 0x57E : ComOut( CGM_LEVEL1, "AppData - XYSERIESOPTN" ) break; 216*cdf0e10cSrcweir case 0x580 : ComOut( CGM_LEVEL1, "AppData - XYSTYLEOPTN" ) break; 217*cdf0e10cSrcweir case 0x582 : ComOut( CGM_LEVEL1, "AppData - XYTABLEOPTN" ) break; 218*cdf0e10cSrcweir case 0x584 : ComOut( CGM_LEVEL1, "AppData - XYTEXTOPTN" ) break; 219*cdf0e10cSrcweir case 0x586 : ComOut( CGM_LEVEL1, "AppData - XYDATAOPTN" ) break; 220*cdf0e10cSrcweir case 0x58A : ComOut( CGM_LEVEL1, "AppData - XYLEGENDOPN" ) break; 221*cdf0e10cSrcweir case 0x58C : ComOut( CGM_LEVEL1, "AppData - XYCALCULATION" ) break; 222*cdf0e10cSrcweir case 0x58E : ComOut( CGM_LEVEL1, "AppData - XYXVALUE" ) break; 223*cdf0e10cSrcweir case 0x590 : ComOut( CGM_LEVEL1, "AppData - XYYVALUE" ) break; 224*cdf0e10cSrcweir case 0x592 : ComOut( CGM_LEVEL1, "AppData - XYXEXTVALUE" ) break; 225*cdf0e10cSrcweir case 0x618 : ComOut( CGM_LEVEL1, "AppData - IOC_CHTCOLRTAB" ) break; 226*cdf0e10cSrcweir case 0x619 : ComOut( CGM_LEVEL1, "AppData - IOC_CHTFONTTAB" ) break; 227*cdf0e10cSrcweir case 0x1fff : ComOut( CGM_LEVEL1, "AppData - 0x1fff" ) break; 228*cdf0e10cSrcweir default : ComOut( CGM_LEVEL1, "UNKNOWN Application Data" ) break; 229*cdf0e10cSrcweir } 230*cdf0e10cSrcweir } 231*cdf0e10cSrcweir mnParaSize = mnElementSize; 232*cdf0e10cSrcweir break; 233*cdf0e10cSrcweir } 234*cdf0e10cSrcweir default: ComOut( CGM_UNKNOWN_COMMAND, "" ) break; 235*cdf0e10cSrcweir } 236*cdf0e10cSrcweir }; 237*cdf0e10cSrcweir 238