[Libreoffice-commits] core.git: vcl/inc vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon May 10 08:58:23 UTC 2021


 vcl/inc/unx/gtk/gtkframe.hxx |   16 +++++-----
 vcl/inc/unx/gtk/gtkinst.hxx  |   14 ++++----
 vcl/unx/gtk3/gtkframe.cxx    |   44 +++++++++++++--------------
 vcl/unx/gtk3/gtkinst.cxx     |   68 +++++++++++++++++++++----------------------
 4 files changed, 71 insertions(+), 71 deletions(-)

New commits:
commit bc4e15d23cbcaf0a1bff32d4d5d9079805e298e5
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri May 7 13:05:09 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon May 10 10:57:33 2021 +0200

    rename GtkDropTarget and GtkDragSource to avoid conflicts
    
    Change-Id: I7a51cb6939204105cf49c91c92fdf33f9cb7cc42
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115292
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index b62f5b2e786e..f2e2386f7971 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -52,8 +52,8 @@ class GtkSalGraphics;
 class GtkSalDisplay;
 
 typedef sal_uIntPtr GdkNativeWindow;
-class GtkDropTarget;
-class GtkDragSource;
+class GtkInstDropTarget;
+class GtkInstDragSource;
 class GtkDnDTransferable;
 
 class GtkSalMenu;
@@ -201,8 +201,8 @@ class GtkSalFrame final : public SalFrame
     tools::Long                            m_nWidthRequest;
     tools::Long                            m_nHeightRequest;
     cairo_region_t*                 m_pRegion;
-    GtkDropTarget*                  m_pDropTarget;
-    GtkDragSource*                  m_pDragSource;
+    GtkInstDropTarget*              m_pDropTarget;
+    GtkInstDragSource*              m_pDragSource;
     bool                            m_bGeometryIsProvisional;
     bool                            m_bIconSetWhileUnmapped;
 
@@ -349,25 +349,25 @@ public:
     void damaged(sal_Int32 nExtentsLeft, sal_Int32 nExtentsTop,
                  sal_Int32 nExtentsRight, sal_Int32 nExtentsBottom) const;
 
-    void registerDropTarget(GtkDropTarget* pDropTarget)
+    void registerDropTarget(GtkInstDropTarget* pDropTarget)
     {
         assert(!m_pDropTarget);
         m_pDropTarget = pDropTarget;
     }
 
-    void deregisterDropTarget(GtkDropTarget const * pDropTarget)
+    void deregisterDropTarget(GtkInstDropTarget const * pDropTarget)
     {
         assert(m_pDropTarget == pDropTarget); (void)pDropTarget;
         m_pDropTarget = nullptr;
     }
 
-    void registerDragSource(GtkDragSource* pDragSource)
+    void registerDragSource(GtkInstDragSource* pDragSource)
     {
         assert(!m_pDragSource);
         m_pDragSource = pDragSource;
     }
 
-    void deregisterDragSource(GtkDragSource const * pDragSource)
+    void deregisterDragSource(GtkInstDragSource const * pDragSource)
     {
         assert(m_pDragSource == pDragSource); (void)pDragSource;
         m_pDragSource = nullptr;
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index 0d3c16bfdbb5..565a72c90a9d 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -79,7 +79,7 @@ public:
 
 class GtkDnDTransferable;
 
-class GtkDropTarget final : public cppu::WeakComponentImplHelper<css::datatransfer::dnd::XDropTarget,
+class GtkInstDropTarget final : public cppu::WeakComponentImplHelper<css::datatransfer::dnd::XDropTarget,
                                                            css::lang::XInitialization,
                                                            css::lang::XServiceInfo>
 {
@@ -91,8 +91,8 @@ class GtkDropTarget final : public cppu::WeakComponentImplHelper<css::datatransf
     sal_Int8 m_nDefaultActions;
     std::vector<css::uno::Reference<css::datatransfer::dnd::XDropTargetListener>> m_aListeners;
 public:
-    GtkDropTarget();
-    virtual ~GtkDropTarget() override;
+    GtkInstDropTarget();
+    virtual ~GtkInstDropTarget() override;
 
     // XInitialization
     virtual void        SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& rArgs) override;
@@ -128,7 +128,7 @@ public:
     void signalDragLeave(GtkWidget* pWidget, GdkDragContext* context, guint time);
 };
 
-class GtkDragSource final : public cppu::WeakComponentImplHelper<css::datatransfer::dnd::XDragSource,
+class GtkInstDragSource final : public cppu::WeakComponentImplHelper<css::datatransfer::dnd::XDragSource,
                                                            css::lang::XInitialization,
                                                            css::lang::XServiceInfo>
 {
@@ -138,7 +138,7 @@ class GtkDragSource final : public cppu::WeakComponentImplHelper<css::datatransf
     css::uno::Reference<css::datatransfer::XTransferable> m_xTrans;
     VclToGtkHelper m_aConversionHelper;
 public:
-    GtkDragSource()
+    GtkInstDragSource()
         : WeakComponentImplHelper(m_aMutex)
         , m_pFrame(nullptr)
     {
@@ -151,7 +151,7 @@ public:
 
     void setActiveDragSource();
 
-    virtual ~GtkDragSource() override;
+    virtual ~GtkInstDragSource() override;
 
     // XDragSource
     virtual sal_Bool    SAL_CALL isDragImageSupported() override;
@@ -178,7 +178,7 @@ public:
 
     // For LibreOffice internal D&D we provide the Transferable without Gtk
     // intermediaries as a shortcut, see tdf#100097 for how dbaccess depends on this
-    static GtkDragSource* g_ActiveDragSource;
+    static GtkInstDragSource* g_ActiveDragSource;
     css::uno::Reference<css::datatransfer::XTransferable> const & GetTransferrable() const { return m_xTrans; }
 };
 
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index fa46f1372fe1..79f2f73641bf 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -3589,7 +3589,7 @@ public:
     virtual void SAL_CALL dropComplete(sal_Bool bSuccess) override
     {
         gtk_drag_finish(m_pContext, bSuccess, false, m_nTime);
-        if (GtkDragSource::g_ActiveDragSource)
+        if (GtkInstDragSource::g_ActiveDragSource)
         {
             g_DropSuccessSet = true;
             g_DropSuccess = bSuccess;
@@ -3604,11 +3604,11 @@ class GtkDnDTransferable : public GtkTransferable
     GdkDragContext *m_pContext;
     guint m_nTime;
     GtkWidget *m_pWidget;
-    GtkDropTarget* m_pDropTarget;
+    GtkInstDropTarget* m_pDropTarget;
     GMainLoop *m_pLoop;
     GtkSelectionData *m_pData;
 public:
-    GtkDnDTransferable(GdkDragContext *pContext, guint nTime, GtkWidget *pWidget, GtkDropTarget *pDropTarget)
+    GtkDnDTransferable(GdkDragContext *pContext, guint nTime, GtkWidget *pWidget, GtkInstDropTarget *pDropTarget)
         : m_pContext(pContext)
         , m_nTime(nTime)
         , m_pWidget(pWidget)
@@ -3696,7 +3696,7 @@ public:
 
 // For LibreOffice internal D&D we provide the Transferable without Gtk
 // intermediaries as a shortcut, see tdf#100097 for how dbaccess depends on this
-GtkDragSource* GtkDragSource::g_ActiveDragSource;
+GtkInstDragSource* GtkInstDragSource::g_ActiveDragSource;
 
 gboolean GtkSalFrame::signalDragDrop(GtkWidget* pWidget, GdkDragContext* context, gint x, gint y, guint time, gpointer frame)
 {
@@ -3706,7 +3706,7 @@ gboolean GtkSalFrame::signalDragDrop(GtkWidget* pWidget, GdkDragContext* context
     return pThis->m_pDropTarget->signalDragDrop(pWidget, context, x, y, time);
 }
 
-gboolean GtkDropTarget::signalDragDrop(GtkWidget* pWidget, GdkDragContext* context, gint x, gint y, guint time)
+gboolean GtkInstDropTarget::signalDragDrop(GtkWidget* pWidget, GdkDragContext* context, gint x, gint y, guint time)
 {
     // remove the deferred dragExit, as we'll do a drop
 #ifndef NDEBUG
@@ -3737,8 +3737,8 @@ gboolean GtkDropTarget::signalDragDrop(GtkWidget* pWidget, GdkDragContext* conte
     css::uno::Reference<css::datatransfer::XTransferable> xTransferable;
     // For LibreOffice internal D&D we provide the Transferable without Gtk
     // intermediaries as a shortcut, see tdf#100097 for how dbaccess depends on this
-    if (GtkDragSource::g_ActiveDragSource)
-        xTransferable = GtkDragSource::g_ActiveDragSource->GetTransferrable();
+    if (GtkInstDragSource::g_ActiveDragSource)
+        xTransferable = GtkInstDragSource::g_ActiveDragSource->GetTransferrable();
     else
         xTransferable = new GtkDnDTransferable(context, time, pWidget, this);
     aEvent.Transferable = xTransferable;
@@ -3782,7 +3782,7 @@ void GtkSalFrame::signalDragDropReceived(GtkWidget* pWidget, GdkDragContext* con
     pThis->m_pDropTarget->signalDragDropReceived(pWidget, context, x, y, data, ttype, time);
 }
 
-void GtkDropTarget::signalDragDropReceived(GtkWidget* /*pWidget*/, GdkDragContext * /*context*/, gint /*x*/, gint /*y*/, GtkSelectionData* data, guint /*ttype*/, guint /*time*/)
+void GtkInstDropTarget::signalDragDropReceived(GtkWidget* /*pWidget*/, GdkDragContext * /*context*/, gint /*x*/, gint /*y*/, GtkSelectionData* data, guint /*ttype*/, guint /*time*/)
 {
     /*
      * If we get a drop, then we will call like gtk_clipboard_wait_for_contents
@@ -3806,7 +3806,7 @@ gboolean GtkSalFrame::signalDragMotion(GtkWidget *pWidget, GdkDragContext *conte
 }
 
 
-gboolean GtkDropTarget::signalDragMotion(GtkWidget *pWidget, GdkDragContext *context, gint x, gint y, guint time)
+gboolean GtkInstDropTarget::signalDragMotion(GtkWidget *pWidget, GdkDragContext *context, gint x, gint y, guint time)
 {
     if (!m_bInDrag)
         gtk_drag_highlight(pWidget);
@@ -3824,7 +3824,7 @@ gboolean GtkDropTarget::signalDragMotion(GtkWidget *pWidget, GdkDragContext *con
     // tdf#124411 default to move if drag originates within LO itself, default
     // to copy if it comes from outside, this is similar to srcAndDestEqual
     // in macosx DropTarget::determineDropAction equivalent
-    sal_Int8 nNewDropAction = GtkDragSource::g_ActiveDragSource ?
+    sal_Int8 nNewDropAction = GtkInstDragSource::g_ActiveDragSource ?
                                 css::datatransfer::dnd::DNDConstants::ACTION_MOVE :
                                 css::datatransfer::dnd::DNDConstants::ACTION_COPY;
 
@@ -3861,8 +3861,8 @@ gboolean GtkDropTarget::signalDragMotion(GtkWidget *pWidget, GdkDragContext *con
         css::uno::Reference<css::datatransfer::XTransferable> xTransferable;
         // For LibreOffice internal D&D we provide the Transferable without Gtk
         // intermediaries as a shortcut, see tdf#100097 for how dbaccess depends on this
-        if (GtkDragSource::g_ActiveDragSource)
-            xTransferable = GtkDragSource::g_ActiveDragSource->GetTransferrable();
+        if (GtkInstDragSource::g_ActiveDragSource)
+            xTransferable = GtkInstDragSource::g_ActiveDragSource->GetTransferrable();
         else
             xTransferable = new GtkDnDTransferable(context, time, pWidget, this);
         css::uno::Sequence<css::datatransfer::DataFlavor> aFormats = xTransferable->getTransferDataFlavors();
@@ -3888,14 +3888,14 @@ void GtkSalFrame::signalDragLeave(GtkWidget *pWidget, GdkDragContext *context, g
 
 static gboolean lcl_deferred_dragExit(gpointer user_data)
 {
-    GtkDropTarget* pThis = static_cast<GtkDropTarget*>(user_data);
+    GtkInstDropTarget* pThis = static_cast<GtkInstDropTarget*>(user_data);
     css::datatransfer::dnd::DropTargetEvent aEvent;
     aEvent.Source = static_cast<css::datatransfer::dnd::XDropTarget*>(pThis);
     pThis->fire_dragExit(aEvent);
     return FALSE;
 }
 
-void GtkDropTarget::signalDragLeave(GtkWidget* pWidget, GdkDragContext* /*context*/, guint /*time*/)
+void GtkInstDropTarget::signalDragLeave(GtkWidget* pWidget, GdkDragContext* /*context*/, guint /*time*/)
 {
     m_bInDrag = false;
     gtk_drag_unhighlight(pWidget);
@@ -4534,14 +4534,14 @@ sal_uIntPtr GtkSalFrame::GetNativeWindowHandle(GtkWidget *pWidget) const
     return 0;
 }
 
-void GtkDragSource::set_datatransfer(const css::uno::Reference<css::datatransfer::XTransferable>& rTrans,
+void GtkInstDragSource::set_datatransfer(const css::uno::Reference<css::datatransfer::XTransferable>& rTrans,
                                      const css::uno::Reference<css::datatransfer::dnd::XDragSourceListener>& rListener)
 {
     m_xListener = rListener;
     m_xTrans = rTrans;
 }
 
-void GtkDragSource::setActiveDragSource()
+void GtkInstDragSource::setActiveDragSource()
 {
    // For LibreOffice internal D&D we provide the Transferable without Gtk
    // intermediaries as a shortcut, see tdf#100097 for how dbaccess depends on this
@@ -4550,12 +4550,12 @@ void GtkDragSource::setActiveDragSource()
    g_DropSuccess = false;
 }
 
-std::vector<GtkTargetEntry> GtkDragSource::FormatsToGtk(const css::uno::Sequence<css::datatransfer::DataFlavor> &rFormats)
+std::vector<GtkTargetEntry> GtkInstDragSource::FormatsToGtk(const css::uno::Sequence<css::datatransfer::DataFlavor> &rFormats)
 {
     return m_aConversionHelper.FormatsToGtk(rFormats);
 }
 
-void GtkDragSource::startDrag(const datatransfer::dnd::DragGestureEvent& rEvent,
+void GtkInstDragSource::startDrag(const datatransfer::dnd::DragGestureEvent& rEvent,
                               sal_Int8 sourceActions, sal_Int32 /*cursor*/, sal_Int32 /*image*/,
                               const css::uno::Reference<css::datatransfer::XTransferable>& rTrans,
                               const css::uno::Reference<css::datatransfer::dnd::XDragSourceListener>& rListener)
@@ -4620,7 +4620,7 @@ void GtkSalFrame::startDrag(gint nButton, gint nDragOriginX, gint nDragOriginY,
         m_pDragSource->dragFailed();
 }
 
-void GtkDragSource::dragFailed()
+void GtkInstDragSource::dragFailed()
 {
     if (m_xListener.is())
     {
@@ -4642,7 +4642,7 @@ gboolean GtkSalFrame::signalDragFailed(GtkWidget* /*widget*/, GdkDragContext* /*
     return false;
 }
 
-void GtkDragSource::dragDelete()
+void GtkInstDragSource::dragDelete()
 {
     if (m_xListener.is())
     {
@@ -4663,7 +4663,7 @@ void GtkSalFrame::signalDragDelete(GtkWidget* /*widget*/, GdkDragContext* /*cont
     pThis->m_pDragSource->dragDelete();
 }
 
-void GtkDragSource::dragEnd(GdkDragContext* context)
+void GtkInstDragSource::dragEnd(GdkDragContext* context)
 {
     if (m_xListener.is())
     {
@@ -4690,7 +4690,7 @@ void GtkSalFrame::signalDragEnd(GtkWidget* /*widget*/, GdkDragContext* context,
     pThis->m_pDragSource->dragEnd(context);
 }
 
-void GtkDragSource::dragDataGet(GtkSelectionData *data, guint info)
+void GtkInstDragSource::dragDataGet(GtkSelectionData *data, guint info)
 {
     m_aConversionHelper.setSelectionData(m_xTrans, data, info);
 }
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index b4ad243c0422..485ed1d8c387 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -1175,7 +1175,7 @@ Reference< XInterface > GtkInstance::CreateClipboard(const Sequence< Any >& argu
     return xClipboard;
 }
 
-GtkDropTarget::GtkDropTarget()
+GtkInstDropTarget::GtkInstDropTarget()
     : WeakComponentImplHelper(m_aMutex)
     , m_pFrame(nullptr)
     , m_pFormatConversionRequest(nullptr)
@@ -1185,35 +1185,35 @@ GtkDropTarget::GtkDropTarget()
 {
 }
 
-OUString SAL_CALL GtkDropTarget::getImplementationName()
+OUString SAL_CALL GtkInstDropTarget::getImplementationName()
 {
     return "com.sun.star.datatransfer.dnd.VclGtkDropTarget";
 }
 
-sal_Bool SAL_CALL GtkDropTarget::supportsService(OUString const & ServiceName)
+sal_Bool SAL_CALL GtkInstDropTarget::supportsService(OUString const & ServiceName)
 {
     return cppu::supportsService(this, ServiceName);
 }
 
-css::uno::Sequence<OUString> SAL_CALL GtkDropTarget::getSupportedServiceNames()
+css::uno::Sequence<OUString> SAL_CALL GtkInstDropTarget::getSupportedServiceNames()
 {
     Sequence<OUString> aRet { "com.sun.star.datatransfer.dnd.GtkDropTarget" };
     return aRet;
 }
 
-GtkDropTarget::~GtkDropTarget()
+GtkInstDropTarget::~GtkInstDropTarget()
 {
     if (m_pFrame)
         m_pFrame->deregisterDropTarget(this);
 }
 
-void GtkDropTarget::deinitialize()
+void GtkInstDropTarget::deinitialize()
 {
     m_pFrame = nullptr;
     m_bActive = false;
 }
 
-void GtkDropTarget::initialize(const Sequence<Any>& rArguments)
+void GtkInstDropTarget::initialize(const Sequence<Any>& rArguments)
 {
     if (rArguments.getLength() < 2)
     {
@@ -1235,21 +1235,21 @@ void GtkDropTarget::initialize(const Sequence<Any>& rArguments)
     m_bActive = true;
 }
 
-void GtkDropTarget::addDropTargetListener( const Reference< css::datatransfer::dnd::XDropTargetListener >& xListener)
+void GtkInstDropTarget::addDropTargetListener( const Reference< css::datatransfer::dnd::XDropTargetListener >& xListener)
 {
     ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex );
 
     m_aListeners.push_back( xListener );
 }
 
-void GtkDropTarget::removeDropTargetListener( const Reference< css::datatransfer::dnd::XDropTargetListener >& xListener)
+void GtkInstDropTarget::removeDropTargetListener( const Reference< css::datatransfer::dnd::XDropTargetListener >& xListener)
 {
     ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex );
 
     m_aListeners.erase(std::remove(m_aListeners.begin(), m_aListeners.end(), xListener), m_aListeners.end());
 }
 
-void GtkDropTarget::fire_drop(const css::datatransfer::dnd::DropTargetDropEvent& dtde)
+void GtkInstDropTarget::fire_drop(const css::datatransfer::dnd::DropTargetDropEvent& dtde)
 {
     osl::ClearableGuard<osl::Mutex> aGuard( m_aMutex );
     std::vector<css::uno::Reference<css::datatransfer::dnd::XDropTargetListener>> aListeners(m_aListeners);
@@ -1261,7 +1261,7 @@ void GtkDropTarget::fire_drop(const css::datatransfer::dnd::DropTargetDropEvent&
     }
 }
 
-void GtkDropTarget::fire_dragEnter(const css::datatransfer::dnd::DropTargetDragEnterEvent& dtde)
+void GtkInstDropTarget::fire_dragEnter(const css::datatransfer::dnd::DropTargetDragEnterEvent& dtde)
 {
     osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex );
     std::vector<css::uno::Reference<css::datatransfer::dnd::XDropTargetListener>> aListeners(m_aListeners);
@@ -1273,7 +1273,7 @@ void GtkDropTarget::fire_dragEnter(const css::datatransfer::dnd::DropTargetDragE
     }
 }
 
-void GtkDropTarget::fire_dragOver(const css::datatransfer::dnd::DropTargetDragEvent& dtde)
+void GtkInstDropTarget::fire_dragOver(const css::datatransfer::dnd::DropTargetDragEvent& dtde)
 {
     osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex );
     std::vector<css::uno::Reference<css::datatransfer::dnd::XDropTargetListener>> aListeners(m_aListeners);
@@ -1285,7 +1285,7 @@ void GtkDropTarget::fire_dragOver(const css::datatransfer::dnd::DropTargetDragEv
     }
 }
 
-void GtkDropTarget::fire_dragExit(const css::datatransfer::dnd::DropTargetEvent& dte)
+void GtkInstDropTarget::fire_dragExit(const css::datatransfer::dnd::DropTargetEvent& dte)
 {
     osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex );
     std::vector<css::uno::Reference<css::datatransfer::dnd::XDropTargetListener>> aListeners(m_aListeners);
@@ -1297,22 +1297,22 @@ void GtkDropTarget::fire_dragExit(const css::datatransfer::dnd::DropTargetEvent&
     }
 }
 
-sal_Bool GtkDropTarget::isActive()
+sal_Bool GtkInstDropTarget::isActive()
 {
     return m_bActive;
 }
 
-void GtkDropTarget::setActive(sal_Bool bActive)
+void GtkInstDropTarget::setActive(sal_Bool bActive)
 {
     m_bActive = bActive;
 }
 
-sal_Int8 GtkDropTarget::getDefaultActions()
+sal_Int8 GtkInstDropTarget::getDefaultActions()
 {
     return m_nDefaultActions;
 }
 
-void GtkDropTarget::setDefaultActions(sal_Int8 nDefaultActions)
+void GtkInstDropTarget::setDefaultActions(sal_Int8 nDefaultActions)
 {
     m_nDefaultActions = nDefaultActions;
 }
@@ -1322,37 +1322,37 @@ Reference< XInterface > GtkInstance::CreateDropTarget()
     if ( bRunningUnitTest )
         return SalInstance::CreateDropTarget();
 
-    return Reference<XInterface>(static_cast<cppu::OWeakObject*>(new GtkDropTarget));
+    return Reference<XInterface>(static_cast<cppu::OWeakObject*>(new GtkInstDropTarget));
 }
 
-GtkDragSource::~GtkDragSource()
+GtkInstDragSource::~GtkInstDragSource()
 {
     if (m_pFrame)
         m_pFrame->deregisterDragSource(this);
 
-    if (GtkDragSource::g_ActiveDragSource == this)
+    if (GtkInstDragSource::g_ActiveDragSource == this)
     {
-        SAL_WARN( "vcl.gtk", "dragEnd should have been called on GtkDragSource before dtor");
-        GtkDragSource::g_ActiveDragSource = nullptr;
+        SAL_WARN( "vcl.gtk", "dragEnd should have been called on GtkInstDragSource before dtor");
+        GtkInstDragSource::g_ActiveDragSource = nullptr;
     }
 }
 
-void GtkDragSource::deinitialize()
+void GtkInstDragSource::deinitialize()
 {
     m_pFrame = nullptr;
 }
 
-sal_Bool GtkDragSource::isDragImageSupported()
+sal_Bool GtkInstDragSource::isDragImageSupported()
 {
     return true;
 }
 
-sal_Int32 GtkDragSource::getDefaultCursor( sal_Int8 )
+sal_Int32 GtkInstDragSource::getDefaultCursor( sal_Int8 )
 {
     return 0;
 }
 
-void GtkDragSource::initialize(const css::uno::Sequence<css::uno::Any >& rArguments)
+void GtkInstDragSource::initialize(const css::uno::Sequence<css::uno::Any >& rArguments)
 {
     if (rArguments.getLength() < 2)
     {
@@ -1373,17 +1373,17 @@ void GtkDragSource::initialize(const css::uno::Sequence<css::uno::Any >& rArgume
     m_pFrame->registerDragSource(this);
 }
 
-OUString SAL_CALL GtkDragSource::getImplementationName()
+OUString SAL_CALL GtkInstDragSource::getImplementationName()
 {
     return "com.sun.star.datatransfer.dnd.VclGtkDragSource";
 }
 
-sal_Bool SAL_CALL GtkDragSource::supportsService(OUString const & ServiceName)
+sal_Bool SAL_CALL GtkInstDragSource::supportsService(OUString const & ServiceName)
 {
     return cppu::supportsService(this, ServiceName);
 }
 
-css::uno::Sequence<OUString> SAL_CALL GtkDragSource::getSupportedServiceNames()
+css::uno::Sequence<OUString> SAL_CALL GtkInstDragSource::getSupportedServiceNames()
 {
     Sequence<OUString> aRet { "com.sun.star.datatransfer.dnd.GtkDragSource" };
     return aRet;
@@ -1394,7 +1394,7 @@ Reference< XInterface > GtkInstance::CreateDragSource()
     if ( bRunningUnitTest )
         return SalInstance::CreateDragSource();
 
-    return Reference< XInterface >( static_cast<cppu::OWeakObject *>(new GtkDragSource()) );
+    return Reference< XInterface >( static_cast<cppu::OWeakObject *>(new GtkInstDragSource()) );
 }
 
 namespace {
@@ -2143,8 +2143,8 @@ private:
     gulong m_nDragDataDeleteignalId;
     gulong m_nDragGetSignalId;
 
-    rtl::Reference<GtkDropTarget> m_xDropTarget;
-    rtl::Reference<GtkDragSource> m_xDragSource;
+    rtl::Reference<GtkInstDropTarget> m_xDropTarget;
+    rtl::Reference<GtkInstDragSource> m_xDragSource;
 
     static void signalSizeAllocate(GtkWidget*, GdkRectangle* allocation, gpointer widget)
     {
@@ -2382,7 +2382,7 @@ private:
     {
         if (!m_xDragSource)
         {
-            m_xDragSource.set(new GtkDragSource);
+            m_xDragSource.set(new GtkInstDragSource);
 
             m_nDragFailedSignalId = g_signal_connect(m_pWidget, "drag-failed", G_CALLBACK(signalDragFailed), this);
             m_nDragDataDeleteignalId = g_signal_connect(m_pWidget, "drag-data-delete", G_CALLBACK(signalDragDelete), this);
@@ -3050,7 +3050,7 @@ public:
     {
         if (!m_xDropTarget)
         {
-            m_xDropTarget.set(new GtkDropTarget);
+            m_xDropTarget.set(new GtkInstDropTarget);
             if (!gtk_drag_dest_get_track_motion(m_pWidget))
             {
                 gtk_drag_dest_set(m_pWidget, GtkDestDefaults(0), nullptr, 0, GdkDragAction(0));


More information about the Libreoffice-commits mailing list