1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
19 #ifndef INCLUDED_DTRANS_TEST_WIN32_DND_TRANSFERABLE_HXX
20 #define INCLUDED_DTRANS_TEST_WIN32_DND_TRANSFERABLE_HXX
22 #include <cppuhelper/servicefactory.hxx>
23 #include <com/sun/star/datatransfer/XTransferable.hpp>
24 #include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp>
25 #include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp>
26 #include <com/sun/star/datatransfer/clipboard/XClipboardEx.hpp>
27 #include <com/sun/star/lang/XComponent.hpp>
28 #include <cppuhelper/implbase2.hxx>
29 #include <rtl/ustring.hxx>
30 #include <sal/types.h>
31 #include <osl/diagnose.h>
35 #pragma warning(push,1)
47 #include "../../source/win32/ImplHelper.hxx"
51 #define TEST_CLIPBOARD
52 #define RDB_SYSPATH "d:\\projects\\src616\\dtrans\\wntmsci7\\bin\\applicat.rdb"
53 #define WINCLIPBOARD_SERVICE_NAME L"com.sun.star.datatransfer.clipboard.SystemClipboard"
55 #define EVT_MANUAL_RESET TRUE
56 #define EVT_INIT_NONSIGNALED FALSE
61 using namespace ::std
;
62 using namespace ::cppu
;
63 using namespace ::com::sun::star::datatransfer
;
64 using namespace ::com::sun::star::datatransfer::clipboard
;
65 using namespace ::com::sun::star::uno
;
66 using namespace ::com::sun::star::io
;
67 using namespace ::com::sun::star::lang
;
69 class CTransferable
: public WeakImplHelper2
< XClipboardOwner
, XTransferable
>
73 CTransferable( wchar_t* dataString
);
77 virtual Any SAL_CALL
getTransferData( const DataFlavor
& aFlavor
) throw(UnsupportedFlavorException
, IOException
, RuntimeException
);
78 virtual Sequence
< DataFlavor
> SAL_CALL
getTransferDataFlavors( ) throw(RuntimeException
);
79 virtual sal_Bool SAL_CALL
isDataFlavorSupported( const DataFlavor
& aFlavor
) throw(RuntimeException
);
83 virtual void SAL_CALL
lostOwnership( const Reference
< XClipboard
>& xClipboard
, const Reference
< XTransferable
>& xTrans
) throw(RuntimeException
);
86 Sequence
< DataFlavor
> m_seqDFlv
;
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */