[Libreoffice-commits] .: unotools/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Jun 7 09:13:22 PDT 2011


 unotools/source/ucbhelper/ucbstreamhelper.cxx |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit b34d335466c196b4aacde0f600466c1632713171
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jun 7 16:29:26 2011 +0100

    catch by const reference

diff --git a/unotools/source/ucbhelper/ucbstreamhelper.cxx b/unotools/source/ucbhelper/ucbstreamhelper.cxx
index 9b286be..6d83576 100644
--- a/unotools/source/ucbhelper/ucbstreamhelper.cxx
+++ b/unotools/source/ucbhelper/ucbstreamhelper.cxx
@@ -75,14 +75,14 @@ static SvStream* lcl_CreateStream( const String& rFileName, StreamMode eOpenMode
                     aCnt.executeCommand( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")), makeAny( sal_Bool( sal_True ) ) );
                 }
 
-                catch ( CommandAbortedException& )
+                catch ( const CommandAbortedException& )
                 {
                     // couldn't truncate/delete
                 }
-                catch ( ContentCreationException& )
+                catch ( const ContentCreationException& )
                 {
                 }
-                catch ( Exception& )
+                catch ( const Exception& )
                 {
                 }
             }
@@ -107,14 +107,14 @@ static SvStream* lcl_CreateStream( const String& rFileName, StreamMode eOpenMode
                 }
 
                 // it is NOT an error when the stream already exists and no truncation was desired
-                catch ( CommandAbortedException& )
+                catch ( const CommandAbortedException& )
                 {
                     // currently never an error is detected !
                 }
-                catch ( ContentCreationException& )
+                catch ( const ContentCreationException& )
                 {
                 }
-                catch ( Exception& )
+                catch ( const Exception& )
                 {
                 }
             }
@@ -133,13 +133,13 @@ static SvStream* lcl_CreateStream( const String& rFileName, StreamMode eOpenMode
                 pStream->SetError( xLockBytes->GetError() );
             }
         }
-        catch ( CommandAbortedException& )
+        catch ( const CommandAbortedException& )
         {
         }
-        catch ( ContentCreationException& )
+        catch ( const ContentCreationException& )
         {
         }
-        catch ( Exception& )
+        catch ( const Exception& )
         {
         }
     }


More information about the Libreoffice-commits mailing list