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

Stephan Bergmann sbergman at redhat.com
Thu Dec 4 01:00:50 PST 2014


 vcl/inc/generic/gendata.hxx     |    8 ++++----
 vcl/unx/kde/UnxFilePicker.cxx   |    2 +-
 vcl/unx/kde4/KDE4FilePicker.cxx |    2 +-
 vcl/unx/kde4/KDEXLib.cxx        |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit d7e5ee16069106df4e8f11d7dac598fff33425b8
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Dec 4 10:00:12 2014 +0100

    vcl (Linux): loplugin:cstylecast
    
    Change-Id: I7ad80af29d094348f07c9a6b69e160ae5b0b8916

diff --git a/vcl/inc/generic/gendata.hxx b/vcl/inc/generic/gendata.hxx
index 334193d..6cd17b2 100644
--- a/vcl/inc/generic/gendata.hxx
+++ b/vcl/inc/generic/gendata.hxx
@@ -11,12 +11,12 @@
 #define INCLUDED_VCL_INC_GENERIC_GENDATA_HXX
 
 #include <osl/socket.hxx>
-#include <saldatabasic.hxx>
 
-class SalGenericDisplay;
+#include <generic/gendisp.hxx>
+#include <saldatabasic.hxx>
+#include <unx/saldisp.hxx>
 
 // Not the prettiest - but helpful for migrating old code ...
-class SalDisplay;
 class GtkSalDisplay;
 enum SalGenericDataType { SAL_DATA_GTK, SAL_DATA_GTK3,
                           SAL_DATA_TDE3, SAL_DATA_KDE3, SAL_DATA_KDE4,
@@ -64,7 +64,7 @@ class VCL_DLLPUBLIC SalGenericData : public SalData
     inline SalDisplay *GetSalDisplay() const
     {
         OSL_ASSERT( m_eType != SAL_DATA_GTK3 );
-        return (SalDisplay *)GetDisplay();
+        return static_cast<SalDisplay *>(GetDisplay());
     }
     inline GtkSalDisplay *GetGtkDisplay() const
     {
diff --git a/vcl/unx/kde/UnxFilePicker.cxx b/vcl/unx/kde/UnxFilePicker.cxx
index 4acd5f5..a82252e 100644
--- a/vcl/unx/kde/UnxFilePicker.cxx
+++ b/vcl/unx/kde/UnxFilePicker.cxx
@@ -711,7 +711,7 @@ void UnxFilePicker::initFilePicker()
         vcl::Window *pParentWin = Application::GetDefDialogParent();
         if ( pParentWin )
         {
-            const SystemEnvData* pSysData = ((SystemWindow *)pParentWin)->GetSystemData();
+            const SystemEnvData* pSysData = static_cast<SystemWindow *>(pParentWin)->GetSystemData();
             if ( pSysData )
             {
                 snprintf( pWinId, nIdLen, "%ld", pSysData->aWindow ); // unx only
diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx
index af3e3ee..df236c2 100644
--- a/vcl/unx/kde4/KDE4FilePicker.cxx
+++ b/vcl/unx/kde4/KDE4FilePicker.cxx
@@ -243,7 +243,7 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute()
     vcl::Window *pParentWin = Application::GetDefDialogParent();
     if ( pParentWin )
     {
-        const SystemEnvData* pSysData = ((SystemWindow *)pParentWin)->GetSystemData();
+        const SystemEnvData* pSysData = static_cast<SystemWindow *>(pParentWin)->GetSystemData();
         if ( pSysData )
         {
             KWindowSystem::setMainWindow( _dialog, pSysData->aWindow); // unx only
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index a915fd4..dc357dd 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -359,7 +359,7 @@ void KDEXLib::timeoutActivated()
     while( SalKDEDisplay::self()->HasUserEvents() )
         SalKDEDisplay::self()->DispatchInternalEvent();
 
-    X11SalData *pData = (X11SalData*)ImplGetSVData()->mpSalData;
+    X11SalData *pData = static_cast<X11SalData*>(ImplGetSVData()->mpSalData);
     pData->Timeout();
     // QTimer is not single shot, so will be restarted immediatelly
 }


More information about the Libreoffice-commits mailing list