[Libreoffice-commits] .: sc/source

Takeshi Abe tabe at kemper.freedesktop.org
Thu Nov 3 10:07:56 PDT 2011


 sc/source/core/data/dpobject.cxx                    |    2 +-
 sc/source/core/tool/addincol.cxx                    |    2 +-
 sc/source/core/tool/charthelper.cxx                 |    3 +--
 sc/source/filter/xml/xmlimprt.cxx                   |    2 +-
 sc/source/filter/xml/xmlwrap.cxx                    |    8 ++++----
 sc/source/ui/Accessibility/DrawModelBroadcaster.cxx |    2 +-
 sc/source/ui/docshell/dbdocimp.cxx                  |    2 +-
 sc/source/ui/docshell/docsh8.cxx                    |    2 +-
 sc/source/ui/unoobj/scdetect.cxx                    |    2 +-
 sc/source/ui/vba/vbaaxis.cxx                        |   10 +++++-----
 sc/source/ui/vba/vbachartobjects.cxx                |    2 +-
 sc/source/ui/vba/vbarange.cxx                       |    6 +++---
 12 files changed, 21 insertions(+), 22 deletions(-)

New commits:
commit 225cbd10f7fcb285c20c18c68fcae3a2cbfe9711
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Fri Nov 4 02:02:20 2011 +0900

    catch exception by const reference

diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index ff18497..f42043a 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -2524,7 +2524,7 @@ const ScDPCache* ScDPCollection::DBCaches::getCache(sal_Int32 nSdbType, const OU
                 xRowSet->execute();
         }
     }
-    catch ( sdbc::SQLException& rError )
+    catch ( const sdbc::SQLException& rError )
     {
         //! store error message
         InfoBox aInfoBox( 0, String(rError.Message) );
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index e4c6734..e6ed044 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -1556,7 +1556,7 @@ void ScUnoAddInCall::ExecuteCallWithArgs(uno::Sequence<uno::Any>& rCallArgs)
             nErrCode = errIllegalArgument;
         }
 
-        catch(reflection::InvocationTargetException& rWrapped)
+        catch(const reflection::InvocationTargetException& rWrapped)
         {
             if ( rWrapped.TargetException.getValueType().equals(
                     getCppuType( (lang::IllegalArgumentException*)0 ) ) )
diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx
index 282f0f9..d4bfbc2 100644
--- a/sc/source/core/tool/charthelper.cxx
+++ b/sc/source/core/tool/charthelper.cxx
@@ -278,9 +278,8 @@ void ScChartHelper::SetChartRanges( const uno::Reference< chart2::XChartDocument
             }
         }
     }
-    catch ( uno::Exception& ex )
+    catch (const uno::Exception&)
     {
-        (void)ex;
         OSL_FAIL("Exception in ScChartHelper::SetChartRanges - invalid range string?");
     }
 
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 3beef27..eeb3546 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -2323,7 +2323,7 @@ sal_Int32 ScXMLImport::SetCurrencySymbol(const sal_Int32 nKey, const rtl::OUStri
                     }
                 }
             }
-            catch ( util::MalformedNumberFormatException& rException )
+            catch ( const util::MalformedNumberFormatException& rException )
             {
                 rtl::OUString sErrorMessage(RTL_CONSTASCII_USTRINGPARAM("Fehler im Formatstring "));
                 sErrorMessage += sFormatString;
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 6c8fd7e..ba9d4fc 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -245,7 +245,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe
             }
         }
     }
-    catch( xml::sax::SAXException& r )
+    catch( const xml::sax::SAXException& r )
     {
         packages::zip::ZipIOException aBrokenPackage;
         if ( r.WrappedException >>= aBrokenPackage )
@@ -265,7 +265,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe
             nReturn = SCERR_IMPORT_FORMAT;
         }
     }
-    catch( packages::zip::ZipIOException& r )
+    catch( const packages::zip::ZipIOException& r )
     {
 #if OSL_DEBUG_LEVEL > 0
         ByteString aError( "Zip exception catched while importing:\n" );
@@ -276,7 +276,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe
 
         nReturn = ERRCODE_IO_BROKENPACKAGE;
     }
-    catch( io::IOException& r )
+    catch( const io::IOException& r )
     {
 #if OSL_DEBUG_LEVEL > 0
         ByteString aError( "IO exception catched while importing:\n" );
@@ -287,7 +287,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe
 
         nReturn = SCERR_IMPORT_OPEN;
     }
-    catch( uno::Exception& r )
+    catch( const uno::Exception& r )
     {
 #if OSL_DEBUG_LEVEL > 0
         ByteString aError( "uno exception catched while importing:\n" );
diff --git a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
index d5bf043..29fa417 100644
--- a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
+++ b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
@@ -80,7 +80,7 @@ void ScDrawModelBroadcaster::Notify( SfxBroadcaster&,
         {
             xListener->notifyEvent( aEvent );
         }
-        catch( uno::RuntimeException& r )
+        catch( const uno::RuntimeException& r )
         {
             (void) r;
 #if OSL_DEBUG_LEVEL > 1
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 1dc6c1c..8b4f1f3 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -450,7 +450,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
                 ::comphelper::disposeComponent( xRowSet );
         }
     }
-    catch ( sdbc::SQLException& rError )
+    catch ( const sdbc::SQLException& rError )
     {
         aErrorMessage = rError.Message;
     }
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index c33b76a..c97dddf 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -1060,7 +1060,7 @@ sal_uLong ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet
         comphelper::disposeComponent( xRowSet );
         comphelper::disposeComponent( xConnection );
     }
-    catch ( sdbc::SQLException& aException )
+    catch ( const sdbc::SQLException& aException )
     {
         sal_Int32 nError = aException.ErrorCode;
 #if OSL_DEBUG_LEVEL > 1
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index 3e97c55..59ba7f1 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -366,7 +366,7 @@ static sal_Bool lcl_MayBeDBase( SvStream& rStream )
                             aFilterName = pFilter->GetName();
                         aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsOwnTemplateFormat() : false, &aFilterName );
                     }
-                    catch( lang::WrappedTargetException& aWrap )
+                    catch( const lang::WrappedTargetException& aWrap )
                     {
                         packages::zip::ZipIOException aZipException;
 
diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx
index 843b278..28dbc8a 100644
--- a/sc/source/ui/vba/vbaaxis.cxx
+++ b/sc/source/ui/vba/vbaaxis.cxx
@@ -101,7 +101,7 @@ ScVbaAxis::getAxisTitle(  ) throw (script::BasicErrorException, uno::RuntimeExce
             }
         }
     }
-    catch (uno::Exception& e)
+    catch (const uno::Exception& e)
     {
         DebugHelper::exception(e);
     }
@@ -198,7 +198,7 @@ ScVbaAxis::setCrossesAt( double _fCrossesAt ) throw (script::BasicErrorException
         setMinimumScaleIsAuto( false );
         mxPropertySet->setPropertyValue(ORIGIN, uno::makeAny(_fCrossesAt));
     }
-    catch (uno::Exception& e)
+    catch (const uno::Exception& e)
     {
         DebugHelper::exception(e);
     }
@@ -251,7 +251,7 @@ ScVbaAxis::setHasTitle( ::sal_Bool _bHasTitle ) throw (script::BasicErrorExcepti
         }
 
     }
-    catch (uno::Exception& e)
+    catch (const uno::Exception& e)
     {
         DebugHelper::exception(e);
     }
@@ -277,7 +277,7 @@ ScVbaAxis::getHasTitle(  ) throw (script::BasicErrorException, uno::RuntimeExcep
                 pChart->mxDiagramPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HasYAxisTitle")) ) >>= bHasTitle;
         }
     }
-    catch (uno::Exception& e)
+    catch (const uno::Exception& e)
     {
         DebugHelper::exception(e);
     }
@@ -515,7 +515,7 @@ ScVbaAxis::getMinimumScale(  ) throw (script::BasicErrorException, uno::RuntimeE
         if (isValueAxis())
             mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Min") )) >>= fMin;
     }
-    catch (uno::Exception& e)
+    catch (const uno::Exception& e)
     {
         DebugHelper::exception(e);
     }
diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx
index 0ca3fa9..869311d 100644
--- a/sc/source/ui/vba/vbachartobjects.cxx
+++ b/sc/source/ui/vba/vbachartobjects.cxx
@@ -134,7 +134,7 @@ ScVbaChartObjects::Add( double _nX, double _nY, double _nWidth, double _nHeight
         xChartObject->getChart()->setChartType(excel::XlChartType::xlColumnClustered);
         return uno::makeAny( xChartObject );
     }
-    catch ( uno::Exception& ex)
+    catch (const uno::Exception& ex)
     {
         OSL_TRACE("AddItem caught exception ->%s", rtl::OUStringToOString( ex.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
     }
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 659bff8..0fb69e0 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1654,7 +1654,7 @@ ScVbaRange::setValue( const uno::Any& aValue, ValueSetter& valueSetter, bool bFi
                 visitArray( setter );
             }
         }
-        catch ( uno::Exception& e )
+        catch ( const uno::Exception& e )
         {
             OSL_TRACE("Bahhh, caught exception %s",
                 rtl::OUStringToOString( e.Message,
@@ -3129,7 +3129,7 @@ ScVbaRange::getHidden() throw (uno::RuntimeException)
         if ( !( xProps->getPropertyValue( ISVISIBLE ) >>= bIsVisible ) )
             throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to get IsVisible property")), uno::Reference< uno::XInterface >() );
     }
-    catch( uno::Exception& e )
+    catch( const uno::Exception& e )
     {
         throw uno::RuntimeException( e.Message, uno::Reference< uno::XInterface >() );
     }
@@ -3156,7 +3156,7 @@ ScVbaRange::setHidden( const uno::Any& _hidden ) throw (uno::RuntimeException)
         uno::Reference< beans::XPropertySet > xProps = getRowOrColumnProps( mxRange, mbIsRows );
         xProps->setPropertyValue( ISVISIBLE, uno::Any( !bHidden ) );
     }
-    catch( uno::Exception& e )
+    catch( const uno::Exception& e )
     {
         throw uno::RuntimeException( e.Message, uno::Reference< uno::XInterface >() );
     }


More information about the Libreoffice-commits mailing list