[Libreoffice-commits] core.git: 3 commits - sal/osl sd/source vcl/inc vcl/unx

Stephan Bergmann sbergman at redhat.com
Mon Jan 13 05:27:32 PST 2014


 sal/osl/unx/process.cxx            |    9 +++++++--
 sd/source/ui/unoidl/unomodel.cxx   |    4 +++-
 vcl/inc/unx/gtk/gtkdata.hxx        |    2 +-
 vcl/inc/unx/saldisp.hxx            |    4 ++--
 vcl/inc/unx/salobj.h               |    2 +-
 vcl/unx/generic/app/saldisp.cxx    |   12 ++++++------
 vcl/unx/generic/window/salobj.cxx  |   16 ++++++++--------
 vcl/unx/gtk/app/gtkdata.cxx        |    4 ++--
 vcl/unx/kde4/VCLKDEApplication.cxx |    2 +-
 9 files changed, 31 insertions(+), 24 deletions(-)

New commits:
commit a401dc5dcf2a5a4e8f427d3077d473be72ebbcf2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 13 14:26:21 2014 +0100

    SalDisplay::Dispatch shall apparently return bool
    
    Change-Id: I46ab0ef04b598a4154659f9a1e1cbb2164023b63

diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 1f4db2b..85c664a 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -171,7 +171,7 @@ public:
 #if GTK_CHECK_VERSION(3,0,0)
     guint32 GetLastUserEventTime( bool /* b */ ) { return GDK_CURRENT_TIME; } // horrible hack
 #else
-    virtual long Dispatch( XEvent *pEvent );
+    virtual bool Dispatch( XEvent *pEvent );
 #endif
 };
 
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index b98bcb2..00fcd3e 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -280,7 +280,7 @@ protected:
 
     mutable XLIB_Time  m_nLastUserEventTime; // mutable because changed on first access
 
-    virtual long    Dispatch( XEvent *pEvent ) = 0;
+    virtual bool    Dispatch( XEvent *pEvent ) = 0;
     void            InitXinerama();
     void            InitRandR( XLIB_Window aRoot ) const;
     void            DeInitRandR();
@@ -399,7 +399,7 @@ public:
              SalX11Display( Display* pDisp );
     virtual ~SalX11Display();
 
-    virtual long        Dispatch( XEvent *pEvent );
+    virtual bool        Dispatch( XEvent *pEvent );
     virtual void        Yield();
     virtual void        PostUserEvent();
 
diff --git a/vcl/inc/unx/salobj.h b/vcl/inc/unx/salobj.h
index b644b1b..5014dd3 100644
--- a/vcl/inc/unx/salobj.h
+++ b/vcl/inc/unx/salobj.h
@@ -68,7 +68,7 @@ public:
     SalClipRegion   maClipRegion;
     sal_Bool            mbVisible;
 
-    static VCL_DLLPUBLIC long Dispatch( XEvent* pEvent );
+    static VCL_DLLPUBLIC bool Dispatch( XEvent* pEvent );
     static VCL_DLLPUBLIC X11SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow = sal_True );
 
     X11SalObject();
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index bb87724..c8a78e4 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -1864,7 +1864,7 @@ void SalX11Display::Yield()
     GetX11SalData()->ResetXErrorOccurred();
 }
 
-long SalX11Display::Dispatch( XEvent *pEvent )
+bool SalX11Display::Dispatch( XEvent *pEvent )
 {
     if( pEvent->type == XLIB_KeyPress || pEvent->type == KeyRelease )
     {
@@ -1883,12 +1883,12 @@ long SalX11Display::Dispatch( XEvent *pEvent )
         if( it != m_aFrames.end() )
         {
             if ( mpInputMethod->FilterEvent( pEvent , aWindow ) )
-                return 0;
+                return false;
         }
     }
     else
         if ( mpInputMethod->FilterEvent( pEvent, None ) )
-            return 0;
+            return false;
 
     SalInstance* pInstance = GetSalData()->m_pInstance;
     pInstance->CallEventCallback( pEvent, sizeof( XEvent ) );
@@ -1913,7 +1913,7 @@ long SalX11Display::Dispatch( XEvent *pEvent )
                         std::list< SalFrame* >::const_iterator it;
                         for( it = m_aFrames.begin(); it != m_aFrames.end(); ++it )
                             (*it)->CallCallback( SALEVENT_SETTINGSCHANGED, NULL );
-                        return 0;
+                        return false;
                     }
                 }
             }
@@ -1939,7 +1939,7 @@ long SalX11Display::Dispatch( XEvent *pEvent )
                 && GetKbdExtension()->GetEventBase() == pEvent->type )
             {
                 GetKbdExtension()->Dispatch( pEvent );
-                return 1;
+                return true;
             }
             break;
     }
@@ -1968,7 +1968,7 @@ long SalX11Display::Dispatch( XEvent *pEvent )
     // is this perhaps a root window that changed size ?
     processRandREvent( pEvent );
 
-    return 0;
+    return false;
 }
 
 #ifdef DBG_UTIL
diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx
index bc7dfbc..6f61ced 100644
--- a/vcl/unx/generic/window/salobj.cxx
+++ b/vcl/unx/generic/window/salobj.cxx
@@ -440,7 +440,7 @@ static sal_uInt16 sal_GetCode( int state )
     return nCode;
 }
 
-long X11SalObject::Dispatch( XEvent* pEvent )
+bool X11SalObject::Dispatch( XEvent* pEvent )
 {
     std::list< SalObject* >& rObjects = GetGenericData()->GetSalDisplay()->getSalObjects();
 
@@ -501,26 +501,26 @@ long X11SalObject::Dispatch( XEvent* pEvent )
                 {
                     case UnmapNotify:
                     pObject->mbVisible = sal_False;
-                    return 1;
+                    return true;
                     case MapNotify:
                     pObject->mbVisible = sal_True;
-                    return 1;
+                    return true;
                     case ButtonPress:
                     pObject->CallCallback( SALOBJ_EVENT_TOTOP, NULL );
-                    return 1;
+                    return true;
                     case FocusIn:
                     pObject->CallCallback( SALOBJ_EVENT_GETFOCUS, NULL );
-                    return 1;
+                    return true;
                     case FocusOut:
                     pObject->CallCallback( SALOBJ_EVENT_LOSEFOCUS, NULL );
-                    return 1;
+                    return true;
                     default: break;
                 }
             }
-            return 0;
+            return false;
         }
     }
-    return 0;
+    return false;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 9761354..347006f 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -222,7 +222,7 @@ GtkSalDisplay::initScreen( SalX11Screen nXScreen ) const
     return pSD;
 }
 
-long GtkSalDisplay::Dispatch( XEvent* pEvent )
+bool GtkSalDisplay::Dispatch( XEvent* pEvent )
 {
     if( GetDisplay() == pEvent->xany.display )
     {
@@ -236,7 +236,7 @@ long GtkSalDisplay::Dispatch( XEvent* pEvent )
         }
     }
 
-    return GDK_FILTER_CONTINUE;
+    return false;
 }
 #endif
 
diff --git a/vcl/unx/kde4/VCLKDEApplication.cxx b/vcl/unx/kde4/VCLKDEApplication.cxx
index e196ff3..c79b36e 100644
--- a/vcl/unx/kde4/VCLKDEApplication.cxx
+++ b/vcl/unx/kde4/VCLKDEApplication.cxx
@@ -32,7 +32,7 @@ bool VCLKDEApplication::x11EventFilter(XEvent* ev)
 {
     //if we have a display and the display consumes the event
     //do not process the event in qt
-    if (SalKDEDisplay::self() && SalKDEDisplay::self()->Dispatch(ev) > 0)
+    if (SalKDEDisplay::self() && SalKDEDisplay::self()->Dispatch(ev))
     {
         return true;
     }
commit 3c8d74eb3f853e3fa00afae284ae391caeb143fb
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 13 14:25:20 2014 +0100

    Handle osl_createThread failure
    
    Change-Id: I58144461d3941359f8ea6c2bd547486b2c8ae81a

diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx
index ee63468..24d0be6 100644
--- a/sal/osl/unx/process.cxx
+++ b/sal/osl/unx/process.cxx
@@ -685,7 +685,10 @@ oslProcessError SAL_CALL osl_psz_executeProcess(sal_Char *pszImageName,
 
     hThread = osl_createThread(ChildStatusProc, &Data);
 
-    osl_waitCondition(Data.m_started, NULL);
+    if (hThread != 0)
+    {
+        osl_waitCondition(Data.m_started, NULL);
+    }
     osl_destroyCondition(Data.m_started);
 
     for (i = 0; Data.m_pszArgs[i] != NULL; i++)
@@ -703,12 +706,14 @@ oslProcessError SAL_CALL osl_psz_executeProcess(sal_Char *pszImageName,
 
     if (Data.m_pProcImpl->m_pid != 0)
     {
+         assert(hThread != 0);
+
         *pProcess = Data.m_pProcImpl;
 
          if (Options & osl_Process_WAIT)
             osl_joinProcess(*pProcess);
 
-        return osl_Process_E_None;
+         return osl_Process_E_None;
     }
 
     osl_destroyCondition(Data.m_pProcImpl->m_terminated);
commit a675873cb2bad78a5da3e3b089bebf01ca60f898
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 13 14:24:36 2014 +0100

    fdo#73436 Let SdXImpressDocument handle css.drawing.* requests directly
    
    ...instead of handing off to base class, so that potential wrapping in SdXShape
    (in create) is not skipped.
    
    Change-Id: I57fb10ef478688a5a0c1c3c736efbd55a7172423

diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index e15ef7f..a9f7ab4 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1088,7 +1088,9 @@ SdXImpressDocument::createInstanceWithArguments(
     throw (css::uno::Exception, css::uno::RuntimeException)
 {
     OUString arg;
-    if (ServiceSpecifier == "com.sun.star.presentation.MediaShape"
+    if ((ServiceSpecifier == "com.sun.star.drawing.GraphicObjectShape"
+         || ServiceSpecifier == "com.sun.star.drawing.MediaShape"
+         || ServiceSpecifier == "com.sun.star.presentation.MediaShape")
         && Arguments.getLength() == 1 && (Arguments[0] >>= arg))
     {
         return create(ServiceSpecifier, arg);


More information about the Libreoffice-commits mailing list