[Libreoffice-commits] core.git: embeddedobj/source

Stephan Bergmann sbergman at redhat.com
Fri Nov 29 08:45:35 PST 2013


 embeddedobj/source/msole/olecomponent.cxx |   11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

New commits:
commit d694313b57f2edca8fb04cd8655476df6d879784
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 29 17:42:08 2013 +0100

    Catch block smells like leftover debugging code
    
    ...especially as it doesn't change hr from S_OK, and compiling with /EHsc
    (instead of /EHa) reveals that OleRun does not throw any (C++) exceptions (and
    thus produces an "unreachable code" warning for the catch block).
    
    Change-Id: Ic34e83e6ede3a214ccb073e3e54d6fcc493d46ea

diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx
index 1bbec21..7181083 100644
--- a/embeddedobj/source/msole/olecomponent.cxx
+++ b/embeddedobj/source/msole/olecomponent.cxx
@@ -988,16 +988,7 @@ void OleComponent::RunObject()
 
     if ( !OleIsRunning( m_pNativeImpl->m_pOleObject ) )
     {
-        HRESULT hr = S_OK;
-        try
-        {
-            hr = OleRun( m_pNativeImpl->m_pObj );
-        }
-        catch( ... )
-        {
-            int i = 0;
-            i++;
-        }
+        HRESULT hr = OleRun( m_pNativeImpl->m_pObj );
 
         if ( FAILED( hr ) )
         {


More information about the Libreoffice-commits mailing list