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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 14 08:50:59 UTC 2019


 chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx   |    8 
 chart2/source/controller/dialogs/ObjectNameProvider.cxx                |    4 
 chart2/source/controller/dialogs/res_ErrorBar.cxx                      |    5 
 chart2/source/controller/dialogs/tp_ChartType.cxx                      |    4 
 chart2/source/controller/drawinglayer/ViewElementListProvider.cxx      |    5 
 chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx     |   25 +-
 chart2/source/controller/itemsetwrapper/ItemConverter.cxx              |   12 -
 chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx |    4 
 chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx     |   25 +-
 chart2/source/controller/main/ChartController_Insert.cxx               |   53 ++---
 chart2/source/controller/main/ChartController_Position.cxx             |    5 
 chart2/source/controller/main/ChartController_Properties.cxx           |    5 
 chart2/source/controller/main/ChartController_Tools.cxx                |    4 
 chart2/source/controller/main/ControllerCommandDispatch.cxx            |    9 
 chart2/source/tools/AxisHelper.cxx                                     |    4 
 chart2/source/tools/ChartModelHelper.cxx                               |    4 
 chart2/source/tools/DataSeriesHelper.cxx                               |   24 +-
 chart2/source/tools/ThreeDHelper.cxx                                   |   12 -
 chart2/source/view/axes/VAxisProperties.cxx                            |   13 -
 chart2/source/view/axes/VCartesianAxis.cxx                             |    5 
 chart2/source/view/axes/VCoordinateSystem.cxx                          |    6 
 chart2/source/view/charttypes/BarChart.cxx                             |   13 -
 chart2/source/view/charttypes/CandleStickChart.cxx                     |    5 
 chart2/source/view/charttypes/PieChart.cxx                             |   13 -
 chart2/source/view/charttypes/VSeriesPlotter.cxx                       |   16 -
 chart2/source/view/diagram/VDiagram.cxx                                |   12 -
 chart2/source/view/main/ChartView.cxx                                  |   16 -
 chart2/source/view/main/PropertyMapper.cxx                             |   17 -
 chart2/source/view/main/ShapeFactory.cxx                               |  104 +++++-----
 chart2/source/view/main/VDataSeries.cxx                                |   25 +-
 chart2/source/view/main/VLineProperties.cxx                            |    5 
 chart2/source/view/main/VTitle.cxx                                     |    9 
 32 files changed, 244 insertions(+), 227 deletions(-)

New commits:
commit bba7ca803cfcb316882c5f32cd28f0aa0c67591b
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Jun 14 09:31:55 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jun 14 10:49:55 2019 +0200

    loplugin:logexceptionnicely in chart2
    
    Change-Id: Ib7933723e5506578bbc85cc431d54d1ed8466376
    Reviewed-on: https://gerrit.libreoffice.org/74019
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index 2f4077a1b51b..d9f594a83b6a 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -398,9 +398,9 @@ void lcl_correctSymbolSizeForBitmaps( chart2::Symbol& rSymbol )
                         bFoundSize = true;
                 }
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
 
             if(!bFoundSize)
@@ -419,9 +419,9 @@ void lcl_correctSymbolSizeForBitmaps( chart2::Symbol& rSymbol )
         }
         rSymbol.Size = aSize;
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index f36d6c7bf9a6..4aa16cd970dc 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -171,9 +171,9 @@ OUString lcl_getDataPointValueText( const Reference< XDataSeries >& xSeries, sal
                     a_Size = aNumberFormatterWrapper.getFormattedString( nNumberFormatKey, fValue, nLabelColor, bColorChanged );
                 }
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
     }
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index f8fa420120f5..bb9f78f85134 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -27,6 +27,7 @@
 
 #include <rtl/math.hxx>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 #include <osl/diagnose.h>
 #include <svl/stritem.hxx>
 
@@ -185,9 +186,9 @@ void ErrorBarResources::SetChartDocumentForRangeChoosing(
             {
                 xProps->getPropertyValue("EnableDataTableDialog") >>= m_bEnableDataTableDialog;
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
     }
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index b6a4a5eae31b..602b2d6b2858 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -649,9 +649,9 @@ ChartTypeTabPage::ChartTypeTabPage(TabPageParent pParent , const uno::Reference<
         {
             xProps->getPropertyValue("EnableComplexChartTypes") >>= bEnableComplexChartTypes;
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
 
diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
index 52b122f909c4..5ed463ca3f76 100644
--- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
+++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
@@ -34,6 +34,7 @@
 #include <svx/svdview.hxx>
 #include <svx/svdpage.hxx>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 
 namespace chart
 {
@@ -128,9 +129,9 @@ SdrObjList* ViewElementListProvider::GetSymbolList() const
         if (pSdrObject)
             pSymbolList = pSdrObject->GetSubList();
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
     return pSymbolList;
 }
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 6be559c23639..d5437f09165e 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -43,6 +43,7 @@
 #include <svl/stritem.hxx>
 #include <editeng/brushitem.hxx>
 #include <svl/ilstitem.hxx>
+#include <tools/diagnose_ex.h>
 #include <vcl/graph.hxx>
 
 #include <svx/tabline.hxx>
@@ -362,9 +363,9 @@ bool DataPointItemConverter::ApplySpecialItem(
                     bChanged = true;
                 }
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
         break;
@@ -393,9 +394,9 @@ bool DataPointItemConverter::ApplySpecialItem(
                     bChanged = true;
                 }
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
         break;
@@ -428,9 +429,9 @@ bool DataPointItemConverter::ApplySpecialItem(
                     bChanged = true;
                 }
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
         break;
@@ -612,9 +613,9 @@ void DataPointItemConverter::FillSpecialItem(
                 GetPropertySet()->getPropertyValue( "LabelSeparator" ) >>= aValue;
                 rOutItemSet.Put( SfxStringItem( nWhichId, aValue ));
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
         break;
@@ -627,9 +628,9 @@ void DataPointItemConverter::FillSpecialItem(
                 GetPropertySet()->getPropertyValue( "TextWordWrap" ) >>= bValue;
                 rOutItemSet.Put( SfxBoolItem( nWhichId, bValue ));
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
         break;
@@ -644,9 +645,9 @@ void DataPointItemConverter::FillSpecialItem(
                 else if( m_aAvailableLabelPlacements.hasElements() )
                     rOutItemSet.Put( SfxInt32Item( nWhichId, m_aAvailableLabelPlacements[0] ));
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
         break;
diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
index c0f7f0da3276..e94875b704a4 100644
--- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
@@ -110,9 +110,9 @@ void ItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const
                             rOutItemSet.Put( std::move(pItem) );
                         }
                     }
-                    catch( const beans::UnknownPropertyException &ex )
+                    catch( const beans::UnknownPropertyException & )
                     {
-                        SAL_WARN( "chart2", ex << " - unknown Property: " << aProperty.first);
+                        TOOLS_WARN_EXCEPTION( "chart2", "unknown Property: " << aProperty.first);
                     }
                     catch( const uno::Exception & )
                     {
@@ -174,13 +174,13 @@ bool ItemConverter::ApplyItemSet( const SfxItemSet & rItemSet )
                         bItemsChanged = true;
                     }
                 }
-                catch( const beans::UnknownPropertyException &ex )
+                catch( const beans::UnknownPropertyException & )
                 {
-                    SAL_WARN( "chart2", ex << " - unknown Property: " << aProperty.first);
+                    TOOLS_WARN_EXCEPTION( "chart2", "unknown Property: " << aProperty.first);
                 }
-                catch( const uno::Exception &ex )
+                catch( const uno::Exception & )
                 {
-                    SAL_WARN( "chart2", ex );
+                    TOOLS_WARN_EXCEPTION( "chart2", "" );
                 }
             }
             else
diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index 977eddbb0fb8..9b169f9280cf 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -324,9 +324,9 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf
                             bChanged = true;
                         }
                     }
-                    catch( const uno::Exception& e )
+                    catch( const uno::Exception& )
                     {
-                        SAL_WARN("chart2", "Exception caught. " << e );
+                        TOOLS_WARN_EXCEPTION("chart2", "" );
                     }
                 }
             }
diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
index f759cd7306a9..f04d8717a1c0 100644
--- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
@@ -34,6 +34,7 @@
 #include <svl/intitem.hxx>
 #include <svl/stritem.hxx>
 #include <svx/tabline.hxx>
+#include <tools/diagnose_ex.h>
 
 #include <com/sun/star/chart2/AxisType.hpp>
 #include <com/sun/star/chart2/DataPointLabel.hpp>
@@ -325,9 +326,9 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte
                     bChanged = true;
                 }
             }
-            catch (const uno::Exception& e)
+            catch (const uno::Exception&)
             {
-                SAL_WARN("chart2", "Exception caught. " << e);
+                TOOLS_WARN_EXCEPTION("chart2", "");
             }
         }
         break;
@@ -355,9 +356,9 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte
                     bChanged = true;
                 }
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
         break;
@@ -388,9 +389,9 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte
                     bChanged = true;
                 }
             }
-            catch (const uno::Exception& e)
+            catch (const uno::Exception&)
             {
-                SAL_WARN("chart2", "Exception caught. " << e);
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
         break;
@@ -563,9 +564,9 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r
                 GetPropertySet()->getPropertyValue("LabelSeparator") >>= aValue;
                 rOutItemSet.Put(SfxStringItem(nWhichId, aValue));
             }
-            catch (const uno::Exception& e)
+            catch (const uno::Exception&)
             {
-                SAL_WARN("chart2", "Exception caught. " << e);
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
         break;
@@ -577,9 +578,9 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r
                 GetPropertySet()->getPropertyValue( "TextWordWrap" ) >>= bValue;
                 rOutItemSet.Put( SfxBoolItem( nWhichId, bValue ));
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
         break;
@@ -593,9 +594,9 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r
                 else if (maAvailableLabelPlacements.hasElements())
                     rOutItemSet.Put(SfxInt32Item(nWhichId, maAvailableLabelPlacements[0]));
             }
-            catch (const uno::Exception& e)
+            catch (const uno::Exception&)
             {
-                SAL_WARN("chart2", "Exception caught. " << e);
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
         break;
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx
index a2f2dcb347ae..50a3a3904219 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -58,6 +58,7 @@
 #include <svx/ActionDescriptionProvider.hxx>
 
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 #include <vcl/svapp.hxx>
 
 using namespace ::com::sun::star;
@@ -116,9 +117,9 @@ void ChartController::executeDispatch_InsertAxes()
                 aUndoGuard.commit();
         }
     }
-    catch(const uno::RuntimeException& e)
+    catch(const uno::RuntimeException&)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -150,9 +151,9 @@ void ChartController::executeDispatch_InsertGrid()
                 aUndoGuard.commit();
         }
     }
-    catch(const uno::RuntimeException& e)
+    catch(const uno::RuntimeException&)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -181,9 +182,9 @@ void ChartController::executeDispatch_InsertTitles()
                 aUndoGuard.commit();
         }
     }
-    catch(const uno::RuntimeException& e)
+    catch(const uno::RuntimeException&)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -232,9 +233,9 @@ void ChartController::executeDispatch_OpenLegendDialog()
             aUndoGuard.commit();
         }
     }
-    catch(const uno::RuntimeException& e)
+    catch(const uno::RuntimeException&)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -294,9 +295,9 @@ void ChartController::executeDispatch_InsertMenu_DataLabels()
                 aUndoGuard.commit();
         }
     }
-    catch(const uno::RuntimeException& e)
+    catch(const uno::RuntimeException&)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -505,9 +506,9 @@ void ChartController::executeDispatch_InsertErrorBars( bool bYError )
                     aUndoGuard.commit();
             }
         }
-        catch(const uno::RuntimeException& e)
+        catch(const uno::RuntimeException&)
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
 }
@@ -730,9 +731,9 @@ void ChartController::executeDispatch_InsertAxisTitle()
             aUndoGuard.commit();
         }
     }
-    catch(const uno::RuntimeException& e)
+    catch(const uno::RuntimeException&)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -752,9 +753,9 @@ void ChartController::executeDispatch_InsertAxis()
             aUndoGuard.commit();
         }
     }
-    catch(const uno::RuntimeException& e)
+    catch(const uno::RuntimeException&)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -774,9 +775,9 @@ void ChartController::executeDispatch_DeleteAxis()
             aUndoGuard.commit();
         }
     }
-    catch(const uno::RuntimeException& e)
+    catch(const uno::RuntimeException&)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -796,9 +797,9 @@ void ChartController::executeDispatch_InsertMajorGrid()
             aUndoGuard.commit();
         }
     }
-    catch(const uno::RuntimeException& e)
+    catch(const uno::RuntimeException&)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -818,9 +819,9 @@ void ChartController::executeDispatch_DeleteMajorGrid()
             aUndoGuard.commit();
         }
     }
-    catch(const uno::RuntimeException& e)
+    catch(const uno::RuntimeException&)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -842,9 +843,9 @@ void ChartController::executeDispatch_InsertMinorGrid()
             aUndoGuard.commit();
         }
     }
-    catch(const uno::RuntimeException& e)
+    catch(const uno::RuntimeException&)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -866,9 +867,9 @@ void ChartController::executeDispatch_DeleteMinorGrid()
             aUndoGuard.commit();
         }
     }
-    catch(const uno::RuntimeException& e)
+    catch(const uno::RuntimeException&)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index 164b2197ec91..8df27d382153 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -37,6 +37,7 @@
 #include <svl/aeitem.hxx>
 #include <svl/intitem.hxx>
 #include <svx/svxdlg.hxx>
+#include <tools/diagnose_ex.h>
 #include <vcl/svapp.hxx>
 #include <memory>
 
@@ -200,9 +201,9 @@ void ChartController::executeDispatch_PositionAndSize(const ::css::uno::Sequence
                 aUndoGuard.commit();
         }
     }
-    catch(const uno::Exception& e)
+    catch(const uno::Exception&)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index 69fc84fdda90..32688d35cb95 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -59,6 +59,7 @@
 #include <sal/log.hxx>
 #include <vcl/svapp.hxx>
 #include <svx/ActionDescriptionProvider.hxx>
+#include <tools/diagnose_ex.h>
 
 namespace chart
 {
@@ -824,9 +825,9 @@ void ChartController::executeDispatch_View3D()
         if (aDlg.run() == RET_OK)
             aUndoGuard.commit();
     }
-    catch(const uno::RuntimeException& e)
+    catch(const uno::RuntimeException&)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index 819800c00016..963baf15d405 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -977,9 +977,9 @@ void ChartController::executeDispatch_LOKPieSegmentDragging( int nOffset )
                 xPointProperties->setPropertyValue( "Offset", uno::Any( nOffset / 100.0 ) );
         }
     }
-    catch( const uno::Exception & ex )
+    catch( const uno::Exception & )
     {
-        SAL_WARN( "chart2", "Exception caught. " << ex );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index 031c4e4cf1cf..27a0fe3e5ec0 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -35,6 +35,7 @@
 
 #include <vcl/svapp.hxx>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 
 #include <com/sun/star/util/XModifyBroadcaster.hpp>
 #include <com/sun/star/frame/XStorable.hpp>
@@ -295,9 +296,9 @@ void ControllerState::update(
                     if( xEquationProperties.is() )
                         xEquationProperties->getPropertyValue( "ShowCorrelationCoefficient" ) >>= bHasR2Value;
                 }
-                catch(const uno::RuntimeException& e)
+                catch(const uno::RuntimeException&)
                 {
-                    SAL_WARN("chart2", "Exception caught. " << e );
+                    TOOLS_WARN_EXCEPTION("chart2", "" );
                 }
                 bMayAddR2Value = !bHasR2Value;
                 bMayDeleteR2Value = bHasR2Value;
@@ -541,9 +542,9 @@ void ControllerCommandDispatch::updateCommandAvailability()
             {
                 xProps->getPropertyValue("EnableDataTableDialog") >>= bEnableDataTableDialog;
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
 
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx
index 607bc41d187b..8339c8ff1ceb 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -390,9 +390,9 @@ Reference< XAxis > AxisHelper::createAxis(
             if( pRefSizeProvider )
                 pRefSizeProvider->setValuesAtPropertySet( xProp );
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
     return xAxis;
diff --git a/chart2/source/tools/ChartModelHelper.cxx b/chart2/source/tools/ChartModelHelper.cxx
index 6d59b6831911..2ff699fb0f4a 100644
--- a/chart2/source/tools/ChartModelHelper.cxx
+++ b/chart2/source/tools/ChartModelHelper.cxx
@@ -275,9 +275,9 @@ bool ChartModelHelper::setIncludeHiddenCells( bool bIncludeHiddenCells, ChartMod
             xDiagramProperties->setPropertyValue( "IncludeHiddenCells", aNewValue);
         }
     }
-    catch (const uno::Exception& e)
+    catch (const uno::Exception&)
     {
-        SAL_WARN("chart2", "Exception caught. " << e);
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
     return bChanged;
 }
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index ad60f8914c54..45d3cc49947d 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -177,9 +177,9 @@ void lcl_insertOrDeleteDataLabelsToSeriesAndAllPoints( const Reference< chart2::
             }
         }
     }
-    catch(const uno::Exception &e)
+    catch(const uno::Exception &)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -724,9 +724,9 @@ bool hasDataLabelsAtSeries( const Reference< chart2::XDataSeries >& xSeries )
                 bRet = aLabel.ShowNumber || aLabel.ShowNumberInPercent || aLabel.ShowCategoryName;
         }
     }
-    catch(const uno::Exception &e)
+    catch(const uno::Exception &)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
     return bRet;
 }
@@ -757,9 +757,9 @@ bool hasDataLabelsAtPoints( const Reference< chart2::XDataSeries >& xSeries )
             }
         }
     }
-    catch(const uno::Exception &e)
+    catch(const uno::Exception &)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
     return bRet;
 }
@@ -791,9 +791,9 @@ bool hasDataLabelAtPoint( const Reference< chart2::XDataSeries >& xSeries, sal_I
             }
         }
     }
-    catch(const uno::Exception &e)
+    catch(const uno::Exception &)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
     return bRet;
 }
@@ -820,9 +820,9 @@ void insertDataLabelToPoint( const Reference< beans::XPropertySet >& xPointProp
             xPointProp->setPropertyValue(CHART_UNONAME_LABEL, uno::Any(aLabel));
         }
     }
-    catch(const uno::Exception &e)
+    catch(const uno::Exception &)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -840,9 +840,9 @@ void deleteDataLabelsFromPoint( const Reference< beans::XPropertySet >& xPointPr
             xPointProp->setPropertyValue(CHART_UNONAME_LABEL, uno::Any(aLabel));
         }
     }
-    catch(const uno::Exception &e)
+    catch(const uno::Exception &)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
diff --git a/chart2/source/tools/ThreeDHelper.cxx b/chart2/source/tools/ThreeDHelper.cxx
index b6e91156fbab..1e049a856da9 100644
--- a/chart2/source/tools/ThreeDHelper.cxx
+++ b/chart2/source/tools/ThreeDHelper.cxx
@@ -1320,9 +1320,9 @@ void ThreeDHelper::getRoundedEdgesAndObjectLines(
                         , aPercentDiagonalPropertyName, uno::Any(nPercentDiagonal) ) )
                         bDifferentRoundedEdges = true;
                 }
-                catch( const uno::Exception& e )
+                catch( const uno::Exception& )
                 {
-                    SAL_WARN("chart2", "Exception caught. " << e );
+                    TOOLS_WARN_EXCEPTION("chart2", "" );
                     bDifferentRoundedEdges = true;
                 }
                 try
@@ -1333,9 +1333,9 @@ void ThreeDHelper::getRoundedEdgesAndObjectLines(
                         , aBorderStylePropertyName, uno::Any(aLineStyle) ) )
                         bDifferentObjectLines = true;
                 }
-                catch( const uno::Exception& e )
+                catch( const uno::Exception& )
                 {
-                    SAL_WARN("chart2", "Exception caught. " << e );
+                    TOOLS_WARN_EXCEPTION("chart2", "" );
                     bDifferentObjectLines = true;
                 }
             }
@@ -1375,9 +1375,9 @@ void ThreeDHelper::getRoundedEdgesAndObjectLines(
         else if( aLineStyle == drawing::LineStyle_SOLID )
             rnObjectLines = 1;
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
diff --git a/chart2/source/view/axes/VAxisProperties.cxx b/chart2/source/view/axes/VAxisProperties.cxx
index ee94a6dacf52..098401db5754 100644
--- a/chart2/source/view/axes/VAxisProperties.cxx
+++ b/chart2/source/view/axes/VAxisProperties.cxx
@@ -29,6 +29,7 @@
 #include <com/sun/star/chart2/XAxis.hpp>
 
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 #include <rtl/math.hxx>
 
 using namespace ::com::sun::star;
@@ -235,9 +236,9 @@ void AxisProperties::initAxisPositioning( const uno::Reference< beans::XProperty
             m_eTickmarkPos = css::chart::ChartAxisMarkPosition_AT_LABELS;
         }
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -325,9 +326,9 @@ void AxisProperties::init( bool bCartesian )
             m_aTickmarkPropertiesList.push_back( aTickmarkProperties );
         }
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -376,9 +377,9 @@ void AxisLabelProperties::init( const uno::Reference< XAxis >& xAxisModel )
                     break;
             }
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
 }
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index a70551bf8518..b80f1b97ebd3 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -31,6 +31,7 @@
 #include <com/sun/star/chart2/AxisType.hpp>
 
 #include <rtl/math.hxx>
+#include <tools/diagnose_ex.h>
 #include <tools/color.hxx>
 #include <svx/unoshape.hxx>
 #include <svx/unoshtxt.hxx>
@@ -1778,9 +1779,9 @@ void VCartesianAxis::updatePositions()
                     {
                         xProp->setPropertyValue( "Transformation", aATransformation );
                     }
-                    catch( const uno::Exception& e )
+                    catch( const uno::Exception& )
                     {
-                        SAL_WARN("chart2", "Exception caught. " << e );
+                        TOOLS_WARN_EXCEPTION("chart2", "" );
                     }
                 }
 
diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx
index 8ab7e19e6013..ddf10f459eff 100644
--- a/chart2/source/view/axes/VCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VCoordinateSystem.cxx
@@ -34,7 +34,7 @@
 #include <com/sun/star/chart2/XCoordinateSystem.hpp>
 #include <comphelper/sequence.hxx>
 #include <sal/log.hxx>
-
+#include <tools/diagnose_ex.h>
 #include <algorithm>
 #include <rtl/math.hxx>
 
@@ -533,9 +533,9 @@ bool VCoordinateSystem::getPropertySwapXAndYAxis() const
     {
         xProp->getPropertyValue( "SwapXAndYAxis" ) >>= bSwapXAndY;
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
     return bSwapXAndY;
 }
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index bb1c50387d2e..28dde06bf071 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -37,6 +37,7 @@
 #include <com/sun/star/chart2/DataPointGeometry3D.hpp>
 #include <rtl/math.hxx>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 #include <unordered_set>
 
 namespace chart
@@ -61,9 +62,9 @@ BarChart::BarChart( const uno::Reference<XChartType>& xChartTypeModel
             m_xChartTypeModelProps->getPropertyValue( "GapwidthSequence" ) >>= m_aGapwidthSequence;
         }
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -313,9 +314,9 @@ uno::Reference< drawing::XShape > BarChart::createDataPoint3D_Bar(
                 bRoundedEdges = false;
         }
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 
     uno::Reference< drawing::XShape > xShape;
@@ -696,9 +697,9 @@ void BarChart::createShapes()
                     {
                         xDataPointProperties->getPropertyValue( "Geometry3D") >>= nGeometry3D;
                     }
-                    catch( const uno::Exception& e )
+                    catch( const uno::Exception& )
                     {
-                        SAL_WARN("chart2", "Exception caught. " << e );
+                        TOOLS_WARN_EXCEPTION("chart2", "" );
                     }
 
                     //@todo iterate through all subsystems to create partial points
diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx
index 4f84f2b01a33..e48489a61906 100644
--- a/chart2/source/view/charttypes/CandleStickChart.cxx
+++ b/chart2/source/view/charttypes/CandleStickChart.cxx
@@ -26,6 +26,7 @@
 #include <DateHelper.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 #include <osl/diagnose.h>
 
 namespace chart
@@ -124,9 +125,9 @@ void CandleStickChart::createShapes()
             PropertyMapper::getMultiPropertyListsFromValueMap( aBlackBox_Names, aBlackBox_Values, aBlackBox_Map );
         }
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 
     //(@todo maybe different iteration for breaks in axis ?)
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index 662a9a842db7..d4fe022f48f9 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -35,6 +35,7 @@
 #include <rtl/math.hxx>
 #include <sal/log.hxx>
 #include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
 #include <tools/helpers.hxx>
 
 #include <memory>
@@ -191,9 +192,9 @@ PieChart::PieChart( const uno::Reference<XChartType>& xChartTypeModel
                 m_pPosHelper->m_fRingDistance = 0.1;
         }
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -647,9 +648,9 @@ void PieChart::createShapes()
                 {
                     xPointProperties->getPropertyValue( "Offset") >>= aParam.mfExplodePercentage;
                 }
-                catch( const uno::Exception& e )
+                catch( const uno::Exception& )
                 {
-                    SAL_WARN("chart2", "Exception caught. " << e );
+                    TOOLS_WARN_EXCEPTION("chart2", "" );
                 }
 
                 ///see notes for `PolarPlottingPositionHelper` methods
@@ -719,9 +720,9 @@ void PieChart::createShapes()
                     ShapeFactory::setShapeName( xPointShape
                                 , ObjectIdentifier::createPointCID( aPointCIDStub, nPointIndex ) );
                 }
-                catch( const uno::Exception& e )
+                catch( const uno::Exception& )
                 {
-                    SAL_WARN("chart2", "Exception caught. " << e );
+                    TOOLS_WARN_EXCEPTION("chart2", "" );
                 }
             }//next series in x slot (next y slot)
         }//next category
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 0a47f0ddcd88..8322ff05372b 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -492,9 +492,9 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
                 xPointProps->getPropertyValue( "TextRotation" ) >>= fRotationDegrees;
             }
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
 
         sal_Int32 nLineCountForSymbolsize = 0;
@@ -755,9 +755,9 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
             xTextShape->setPosition( aNewTextPos );
         }
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 
     return xTextShape;
@@ -845,9 +845,9 @@ double lcl_getErrorBarLogicLength(
             break;
         }
     }
-    catch( const uno::Exception & e )
+    catch( const uno::Exception & )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 
     return fResult;
@@ -1063,9 +1063,9 @@ void VSeriesPlotter::createErrorBar(
         uno::Reference< drawing::XShape > xShape = m_pShapeFactory->createLine2D( xTarget, PolyToPointSequence( aPoly) );
         setMappedProperties( xShape, xErrorBarProperties, PropertyMapper::getPropertyNameMapForLineProperties() );
     }
-    catch( const uno::Exception & e )
+    catch( const uno::Exception & )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 
 }
diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx
index 6069296d7271..ffce05afa0ad 100644
--- a/chart2/source/view/diagram/VDiagram.cxx
+++ b/chart2/source/view/diagram/VDiagram.cxx
@@ -189,9 +189,9 @@ void VDiagram::createShapes_2d()
                     xProp->setPropertyValue( UNO_NAME_MISC_OBJ_NAME, uno::Any( aWallCID ) );
                 }
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
 
@@ -433,9 +433,9 @@ void VDiagram::adjustAspectRatio3d( const awt::Size& rAvailableSize )
             m_xAspectRatio3D->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX
                 , uno::Any(BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aResult )) );
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
 }
@@ -653,9 +653,9 @@ void VDiagram::createShapes_3d()
                 xShapeProp->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX
                     , uno::Any(BaseGFXHelper::B3DHomMatrixToHomogenMatrix(aM)) );
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
     }
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index bb73719ec708..44a70013bf64 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -490,9 +490,9 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
                 xAxisProp->getPropertyValue("Show") >>= bSecondaryYaxisVisible;
             }
         }
-        catch (const lang::IndexOutOfBoundsException& e)
+        catch (const lang::IndexOutOfBoundsException&)
         {
-            SAL_WARN("chart2", "Exception caught. " << e);
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
         //iterate through all chart types in the current coordinate system
         uno::Reference< XChartTypeContainer > xChartTypeContainer( xCooSys, uno::UNO_QUERY );
@@ -764,9 +764,9 @@ void SeriesPlotterContainer::setNumberFormatsFromAxes()
                             }
                         }
                     }
-                    catch( const lang::IndexOutOfBoundsException& e )
+                    catch( const lang::IndexOutOfBoundsException& )
                     {
-                        SAL_WARN("chart2", "Exception caught. " << e );
+                        TOOLS_WARN_EXCEPTION("chart2", "" );
                     }
                 }
             }
@@ -1872,9 +1872,9 @@ bool lcl_getPropertySwapXAndYAxis( const uno::Reference< XDiagram >& xDiagram )
             {
                 xProp->getPropertyValue( "SwapXAndYAxis" ) >>= bSwapXAndY;
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
     }
@@ -2456,9 +2456,9 @@ void ChartView::impl_refreshAddIn()
                 xAddIn->refresh();
         }
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx
index 35bdd98e75c7..c4b4b6756097 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -27,6 +27,7 @@
 #include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
 #include <com/sun/star/drawing/LineJoint.hpp>
 #include <comphelper/sequence.hxx>
+#include <tools/diagnose_ex.h>
 
 namespace chart
 {
@@ -108,9 +109,9 @@ void PropertyMapper::getValueMap(
                 if( aAny.hasValue() )
                     rValueMap.emplace(  aTarget, aAny );
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
     }
@@ -399,9 +400,9 @@ void PropertyMapper::setMultiProperties(
             bSuccess = true;
         }
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e ); //if this occurs more often think of removing the XMultiPropertySet completely for better performance
+        TOOLS_WARN_EXCEPTION("chart2", "" ); //if this occurs more often think of removing the XMultiPropertySet completely for better performance
     }
 
     if(!bSuccess)
@@ -419,15 +420,15 @@ void PropertyMapper::setMultiProperties(
             {
                 xTarget->setPropertyValue( aPropName, aValue );
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index e52ec392f756..d90b502e629f 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -377,9 +377,9 @@ uno::Reference<drawing::XShape>
                     bRounded = false;
             }
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
     uno::Reference<drawing::XShape> xShape = impl_createCube( xTarget, rPosition, rSize, nRotateZAngleHundredthDegree, bRounded );
@@ -443,9 +443,9 @@ uno::Reference<drawing::XShape>
 
             xMultiPropertySet->setPropertyValues(aPropertyNames, aPropertyValues);
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
     return xShape;
@@ -691,9 +691,9 @@ uno::Reference<drawing::XShape>
 
             xMultiPropertySet->setPropertyValues(aPropertyNames, aPropertyValues);
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
     return xShape;
@@ -902,9 +902,9 @@ uno::Reference< drawing::XShape >
 
             xProp->setPropertyValue( "PolyPolygonBezier", uno::Any( aCoords ) );
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
 
@@ -985,9 +985,9 @@ uno::Reference< drawing::XShape >
             xProp->setPropertyValue( UNO_NAME_3D_TEXTURE_PROJ_Y
                 , uno::Any( drawing::TextureProjectionMode_OBJECTSPECIFIC ) );
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
     return xShape;
@@ -1047,9 +1047,9 @@ uno::Reference< drawing::XShape >
                 PropertyMapper::setMappedProperties(xPropertySet, xSourceProp, rPropertyNameMap);
             }
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
     return xShape;
@@ -1106,9 +1106,9 @@ uno::Reference< drawing::XShape >
             }
             xMultiPropertySet->setPropertyValues(aPropertyNames, aPropertyValues);
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
     return xShape;
@@ -1146,9 +1146,9 @@ uno::Reference< drawing::XShape >
             xProp->setPropertyValue( UNO_NAME_MISC_OBJ_ZORDER
                 , uno::Any( sal_Int32(0) ) );
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
     return xShape;
@@ -1695,9 +1695,9 @@ uno::Reference< drawing::XShape >
             xProp->setPropertyValue( UNO_NAME_FILLCOLOR
                 , uno::Any( nFillColor ) );
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
     return xShape;
@@ -1732,9 +1732,9 @@ uno::Reference< drawing::XShape >
         xShape->setPosition( Position3DToAWTPoint( aCenterPosition ));
         xShape->setSize( Direction3DToAWTSize( rSize ));
     }
-    catch( const uno::Exception & e )
+    catch( const uno::Exception & )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
     uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY );
     OSL_ENSURE(xProp.is(), "created shape offers no XPropertySet");
@@ -1744,9 +1744,9 @@ uno::Reference< drawing::XShape >
         {
             xProp->setPropertyValue( "Graphic", uno::Any( xGraphic ));
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
     return xShape;
@@ -1780,9 +1780,9 @@ uno::Reference< drawing::XShapes >
             uno::Reference<drawing::XShapes>( xShape, uno::UNO_QUERY );
         return xShapes;
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
     return nullptr;
 }
@@ -1817,9 +1817,9 @@ uno::Reference< drawing::XShapes >
                     xProp->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX
                         , uno::Any(B3DHomMatrixToHomogenMatrix(aM)) );
                 }
-                catch( const uno::Exception& e )
+                catch( const uno::Exception& )
                 {
-                    SAL_WARN("chart2", "Exception caught. " << e );
+                    TOOLS_WARN_EXCEPTION("chart2", "" );
                 }
             }
         }
@@ -1833,9 +1833,9 @@ uno::Reference< drawing::XShapes >
                 uno::Reference<drawing::XShapes>( xShape, uno::UNO_QUERY );
         return xShapes;
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
     return nullptr;
 }
@@ -1863,9 +1863,9 @@ uno::Reference< drawing::XShape >
         xShape->setPosition( Position3DToAWTPoint( aCenterPosition ));
         xShape->setSize( Direction3DToAWTSize( rSize ));
     }
-    catch( const uno::Exception & e )
+    catch( const uno::Exception & )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 
     //set properties
@@ -1877,9 +1877,9 @@ uno::Reference< drawing::XShape >
         {
             xProp->setPropertyValue( UNO_NAME_CIRCKIND, uno::Any( drawing::CircleKind_FULL ) );
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
     return xShape;
@@ -1967,9 +1967,9 @@ uno::Reference< drawing::XShape >
             }
             xMultiPropertySet->setPropertyValues(aPropertyNames, aPropertyValues);
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
     return xShape;
@@ -2031,9 +2031,9 @@ uno::Reference< drawing::XShape >
                         , pLineProperties->DashName );
             }
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
     return xShape;
@@ -2158,9 +2158,9 @@ uno::Reference< drawing::XShape >
         {
             xProp->setPropertyValue( "Transformation", rATransformation );
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
     return xShape;
@@ -2261,9 +2261,9 @@ uno::Reference< drawing::XShape >
             {
                 xProp->setPropertyValue( "Transformation", rATransformation );
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
     }
@@ -2355,9 +2355,9 @@ uno::Reference< drawing::XShape >
             {
                 xProp->setPropertyValue( "Transformation", rATransformation );
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
     }
@@ -2425,9 +2425,9 @@ uno::Reference< drawing::XShape >
         {
             xTextProperties->getPropertyValue( "StackCharacters" ) >>= bStackCharacters;
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
 
         if(bStackCharacters)
@@ -2506,9 +2506,9 @@ uno::Reference< drawing::XShape >
         aM.translate( nXPos, nYPos );
         xShapeProp->setPropertyValue( "Transformation", uno::Any( B2DHomMatrixToHomogenMatrix3(aM) ) );
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
     return xShape;
 }
@@ -2554,9 +2554,9 @@ void ShapeFactory::makeShapeInvisible( const uno::Reference< drawing::XShape >&
             xShapeProp->setPropertyValue( "LineStyle", uno::Any( drawing::LineStyle_NONE ));
             xShapeProp->setPropertyValue( "FillStyle", uno::Any( drawing::FillStyle_NONE ));
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
 }
@@ -2577,9 +2577,9 @@ void ShapeFactory::setShapeName( const uno::Reference< drawing::XShape >& xShape
             xProp->setPropertyValue( UNO_NAME_MISC_OBJ_NAME
                 , uno::Any( rName ) );
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
 }
@@ -2596,9 +2596,9 @@ OUString ShapeFactory::getShapeName( const uno::Reference< drawing::XShape >& xS
         {
             xProp->getPropertyValue( UNO_NAME_MISC_OBJ_NAME ) >>= aRet;
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
 
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index e93c2fc18676..f606883e3fbd 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -36,6 +36,7 @@
 #include <sal/log.hxx>
 #include <osl/diagnose.h>
 #include <tools/color.hxx>
+#include <tools/diagnose_ex.h>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/beans/XPropertyState.hpp>
 #include <com/sun/star/chart2/data/XDataSource.hpp>
@@ -218,9 +219,9 @@ VDataSeries::VDataSeries( const uno::Reference< XDataSeries >& xDataSeries )
                     m_PropertyMap.insert(std::make_pair(aRole, aSequence));
                 }
             }
-            catch( const uno::Exception& e )
+            catch( const uno::Exception& )
             {
-                SAL_WARN("chart2", "Exception caught. " << e );
+                TOOLS_WARN_EXCEPTION("chart2", "" );
             }
         }
     }
@@ -254,9 +255,9 @@ VDataSeries::VDataSeries( const uno::Reference< XDataSeries >& xDataSeries )
             if(m_nAxisIndex<0)
                 m_nAxisIndex=0;
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
 }
@@ -627,9 +628,9 @@ sal_Int32 VDataSeries::getLabelPlacement( sal_Int32 nPointIndex, const uno::Refe
 
         OSL_FAIL("no label placement supported");
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
     return nLabelPlacement;
 }
@@ -772,9 +773,9 @@ static std::unique_ptr<Symbol> getSymbolPropertiesFromPropertySet( const uno::Re
         else
             apSymbolProps.reset();
     }
-    catch(const uno::Exception &e)
+    catch(const uno::Exception &)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
     return apSymbolProps;
 }
@@ -862,9 +863,9 @@ bool VDataSeries::hasPointOwnColor( sal_Int32 index ) const
         uno::Reference< beans::XPropertyState > xPointState( getPropertiesOfPoint(index), uno::UNO_QUERY_THROW );
         return (xPointState->getPropertyState("Color") != beans::PropertyState_DEFAULT_VALUE );
     }
-    catch(const uno::Exception& e)
+    catch(const uno::Exception&)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
     return false;
 }
@@ -911,9 +912,9 @@ static std::unique_ptr<DataPointLabel> getDataPointLabelFromPropertySet( const u
         if( !(xProp->getPropertyValue(CHART_UNONAME_LABEL) >>= *apLabel) )
             apLabel.reset();
     }
-    catch(const uno::Exception &e)
+    catch(const uno::Exception &)
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
     return apLabel;
 }
diff --git a/chart2/source/view/main/VLineProperties.cxx b/chart2/source/view/main/VLineProperties.cxx
index 128ea8a82cfe..003659610a96 100644
--- a/chart2/source/view/main/VLineProperties.cxx
+++ b/chart2/source/view/main/VLineProperties.cxx
@@ -21,6 +21,7 @@
 #include <com/sun/star/drawing/LineStyle.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 
 namespace chart
 {
@@ -48,9 +49,9 @@ void VLineProperties::initFromPropertySet( const uno::Reference< beans::XPropert
             Width = xProp->getPropertyValue( "LineWidth" );
             DashName = xProp->getPropertyValue( "LineDashName" );
         }
-        catch( const uno::Exception& e )
+        catch( const uno::Exception& )
         {
-            SAL_WARN("chart2", "Exception caught. " << e );
+            TOOLS_WARN_EXCEPTION("chart2", "" );
         }
     }
     else
diff --git a/chart2/source/view/main/VTitle.cxx b/chart2/source/view/main/VTitle.cxx
index 4d7077c6de31..d0633263f8af 100644
--- a/chart2/source/view/main/VTitle.cxx
+++ b/chart2/source/view/main/VTitle.cxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/drawing/XShape.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 
 namespace chart
 {
@@ -91,9 +92,9 @@ void VTitle::changePosition( const awt::Point& rPos )
         aM.translate( m_nXPos, m_nYPos);
         xShapeProp->setPropertyValue( "Transformation", uno::Any( B2DHomMatrixToHomogenMatrix3(aM) ) );
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 }
 
@@ -119,9 +120,9 @@ void VTitle::createShapes(
         xTitleProperties->getPropertyValue( "TextRotation" ) >>= fAngleDegree;
         m_fRotationAngleDegree += fAngleDegree;
     }
-    catch( const uno::Exception& e )
+    catch( const uno::Exception& )
     {
-        SAL_WARN("chart2", "Exception caught. " << e );
+        TOOLS_WARN_EXCEPTION("chart2", "" );
     }
 
     ShapeFactory* pShapeFactory = ShapeFactory::getOrCreateShapeFactory(m_xShapeFactory);


More information about the Libreoffice-commits mailing list