1*22e87013SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*22e87013SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*22e87013SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*22e87013SAndrew Rist  * distributed with this work for additional information
6*22e87013SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*22e87013SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*22e87013SAndrew Rist  * "License"); you may not use this file except in compliance
9*22e87013SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*22e87013SAndrew Rist  *
11*22e87013SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*22e87013SAndrew Rist  *
13*22e87013SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*22e87013SAndrew Rist  * software distributed under the License is distributed on an
15*22e87013SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*22e87013SAndrew Rist  * KIND, either express or implied.  See the License for the
17*22e87013SAndrew Rist  * specific language governing permissions and limitations
18*22e87013SAndrew Rist  * under the License.
19*22e87013SAndrew Rist  *
20*22e87013SAndrew Rist  *************************************************************/
21*22e87013SAndrew Rist 
22*22e87013SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #include <tools/stream.hxx>
25cdf0e10cSrcweir #include <vcl/gdimtf.hxx>
26cdf0e10cSrcweir #include <vcl/bitmap.hxx>
27cdf0e10cSrcweir 
28cdf0e10cSrcweir /************************************************************************
29cdf0e10cSrcweir |*    Impl_CacheElement
30cdf0e10cSrcweir |*    Impl_Cache
31cdf0e10cSrcweir |*
32cdf0e10cSrcweir |*    Beschreibung
33cdf0e10cSrcweir *************************************************************************/
34cdf0e10cSrcweir class Impl_OlePres
35cdf0e10cSrcweir {
36cdf0e10cSrcweir 	sal_uLong	nFormat;
37cdf0e10cSrcweir     sal_uInt16	nAspect;
38cdf0e10cSrcweir 	Bitmap *		pBmp;
39cdf0e10cSrcweir 	GDIMetaFile *	pMtf;
40cdf0e10cSrcweir 
41cdf0e10cSrcweir 	sal_uInt32  nAdvFlags;
42cdf0e10cSrcweir 	sal_Int32 	nJobLen;
43cdf0e10cSrcweir 	sal_uInt8*	pJob;
44cdf0e10cSrcweir 	Size	aSize;		// Groesse in 100TH_MM
45cdf0e10cSrcweir public:
Impl_OlePres(sal_uLong nF)46cdf0e10cSrcweir 					Impl_OlePres( sal_uLong nF )
47cdf0e10cSrcweir 						: nFormat( nF )
48cdf0e10cSrcweir 						, pBmp( NULL )
49cdf0e10cSrcweir 						, pMtf( NULL )
50cdf0e10cSrcweir 						, nAdvFlags( 0x2 )	// in Dokument gefunden
51cdf0e10cSrcweir 						, nJobLen( 0 )
52cdf0e10cSrcweir 						, pJob( NULL )
53cdf0e10cSrcweir 					{}
~Impl_OlePres()54cdf0e10cSrcweir 					~Impl_OlePres()
55cdf0e10cSrcweir 					{
56cdf0e10cSrcweir 						delete pJob;
57cdf0e10cSrcweir 						delete pBmp;
58cdf0e10cSrcweir 						delete pMtf;
59cdf0e10cSrcweir 					}
SetMtf(const GDIMetaFile & rMtf)60cdf0e10cSrcweir 	void	SetMtf( const GDIMetaFile & rMtf )
61cdf0e10cSrcweir 			{
62cdf0e10cSrcweir 				if( pMtf )
63cdf0e10cSrcweir 					delete pMtf;
64cdf0e10cSrcweir 				pMtf = new GDIMetaFile( rMtf );
65cdf0e10cSrcweir 			}
GetBitmap() const66cdf0e10cSrcweir 	Bitmap *GetBitmap() const { return pBmp; }
GetMetaFile() const67cdf0e10cSrcweir 	GDIMetaFile *GetMetaFile() const { return pMtf; }
GetFormat() const68cdf0e10cSrcweir 	sal_uLong	GetFormat() const { return nFormat; }
SetAspect(sal_uInt16 nAsp)69cdf0e10cSrcweir 	void	SetAspect( sal_uInt16 nAsp ) { nAspect = nAsp; }
GetAdviseFlags() const70cdf0e10cSrcweir 	sal_uLong	GetAdviseFlags() const { return nAdvFlags; }
SetAdviseFlags(sal_uLong nAdv)71cdf0e10cSrcweir 	void	SetAdviseFlags( sal_uLong nAdv ) { nAdvFlags = nAdv; }
SetSize(const Size & rSize)72cdf0e10cSrcweir 	void	SetSize( const Size & rSize ) { aSize = rSize; }
73cdf0e10cSrcweir 			/// return sal_False => unknown format
74cdf0e10cSrcweir 	void 	Write( SvStream & rStm );
75cdf0e10cSrcweir };
76cdf0e10cSrcweir 
77cdf0e10cSrcweir 
78