1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: Os2Transferable.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _DTRANS_OS2_TRANSFERABLE_HXX_
32 #define _DTRANS_OS2_TRANSFERABLE_HXX_
34 #include <com/sun/star/datatransfer/XTransferable.hpp>
36 #ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HDL_
37 #include <com/sun/star/lang/XEventListener.hpp>
39 #include <cppuhelper/implbase1.hxx>
40 #include <osl/thread.h>
46 #define CHAR_POINTER(THE_OUSTRING) ::rtl::OUStringToOString (THE_OUSTRING, RTL_TEXTENCODING_UTF8).pData->buffer
49 //extern "C" int debug_printf(const char *f, ...);
50 #define debug_printf( ...) { 1; }
52 #define debug_printf( ...) { 1; }
55 #define CPPUTYPE_SEQSALINT8 getCppuType( (const Sequence< sal_Int8 >*) 0 )
56 #define CPPUTYPE_DEFAULT CPPUTYPE_SEQSALINT8
59 using namespace com::sun::star::uno
;
60 HBITMAP
OOoBmpToOS2Handle( Any
&aAnyB
);
61 int OS2HandleToOOoBmp( HBITMAP hbm
, Sequence
< sal_Int8
>* winDIBStream
);
63 #define OOoBmpToOS2Handle(a) 0
64 #define OS2HandleToOOoBmp(a,b) 0
69 class Os2Transferable
: public ::cppu::WeakImplHelper1
<
70 ::com::sun::star::datatransfer::XTransferable
>
73 ::rtl::OUString clipText
;
74 ::com::sun::star::datatransfer::DataFlavor aFlavor
;
75 ::osl::Mutex m_aMutex
;
76 ::com::sun::star::uno::Reference
< XInterface
> m_xCreator
;
79 Os2Transferable( const ::com::sun::star::uno::Reference
< XInterface
>& xCreator
);
80 virtual ~Os2Transferable();
86 virtual ::com::sun::star::uno::Any SAL_CALL
getTransferData( const ::com::sun::star::datatransfer::DataFlavor
& aFlavor
)
87 throw(::com::sun::star::datatransfer::UnsupportedFlavorException
,
88 ::com::sun::star::io::IOException
,
89 ::com::sun::star::uno::RuntimeException
92 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::datatransfer::DataFlavor
> SAL_CALL
getTransferDataFlavors( )
93 throw(::com::sun::star::uno::RuntimeException
);
95 virtual sal_Bool SAL_CALL
isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor
& aFlavor
)
96 throw(::com::sun::star::uno::RuntimeException
);