1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #include <tools/stream.hxx> 29 #include <vcl/gdimtf.hxx> 30 #include <vcl/bitmap.hxx> 31 32 /************************************************************************ 33 |* Impl_CacheElement 34 |* Impl_Cache 35 |* 36 |* Beschreibung 37 *************************************************************************/ 38 class Impl_OlePres 39 { 40 sal_uLong nFormat; 41 sal_uInt16 nAspect; 42 Bitmap * pBmp; 43 GDIMetaFile * pMtf; 44 45 sal_uInt32 nAdvFlags; 46 sal_Int32 nJobLen; 47 sal_uInt8* pJob; 48 Size aSize; // Groesse in 100TH_MM 49 public: 50 Impl_OlePres( sal_uLong nF ) 51 : nFormat( nF ) 52 , pBmp( NULL ) 53 , pMtf( NULL ) 54 , nAdvFlags( 0x2 ) // in Dokument gefunden 55 , nJobLen( 0 ) 56 , pJob( NULL ) 57 {} 58 ~Impl_OlePres() 59 { 60 delete pJob; 61 delete pBmp; 62 delete pMtf; 63 } 64 void SetMtf( const GDIMetaFile & rMtf ) 65 { 66 if( pMtf ) 67 delete pMtf; 68 pMtf = new GDIMetaFile( rMtf ); 69 } 70 Bitmap *GetBitmap() const { return pBmp; } 71 GDIMetaFile *GetMetaFile() const { return pMtf; } 72 sal_uLong GetFormat() const { return nFormat; } 73 void SetAspect( sal_uInt16 nAsp ) { nAspect = nAsp; } 74 sal_uLong GetAdviseFlags() const { return nAdvFlags; } 75 void SetAdviseFlags( sal_uLong nAdv ) { nAdvFlags = nAdv; } 76 void SetSize( const Size & rSize ) { aSize = rSize; } 77 /// return sal_False => unknown format 78 void Write( SvStream & rStm ); 79 }; 80 81 82