update credits
[LibreOffice.git] / dtrans / source / win32 / dtobj / Fetc.hxx
blob3d02afa16b5c7e666cde92f0b6c49971c1b6bce2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
21 #ifndef _FETC_HXX_
22 #define _FETC_HXX_
24 #include <sal/types.h>
26 #if defined _MSC_VER
27 #pragma warning(push,1)
28 #endif
29 #include <windows.h>
30 #if defined _MSC_VER
31 #pragma warning(pop)
32 #endif
34 /**********************************************************************
35 stl container elements must fulfill the following requirements:
36 1. they need a copy ctor and assignement operator(?)
37 2. they must be compareable
38 because the FORMATETC structure has a pointer to a TARGETDEVICE
39 structure we need a simple wrapper class to fulfill these needs
40 ***********************************************************************/
42 class CFormatEtc
44 public:
45 CFormatEtc( );
46 CFormatEtc( const FORMATETC& aFormatEtc );
47 CFormatEtc( CLIPFORMAT cf, DWORD tymed = TYMED_HGLOBAL, DVTARGETDEVICE* ptd = NULL, DWORD dwAspect = DVASPECT_CONTENT, LONG lindex = -1 );
48 CFormatEtc( const CFormatEtc& theOther );
50 ~CFormatEtc( );
52 CFormatEtc& operator=( const CFormatEtc& theOther );
53 operator FORMATETC*( );
54 operator FORMATETC( );
56 void getFORMATETC( LPFORMATETC lpFormatEtc );
58 CLIPFORMAT getClipformat( ) const;
59 DWORD getTymed( ) const;
60 void getTargetDevice( DVTARGETDEVICE** ptd ) const;
61 DWORD getDvAspect( ) const;
62 LONG getLindex( ) const;
64 void setClipformat( CLIPFORMAT cf );
65 void setTymed( DWORD tymed );
66 void setTargetDevice( DVTARGETDEVICE* ptd );
67 void setDvAspect( DWORD dwAspect );
68 void setLindex( LONG lindex );
70 private:
71 FORMATETC m_FormatEtc;
73 friend sal_Int32 operator==( const CFormatEtc& lhs, const CFormatEtc& rhs );
74 friend sal_Int32 operator!=( const CFormatEtc& lhs, const CFormatEtc& rhs );
77 sal_Int32 operator==( const CFormatEtc& lhs, const CFormatEtc& rhs );
78 sal_Int32 operator!=( const CFormatEtc& lhs, const CFormatEtc& rhs );
81 #endif
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */