Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef INCLUDED_VCL_UNX_GENERIC_DTRANS_X11_SELECTION_HXX
21 : #define INCLUDED_VCL_UNX_GENERIC_DTRANS_X11_SELECTION_HXX
22 :
23 : #include <cppuhelper/compbase3.hxx>
24 : #include <cppuhelper/compbase4.hxx>
25 : #include <com/sun/star/datatransfer/XTransferable.hpp>
26 : #include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
27 : #include <com/sun/star/datatransfer/dnd/XDragSource.hpp>
28 : #include <com/sun/star/awt/XDisplayConnection.hpp>
29 : #include <com/sun/star/lang/XInitialization.hpp>
30 : #include <com/sun/star/lang/XServiceInfo.hpp>
31 : #include <com/sun/star/frame/XDesktop2.hpp>
32 : #include <osl/thread.h>
33 :
34 : #include <osl/conditn.hxx>
35 :
36 : #include <boost/unordered_map.hpp>
37 : #include <list>
38 :
39 : #include <prex.h>
40 : #include <X11/Xlib.h>
41 : #include <postx.h>
42 :
43 : #define XDND_IMPLEMENTATION_NAME "com.sun.star.datatransfer.dnd.XdndSupport"
44 : #define XDND_DROPTARGET_IMPLEMENTATION_NAME "com.sun.star.datatransfer.dnd.XdndDropTarget"
45 :
46 : using namespace ::com::sun::star::uno;
47 :
48 : namespace x11 {
49 :
50 : class PixmapHolder; // in bmp.hxx
51 :
52 : rtl_TextEncoding getTextPlainEncoding( const OUString& rMimeType );
53 :
54 0 : class SelectionAdaptor
55 : {
56 : public:
57 : virtual com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() = 0;
58 : virtual void clearTransferable() = 0;
59 : virtual void fireContentsChanged() = 0;
60 : virtual com::sun::star::uno::Reference< XInterface > getReference() = 0;
61 : // returns a reference that will keep the SelectionAdaptor alive until the
62 : // refernce is released
63 :
64 : protected:
65 0 : ~SelectionAdaptor() {}
66 : };
67 :
68 : class DropTarget :
69 : public ::cppu::WeakComponentImplHelper3<
70 : ::com::sun::star::datatransfer::dnd::XDropTarget,
71 : ::com::sun::star::lang::XInitialization,
72 : ::com::sun::star::lang::XServiceInfo
73 : >
74 : {
75 : public:
76 : ::osl::Mutex m_aMutex;
77 : bool m_bActive;
78 : sal_Int8 m_nDefaultActions;
79 : XLIB_Window m_aTargetWindow;
80 : class SelectionManager* m_pSelectionManager;
81 : com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >
82 : m_xSelectionManager;
83 : ::std::list< com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener > >
84 : m_aListeners;
85 :
86 : DropTarget();
87 : virtual ~DropTarget();
88 :
89 : // convenience functions that loop over listeners
90 : void dragEnter( const ::com::sun::star::datatransfer::dnd::DropTargetDragEnterEvent& dtde ) throw();
91 : void dragExit( const ::com::sun::star::datatransfer::dnd::DropTargetEvent& dte ) throw();
92 : void dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& dtde ) throw();
93 : void drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& dtde ) throw();
94 :
95 : // XInitialization
96 : virtual void SAL_CALL initialize( const Sequence< Any >& args ) throw ( ::com::sun::star::uno::Exception, std::exception ) SAL_OVERRIDE;
97 :
98 : // XDropTarget
99 : virtual void SAL_CALL addDropTargetListener( const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw(std::exception) SAL_OVERRIDE;
100 : virtual void SAL_CALL removeDropTargetListener( const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw(std::exception) SAL_OVERRIDE;
101 : virtual sal_Bool SAL_CALL isActive() throw(std::exception) SAL_OVERRIDE;
102 : virtual void SAL_CALL setActive( sal_Bool active ) throw(std::exception) SAL_OVERRIDE;
103 : virtual sal_Int8 SAL_CALL getDefaultActions() throw(std::exception) SAL_OVERRIDE;
104 : virtual void SAL_CALL setDefaultActions( sal_Int8 actions ) throw(std::exception) SAL_OVERRIDE;
105 :
106 : // XServiceInfo
107 : virtual OUString SAL_CALL getImplementationName() throw(std::exception) SAL_OVERRIDE;
108 : virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(std::exception) SAL_OVERRIDE;
109 : virtual ::com::sun::star::uno::Sequence< OUString >
110 : SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE;
111 : };
112 :
113 : class SelectionManagerHolder :
114 : public ::cppu::WeakComponentImplHelper3<
115 : ::com::sun::star::datatransfer::dnd::XDragSource,
116 : ::com::sun::star::lang::XInitialization,
117 : ::com::sun::star::lang::XServiceInfo
118 : >
119 : {
120 : ::osl::Mutex m_aMutex;
121 : com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >
122 : m_xRealDragSource;
123 : public:
124 : SelectionManagerHolder();
125 : virtual ~SelectionManagerHolder();
126 :
127 : // XServiceInfo
128 : virtual OUString SAL_CALL getImplementationName() throw(std::exception) SAL_OVERRIDE;
129 : virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(std::exception) SAL_OVERRIDE;
130 : virtual ::com::sun::star::uno::Sequence< OUString >
131 : SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE;
132 :
133 : // XInitialization
134 : virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception, std::exception ) SAL_OVERRIDE;
135 :
136 : // XDragSource
137 : virtual sal_Bool SAL_CALL isDragImageSupported() throw(std::exception) SAL_OVERRIDE;
138 : virtual sal_Int32 SAL_CALL getDefaultCursor( sal_Int8 dragAction ) throw(std::exception) SAL_OVERRIDE;
139 : virtual void SAL_CALL startDrag(
140 : const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger,
141 : sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image,
142 : const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& transferable,
143 : const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener
144 : ) throw(std::exception) SAL_OVERRIDE;
145 :
146 : };
147 :
148 : class SelectionManager :
149 : public ::cppu::WeakImplHelper4<
150 : ::com::sun::star::datatransfer::dnd::XDragSource,
151 : ::com::sun::star::lang::XInitialization,
152 : ::com::sun::star::awt::XEventHandler,
153 : ::com::sun::star::frame::XTerminateListener
154 : >,
155 : public SelectionAdaptor
156 : {
157 : static ::boost::unordered_map< OUString, SelectionManager*, OUStringHash >& getInstances();
158 :
159 : // for INCR type selection transfer
160 : // INCR protocol is used if the data cannot
161 : // be transported at once but in parts
162 : // IncrementalTransfer holds the bytes to be transmitted
163 : // as well a the current position
164 : // INCR triggers the delivery of the next part by deleting the
165 : // property used to transfer the data
166 0 : struct IncrementalTransfer
167 : {
168 : Sequence< sal_Int8 > m_aData;
169 : int m_nBufferPos;
170 : XLIB_Window m_aRequestor;
171 : Atom m_aProperty;
172 : Atom m_aTarget;
173 : int m_nFormat;
174 : int m_nTransferStartTime;
175 : };
176 : int m_nIncrementalThreshold;
177 :
178 : // a struct to hold the data associated with a selection
179 0 : struct Selection
180 : {
181 : enum State
182 : {
183 : Inactive, WaitingForResponse, WaitingForData, IncrementalTransfer
184 : };
185 :
186 : State m_eState;
187 : SelectionAdaptor* m_pAdaptor;
188 : Atom m_aAtom;
189 : ::osl::Condition m_aDataArrived;
190 : Sequence< sal_Int8 > m_aData;
191 : Sequence< ::com::sun::star::datatransfer::DataFlavor >
192 : m_aTypes;
193 : std::vector< Atom > m_aNativeTypes;
194 : // this is used for caching
195 : // m_aTypes is invalid after 2 seconds
196 : // m_aNativeTypes contains the corresponding original atom
197 : Atom m_aRequestedType;
198 : // m_aRequestedType is only valid while WaitingForResponse and WaitingFotData
199 : int m_nLastTimestamp;
200 : bool m_bHaveUTF16;
201 : Atom m_aUTF8Type;
202 : bool m_bHaveCompound;
203 : bool m_bOwner;
204 : XLIB_Window m_aLastOwner;
205 : PixmapHolder* m_pPixmap;
206 : // m_nOrigXLIB_Timestamp contains the XLIB_Timestamp at which the seclection
207 : // was acquired; needed for XLIB_TimeSTAMP target
208 : XLIB_Time m_nOrigTimestamp;
209 :
210 0 : Selection() : m_eState( Inactive ),
211 : m_pAdaptor( NULL ),
212 : m_aAtom( None ),
213 : m_aRequestedType( None ),
214 : m_nLastTimestamp( 0 ),
215 : m_bHaveUTF16( false ),
216 : m_aUTF8Type( None ),
217 : m_bHaveCompound( false ),
218 : m_bOwner( false ),
219 : m_aLastOwner( None ),
220 : m_pPixmap( NULL ),
221 0 : m_nOrigTimestamp( CurrentTime )
222 0 : {}
223 : };
224 :
225 : // a struct to hold data associated with a XDropTarget
226 : struct DropTargetEntry
227 : {
228 : DropTarget* m_pTarget;
229 : XLIB_Window m_aRootWindow;
230 :
231 0 : DropTargetEntry() : m_pTarget( NULL ), m_aRootWindow( None ) {}
232 0 : DropTargetEntry( DropTarget* pTarget ) :
233 : m_pTarget( pTarget ),
234 0 : m_aRootWindow( None )
235 0 : {}
236 : DropTargetEntry( const DropTargetEntry& rEntry ) :
237 : m_pTarget( rEntry.m_pTarget ),
238 : m_aRootWindow( rEntry.m_aRootWindow )
239 : {}
240 0 : ~DropTargetEntry() {}
241 :
242 0 : DropTarget* operator->() const { return m_pTarget; }
243 0 : DropTargetEntry& operator=(const DropTargetEntry& rEntry)
244 0 : { m_pTarget = rEntry.m_pTarget; m_aRootWindow = rEntry.m_aRootWindow; return *this; }
245 : };
246 :
247 : // internal data
248 : Display* m_pDisplay;
249 : oslThread m_aThread;
250 : int m_EndThreadPipe[2];
251 : oslThread m_aDragExecuteThread;
252 : ::osl::Condition m_aDragRunning;
253 : XLIB_Window m_aWindow;
254 : com::sun::star::uno::Reference< ::com::sun::star::frame::XDesktop2 > m_xDesktop;
255 : com::sun::star::uno::Reference< ::com::sun::star::awt::XDisplayConnection >
256 : m_xDisplayConnection;
257 : sal_Int32 m_nSelectionTimeout;
258 : XLIB_Time m_nSelectionTimestamp;
259 :
260 : // members used for Xdnd
261 :
262 : // drop only
263 :
264 : // contains the XdndEnterEvent of a drop action running
265 : // with one of our targets. The data.l[0] member
266 : // (conatining the drag source XLIB_Window) is set
267 : // to None while that is not the case
268 : XClientMessageEvent m_aDropEnterEvent;
269 : // set to false on XdndEnter
270 : // set to true on first XdndPosition or XdndLeave
271 : bool m_bDropEnterSent;
272 : XLIB_Window m_aCurrentDropWindow;
273 : // XLIB_Time code of XdndDrop
274 : XLIB_Time m_nDropTime;
275 : sal_Int8 m_nLastDropAction;
276 : // XTransferable for Xdnd with foreign drag source
277 : com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >
278 : m_xDropTransferable;
279 : int m_nLastX, m_nLastY;
280 : XLIB_Time m_nDropTimestamp;
281 : // set to true when calling drop()
282 : // if another XdndEnter is received this shows that
283 : // someone forgot to call dropComplete - we should reset
284 : // and react to the new drop
285 : bool m_bDropWaitingForCompletion;
286 :
287 : // drag only
288 :
289 : // None if no Dnd action is running with us as source
290 : XLIB_Window m_aDropWindow;
291 : // either m_aDropXLIB_Window or its XdndProxy
292 : XLIB_Window m_aDropProxy;
293 : XLIB_Window m_aDragSourceWindow;
294 : // XTransferable for Xdnd when we are drag source
295 : com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >
296 : m_xDragSourceTransferable;
297 : com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >
298 : m_xDragSourceListener;
299 : // root coordinates
300 : int m_nLastDragX, m_nLastDragY;
301 : Sequence< ::com::sun::star::datatransfer::DataFlavor >
302 : m_aDragFlavors;
303 : // the rectangle the pointer must leave until a new XdndPosition should
304 : // be sent. empty unless the drop target told to fill
305 : int m_nNoPosX, m_nNoPosY, m_nNoPosWidth, m_nNoPosHeight;
306 : unsigned int m_nDragButton;
307 : sal_Int8 m_nUserDragAction;
308 : sal_Int8 m_nTargetAcceptAction;
309 : sal_Int8 m_nSourceActions;
310 : bool m_bLastDropAccepted;
311 : bool m_bDropSuccess;
312 : bool m_bDropSent;
313 : time_t m_nDropTimeout;
314 : bool m_bWaitingForPrimaryConversion;
315 : XLIB_Time m_nDragTimestamp;
316 :
317 : // drag cursors
318 : XLIB_Cursor m_aMoveCursor;
319 : XLIB_Cursor m_aCopyCursor;
320 : XLIB_Cursor m_aLinkCursor;
321 : XLIB_Cursor m_aNoneCursor;
322 : XLIB_Cursor m_aCurrentCursor;
323 :
324 : // drag and drop
325 :
326 : int m_nCurrentProtocolVersion;
327 : ::boost::unordered_map< XLIB_Window, DropTargetEntry >
328 : m_aDropTargets;
329 :
330 : // some special atoms that are needed often
331 : Atom m_nCLIPBOARDAtom;
332 : Atom m_nTARGETSAtom;
333 : Atom m_nTIMESTAMPAtom;
334 : Atom m_nTEXTAtom;
335 : Atom m_nINCRAtom;
336 : Atom m_nCOMPOUNDAtom;
337 : Atom m_nMULTIPLEAtom;
338 : Atom m_nUTF16Atom;
339 : Atom m_nImageBmpAtom;
340 : Atom m_nXdndAware;
341 : Atom m_nXdndEnter;
342 : Atom m_nXdndLeave;
343 : Atom m_nXdndPosition;
344 : Atom m_nXdndStatus;
345 : Atom m_nXdndDrop;
346 : Atom m_nXdndFinished;
347 : Atom m_nXdndSelection;
348 : Atom m_nXdndTypeList;
349 : Atom m_nXdndProxy;
350 : Atom m_nXdndActionCopy;
351 : Atom m_nXdndActionMove;
352 : Atom m_nXdndActionLink;
353 : Atom m_nXdndActionAsk;
354 : Atom m_nXdndActionPrivate;
355 :
356 : // caching for atoms
357 : ::boost::unordered_map< Atom, OUString >
358 : m_aAtomToString;
359 : ::boost::unordered_map< OUString, Atom, OUStringHash >
360 : m_aStringToAtom;
361 :
362 : // the registered selections
363 : ::boost::unordered_map< Atom, Selection* >
364 : m_aSelections;
365 : // IncrementalTransfers in progress
366 : boost::unordered_map< XLIB_Window, boost::unordered_map< Atom, IncrementalTransfer > >
367 : m_aIncrementals;
368 :
369 : // do not use X11 multithreading capabilities
370 : // since this leads to deadlocks in different Xlib implentations
371 : // (XFree as well as Xsun) use an own mutex instead
372 : ::osl::Mutex m_aMutex;
373 : bool m_bShutDown;
374 :
375 : SelectionManager();
376 : virtual ~SelectionManager();
377 :
378 : SelectionAdaptor* getAdaptor( Atom selection );
379 : PixmapHolder* getPixmapHolder( Atom selection );
380 :
381 : // handle various events
382 : bool handleSelectionRequest( XSelectionRequestEvent& rRequest );
383 : bool handleSendPropertyNotify( XPropertyEvent& rNotify );
384 : bool handleReceivePropertyNotify( XPropertyEvent& rNotify );
385 : bool handleSelectionNotify( XSelectionEvent& rNotify );
386 : bool handleDragEvent( XEvent& rMessage );
387 : bool handleDropEvent( XClientMessageEvent& rMessage );
388 :
389 : // dnd helpers
390 : void sendDragStatus( Atom nDropAction );
391 : void sendDropPosition( bool bForce, XLIB_Time eventXLIB_Time );
392 : bool updateDragAction( int modifierState );
393 : int getXdndVersion( XLIB_Window aXLIB_Window, XLIB_Window& rProxy );
394 : XLIB_Cursor createCursor( const unsigned char* pPointerData, const unsigned char* pMaskData, int width, int height, int hotX, int hotY );
395 : // coordinates on root XLIB_Window
396 : void updateDragWindow( int nX, int nY, XLIB_Window aRoot );
397 :
398 : bool getPasteData( Atom selection, Atom type, Sequence< sal_Int8 >& rData );
399 : // returns true if conversion was successful
400 : bool convertData( const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable,
401 : Atom nType,
402 : Atom nSelection,
403 : int & rFormat,
404 : Sequence< sal_Int8 >& rData );
405 : bool sendData( SelectionAdaptor* pAdaptor, XLIB_Window requestor, Atom target, Atom property, Atom selection );
406 :
407 : // thread dispatch loop
408 : public:
409 : // public for extern "C" stub
410 : static void run( void* );
411 : private:
412 : void dispatchEvent( int millisec );
413 : // drag thread dispatch
414 : public:
415 : // public for extern "C" stub
416 : static void runDragExecute( void* );
417 : private:
418 : void dragDoDispatch();
419 : bool handleXEvent( XEvent& rEvent );
420 :
421 : // compound text conversion
422 : OString convertToCompound( const OUString& rText );
423 : OUString convertFromCompound( const char* pText, int nLen = -1 );
424 :
425 : sal_Int8 getUserDragAction() const;
426 : sal_Int32 getSelectionTimeout();
427 : public:
428 : static SelectionManager& get( const OUString& rDisplayName = OUString() );
429 :
430 0 : Display * getDisplay() { return m_pDisplay; };
431 : XLIB_Window getWindow() { return m_aWindow; };
432 :
433 : void registerHandler( Atom selection, SelectionAdaptor& rAdaptor );
434 : void deregisterHandler( Atom selection );
435 : bool requestOwnership( Atom selection );
436 :
437 : // allow for synchronization over one mutex for XClipboard
438 0 : osl::Mutex& getMutex() { return m_aMutex; }
439 :
440 : Atom getAtom( const OUString& rString );
441 : const OUString& getString( Atom nAtom );
442 :
443 : // type conversion
444 : // note: convertTypeToNative does NOT clear the list, so you can append
445 : // multiple types to the same list
446 : void convertTypeToNative( const OUString& rType, Atom selection, int& rFormat, ::std::list< Atom >& rConversions, bool bPushFront = false );
447 : OUString convertTypeFromNative( Atom nType, Atom selection, int& rFormat );
448 : void getNativeTypeList( const Sequence< com::sun::star::datatransfer::DataFlavor >& rTypes, std::list< Atom >& rOutTypeList, Atom targetselection );
449 :
450 : // methods for transferable
451 : bool getPasteDataTypes( Atom selection, Sequence< ::com::sun::star::datatransfer::DataFlavor >& rTypes );
452 : bool getPasteData( Atom selection, const OUString& rType, Sequence< sal_Int8 >& rData );
453 :
454 : // for XDropTarget to register/deregister itself
455 : void registerDropTarget( XLIB_Window aXLIB_Window, DropTarget* pTarget );
456 : void deregisterDropTarget( XLIB_Window aXLIB_Window );
457 :
458 : // for XDropTarget{Drag|Drop}Context
459 : void accept( sal_Int8 dragOperation, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp );
460 : void reject( XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp );
461 : void dropComplete( bool success, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp );
462 :
463 : // for XDragSourceContext
464 : sal_Int32 getCurrentCursor();
465 : void setCursor( sal_Int32 cursor, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp );
466 : void setImage( sal_Int32 image, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp );
467 : void transferablesFlavorsChanged();
468 :
469 : void shutdown() throw();
470 :
471 : // XInitialization
472 : virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception, std::exception ) SAL_OVERRIDE;
473 :
474 : // XEventHandler
475 : virtual sal_Bool SAL_CALL handleEvent( const Any& event ) throw(std::exception) SAL_OVERRIDE;
476 :
477 : // XDragSource
478 : virtual sal_Bool SAL_CALL isDragImageSupported() throw(std::exception) SAL_OVERRIDE;
479 : virtual sal_Int32 SAL_CALL getDefaultCursor( sal_Int8 dragAction ) throw(std::exception) SAL_OVERRIDE;
480 : virtual void SAL_CALL startDrag(
481 : const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger,
482 : sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image,
483 : const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& transferable,
484 : const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener
485 : ) throw(std::exception) SAL_OVERRIDE;
486 :
487 : // SelectionAdaptor for XdndSelection Drag (we are drag source)
488 : virtual com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() throw() SAL_OVERRIDE;
489 : virtual void clearTransferable() throw() SAL_OVERRIDE;
490 : virtual void fireContentsChanged() throw() SAL_OVERRIDE;
491 : virtual com::sun::star::uno::Reference< XInterface > getReference() throw() SAL_OVERRIDE;
492 :
493 : // XEventListener
494 : virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
495 :
496 : // XTerminateListener
497 : virtual void SAL_CALL queryTermination( const ::com::sun::star::lang::EventObject& aEvent )
498 : throw( ::com::sun::star::frame::TerminationVetoException, ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
499 : virtual void SAL_CALL notifyTermination( const ::com::sun::star::lang::EventObject& aEvent )
500 : throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
501 : };
502 :
503 : ::com::sun::star::uno::Sequence< OUString > SAL_CALL Xdnd_getSupportedServiceNames();
504 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Xdnd_createInstance(
505 : const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory);
506 :
507 : ::com::sun::star::uno::Sequence< OUString > SAL_CALL Xdnd_dropTarget_getSupportedServiceNames();
508 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Xdnd_dropTarget_createInstance(
509 : const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory);
510 :
511 : }
512 :
513 : #endif
514 :
515 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|