summaryrefslogtreecommitdiff
path: root/include/svtools/openfiledroptargetlistener.hxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-08-06 19:51:05 +0200
committerJan Holesovsky <kendy@suse.cz>2013-08-06 19:56:30 +0200
commit3080087d2940e80b956e7750f50a30850778fa0d (patch)
treeead6ae9850d925252d22fb481338e377673a1b0c /include/svtools/openfiledroptargetlistener.hxx
parent9281fc72e7c45c8080a0373449191d73c26e3a08 (diff)
Basic de-uglyfication + added the purpose comment.
Change-Id: I4da0649bf4eb757a7d67beac19da58c4ac755c90
Diffstat (limited to 'include/svtools/openfiledroptargetlistener.hxx')
-rw-r--r--include/svtools/openfiledroptargetlistener.hxx31
1 files changed, 11 insertions, 20 deletions
diff --git a/include/svtools/openfiledroptargetlistener.hxx b/include/svtools/openfiledroptargetlistener.hxx
index ef03fb079371..2a6832d886d0 100644
--- a/include/svtools/openfiledroptargetlistener.hxx
+++ b/include/svtools/openfiledroptargetlistener.hxx
@@ -30,31 +30,26 @@
#include <sot/exchange.hxx>
#include <tools/string.hxx>
+/** DropTargetListener that takes care of opening a file when it is dropped in the frame.
+*/
class SVT_DLLPUBLIC OpenFileDropTargetListener : public ::cppu::WeakImplHelper1< ::com::sun::star::datatransfer::dnd::XDropTargetListener >
{
- //___________________________________________
- // member
private:
-
/// uno service manager to create necessary services
css::uno::Reference< css::uno::XComponentContext > m_xContext;
+
/// weakreference to target frame (Don't use a hard reference. Owner can't delete us then!)
css::uno::WeakReference< css::frame::XFrame > m_xTargetFrame;
+
/// drag/drop info
DataFlavorExVector* m_pFormats;
- //___________________________________________
- // c++ interface
public:
+ OpenFileDropTargetListener( const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ const css::uno::Reference< css::frame::XFrame >& xFrame );
+ ~OpenFileDropTargetListener();
- OpenFileDropTargetListener( const css::uno::Reference< css::uno::XComponentContext >& xContext ,
- const css::uno::Reference< css::frame::XFrame >& xFrame );
- ~OpenFileDropTargetListener( );
-
- //___________________________________________
- // uno interface
public:
-
// XEventListener
virtual void SAL_CALL disposing ( const css::lang::EventObject& Source ) throw(css::uno::RuntimeException);
@@ -65,15 +60,11 @@ class SVT_DLLPUBLIC OpenFileDropTargetListener : public ::cppu::WeakImplHelper1<
virtual void SAL_CALL dragOver ( const css::datatransfer::dnd::DropTargetDragEvent& dtde ) throw(css::uno::RuntimeException);
virtual void SAL_CALL dropActionChanged( const css::datatransfer::dnd::DropTargetDragEvent& dtde ) throw(css::uno::RuntimeException);
- //___________________________________________
- // internal helper
private:
-
- void implts_BeginDrag ( const css::uno::Sequence< css::datatransfer::DataFlavor >& rSupportedDataFlavors );
- void implts_EndDrag ( );
- sal_Bool implts_IsDropFormatSupported( SotFormatStringId nFormat );
- void implts_OpenFile ( const String& rFilePath );
-
+ void implts_BeginDrag( const css::uno::Sequence< css::datatransfer::DataFlavor >& rSupportedDataFlavors );
+ void implts_EndDrag();
+ sal_Bool implts_IsDropFormatSupported( SotFormatStringId nFormat );
+ void implts_OpenFile( const String& rFilePath );
};
#endif // SVTOOLS_DROPTARGETLISTENER_HXX