[Libreoffice-commits] core.git: 4 commits - desktop/source include/vcl vcl/source

Tor Lillqvist tml at collabora.com
Sat Mar 28 12:06:40 PDT 2015


 desktop/source/app/officeipcthread.cxx |   14 ---
 include/vcl/svapp.hxx                  |  122 +++++++++++++++++----------------
 vcl/source/app/svmain.cxx              |    2 
 3 files changed, 65 insertions(+), 73 deletions(-)

New commits:
commit a95f63407f63f2e1fc3ce1916f97406012993606
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Mar 28 19:48:19 2015 +0200

    IsEnableAccessInterface() is not used anywhere
    
    Change-Id: If5591adcc15bef2144505f9747d2348568b8e1ae

diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 3e1c506..bca677a 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -1501,15 +1501,6 @@ public:
     static css::uno::Reference< css::ui::dialogs::XFolderPicker2 >
         createFolderPicker( const css::uno::Reference< css::uno::XComponentContext >& rServiceManager );
 
-    /** Is the access interface enabled?
-
-     @returns true
-    */
-    static bool                 IsEnableAccessInterface()
-    {
-        return true;
-    }
-
     ///@}
 
     // For vclbootstrapprotector:
commit 88482de1171e11343c6a1f96b830553d48b79f05
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Mar 28 19:39:04 2015 +0200

    Fix weird style, whitespace changes only
    
    Change-Id: Iab7e3704b6094a3a3754400f05b9718853fe6c58

diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 7de317f..3e1c506 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -96,7 +96,7 @@ namespace o3tl
 
 typedef long (*VCLEventHookProc)( NotifyEvent& rEvt, void* pData );
 
-    /** An application can be notified of a number of different events:
+/** An application can be notified of a number of different events:
     - TYPE_ACCEPT       - listen for connection to the application (a connection
                           string is passed via the event)
     - TYPE_UNACCEPT     - stops listening for a connection to the app (determined by
@@ -112,6 +112,7 @@ typedef long (*VCLEventHookProc)( NotifyEvent& rEvt, void* pData );
                           as an array of strings
     - TYPE_PRIVATE_DOSHUTDOWN - shutdown the app
 */
+
 class VCL_DLLPUBLIC ApplicationEvent
 {
 public:
@@ -136,7 +137,8 @@ public:
         a data string with the event. No other events should use this
         constructor!
     */
-    explicit ApplicationEvent(Type type): aEvent(type) {
+    explicit ApplicationEvent(Type type): aEvent(type)
+    {
         assert(
             type == TYPE_APPEAR || type == TYPE_VERSION
             || type == TYPE_PRIVATE_DOSHUTDOWN || type == TYPE_QUICKSTART);
@@ -149,7 +151,8 @@ public:
         and TYPE_UNACCEPT are the \em only events that accept a single
         string as event data. No other events should use this constructor!
     */
-    ApplicationEvent(Type type, OUString const & data): aEvent(type) {
+    ApplicationEvent(Type type, OUString const & data): aEvent(type)
+    {
         assert(
             type == TYPE_ACCEPT || type == TYPE_HELP || type == TYPE_OPENHELPURL
             || type == TYPE_SHOWDIALOG || type == TYPE_UNACCEPT);
@@ -165,13 +168,18 @@ public:
     */
     ApplicationEvent(Type type, std::vector<OUString> const & data):
         aEvent(type), aData(data)
-    { assert(type == TYPE_OPEN || type == TYPE_PRINT); }
+    {
+        assert(type == TYPE_OPEN || type == TYPE_PRINT);
+    }
 
     /** Get the type of event.
 
      @returns The type of event.
     */
-    Type GetEvent() const { return aEvent; }
+    Type GetEvent() const
+    {
+        return aEvent;
+    }
 
     /** Gets the application event's data string.
 
@@ -180,7 +188,8 @@ public:
 
      @returns The event's data string.
     */
-    OUString GetStringData() const {
+    OUString GetStringData() const
+    {
         assert(
             aEvent == TYPE_ACCEPT || aEvent == TYPE_HELP
             || aEvent == TYPE_OPENHELPURL || aEvent == TYPE_SHOWDIALOG
@@ -194,7 +203,8 @@ public:
      @attention The \em only events that need an array of strings
         are TYPE_OPEN and TYPE_PRINT.
     */
-    std::vector<OUString> const & GetStringsData() const {
+    std::vector<OUString> const & GetStringsData() const
+    {
         assert(aEvent == TYPE_OPEN || aEvent == TYPE_PRINT);
         return aData;
     }
@@ -1495,7 +1505,10 @@ public:
 
      @returns true
     */
-    static bool                 IsEnableAccessInterface() { return true; }
+    static bool                 IsEnableAccessInterface()
+    {
+        return true;
+    }
 
     ///@}
 
@@ -1512,16 +1525,15 @@ private:
 
 class VCL_DLLPUBLIC SolarMutexGuard
 {
-    private:
-        SolarMutexGuard( const SolarMutexGuard& ) SAL_DELETED_FUNCTION;
-        const SolarMutexGuard& operator = ( const SolarMutexGuard& ) SAL_DELETED_FUNCTION;
-        comphelper::SolarMutex& m_solarMutex;
-
-    public:
+private:
+    SolarMutexGuard( const SolarMutexGuard& ) SAL_DELETED_FUNCTION;
+    const SolarMutexGuard& operator = ( const SolarMutexGuard& ) SAL_DELETED_FUNCTION;
+    comphelper::SolarMutex& m_solarMutex;
 
-        /** Acquires the object specified as parameter.
-         */
-        SolarMutexGuard() :
+public:
+    /** Acquires the object specified as parameter.
+     */
+    SolarMutexGuard() :
         m_solarMutex(Application::GetSolarMutex())
     {
         m_solarMutex.acquire();
@@ -1545,28 +1557,29 @@ public:
     SolarMutexClearableGuard()
         : m_bCleared(false)
         , m_solarMutex( Application::GetSolarMutex() )
-        {
-            m_solarMutex.acquire();
-        }
+    {
+        m_solarMutex.acquire();
+    }
 
     /** Releases mutex. */
     ~SolarMutexClearableGuard()
+    {
+        if( !m_bCleared )
         {
-            if( !m_bCleared )
-            {
-                m_solarMutex.release();
-            }
+            m_solarMutex.release();
         }
+    }
 
     /** Releases mutex. */
     void SAL_CALL clear()
+    {
+        if( !m_bCleared )
         {
-            if( !m_bCleared )
-            {
-                m_solarMutex.release();
-                m_bCleared = true;
-            }
+            m_solarMutex.release();
+            m_bCleared = true;
         }
+    }
+
 protected:
     comphelper::SolarMutex& m_solarMutex;
 };
@@ -1582,37 +1595,39 @@ public:
     SolarMutexResettableGuard()
         : m_bCleared(false)
         , m_solarMutex( Application::GetSolarMutex() )
-        {
-            m_solarMutex.acquire();
-        }
+    {
+        m_solarMutex.acquire();
+    }
 
     /** Releases mutex. */
     ~SolarMutexResettableGuard()
+    {
+        if( !m_bCleared )
         {
-            if( !m_bCleared )
-            {
-                m_solarMutex.release();
-            }
+            m_solarMutex.release();
         }
+    }
 
     /** Releases mutex. */
     void SAL_CALL clear()
+    {
+        if( !m_bCleared)
         {
-            if( !m_bCleared)
-            {
-                m_solarMutex.release();
-                m_bCleared = true;
-            }
+            m_solarMutex.release();
+            m_bCleared = true;
         }
+    }
+
     /** Releases mutex. */
     void SAL_CALL reset()
+    {
+        if( m_bCleared)
         {
-            if( m_bCleared)
-            {
-                m_solarMutex.acquire();
-                m_bCleared = false;
-            }
+            m_solarMutex.acquire();
+            m_bCleared = false;
         }
+    }
+
 protected:
     comphelper::SolarMutex& m_solarMutex;
 };
@@ -1624,17 +1639,17 @@ namespace vcl
  */
 class SolarMutexTryAndBuyGuard
 {
-    private:
-        bool m_isAcquired;
+private:
+    bool m_isAcquired;
 #ifdef DBG_UTIL
-        bool m_isChecked;
+    bool m_isChecked;
 #endif
-        comphelper::SolarMutex& m_rSolarMutex;
+    comphelper::SolarMutex& m_rSolarMutex;
 
-        SolarMutexTryAndBuyGuard(const SolarMutexTryAndBuyGuard&) SAL_DELETED_FUNCTION;
-        SolarMutexTryAndBuyGuard& operator=(const SolarMutexTryAndBuyGuard&) SAL_DELETED_FUNCTION;
+    SolarMutexTryAndBuyGuard(const SolarMutexTryAndBuyGuard&) SAL_DELETED_FUNCTION;
+    SolarMutexTryAndBuyGuard& operator=(const SolarMutexTryAndBuyGuard&) SAL_DELETED_FUNCTION;
 
-    public:
+public:
 
     SolarMutexTryAndBuyGuard()
         : m_isAcquired(false)
commit cbff9aaf99e21bca6b48999df44b288ef14c0d5d
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Mar 28 19:33:52 2015 +0200

    The pExceptionHandler variable can be static
    
    Change-Id: I83f2531e092eaa610cf887937c803e11c6120e55

diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index aee0b91..360dc6a3 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -201,7 +201,7 @@ int SVMain()
 static Application *        pOwnSvApp = NULL;
 
 // Exception handler. pExceptionHandler != NULL => VCL already inited
-oslSignalHandler   pExceptionHandler = NULL;
+static oslSignalHandler pExceptionHandler = NULL;
 
 class DesktopEnvironmentContext: public cppu::WeakImplHelper1< com::sun::star::uno::XCurrentContext >
 {
commit ee0cfd7fc843d34a04eb9bd2bedcfc1993691aba
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Mar 28 16:31:53 2015 +0200

    Remove #if 0 block of code
    
    Change-Id: I95320c0a3e0b7a405a1332e3826d2b917ecf3a6b

diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index eaffa62..d3ce4d8 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -965,20 +965,6 @@ void OfficeIPCThread::execute()
             salhelper::Thread::wait( tval );
         }
     } while( schedule() );
-#else
-
-#if 0 // Seems to work fine to let this thread just die?
-
-    // Not sure what to do, so wait forever. Note that on iOS (or
-    // Android, but in this case ANDROID is handled like DESKTOP, see
-    // above) an app never exits voluntarily, but is always killed by
-    // the system when its resources are needed.)
-    TimeValue tval;
-    tval.Seconds = 100000;
-    tval.Nanosec = 0;
-    salhelper::Thread::wait( tval );
-#endif
-
 #endif
 }
 


More information about the Libreoffice-commits mailing list