[Libreoffice-commits] .: 2 commits - svl/source svtools/source svtools/workben svx/source svx/workben

Takeshi Abe tabe at kemper.freedesktop.org
Thu Jan 5 07:35:29 PST 2012


 svl/source/config/itemholder2.cxx                 |    4 
 svl/source/fsstor/fsstorage.cxx                   |    2 
 svtools/source/config/itemholder2.cxx             |    4 
 svtools/source/dialogs/addresstemplate.cxx        |    6 -
 svtools/source/misc/chartprettypainter.cxx        |    3 
 svtools/workben/svdem.cxx                         |    2 
 svtools/workben/treecontrol/treetest.cxx          |    4 
 svx/source/accessibility/AccessibleShape.cxx      |    6 -
 svx/source/accessibility/DescriptionGenerator.cxx |   10 +-
 svx/source/fmcomp/gridctrl.cxx                    |    3 
 svx/source/svdraw/svdoashp.cxx                    |    2 
 svx/source/svdraw/svdoole2.cxx                    |   24 +----
 svx/source/table/tablecontroller.cxx              |   15 +--
 svx/source/table/tablelayouter.cxx                |  100 ----------------------
 svx/source/table/tablelayouter.hxx                |   11 --
 svx/source/unodraw/unopage.cxx                    |   48 ----------
 svx/source/unodraw/unoshcol.cxx                   |    2 
 svx/workben/msview/xmlconfig.cxx                  |    4 
 18 files changed, 38 insertions(+), 212 deletions(-)

New commits:
commit fd189805e3e42f11bc8ad726c8e4f170337e8267
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Fri Jan 6 00:21:36 2012 +0900

    removed dead code

diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index 06c6d42..18e8332 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -1076,40 +1076,6 @@ void TableLayouter::UpdateBorderLayout()
 }
 
 // -----------------------------------------------------------------------------
-/*
-void TableLayouter::SetLayoutToModel()
-{
-    const sal_Int32 nRowCount = getRowCount();
-    const sal_Int32 nColCount = getColumnCount();
-
-    try
-    {
-        sal_Int32 nOldSize = 0;
-
-        Reference< XIndexAccess > xRows( mxTable->getRows(), UNO_QUERY_THROW );
-        for( sal_Int32 nRow = 0; nRow < nRowCount; nRow++ )
-        {
-            Reference< XPropertySet > xRowSet( xRows->getByIndex( nRow ), UNO_QUERY_THROW );
-            xRowSet->getPropertyValue( msSize ) >>= nOldSize;
-            if( maRows[nRow].mnSize != nOldSize )
-                xRowSet->setPropertyValue( msSize, Any( maRows[nRow].mnSize )  );
-        }
-
-        for( sal_Int32 nCol = 0; nCol < nColCount; nCol++ )
-        {
-            Reference< XPropertySet > xColSet( getColumnByIndex( nCol ), UNO_QUERY_THROW );
-            xColSet->getPropertyValue( msSize ) >>= nOldSize;
-            if( maColumns[nCol].mnSize != nOldSize )
-                xColSet->setPropertyValue( msSize, Any( maColumns[nCol].mnSize )  );
-        }
-    }
-    catch( Exception& )
-    {
-        OSL_FAIL("sdr::table::TableLayouter::SetLayoutToModel(), exception caught!");
-    }
-}
-*/
-// -----------------------------------------------------------------------------
 
 void TableLayouter::DistributeColumns( ::Rectangle& rArea, sal_Int32 nFirstCol, sal_Int32 nLastCol )
 {
@@ -1228,72 +1194,6 @@ sal_Int32 TableLayouter::getRowStart( sal_Int32 nRow ) const
 
 // -----------------------------------------------------------------------------
 
-/*
-sal_Int32 TableLayouter::detectInsertedOrRemovedRows()
-{
-    sal_Int32 nHeightChange = 0;
-
-    try
-    {
-        Reference< XIndexAccess > xRows( mxTable->getRows(), UNO_QUERY_THROW );
-        std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >::iterator oldIter( mxRows.begin() );
-        sal_Int32 nCount = xRows->getCount();
-        for( sal_Int32 nRow = 0; nRow < nCount; nRow++ )
-        {
-            Reference< XInterface > xRow( xRows->getByIndex(nRow), UNO_QUERY );
-
-            std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >::iterator searchIter = mxRows.end();
-            if( oldIter != mxRows.end() )
-                searchIter = std::find( oldIter,mxRows.end(), xRow );
-
-            if( searchIter == mxRows.end() )
-            {
-                // new row
-                Reference< XPropertySet > xSet( xRow, UNO_QUERY_THROW );
-                sal_Int32 nSize = 0;
-                xSet->getPropertyValue( msSize ) >>= nSize;
-                nHeightChange += nSize;
-            }
-            else if( searchIter == oldIter )
-            {
-                // no change
-                oldIter++;
-            }
-            else
-            {
-                // rows removed
-                do
-                {
-                    Reference< XPropertySet > xSet( (*oldIter), UNO_QUERY_THROW );
-                    sal_Int32 nSize = 0;
-                    xSet->getPropertyValue( msSize ) >>= nSize;
-                    nHeightChange -= nSize;
-                }
-                while( oldIter++ != searchIter );
-            }
-        }
-
-        while( oldIter != mxRows.end() )
-        {
-            // rows removed
-            Reference< XPropertySet > xSet( (*oldIter++), UNO_QUERY_THROW );
-            sal_Int32 nSize = 0;
-            xSet->getPropertyValue( msSize ) >>= nSize;
-            nHeightChange -= nSize;
-        }
-    }
-    catch( Exception& e )
-    {
-        (void)e;
-        OSL_FAIL("svx::TableLayouter::detectInsertedOrRemovedRows(), exception caught!");
-    }
-
-    return nHeightChange;
-}
-*/
-
-// -----------------------------------------------------------------------------
-
 } }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/table/tablelayouter.hxx b/svx/source/table/tablelayouter.hxx
index edbacb8..e951590 100644
--- a/svx/source/table/tablelayouter.hxx
+++ b/svx/source/table/tablelayouter.hxx
@@ -67,13 +67,6 @@ public:
     TableLayouter( const TableModelRef& xTableModel );
     virtual ~TableLayouter();
 
-    /** this checks if new rows are inserted or old rows where removed.
-        This can be used to grow or shrink the table shape in this case.
-        @returns
-            the height difference
-    sal_Int32 detectInsertedOrRemovedRows();
-    */
-
     /** try to fit the table into the given rectangle.
         If the rectangle is to small, it will be grown to fit the table.
 
@@ -85,10 +78,6 @@ public:
     */
     void LayoutTable( ::Rectangle& rRectangle, bool bFitWidth, bool bFitHeight );
 
-    /** after a call to LayoutTable, this method can be used to set the new
-        column and row sizes back to the model. */
-//  void SetLayoutToModel();
-
     void UpdateBorderLayout();
 
     basegfx::B2ITuple getCellSize( const CellPos& rPos ) const;
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index 6366a49..1f0b91d 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -123,35 +123,6 @@ SvxDrawPage::~SvxDrawPage() throw()
 // XInterface
 void SvxDrawPage::release() throw()
 {
-/*
-    uno::Reference< uno::XInterface > x( xDelegator );
-    if (! x.is())
-    {
-        if (osl_decrementInterlockedCount( &m_refCount ) == 0)
-        {
-            if (! mrBHelper.bDisposed)
-            {
-                uno::Reference< uno::XInterface > xHoldAlive( (uno::XWeak*)this );
-                // First dispose
-                try
-                {
-                    dispose();
-                }
-                catch(::com::sun::star::uno::Exception&)
-                {
-                    // release should not throw exceptions
-                }
-
-                // only the alive ref holds the object
-                OSL_ASSERT( m_refCount == 1 );
-                // destroy the object if xHoldAlive decrement the refcount to 0
-                return;
-            }
-        }
-        // restore the reference count
-        osl_incrementInterlockedCount( &m_refCount );
-    }
-*/
     OWeakAggObject::release();
 }
 
@@ -269,23 +240,6 @@ void SAL_CALL SvxDrawPage::removeEventListener( const ::com::sun::star::uno::Ref
 
 void SvxDrawPage::Notify( SfxBroadcaster&, const SfxHint& /*rHint*/ )
 {
-/*
-    if( mpModel )
-    {
-        const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
-        if( pSdrHint )
-        {
-            switch( pSdrHint->GetKind() )
-            {
-            case HINT_MODELCLEARED:
-                dispose();
-                break;
-            default:
-                break;
-            }
-        }
-    }
-*/
 }
 
 //----------------------------------------------------------------------
commit 5493951893ea90b330d5280bc171a60ff46fa396
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Fri Jan 6 00:03:58 2012 +0900

    catch exception by constant reference

diff --git a/svl/source/config/itemholder2.cxx b/svl/source/config/itemholder2.cxx
index dc7cd36..f2545d4 100644
--- a/svl/source/config/itemholder2.cxx
+++ b/svl/source/config/itemholder2.cxx
@@ -62,12 +62,12 @@ ItemHolder2::ItemHolder2()
         if (xCfg.is())
             xCfg->addEventListener(static_cast< css::lang::XEventListener* >(this));
     }
-    catch(css::uno::RuntimeException& rREx)
+    catch(const css::uno::RuntimeException& rREx)
     {
         throw rREx;
     }
 #ifdef DBG_UTIL
-    catch(css::uno::Exception& rEx)
+    catch(const css::uno::Exception& rEx)
     {
         static sal_Bool bMessage = sal_True;
         if(bMessage)
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index 4fbc780..01e4434 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -1142,7 +1142,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL FSStorage::getElementNames()
             }
         }
     }
-    catch( ucb::InteractiveIOException& r )
+    catch( const ucb::InteractiveIOException& r )
     {
         if ( r.Code == ucb::IOErrorCode_NOT_EXISTING )
             OSL_FAIL( "The folder does not exist!\n" );
diff --git a/svtools/source/config/itemholder2.cxx b/svtools/source/config/itemholder2.cxx
index 0105c6d..9e9a1ab 100644
--- a/svtools/source/config/itemholder2.cxx
+++ b/svtools/source/config/itemholder2.cxx
@@ -69,12 +69,12 @@ ItemHolder2::ItemHolder2()
         if (xCfg.is())
             xCfg->addEventListener(static_cast< css::lang::XEventListener* >(this));
     }
-    catch(css::uno::RuntimeException& rREx)
+    catch(const css::uno::RuntimeException& rREx)
     {
         throw rREx;
     }
 #ifdef DBG_UTIL
-    catch(css::uno::Exception& rEx)
+    catch(const css::uno::Exception& rEx)
     {
         static sal_Bool bMessage = sal_True;
         if(bMessage)
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index fa322a7..7f81984 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -899,9 +899,9 @@ void AssignmentPersistentData::Commit()
                     aTableNames = m_xCurrentDatasourceTables->getElementNames();
             }
         }
-        catch(SQLContext& e) { aException <<= e; }
-        catch(SQLWarning& e) { aException <<= e; }
-        catch(SQLException& e) { aException <<= e; }
+        catch(const SQLContext& e) { aException <<= e; }
+        catch(const SQLWarning& e) { aException <<= e; }
+        catch(const SQLException& e) { aException <<= e; }
         catch(Exception&)
         {
             OSL_FAIL("AddressBookSourceDialog::resetTables: could not retrieve the table!");
diff --git a/svtools/source/misc/chartprettypainter.cxx b/svtools/source/misc/chartprettypainter.cxx
index e74b7ea..a9fd9f4 100644
--- a/svtools/source/misc/chartprettypainter.cxx
+++ b/svtools/source/misc/chartprettypainter.cxx
@@ -120,9 +120,8 @@ bool ChartPrettyPainter::DoPrettyPaintChart( uno::Reference< frame::XModel > xCh
             }
         }
     }
-    catch( uno::Exception& e )
+    catch( uno::Exception& )
     {
-        (void)e;
         OSL_FAIL( "Chart cannot be painted pretty!" );
     }
     return false;
diff --git a/svtools/workben/svdem.cxx b/svtools/workben/svdem.cxx
index 776f67e..3989a0c 100644
--- a/svtools/workben/svdem.cxx
+++ b/svtools/workben/svdem.cxx
@@ -254,7 +254,7 @@ void MyApp::Main()
 
         Execute();
     }
-    catch ( com::sun::star::uno::Exception & e )
+    catch ( const com::sun::star::uno::Exception & e )
     {
         fprintf( stderr, "Error during bootstrapping servicemanager: %s\n" ,
                  rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
diff --git a/svtools/workben/treecontrol/treetest.cxx b/svtools/workben/treecontrol/treetest.cxx
index 4a9be57..5302705 100644
--- a/svtools/workben/treecontrol/treetest.cxx
+++ b/svtools/workben/treecontrol/treetest.cxx
@@ -358,7 +358,7 @@ int SAL_CALL main( int argc, char **argv )
         xInterface = Reference< XInterface >(
             resolver->resolve( sConnectionString ), UNO_QUERY );
     }
-    catch ( Exception& e )
+    catch ( const Exception& e )
     {
         printf("Error: cannot establish a connection using '%s':\n       %s\n",
                OUStringToOString(sConnectionString, RTL_TEXTENCODING_ASCII_US).getStr(),
@@ -382,7 +382,7 @@ int SAL_CALL main( int argc, char **argv )
         rtl::Reference< DirectoryTree >(
             new DirectoryTree( xComponentContext ) )->display(ustrFileURL);
     }
-    catch( Exception& e )
+    catch( const Exception& e )
     {
         printf("Error: exception caught during test:\n       %s\n",
                OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US).getStr());
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index 7761d0f..4523f47 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -661,7 +661,7 @@ sal_Int32 SAL_CALL AccessibleShape::getForeground (void)
             aColor >>= nColor;
         }
     }
-    catch (::com::sun::star::beans::UnknownPropertyException)
+    catch (const ::com::sun::star::beans::UnknownPropertyException &)
     {
         // Ignore exception and return default color.
     }
@@ -687,7 +687,7 @@ sal_Int32 SAL_CALL AccessibleShape::getBackground (void)
             aColor >>= nColor;
         }
     }
-    catch (::com::sun::star::beans::UnknownPropertyException)
+    catch (const ::com::sun::star::beans::UnknownPropertyException &)
     {
         // Ignore exception and return default color.
     }
@@ -1008,7 +1008,7 @@ void AccessibleShape::ViewForwarderChanged (ChangeType aChangeType,
                 nIndex += 1;
             }
         }
-        catch (beans::UnknownPropertyException)
+        catch (const beans::UnknownPropertyException &)
         {
             // We throw our own exception that is a bit more informative.
             throw uno::RuntimeException (::rtl::OUString (
diff --git a/svx/source/accessibility/DescriptionGenerator.cxx b/svx/source/accessibility/DescriptionGenerator.cxx
index 76ce380..2c967f8 100644
--- a/svx/source/accessibility/DescriptionGenerator.cxx
+++ b/svx/source/accessibility/DescriptionGenerator.cxx
@@ -130,7 +130,7 @@ void DescriptionGenerator::Initialize (::rtl::OUString sPrefix)
                 msDescription.append (
                     OUString(RTL_CONSTASCII_USTRINGPARAM("<no style>")) );
         }
-        catch (::com::sun::star::beans::UnknownPropertyException)
+        catch (const ::com::sun::star::beans::UnknownPropertyException &)
         {
             msDescription.append (
                 OUString(RTL_CONSTASCII_USTRINGPARAM("<unknown>")) );
@@ -291,7 +291,7 @@ void DescriptionGenerator::AddColor (const OUString& sPropertyName,
 
         msDescription.append (lookUpColorName(nValue));
     }
-    catch (::com::sun::star::beans::UnknownPropertyException)
+    catch (const ::com::sun::star::beans::UnknownPropertyException &)
     {
         msDescription.append (
             OUString(RTL_CONSTASCII_USTRINGPARAM("<unknown>")) );
@@ -317,7 +317,7 @@ void DescriptionGenerator::AddInteger (const OUString& sPropertyName,
             msDescription.append (nValue);
         }
     }
-    catch (::com::sun::star::beans::UnknownPropertyException)
+    catch (const ::com::sun::star::beans::UnknownPropertyException &)
     {
         msDescription.append (
             OUString(RTL_CONSTASCII_USTRINGPARAM("<unknown>")) );
@@ -353,7 +353,7 @@ void DescriptionGenerator::AddString (const OUString& sPropertyName,
                 msDescription.append (sValue);
         }
     }
-    catch (::com::sun::star::beans::UnknownPropertyException)
+    catch (const ::com::sun::star::beans::UnknownPropertyException &)
     {
         msDescription.append (
             OUString(RTL_CONSTASCII_USTRINGPARAM("<unknown>")) );
@@ -440,7 +440,7 @@ void DescriptionGenerator::AddFillStyle (const OUString& sPropertyName,
             }
         }
     }
-    catch (::com::sun::star::beans::UnknownPropertyException)
+    catch (const ::com::sun::star::beans::UnknownPropertyException &)
     {
         msDescription.append (
             OUString(RTL_CONSTASCII_USTRINGPARAM("<unknown>")) );
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index b03f921..646bf9b 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -3323,9 +3323,8 @@ sal_Bool DbGridControl::SaveRow()
             xUpdateCursor->updateRow();
         bSuccess = sal_True;
     }
-    catch(SQLException& e)
+    catch(SQLException&)
     {
-        (void)e; // make compiler happy
         EndCursorAction();
         m_bUpdating = sal_False;
         return sal_False;
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 33a0c47..5599ab3 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -578,7 +578,7 @@ basegfx::B2DPolyPolygon SdrObjCustomShape::GetLineGeometry( const SdrObjCustomSh
                 aRetval = basegfx::tools::adaptiveSubdivideByAngle(aRetval);
             }
         }
-        catch ( const com::sun::star::lang::IllegalArgumentException )
+        catch ( const com::sun::star::lang::IllegalArgumentException & )
         {
         }
     }
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index db0322d..904d590 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -919,9 +919,8 @@ sal_Bool SdrOle2Obj::UpdateLinkURL_Impl()
                         if ( nCurState != embed::EmbedStates::LOADED )
                             xObjRef->changeState( nCurState );
                     }
-                    catch( ::com::sun::star::uno::Exception& e )
+                    catch( ::com::sun::star::uno::Exception& )
                     {
-                        (void)e;
                         OSL_FAIL(
                             (OString("SdrOle2Obj::UpdateLinkURL_Impl(), "
                                     "exception caught: ") +
@@ -962,9 +961,8 @@ void SdrOle2Obj::BreakFileLink_Impl()
                 DisconnectFileLink_Impl();
                 mpImpl->maLinkURL = String();
             }
-            catch( ::com::sun::star::uno::Exception& e )
+            catch( ::com::sun::star::uno::Exception& )
             {
-                (void)e;
                 OSL_FAIL(
                     (OString("SdrOle2Obj::BreakFileLink_Impl(), "
                             "exception caught: ") +
@@ -1014,9 +1012,8 @@ void SdrOle2Obj::CheckFileLink_Impl()
                 }
             }
         }
-        catch( ::com::sun::star::uno::Exception& e )
+        catch( ::com::sun::star::uno::Exception& )
         {
-            (void)e;
             OSL_FAIL(
                 (OString("SdrOle2Obj::CheckFileLink_Impl(), "
                         "exception caught: ") +
@@ -1099,9 +1096,8 @@ void SdrOle2Obj::Connect_Impl()
 
             }
         }
-        catch( ::com::sun::star::uno::Exception& e )
+        catch( ::com::sun::star::uno::Exception& )
         {
-            (void)e;
             OSL_FAIL(
                 (OString("SdrOle2Obj::Connect_Impl(), "
                         "exception caught: ") +
@@ -1187,9 +1183,8 @@ void SdrOle2Obj::RemoveListeners_Impl()
                 }
             }
         }
-        catch( ::com::sun::star::uno::Exception& e )
+        catch( ::com::sun::star::uno::Exception& )
         {
-            (void)e;
             OSL_FAIL(
                 (OString("SdrOle2Obj::RemoveListeners_Impl(), "
                         "exception caught: ") +
@@ -1270,9 +1265,8 @@ void SdrOle2Obj::Disconnect_Impl()
             GetSdrGlobalData().GetOLEObjCache().RemoveObj(this);
         }
     }
-    catch( ::com::sun::star::uno::Exception& e )
+    catch( ::com::sun::star::uno::Exception& )
     {
-        (void)e;
         OSL_FAIL(
             (OString("SdrOle2Obj::Disconnect_Impl(), "
                     "exception caught: ") +
@@ -1328,9 +1322,8 @@ void SdrOle2Obj::SetModel(SdrModel* pNewModel)
             }
             DBG_ASSERT( aTmp.getLength(), "Copying embedded object failed!" );
         }
-        catch( ::com::sun::star::uno::Exception& e )
+        catch( ::com::sun::star::uno::Exception& )
         {
-            (void)e;
             OSL_FAIL(
                 (OString("SdrOle2Obj::SetModel(), "
                         "exception caught: ") +
@@ -1886,9 +1879,8 @@ sal_Bool SdrOle2Obj::Unload( const uno::Reference< embed::XEmbeddedObject >& xOb
             xObj->changeState( embed::EmbedStates::LOADED );
             bResult = sal_True;
         }
-        catch( ::com::sun::star::uno::Exception& e )
+        catch( ::com::sun::star::uno::Exception& )
         {
-            (void)e;
             OSL_FAIL(
                 (OString("SdrOle2Obj::Unload=(), "
                         "exception caught: ") +
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index a7e32f8..6b17f79 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -609,9 +609,8 @@ void SvxTableController::onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs )
         StartSelection( aStart );
         UpdateSelection( aEnd );
     }
-    catch( Exception& e )
+    catch( Exception& )
     {
-        (void)e;
         OSL_FAIL("svx::SvxTableController::onInsert(), exception caught!");
     }
 }
@@ -900,9 +899,8 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs )
                         }
                     }
                 }
-                catch( Exception& e )
+                catch( Exception& )
                 {
-                    (void)e;
                     OSL_FAIL( "svx::SvxTableController::SetTableStyle(), exception caught!" );
                 }
             }
@@ -911,9 +909,8 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs )
                 pModel->EndUndo();
         }
     }
-    catch( Exception& e )
+    catch( Exception& )
     {
-        (void)e;
         OSL_FAIL( "svx::SvxTableController::SetTableStyle(), exception caught!" );
     }
 }
@@ -1637,9 +1634,8 @@ void SvxTableController::checkCell( CellPos& rPos )
         if( rPos.mnRow >= mxTable->getRowCount() )
             rPos.mnRow = mxTable->getRowCount()-1;
     }
-    catch( Exception& e )
+    catch( Exception& )
     {
-        (void)e;
         OSL_FAIL("sdr::table::SvxTableController::checkCell(), exception caught!" );
     }
 }
@@ -1656,9 +1652,8 @@ void SvxTableController::findMergeOrigin( CellPos& rPos )
             ::findMergeOrigin( mxTable, rPos.mnCol, rPos.mnRow, rPos.mnCol, rPos.mnRow );
         }
     }
-    catch( Exception& e )
+    catch( Exception& )
     {
-        (void)e;
         OSL_FAIL("sdr::table::SvxTableController::findMergeOrigin(), exception caught!" );
     }
 }
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index 65c09b0..6366a49 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -221,7 +221,7 @@ void SvxDrawPage::dispose()
             // notify subclasses to do their dispose
             disposing();
         }
-        catch(::com::sun::star::uno::Exception& e)
+        catch(const ::com::sun::star::uno::Exception& e)
         {
             // catch exception and throw again but signal that
             // the object was disposed. Dispose should be called
diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx
index 8262333..8686887 100644
--- a/svx/source/unodraw/unoshcol.cxx
+++ b/svx/source/unodraw/unoshcol.cxx
@@ -137,7 +137,7 @@ void SvxShapeCollection::dispose()
             // notify subclasses to do their dispose
             disposing();
         }
-        catch(::com::sun::star::uno::Exception& e)
+        catch(const ::com::sun::star::uno::Exception& e)
         {
             // catch exception and throw again but signal that
             // the object was disposed. Dispose should be called
diff --git a/svx/workben/msview/xmlconfig.cxx b/svx/workben/msview/xmlconfig.cxx
index 3504265..a155371 100644
--- a/svx/workben/msview/xmlconfig.cxx
+++ b/svx/workben/msview/xmlconfig.cxx
@@ -339,7 +339,7 @@ void load_config( const OUString& rPath )
         // finally, parser the stream
         xParser->parseStream( aParserInput );
     }
-    catch( Exception& r )
+    catch( Exception& )
     {
         OSL_FAIL(
             (rtl::OString("load_config(), "
@@ -347,8 +347,6 @@ void load_config( const OUString& rPath )
              rtl::OUStringToOString(
                  comphelper::anyToString( cppu::getCaughtException() ),
                  RTL_TEXTENCODING_UTF8 )).getStr() );
-
-        (void)r;
     }
 }
 


More information about the Libreoffice-commits mailing list