1*fbcf0fe9SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*fbcf0fe9SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*fbcf0fe9SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*fbcf0fe9SAndrew Rist * distributed with this work for additional information 6*fbcf0fe9SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*fbcf0fe9SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*fbcf0fe9SAndrew Rist * "License"); you may not use this file except in compliance 9*fbcf0fe9SAndrew Rist * with the License. You may obtain a copy of the License at 10*fbcf0fe9SAndrew Rist * 11*fbcf0fe9SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*fbcf0fe9SAndrew Rist * 13*fbcf0fe9SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*fbcf0fe9SAndrew Rist * software distributed under the License is distributed on an 15*fbcf0fe9SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*fbcf0fe9SAndrew Rist * KIND, either express or implied. See the License for the 17*fbcf0fe9SAndrew Rist * specific language governing permissions and limitations 18*fbcf0fe9SAndrew Rist * under the License. 19*fbcf0fe9SAndrew Rist * 20*fbcf0fe9SAndrew Rist *************************************************************/ 21*fbcf0fe9SAndrew Rist 22*fbcf0fe9SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir 25cdf0e10cSrcweir #ifndef _FETC_HXX_ 26cdf0e10cSrcweir #define _FETC_HXX_ 27cdf0e10cSrcweir 28cdf0e10cSrcweir //------------------------------------------------------------------------ 29cdf0e10cSrcweir // includes 30cdf0e10cSrcweir //------------------------------------------------------------------------ 31cdf0e10cSrcweir 32cdf0e10cSrcweir #include <sal/types.h> 33cdf0e10cSrcweir 34cdf0e10cSrcweir #if defined _MSC_VER 35cdf0e10cSrcweir #pragma warning(push,1) 36cdf0e10cSrcweir #endif 37cdf0e10cSrcweir #include <windows.h> 38cdf0e10cSrcweir #if defined _MSC_VER 39cdf0e10cSrcweir #pragma warning(pop) 40cdf0e10cSrcweir #endif 41cdf0e10cSrcweir 42cdf0e10cSrcweir /********************************************************************** 43cdf0e10cSrcweir stl container elements must fulfill the following requirements: 44cdf0e10cSrcweir 1. they need a copy ctor and assignement operator(?) 45cdf0e10cSrcweir 2. they must be compareable 46cdf0e10cSrcweir because the FORMATETC structure has a pointer to a TARGETDEVICE 47cdf0e10cSrcweir structure we need a simple wrapper class to fulfill these needs 48cdf0e10cSrcweir ***********************************************************************/ 49cdf0e10cSrcweir 50cdf0e10cSrcweir class CFormatEtc 51cdf0e10cSrcweir { 52cdf0e10cSrcweir public: 53cdf0e10cSrcweir CFormatEtc( ); 54cdf0e10cSrcweir CFormatEtc( const FORMATETC& aFormatEtc ); 55cdf0e10cSrcweir CFormatEtc( CLIPFORMAT cf, DWORD tymed = TYMED_HGLOBAL, DVTARGETDEVICE* ptd = NULL, DWORD dwAspect = DVASPECT_CONTENT, LONG lindex = -1 ); 56cdf0e10cSrcweir CFormatEtc( const CFormatEtc& theOther ); 57cdf0e10cSrcweir 58cdf0e10cSrcweir ~CFormatEtc( ); 59cdf0e10cSrcweir 60cdf0e10cSrcweir CFormatEtc& operator=( const CFormatEtc& theOther ); 61cdf0e10cSrcweir operator FORMATETC*( ); 62cdf0e10cSrcweir operator FORMATETC( ); 63cdf0e10cSrcweir 64cdf0e10cSrcweir void getFORMATETC( LPFORMATETC lpFormatEtc ); 65cdf0e10cSrcweir 66cdf0e10cSrcweir CLIPFORMAT getClipformat( ) const; 67cdf0e10cSrcweir DWORD getTymed( ) const; 68cdf0e10cSrcweir void getTargetDevice( DVTARGETDEVICE** ptd ) const; 69cdf0e10cSrcweir DWORD getDvAspect( ) const; 70cdf0e10cSrcweir LONG getLindex( ) const; 71cdf0e10cSrcweir 72cdf0e10cSrcweir void setClipformat( CLIPFORMAT cf ); 73cdf0e10cSrcweir void setTymed( DWORD tymed ); 74cdf0e10cSrcweir void setTargetDevice( DVTARGETDEVICE* ptd ); 75cdf0e10cSrcweir void setDvAspect( DWORD dwAspect ); 76cdf0e10cSrcweir void setLindex( LONG lindex ); 77cdf0e10cSrcweir 78cdf0e10cSrcweir private: 79cdf0e10cSrcweir FORMATETC m_FormatEtc; 80cdf0e10cSrcweir 81cdf0e10cSrcweir friend sal_Int32 operator==( const CFormatEtc& lhs, const CFormatEtc& rhs ); 82cdf0e10cSrcweir friend sal_Int32 operator!=( const CFormatEtc& lhs, const CFormatEtc& rhs ); 83cdf0e10cSrcweir }; 84cdf0e10cSrcweir 85cdf0e10cSrcweir sal_Int32 operator==( const CFormatEtc& lhs, const CFormatEtc& rhs ); 86cdf0e10cSrcweir sal_Int32 operator!=( const CFormatEtc& lhs, const CFormatEtc& rhs ); 87cdf0e10cSrcweir 88cdf0e10cSrcweir 89cdf0e10cSrcweir #endif 90