summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-06-18 15:38:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-06-18 20:03:42 +0200
commit2836b78b54650d117282a9a345677d1b4d9fc043 (patch)
tree7627772f88f8d6f1b56f4f4db2675ae8772638f6
parent697f8edbb0154ed72a42e4e8d7c4942cfe7dd59d (diff)
loplugin:logexceptionnicely in xmlhelp..xmlsecurity
Change-Id: Idbf0de3f953b08f98144241346533ad30f49269e Reviewed-on: https://gerrit.libreoffice.org/74285 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--xmlhelp/Library_ucpchelp1.mk1
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx5
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx9
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx40
-rw-r--r--xmloff/source/chart/SchXMLImport.cxx4
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx18
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx16
-rw-r--r--xmloff/source/chart/SchXMLSeriesHelper.cxx8
-rw-r--r--xmloff/source/core/DocumentSettingsContext.cxx7
-rw-r--r--xmloff/source/draw/animationexport.cxx5
-rw-r--r--xmloff/source/draw/shapeexport.cxx4
-rw-r--r--xmloff/source/style/XMLFontAutoStylePool.cxx5
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx11
-rw-r--r--xmloff/source/text/txtparai.cxx5
-rw-r--r--xmlsecurity/source/helper/documentsignaturehelper.cxx5
-rw-r--r--xmlsecurity/source/xmlsec/nss/nssinitializer.cxx5
-rw-r--r--xmlsecurity/workben/pdfverify.cxx13
17 files changed, 87 insertions, 74 deletions
diff --git a/xmlhelp/Library_ucpchelp1.mk b/xmlhelp/Library_ucpchelp1.mk
index e12aabf96326..b76e0eb67c23 100644
--- a/xmlhelp/Library_ucpchelp1.mk
+++ b/xmlhelp/Library_ucpchelp1.mk
@@ -36,6 +36,7 @@ $(eval $(call gb_Library_use_libraries,ucpchelp1,\
cppuhelper \
helplinker \
sal \
+ tl \
ucbhelper \
utl \
i18nlangtag \
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
index ac464c6d02c3..d599a217446d 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/lang/Locale.hpp>
#include <helpcompiler/HelpSearch.hxx>
+#include <tools/diagnose_ex.h>
#if defined(__GNUC__)
# pragma GCC visibility push (default)
@@ -234,9 +235,9 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte
aIndexFolderResultVectorVector.push_back( std::move(aIndexFolderResultVector) );
}
- catch (const Exception &e)
+ catch (const Exception &)
{
- SAL_WARN("xmlhelp", e);
+ TOOLS_WARN_EXCEPTION("xmlhelp", "");
}
if( bTemporary )
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index 6cc3a29a7828..df143274ac32 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -27,6 +27,7 @@
#include "SchXMLTools.hxx"
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <unotools/mediadescriptor.hxx>
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmlement.hxx>
@@ -165,9 +166,9 @@ void lcl_removeEmptyChartTypeGroups( const uno::Reference< chart2::XChartDocumen
}
}
}
- catch(const uno::Exception& ex)
+ catch(const uno::Exception&)
{
- SAL_INFO("xmloff.chart", "Exception caught while removing empty chart types: " << ex);
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "Exception caught while removing empty chart types");
}
}
@@ -301,9 +302,9 @@ static void lcl_setDataProvider(uno::Reference<chart2::XChartDocument> const & x
xChartDoc->createInternalDataProvider(false);
}
}
- catch (const uno::Exception & rEx)
+ catch (const uno::Exception &)
{
- SAL_INFO("xmloff.chart", "SchXMLChartContext::StartElement(): Exception caught: " << rEx);
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "SchXMLChartContext::StartElement()");
}
}
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index b1785d5330f4..46214498958b 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -853,9 +853,9 @@ lcl_TableData lcl_getDataForLocalTable(
rTarget[i] <<= rSource[i];
}
}
- catch( const uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- SAL_INFO("xmloff.chart", "something went wrong during table data collection: " << rEx);
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "something went wrong during table data collection");
}
return aResult;
@@ -899,9 +899,9 @@ void lcl_exportNumberFormat( const OUString& rPropertyName, const Reference< bea
}
}
}
- catch( const uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- SAL_INFO("xmloff.chart", "chart:exporting error bar ranges: " << rEx );
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "chart:exporting error bar ranges" );
}
}
@@ -1433,9 +1433,9 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >
Any aShapesAny = xDocPropSet->getPropertyValue("AdditionalShapes");
aShapesAny >>= mxAdditionalShapes;
}
- catch( const uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- SAL_INFO("xmloff.chart", "AdditionalShapes not found: " << rEx );
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "AdditionalShapes not found" );
}
if( mxAdditionalShapes.is())
@@ -1882,9 +1882,9 @@ void SchXMLExportHelper_Impl::exportPlotArea(
rShapeExport->export3DSceneAttributes( xPropSet );
}
}
- catch( const uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- SAL_INFO("xmloff.chart", "chart:exportPlotAreaException caught: " << rEx);
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "chart:exportPlotAreaException caught");
}
}
@@ -2571,9 +2571,9 @@ void SchXMLExportHelper_Impl::exportSeries(
xPropSet = SchXMLSeriesHelper::createOldAPISeriesPropertySet(
aSeriesSeq[nSeriesIdx], mrExport.GetModel() );
}
- catch( const uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- SAL_INFO("xmloff.chart", "Series not found or no XPropertySet: " << rEx );
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "Series not found or no XPropertySet" );
continue;
}
if( xPropSet.is())
@@ -2587,9 +2587,9 @@ void SchXMLExportHelper_Impl::exportSeries(
aAny = xPropSet->getPropertyValue( "MeanValue" );
aAny >>= bHasMeanValueLine;
}
- catch( const beans::UnknownPropertyException & rEx )
+ catch( const beans::UnknownPropertyException & )
{
- SAL_INFO("xmloff.chart", "Required property not found in DataRowProperties: " << rEx );
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "Required property not found in DataRowProperties" );
}
const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
@@ -2756,9 +2756,9 @@ void SchXMLExportHelper_Impl::exportSeries(
Any aPropAny( xPropSet->getPropertyValue( "DataMeanValueProperties" ));
aPropAny >>= xStatProp;
}
- catch( const uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- SAL_INFO("xmloff.chart", "Exception caught during Export of series - optional DataMeanValueProperties not available: " << rEx );
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "Exception caught during Export of series - optional DataMeanValueProperties not available" );
}
if( xStatProp.is() )
@@ -2994,9 +2994,9 @@ void SchXMLExportHelper_Impl::exportErrorBar( const Reference<beans::XPropertySe
aAny >>= nErrorBarStyle;
}
}
- catch( const beans::UnknownPropertyException & rEx )
+ catch( const beans::UnknownPropertyException & )
{
- SAL_INFO("xmloff.chart", "Required property not found in DataRowProperties: " << rEx );
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "Required property not found in DataRowProperties" );
}
if( nErrorBarStyle != chart::ErrorBarStyle::NONE && (bNegative || bPositive))
@@ -3213,9 +3213,9 @@ void SchXMLExportHelper_Impl::exportDataPoints(
xSeries, nElement, mrExport.GetModel() );
bExportNumFmt = true;
}
- catch( const uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- SAL_INFO("xmloff.chart", "Exception caught during Export of data point: " << rEx );
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "Exception caught during Export of data point" );
}
}
else
@@ -3281,9 +3281,9 @@ void SchXMLExportHelper_Impl::exportDataPoints(
xPropSet = SchXMLSeriesHelper::createOldAPIDataPointPropertySet(
xSeries, nCurrIndex, mrExport.GetModel() );
}
- catch( const uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- SAL_INFO("xmloff.chart", "Exception caught during Export of data point: " << rEx );
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "Exception caught during Export of data point" );
}
if( xPropSet.is())
{
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx
index 5d9507cf0a92..a571ecc636a1 100644
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -611,9 +611,9 @@ void SAL_CALL SchXMLImport::setTargetDocument(const uno::Reference<lang::XCompon
}
}
}
- catch (const uno::Exception & rEx)
+ catch (const uno::Exception &)
{
- SAL_INFO("xmloff.chart", "SchXMLChartContext::StartElement(): Exception caught: " << rEx);
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "SchXMLChartContext::StartElement(): Exception caught");
}
}
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index 46fee917baf1..1cf2785030a1 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -28,6 +28,7 @@
#include <comphelper/processfactory.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmlement.hxx>
#include <xmloff/nmspmap.hxx>
@@ -116,9 +117,10 @@ void SchXML3DSceneAttributesHelper::getCameraDefaultFromDiagram( const uno::Refe
maVUP.setZ( aCamGeo.vup.DirectionZ );
}
}
- catch( const uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- SAL_INFO("xmloff.chart", "Exception caught for property NumberOfLines: " << rEx);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_INFO("xmloff.chart", "Exception caught for property NumberOfLines: " << exceptionToString(ex));
}
}
@@ -382,9 +384,9 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri
xProp->getPropertyValue("NumberOfLines") >>= mnNumOfLinesProp;
xProp->getPropertyValue("Volume") >>= mbStockHasVolume;
}
- catch( const uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- SAL_INFO("xmloff.chart", "PlotAreaContext:EndElement(): Exception caught: " << rEx);
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "PlotAreaContext:EndElement(): Exception caught");
}
} // if
@@ -552,9 +554,9 @@ void SchXMLPlotAreaContext::EndElement()
xDiaProp->setPropertyValue("NumberOfLines",
uno::makeAny( mnNumOfLinesProp ));
}
- catch( const uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- SAL_INFO("xmloff.chart", "Exception caught for property NumberOfLines: " << rEx);
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "Exception caught for property NumberOfLines");
}
}
@@ -567,9 +569,9 @@ void SchXMLPlotAreaContext::EndElement()
xDiaProp->setPropertyValue("Volume",
uno::makeAny( true ));
}
- catch( const uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- SAL_INFO("xmloff.chart", "Exception caught for property Volume: " << rEx);
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "Exception caught for property Volume");
}
}
}
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index c7a37c78ac00..857e47435c5c 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -860,9 +860,9 @@ void SchXMLSeries2Context::setStylesToSeries( SeriesDefaultsAndStyles& rSeriesDe
}
}
}
- catch( const uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- SAL_INFO("xmloff.chart", "Exception caught during setting styles to series: " << rEx );
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "Exception caught during setting styles to series" );
}
}
}
@@ -926,9 +926,9 @@ void SchXMLSeries2Context::setStylesToRegressionCurves(
xRegCurveCont->addRegressionCurve( xRegCurve );
}
}
- catch( const uno::Exception& rEx )
+ catch( const uno::Exception& )
{
- SAL_INFO("xmloff.chart", "Exception caught during setting styles to series: " << rEx );
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "Exception caught during setting styles to series" );
}
}
@@ -995,9 +995,9 @@ void SchXMLSeries2Context::setStylesToStatisticsObjects( SeriesDefaultsAndStyles
}
}
}
- catch( const uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- SAL_INFO("xmloff.chart", "Exception caught during setting styles to series: " << rEx );
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "Exception caught during setting styles to series" );
}
}
}
@@ -1090,9 +1090,9 @@ void SchXMLSeries2Context::setStylesToDataPoints( SeriesDefaultsAndStyles& rSeri
lcl_resetSymbolSizeForPointsIfNecessary( xPointProp, rImport, pPropStyleContext, pStylesCtxt );
}
}
- catch( const uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- SAL_INFO("xmloff.chart", "Exception caught during setting styles to data points: " << rEx );
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "Exception caught during setting styles to data points" );
}
}
} // styles iterator
diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx
index 18d1dc93a65e..b206d10df4d8 100644
--- a/xmloff/source/chart/SchXMLSeriesHelper.cxx
+++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx
@@ -180,9 +180,9 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPISeriesProp
}
}
}
- catch( const uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- SAL_INFO("xmloff.chart", "Exception caught SchXMLSeriesHelper::createOldAPISeriesPropertySet: " << rEx );
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "Exception caught SchXMLSeriesHelper::createOldAPISeriesPropertySet" );
}
}
@@ -215,9 +215,9 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPIDataPointP
}
}
}
- catch( const uno::Exception & rEx )
+ catch( const uno::Exception & )
{
- SAL_INFO("xmloff.chart", "Exception caught SchXMLSeriesHelper::createOldAPIDataPointPropertySet: " << rEx );
+ TOOLS_INFO_EXCEPTION("xmloff.chart", "Exception caught SchXMLSeriesHelper::createOldAPIDataPointPropertySet" );
}
}
diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx
index ec3252251e3d..305d1d94853b 100644
--- a/xmloff/source/core/DocumentSettingsContext.cxx
+++ b/xmloff/source/core/DocumentSettingsContext.cxx
@@ -46,6 +46,7 @@
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <unotools/configmgr.hxx>
#include "xmlenums.hxx"
@@ -746,10 +747,10 @@ void XMLConfigItemMapIndexedContext::EndElement()
{
xForbChars->setForbiddenCharacters( aLocale, aForbid );
}
- catch (uno::Exception const& e)
+ catch (uno::Exception const&)
{
- SAL_WARN("xmloff.core",
- "Exception while importing forbidden characters: " << e);
+ TOOLS_WARN_EXCEPTION("xmloff.core",
+ "Exception while importing forbidden characters");
}
}
}
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index 8055e01515fe..a55f1e991685 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -56,6 +56,7 @@
#include <sax/tools/converter.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <xmloff/unointerfacetouniqueidentifiermapper.hxx>
#include "sdxmlexp_impl.hxx"
@@ -537,9 +538,9 @@ static OUString lcl_StoreMediaAndGetURL(SvXMLExport & rExport, OUString const& r
return urlPath;
}
- catch (uno::Exception const& e)
+ catch (uno::Exception const&)
{
- SAL_INFO("xmloff", "exception while storing embedded media: '" << e << "'");
+ TOOLS_INFO_EXCEPTION("xmloff", "exception while storing embedded media");
}
return OUString();
}
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index d798a8a382a7..89a40effd932 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -3227,9 +3227,9 @@ lcl_StoreMediaAndGetURL(SvXMLExport & rExport,
return urlPath;
}
- catch (uno::Exception const& e)
+ catch (uno::Exception const&)
{
- SAL_INFO("xmloff", "exception while storing embedded media: " << e);
+ TOOLS_INFO_EXCEPTION("xmloff", "exception while storing embedded media");
}
return OUString();
}
diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx
index 407f1ae8ecc6..d16997977f10 100644
--- a/xmloff/source/style/XMLFontAutoStylePool.cxx
+++ b/xmloff/source/style/XMLFontAutoStylePool.cxx
@@ -28,6 +28,7 @@
#include <vcl/embeddedfontshelper.hxx>
#include <osl/file.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
@@ -649,9 +650,9 @@ OUString XMLFontAutoStylePool::embedFontFile(OUString const & fileUrl, OUString
return sInternalName;
}
}
- } catch( const Exception& e )
+ } catch( const Exception& )
{
- SAL_WARN( "xmloff", "Exception when embedding a font file:" << e );
+ TOOLS_WARN_EXCEPTION( "xmloff", "Exception when embedding a font file" );
}
return OUString();
}
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index d317ee2808b5..4a7360abe482 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -19,6 +19,7 @@
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <comphelper/base64.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/text/TextContentAnchorType.hpp>
@@ -699,9 +700,9 @@ void XMLTextFrameContext_Impl::Create()
{
xTextImportHelper->InsertTextContent(xTxtCntnt);
}
- catch (lang::IllegalArgumentException const& e)
+ catch (lang::IllegalArgumentException const&)
{
- SAL_WARN("xmloff.text", "Cannot import part of the text - probably an image in the text frame? " << e);
+ TOOLS_WARN_EXCEPTION("xmloff.text", "Cannot import part of the text - probably an image in the text frame?");
return;
}
}
@@ -1294,10 +1295,10 @@ void XMLTextFrameContext_Impl::SetName()
{
xNamed->setName(m_sOrigName);
}
- catch (uno::Exception const& e)
+ catch (uno::Exception const&)
{ // fdo#71698 document contains 2 frames with same draw:name
- SAL_INFO("xmloff.text", "SetName(): exception setting \""
- << m_sOrigName << "\": " << e);
+ TOOLS_INFO_EXCEPTION("xmloff.text", "SetName(): exception setting \""
+ << m_sOrigName << "\"");
}
}
}
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 03ed99fecb5c..8676390dabe6 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -25,6 +25,7 @@
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/text/XTextFrame.hpp>
@@ -2077,9 +2078,9 @@ void XMLParaContext::EndElement()
xTxtImport->GetText()->insertTextContent(
xAttrCursor, xContent, true );
}
- catch (uno::RuntimeException const& e)
+ catch (uno::RuntimeException const&)
{
- SAL_INFO("xmloff.text", "could not insert index mark, presumably in editengine text " << e);
+ TOOLS_INFO_EXCEPTION("xmloff.text", "could not insert index mark, presumably in editengine text");
}
}
break;
diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx
index 66a058c1d3dd..37faa606c32f 100644
--- a/xmlsecurity/source/helper/documentsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx
@@ -39,6 +39,7 @@
#include <rtl/uri.hxx>
#include <sal/log.hxx>
#include <svx/xoutbmp.hxx>
+#include <tools/diagnose_ex.h>
#include <xmloff/attrlist.hxx>
#include <xsecctl.hxx>
@@ -379,9 +380,9 @@ SignatureStreamHelper DocumentSignatureHelper::OpenSignatureStream(
aHelper.xSignatureStorage = rxStore->openStorageElement("_xmlsignatures", nSubStorageOpenMode);
aHelper.nStorageFormat = embed::StorageFormats::OFOPXML;
}
- catch (const io::IOException& rException)
+ catch (const io::IOException&)
{
- SAL_WARN_IF(nOpenMode != css::embed::ElementModes::READ, "xmlsecurity.helper", "DocumentSignatureHelper::OpenSignatureStream: " << rException);
+ TOOLS_WARN_EXCEPTION_IF(nOpenMode != css::embed::ElementModes::READ, "xmlsecurity.helper", "DocumentSignatureHelper::OpenSignatureStream:");
}
}
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index d77e2d4a4fcb..4813d9cac10c 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -31,6 +31,7 @@
#include <osl/file.hxx>
#include <osl/thread.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <unotools/tempfile.hxx>
#include <salhelper/singletonref.hxx>
@@ -260,9 +261,9 @@ OString getMozillaCurrentProfile( const css::uno::Reference< css::uno::XComponen
return OUStringToOString(sUserSetCertPath, osl_getThreadTextEncoding());
}
}
- catch (const uno::Exception &e)
+ catch (const uno::Exception &)
{
- SAL_WARN("xmlsecurity.xmlsec", "getMozillaCurrentProfile: caught " << e);
+ TOOLS_WARN_EXCEPTION("xmlsecurity.xmlsec", "getMozillaCurrentProfile:");
}
// third, dig around to see if there's one available
diff --git a/xmlsecurity/workben/pdfverify.cxx b/xmlsecurity/workben/pdfverify.cxx
index efe0461b9f14..191ca8c087eb 100644
--- a/xmlsecurity/workben/pdfverify.cxx
+++ b/xmlsecurity/workben/pdfverify.cxx
@@ -18,6 +18,7 @@
#include <osl/file.hxx>
#include <sal/log.hxx>
#include <sal/main.h>
+#include <tools/diagnose_ex.h>
#include <vcl/pngwrite.hxx>
#include <vcl/svapp.hxx>
#include <vcl/graphicfilter.hxx>
@@ -67,10 +68,10 @@ int pdfVerify(int nArgc, char** pArgv)
{
xComponentContext = cppu::defaultBootstrap_InitialComponentContext();
}
- catch (const uno::RuntimeException& rException)
+ catch (const uno::RuntimeException&)
{
- SAL_WARN("xmlsecurity.pdfio",
- "cppu::defaultBootstrap_InitialComponentContext() failed: " << rException);
+ TOOLS_WARN_EXCEPTION("xmlsecurity.pdfio",
+ "cppu::defaultBootstrap_InitialComponentContext() failed:");
return 1;
}
uno::Reference<lang::XMultiComponentFactory> xMultiComponentFactory
@@ -92,10 +93,10 @@ int pdfVerify(int nArgc, char** pArgv)
{
xSEInitializer = xml::crypto::SEInitializer::create(xComponentContext);
}
- catch (const uno::DeploymentException& rException)
+ catch (const uno::DeploymentException&)
{
- SAL_WARN("xmlsecurity.pdfio",
- "DeploymentException while creating SEInitializer: " << rException);
+ TOOLS_WARN_EXCEPTION("xmlsecurity.pdfio",
+ "DeploymentException while creating SEInitializer:");
return 1;
}
uno::Reference<xml::crypto::XXMLSecurityContext> xSecurityContext