1cdf0e10cSrcweir /************************************************************************* 2cdf0e10cSrcweir * 3cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4cdf0e10cSrcweir * 5cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6cdf0e10cSrcweir * 7cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8cdf0e10cSrcweir * 9cdf0e10cSrcweir * This file is part of OpenOffice.org. 10cdf0e10cSrcweir * 11cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14cdf0e10cSrcweir * 15cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20cdf0e10cSrcweir * 21cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25cdf0e10cSrcweir * 26cdf0e10cSrcweir ************************************************************************/ 27cdf0e10cSrcweir 28cdf0e10cSrcweir #ifndef _DTRANS_OS2_TRANSFERABLE_HXX_ 29cdf0e10cSrcweir #define _DTRANS_OS2_TRANSFERABLE_HXX_ 30cdf0e10cSrcweir 31cdf0e10cSrcweir #include <com/sun/star/datatransfer/XTransferable.hpp> 32cdf0e10cSrcweir 33cdf0e10cSrcweir #ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HDL_ 34cdf0e10cSrcweir #include <com/sun/star/lang/XEventListener.hpp> 35cdf0e10cSrcweir #endif 36cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx> 37cdf0e10cSrcweir #include <osl/thread.h> 38cdf0e10cSrcweir 39cdf0e10cSrcweir #include <errno.h> 40cdf0e10cSrcweir 41cdf0e10cSrcweir #include <uclip.h> 42cdf0e10cSrcweir 43cdf0e10cSrcweir #define CHAR_POINTER(THE_OUSTRING) ::rtl::OUStringToOString (THE_OUSTRING, RTL_TEXTENCODING_UTF8).pData->buffer 44cdf0e10cSrcweir 45cdf0e10cSrcweir #if OSL_DEBUG_LEVEL>1 46cdf0e10cSrcweir //extern "C" int debug_printf(const char *f, ...); 47cdf0e10cSrcweir #define debug_printf( ...) { 1; } 48cdf0e10cSrcweir #else 49cdf0e10cSrcweir #define debug_printf( ...) { 1; } 50cdf0e10cSrcweir #endif 51cdf0e10cSrcweir 52cdf0e10cSrcweir #define CPPUTYPE_SEQSALINT8 getCppuType( (const Sequence< sal_Int8 >*) 0 ) 53cdf0e10cSrcweir #define CPPUTYPE_DEFAULT CPPUTYPE_SEQSALINT8 54cdf0e10cSrcweir 55*a7e9c4d8SPedro Giffuni using namespace com::sun::star::uno; 56*a7e9c4d8SPedro Giffuni HBITMAP OOoBmpToOS2Handle( Any &aAnyB); 57*a7e9c4d8SPedro Giffuni int OS2HandleToOOoBmp( HBITMAP hbm, Sequence< sal_Int8 >* winDIBStream); 58*a7e9c4d8SPedro Giffuni 59cdf0e10cSrcweir namespace os2 { 60cdf0e10cSrcweir 61cdf0e10cSrcweir class Os2Transferable : public ::cppu::WeakImplHelper1 < 62cdf0e10cSrcweir ::com::sun::star::datatransfer::XTransferable > 63cdf0e10cSrcweir { 64cdf0e10cSrcweir HAB hAB; 65cdf0e10cSrcweir ::rtl::OUString clipText; 66cdf0e10cSrcweir ::com::sun::star::datatransfer::DataFlavor aFlavor; 67cdf0e10cSrcweir ::osl::Mutex m_aMutex; 68cdf0e10cSrcweir ::com::sun::star::uno::Reference< XInterface > m_xCreator; 69cdf0e10cSrcweir 70cdf0e10cSrcweir public: 71cdf0e10cSrcweir Os2Transferable( const ::com::sun::star::uno::Reference< XInterface >& xCreator); 72cdf0e10cSrcweir virtual ~Os2Transferable(); 73cdf0e10cSrcweir 74cdf0e10cSrcweir /* 75cdf0e10cSrcweir * XTransferable 76cdf0e10cSrcweir */ 77cdf0e10cSrcweir 78cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getTransferData( const ::com::sun::star::datatransfer::DataFlavor& aFlavor ) 79cdf0e10cSrcweir throw(::com::sun::star::datatransfer::UnsupportedFlavorException, 80cdf0e10cSrcweir ::com::sun::star::io::IOException, 81cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException 82cdf0e10cSrcweir ); 83cdf0e10cSrcweir 84cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( ) 85cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 86cdf0e10cSrcweir 87cdf0e10cSrcweir virtual sal_Bool SAL_CALL isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor ) 88cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 89cdf0e10cSrcweir }; 90cdf0e10cSrcweir 91cdf0e10cSrcweir } // namespace 92cdf0e10cSrcweir 93cdf0e10cSrcweir #endif 94cdf0e10cSrcweir 95