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