Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #include <sfx2/objsh.hxx>
21 : #include <tools/stream.hxx>
22 : #include <vcl/gdimtf.hxx>
23 : #include <vcl/bitmap.hxx>
24 :
25 : class Impl_OlePres
26 : {
27 : sal_uLong nFormat;
28 : sal_uInt16 nAspect;
29 : Bitmap * pBmp;
30 : GDIMetaFile * pMtf;
31 :
32 : sal_uInt32 nAdvFlags;
33 : sal_Int32 nJobLen;
34 : sal_uInt8* pJob;
35 : Size aSize; // Groesse in 100TH_MM
36 : public:
37 0 : Impl_OlePres( sal_uLong nF )
38 : : nFormat( nF )
39 : , nAspect( ASPECT_CONTENT )
40 : , pBmp( NULL )
41 : , pMtf( NULL )
42 : , nAdvFlags( 0x2 ) // in Dokument gefunden
43 : , nJobLen( 0 )
44 0 : , pJob( NULL )
45 0 : {}
46 0 : ~Impl_OlePres()
47 : {
48 0 : delete pJob;
49 0 : delete pBmp;
50 0 : delete pMtf;
51 0 : }
52 0 : void SetMtf( const GDIMetaFile & rMtf )
53 : {
54 0 : if( pMtf )
55 0 : delete pMtf;
56 0 : pMtf = new GDIMetaFile( rMtf );
57 0 : }
58 : Bitmap *GetBitmap() const { return pBmp; }
59 : GDIMetaFile *GetMetaFile() const { return pMtf; }
60 0 : sal_uLong GetFormat() const { return nFormat; }
61 0 : void SetAspect( sal_uInt16 nAsp ) { nAspect = nAsp; }
62 : sal_uLong GetAdviseFlags() const { return nAdvFlags; }
63 0 : void SetAdviseFlags( sal_uLong nAdv ) { nAdvFlags = nAdv; }
64 0 : void SetSize( const Size & rSize ) { aSize = rSize; }
65 : void Write( SvStream & rStm );
66 : };
67 :
68 :
69 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|