bump product version to 7.6.3.2-android
[LibreOffice.git] / vcl / win / dtrans / Fetc.hxx
blobe0880acd645db6c44a871ac4c6c1f741b90b6b16
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 .
20 #pragma once
22 #include <sal/types.h>
24 #if !defined WIN32_LEAN_AND_MEAN
25 # define WIN32_LEAN_AND_MEAN
26 #endif
27 #include <windows.h>
28 #include <objidl.h>
30 /**********************************************************************
31 stl container elements must fulfill the following requirements:
32 1. they need a copy ctor and assignment operator(?)
33 2. they must be comparable
34 because the FORMATETC structure has a pointer to a TARGETDEVICE
35 structure we need a simple wrapper class to fulfill these needs
36 ***********************************************************************/
38 class CFormatEtc
40 public:
41 CFormatEtc( );
42 explicit CFormatEtc( const FORMATETC& aFormatEtc );
43 CFormatEtc( CLIPFORMAT cf, DWORD tymed = TYMED_HGLOBAL, DVTARGETDEVICE* ptd = nullptr, DWORD dwAspect = DVASPECT_CONTENT, LONG lindex = -1 );
44 CFormatEtc( const CFormatEtc& theOther );
46 ~CFormatEtc( );
48 CFormatEtc& operator=( const CFormatEtc& theOther );
49 operator FORMATETC*( );
50 operator FORMATETC( );
52 void getFORMATETC( LPFORMATETC lpFormatEtc );
54 CLIPFORMAT getClipformat( ) const;
55 DWORD getTymed( ) const;
56 void getTargetDevice( DVTARGETDEVICE** ptd ) const;
57 DWORD getDvAspect( ) const;
58 LONG getLindex( ) const;
60 void setClipformat( CLIPFORMAT cf );
61 void setTymed( DWORD tymed );
62 void setTargetDevice( DVTARGETDEVICE* ptd );
63 void setDvAspect( DWORD dwAspect );
64 void setLindex( LONG lindex );
66 private:
67 FORMATETC m_FormatEtc;
69 friend bool operator==( const CFormatEtc& lhs, const CFormatEtc& rhs );
70 friend bool operator!=( const CFormatEtc& lhs, const CFormatEtc& rhs );
73 bool operator==( const CFormatEtc& lhs, const CFormatEtc& rhs );
74 bool operator!=( const CFormatEtc& lhs, const CFormatEtc& rhs );
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */