rename GtkData to GtkSalData

to match all of the other SalData derivates

Change-Id: I1d40ea5934edbeab747c10570657ac7d23230840
Reviewed-on: https://gerrit.libreoffice.org/42454
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 60a0940..36c42d0 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -92,7 +92,7 @@ public:
    sal_uLong    m_nTimeoutMS;
};

class GtkData : public SalGenericData
class GtkSalData : public SalGenericData
{
    GSource*        m_pUserEvent;
    osl::Mutex      m_aDispatchMutex;
@@ -100,8 +100,8 @@ class GtkData : public SalGenericData
    css::uno::Any   m_aException;

public:
    GtkData( SalInstance *pInstance );
    virtual ~GtkData() override;
    GtkSalData( SalInstance *pInstance );
    virtual ~GtkSalData() override;

    void Init();
    virtual void Dispose() override;
@@ -182,16 +182,16 @@ public:
#endif
};

inline GtkData* GetGtkSalData()
inline GtkSalData* GetGtkSalData()
{
    return static_cast<GtkData*>(ImplGetSVData()->mpSalData);
    return static_cast<GtkSalData*>(ImplGetSVData()->mpSalData);
}
inline GdkDisplay *GtkData::GetGdkDisplay()
inline GdkDisplay *GtkSalData::GetGdkDisplay()
{
    return GetGtkDisplay()->GetGdkDisplay();
}

GtkSalDisplay *GtkData::GetGtkDisplay() const
GtkSalDisplay *GtkSalData::GetGtkDisplay() const
{
    return static_cast<GtkSalDisplay *>(GetDisplay());
}
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 0d40659..99139e1 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -543,7 +543,7 @@ public:
    virtual sal_uIntPtr         GetNativeWindowHandle() override;

    //Call the usual SalFrame Callback, but catch uno exceptions and delegate
    //to GtkData to rethrow them after the gsignal is processed when its safe
    //to GtkSalData to rethrow them after the gsignal is processed when its safe
    //to do so again in our own code after the g_main_context_iteration call
    //which triggers the gsignals.
    bool                        CallCallbackExc(SalEvent nEvent, const void* pEvent) const;
diff --git a/vcl/unx/gtk/gtkdata.cxx b/vcl/unx/gtk/gtkdata.cxx
index a8a0322..f296636 100644
--- a/vcl/unx/gtk/gtkdata.cxx
+++ b/vcl/unx/gtk/gtkdata.cxx
@@ -410,10 +410,10 @@ int GtkSalDisplay::CaptureMouse( SalFrame* pSFrame )
}

/**********************************************************************
 * class GtkData                                                      *
 * class GtkSalData                                                   *
 **********************************************************************/

GtkData::GtkData( SalInstance *pInstance )
GtkSalData::GtkSalData( SalInstance *pInstance )
    : SalGenericData( SAL_DATA_GTK, pInstance )
    , m_aDispatchMutex()
    , m_aDispatchCondition()
@@ -435,7 +435,7 @@ static int XIOErrorHdl(Display *)

}

GtkData::~GtkData()
GtkSalData::~GtkSalData()
{
    Yield( true, true );
    g_warning ("TESTME: We used to have a stop-timer here, but the central code should do this");
@@ -454,13 +454,13 @@ GtkData::~GtkData()
    XSetIOErrorHandler(aOrigXIOErrorHandler);
}

void GtkData::Dispose()
void GtkSalData::Dispose()
{
    deInitNWF();
}

/// Allows events to be processed, returns true if we processed an event.
bool GtkData::Yield( bool bWait, bool bHandleAllCurrentEvents )
bool GtkSalData::Yield( bool bWait, bool bHandleAllCurrentEvents )
{
    /* #i33212# only enter g_main_context_iteration in one thread at any one
     * time, else one of them potentially will never end as long as there is
@@ -512,7 +512,7 @@ bool GtkData::Yield( bool bWait, bool bHandleAllCurrentEvents )
    return bWasEvent;
}

void GtkData::Init()
void GtkSalData::Init()
{
    int i;
    SAL_INFO( "vcl.gtk", "GtkMainloop::Init()" );
@@ -641,12 +641,12 @@ void GtkData::Init()
    }
}

void GtkData::ErrorTrapPush()
void GtkSalData::ErrorTrapPush()
{
    gdk_error_trap_push ();
}

bool GtkData::ErrorTrapPop( bool bIgnoreError )
bool GtkSalData::ErrorTrapPop( bool bIgnoreError )
{
    (void) bIgnoreError;
    return gdk_error_trap_pop () != 0;
@@ -815,10 +815,10 @@ void GtkSalTimer::Stop()
    }
}

gboolean GtkData::userEventFn( gpointer data )
gboolean GtkSalData::userEventFn( gpointer data )
{
    gboolean bContinue = FALSE;
    GtkData *pThis = static_cast<GtkData *>(data);
    GtkSalData *pThis = static_cast<GtkSalData *>(data);
    SalGenericData *pData = GetGenericData();
    SolarMutexGuard aGuard;
    const SalGenericDisplay *pDisplay = pData->GetDisplay();
@@ -850,12 +850,12 @@ extern "C" {
    static gboolean call_userEventFn( void *data )
    {
        SolarMutexGuard aGuard;
        return GtkData::userEventFn( data );
        return GtkSalData::userEventFn( data );
    }
}

// hEventGuard_ held during this invocation
void GtkData::PostUserEvent()
void GtkSalData::PostUserEvent()
{
    if (m_pUserEvent)
        g_main_context_wakeup (nullptr); // really needed ?
diff --git a/vcl/unx/gtk/gtkinst.cxx b/vcl/unx/gtk/gtkinst.cxx
index eabae27..2cd8b11 100644
--- a/vcl/unx/gtk/gtkinst.cxx
+++ b/vcl/unx/gtk/gtkinst.cxx
@@ -115,7 +115,7 @@ extern "C"
        SAL_INFO("vcl.gtk", "creating GtkInstance " << pInstance);

        // Create SalData, this does not leak
        new GtkData( pInstance );
        new GtkSalData( pInstance );

        return pInstance;
    }
@@ -178,9 +178,9 @@ void GtkInstance::EnsureInit()
    if (!bNeedsInit)
        return;
    // initialize SalData
    GtkData *pSalData = GetGtkSalData();
    GtkSalData *pSalData = GetGtkSalData();
    pSalData->Init();
    GtkData::initNWF();
    GtkSalData::initNWF();

    InitAtkBridge();

diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx
index 95fecb7..161caed 100644
--- a/vcl/unx/gtk/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/salnativewidgets-gtk.cxx
@@ -470,7 +470,7 @@ inline void NW_gtk_border_set_from_border( GtkBorder& aDst, const GtkBorder * pS
/*********************************************************
 * Initialize GTK and local stuff
 *********************************************************/
void GtkData::initNWF()
void GtkSalData::initNWF()
{
    ImplSVData* pSVData = ImplGetSVData();

@@ -557,7 +557,7 @@ void GtkData::initNWF()
/*********************************************************
 * Release GTK and local stuff
 *********************************************************/
void GtkData::deInitNWF()
void GtkSalData::deInitNWF()
{
    for( size_t i = 0; i < gWidgetData.size(); i++ )
    {
diff --git a/vcl/unx/gtk3/gtk3gtkdata.cxx b/vcl/unx/gtk3/gtk3gtkdata.cxx
index 0690db4..c0d1b80 100644
--- a/vcl/unx/gtk3/gtk3gtkdata.cxx
+++ b/vcl/unx/gtk3/gtk3gtkdata.cxx
@@ -381,10 +381,10 @@ int GtkSalDisplay::CaptureMouse( SalFrame* pSFrame )
}

/**********************************************************************
 * class GtkData                                                      *
 * class GtkSalData                                                   *
 **********************************************************************/

GtkData::GtkData( SalInstance *pInstance )
GtkSalData::GtkSalData( SalInstance *pInstance )
    : SalGenericData( SAL_DATA_GTK3, pInstance )
    , m_aDispatchMutex()
    , m_aDispatchCondition()
@@ -408,7 +408,7 @@ static int XIOErrorHdl(Display *)
}
#endif

GtkData::~GtkData()
GtkSalData::~GtkSalData()
{
    Yield( true, true );
    g_warning ("TESTME: We used to have a stop-timer here, but the central code should do this");
@@ -430,13 +430,13 @@ GtkData::~GtkData()
#endif
}

void GtkData::Dispose()
void GtkSalData::Dispose()
{
    deInitNWF();
}

/// Allows events to be processed, returns true if we processed an event.
bool GtkData::Yield( bool bWait, bool bHandleAllCurrentEvents )
bool GtkSalData::Yield( bool bWait, bool bHandleAllCurrentEvents )
{
    /* #i33212# only enter g_main_context_iteration in one thread at any one
     * time, else one of them potentially will never end as long as there is
@@ -490,7 +490,7 @@ bool GtkData::Yield( bool bWait, bool bHandleAllCurrentEvents )
    return bWasEvent;
}

void GtkData::Init()
void GtkSalData::Init()
{
    SAL_INFO( "vcl.gtk", "GtkMainloop::Init()" );

@@ -599,12 +599,12 @@ void GtkData::Init()
    }
}

void GtkData::ErrorTrapPush()
void GtkSalData::ErrorTrapPush()
{
    gdk_error_trap_push ();
}

bool GtkData::ErrorTrapPop( bool bIgnoreError )
bool GtkSalData::ErrorTrapPop( bool bIgnoreError )
{
    if (bIgnoreError)
    {
@@ -777,10 +777,10 @@ void GtkSalTimer::Stop()
    }
}

gboolean GtkData::userEventFn( gpointer data )
gboolean GtkSalData::userEventFn( gpointer data )
{
    gboolean bContinue = FALSE;
    GtkData *pThis = static_cast<GtkData *>(data);
    GtkSalData *pThis = static_cast<GtkSalData *>(data);
    SalGenericData *pData = GetGenericData();
    SolarMutexGuard aGuard;
    const SalGenericDisplay *pDisplay = pData->GetDisplay();
@@ -812,12 +812,12 @@ extern "C" {
    static gboolean call_userEventFn( void *data )
    {
        SolarMutexGuard aGuard;
        return GtkData::userEventFn( data );
        return GtkSalData::userEventFn( data );
    }
}

// hEventGuard_ held during this invocation
void GtkData::PostUserEvent()
void GtkSalData::PostUserEvent()
{
    if (m_pUserEvent)
        g_main_context_wakeup (nullptr); // really needed ?
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 39be494..532fa5c 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -4349,12 +4349,12 @@ bool GtkSalFrame::CallCallbackExc(SalEvent nEvent, const void* pEvent) const
    catch (const css::uno::Exception&)
    {
        auto e = cppu::getCaughtException();
        GtkData *pSalData = static_cast<GtkData*>(GetSalData());
        GtkSalData *pSalData = static_cast<GtkSalData*>(GetSalData());
        pSalData->setException(e);
    }
    catch (std::exception & e)
    {
        static_cast<GtkData *>(GetSalData())->setException(
        static_cast<GtkSalData *>(GetSalData())->setException(
            css::uno::Any(
                css::uno::RuntimeException(
                    "wrapped std::exception "
@@ -4362,7 +4362,7 @@ bool GtkSalFrame::CallCallbackExc(SalEvent nEvent, const void* pEvent) const
    }
    catch (...)
    {
        static_cast<GtkData *>(GetSalData())->setException(
        static_cast<GtkSalData *>(GetSalData())->setException(
            css::uno::Any(
                css::uno::RuntimeException("wrapped unknown exception")));
    }
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index 60619ce..753f383 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -3324,7 +3324,7 @@ void getStyleContext(GtkStyleContext** style, GtkWidget* widget)

}

void GtkData::initNWF()
void GtkSalData::initNWF()
{
    ImplSVData* pSVData = ImplGetSVData();
    pSVData->maNWFData.mbFlatMenu = true;
@@ -3345,7 +3345,7 @@ void GtkData::initNWF()
#endif
}

void GtkData::deInitNWF()
void GtkSalData::deInitNWF()
{
    if (gCacheWindow)
        gtk_widget_destroy(gCacheWindow);