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 <tools/stream.hxx>
21 : #include <vcl/gdimtf.hxx>
22 : #include <vcl/bitmap.hxx>
23 :
24 : class Impl_OlePres
25 : {
26 : sal_uLong nFormat;
27 : sal_uInt16 nAspect;
28 : Bitmap * pBmp;
29 : GDIMetaFile * pMtf;
30 :
31 : sal_uInt32 nAdvFlags;
32 : sal_Int32 nJobLen;
33 : sal_uInt8* pJob;
34 : Size aSize; // Groesse in 100TH_MM
35 : public:
36 0 : Impl_OlePres( sal_uLong nF )
37 : : nFormat( nF )
38 : , pBmp( NULL )
39 : , pMtf( NULL )
40 : , nAdvFlags( 0x2 ) // in Dokument gefunden
41 : , nJobLen( 0 )
42 0 : , pJob( NULL )
43 0 : {}
44 0 : ~Impl_OlePres()
45 : {
46 0 : delete pJob;
47 0 : delete pBmp;
48 0 : delete pMtf;
49 0 : }
50 0 : void SetMtf( const GDIMetaFile & rMtf )
51 : {
52 0 : if( pMtf )
53 0 : delete pMtf;
54 0 : pMtf = new GDIMetaFile( rMtf );
55 0 : }
56 : Bitmap *GetBitmap() const { return pBmp; }
57 : GDIMetaFile *GetMetaFile() const { return pMtf; }
58 0 : sal_uLong GetFormat() const { return nFormat; }
59 0 : void SetAspect( sal_uInt16 nAsp ) { nAspect = nAsp; }
60 : sal_uLong GetAdviseFlags() const { return nAdvFlags; }
61 0 : void SetAdviseFlags( sal_uLong nAdv ) { nAdvFlags = nAdv; }
62 0 : void SetSize( const Size & rSize ) { aSize = rSize; }
63 : void Write( SvStream & rStm );
64 : };
65 :
66 :
67 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|