fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / dtrans / source / win32 / dtobj / XNotifyingDataObject.hxx
blobfbe45cb91b368e381ce9645f438dc3b78e615e4f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_DTRANS_SOURCE_WIN32_DTOBJ_XNOTIFYINGDATAOBJECT_HXX
21 #define INCLUDED_DTRANS_SOURCE_WIN32_DTOBJ_XNOTIFYINGDATAOBJECT_HXX
23 #include <com/sun/star/datatransfer/XTransferable.hpp>
24 #include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp>
26 #if defined _MSC_VER
27 #pragma warning(push,1)
28 #endif
29 #include <objidl.h>
30 #include <windows.h>
31 #if defined _MSC_VER
32 #pragma warning(pop)
33 #endif
35 #include <systools/win32/comtools.hxx>
37 /*--------------------------------------------------------------------------
38 To implement the lostOwnership mechanism cleanly we need this wrapper
39 object
40 ----------------------------------------------------------------------------*/
42 // forward
43 class CWinClipbImpl;
45 class CXNotifyingDataObject : public IDataObject
47 public:
48 CXNotifyingDataObject(
49 const IDataObjectPtr& aIDataObject,
50 const com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable >& aXTransferable,
51 const com::sun::star::uno::Reference< com::sun::star::datatransfer::clipboard::XClipboardOwner >& aXClipOwner,
52 CWinClipbImpl* theWinClipImpl );
54 virtual ~CXNotifyingDataObject() {}
56 // ole interface implementation
58 //IUnknown interface methods
59 STDMETHODIMP QueryInterface(REFIID iid, LPVOID* ppvObject);
60 STDMETHODIMP_( ULONG ) AddRef( );
61 STDMETHODIMP_( ULONG ) Release( );
63 // IDataObject interface methods
64 STDMETHODIMP GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium );
65 STDMETHODIMP GetDataHere( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium );
66 STDMETHODIMP QueryGetData( LPFORMATETC pFormatetc );
67 STDMETHODIMP GetCanonicalFormatEtc( LPFORMATETC pFormatectIn, LPFORMATETC pFormatetcOut );
68 STDMETHODIMP SetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium, BOOL fRelease );
69 STDMETHODIMP EnumFormatEtc( DWORD dwDirection, IEnumFORMATETC** ppenumFormatetc );
70 STDMETHODIMP DAdvise( LPFORMATETC pFormatetc, DWORD advf, LPADVISESINK pAdvSink, DWORD* pdwConnection );
71 STDMETHODIMP DUnadvise( DWORD dwConnection );
72 STDMETHODIMP EnumDAdvise( LPENUMSTATDATA* ppenumAdvise );
74 operator IDataObject*( );
76 private:
77 void SAL_CALL lostOwnership( );
79 private:
80 sal_Int32 m_nRefCnt;
81 IDataObjectPtr m_aIDataObject;
82 const com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable > m_XTransferable;
83 const com::sun::star::uno::Reference< com::sun::star::datatransfer::clipboard::XClipboardOwner > m_XClipboardOwner;
84 CWinClipbImpl* m_pWinClipImpl;
86 friend class CWinClipbImpl;
89 #endif
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */