diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-18 09:32:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-18 11:33:03 +0200 |
commit | 399edcb0bca8e1cfc55ca68237cdb470bcc54932 (patch) | |
tree | e836d1094bb43291549b6a7ba3915ed2ef98beab /sw/source/filter | |
parent | 7d9ff70206dbd75a7751515b642fbbbc8878c159 (diff) |
loplugin:logexceptionnicely in sw
Change-Id: I92c84f5c869e5ccab344f7e3591d68a90a20eefa
Reviewed-on: https://gerrit.libreoffice.org/74243
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter')
-rw-r--r-- | sw/source/filter/docx/swdocxreader.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/html/htmlplug.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/rtf/swparrtf.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/writer/writer.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxexport.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8toolbar.cxx | 5 |
6 files changed, 18 insertions, 12 deletions
diff --git a/sw/source/filter/docx/swdocxreader.cxx b/sw/source/filter/docx/swdocxreader.cxx index 4705bc84551a..ea3a2a1065d6 100644 --- a/sw/source/filter/docx/swdocxreader.cxx +++ b/sw/source/filter/docx/swdocxreader.cxx @@ -40,6 +40,8 @@ #include <unotextrange.hxx> #include <sfx2/docfile.hxx> #include <sal/log.hxx> +#include <tools/diagnose_ex.h> + #define AUTOTEXT_GALLERY "autoTxt" using namespace css; @@ -90,9 +92,9 @@ ErrCode SwDOCXReader::Read(SwDoc& rDoc, const OUString& /* rBaseURL */, SwPaM& r { xFilter->filter(aDescriptor); } - catch (uno::Exception const& e) + catch (uno::Exception const&) { - SAL_WARN("sw.docx", "SwDOCXReader::Read(): " << e); + TOOLS_WARN_EXCEPTION("sw.docx", "SwDOCXReader::Read()"); ret = ERR_SWG_READ_ERROR; } pDocShell->SetLoading(SfxLoadedFlags::ALL); diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index ca1eeb9b9ce5..f6a60aff7962 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -35,6 +35,7 @@ #include <svtools/htmlout.hxx> #include <svtools/htmlkywd.hxx> #include <svtools/htmltokn.h> +#include <tools/diagnose_ex.h> #include <SwAppletImpl.hxx> #include <fmtornt.hxx> #include <fmtfsize.hxx> @@ -1571,9 +1572,9 @@ Writer& OutHTML_FrameFormatOLENodeGrf( Writer& rWrt, const SwFrameFormat& rFrame { // Even the native data may be missing. xInStream = xStorage->openStreamElement(aStreamName, embed::ElementModes::READ); - } catch (const uno::Exception& rException) + } catch (const uno::Exception&) { - SAL_WARN("sw.html", "OutHTML_FrameFormatOLENodeGrf: failed to open stream element: " << rException); + TOOLS_WARN_EXCEPTION("sw.html", "OutHTML_FrameFormatOLENodeGrf: failed to open stream element"); } if (xInStream.is()) { diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index e987b4488567..bd333ea0d565 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -32,6 +32,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/propertysequence.hxx> #include <sal/log.hxx> +#include <tools/diagnose_ex.h> #include <com/sun/star/document/XFilter.hpp> #include <com/sun/star/document/XImporter.hpp> @@ -99,9 +100,9 @@ ErrCode SwRTFReader::Read(SwDoc& rDoc, const OUString& /*rBaseURL*/, SwPaM& rPam { xFilter->filter(aDescriptor); } - catch (uno::Exception const& e) + catch (uno::Exception const&) { - SAL_WARN("sw.rtf", "SwRTFReader::Read(): " << e); + TOOLS_WARN_EXCEPTION("sw.rtf", "SwRTFReader::Read()"); ret = ERR_SWG_READ_ERROR; } diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index aa5c9eab397c..be4fbe67571a 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -24,6 +24,7 @@ #include <sfx2/docfile.hxx> #include <svl/urihelper.hxx> #include <vcl/graphicfilter.hxx> +#include <tools/diagnose_ex.h> #include <editeng/fontitem.hxx> #include <editeng/eeitem.hxx> #include <sal/log.hxx> @@ -251,9 +252,9 @@ ErrCode Writer::Write( SwPaM& rPaM, SvStream& rStrm, const OUString* pFName ) if ( nResult == ERRCODE_NONE ) aRef->Commit(); } - catch (const css::ucb::ContentCreationException &e) + catch (const css::ucb::ContentCreationException &) { - SAL_WARN("sw", "Writer::Write caught " << e); + TOOLS_WARN_EXCEPTION("sw", "Writer::Write caught"); } return nResult; } diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 6d6dd78ad1c9..f11c4cbdd82f 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -430,9 +430,9 @@ OString DocxExport::WriteOLEObject(SwOLEObj& rObject, OUString & io_rProgID) { ::comphelper::OStorageHelper::CopyInputToOutput(xInStream, xOutStream); } - catch (uno::Exception const& e) + catch (uno::Exception const&) { - SAL_WARN("sw.ww8", "DocxExport::WriteOLEObject: " << e); + TOOLS_WARN_EXCEPTION("sw.ww8", "DocxExport::WriteOLEObject"); return OString(); } diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx index 1724d2e5bb07..c03777bbbdf8 100644 --- a/sw/source/filter/ww8/ww8toolbar.cxx +++ b/sw/source/filter/ww8/ww8toolbar.cxx @@ -20,6 +20,7 @@ #include <fstream> #include <comphelper/processfactory.hxx> #include <comphelper/sequence.hxx> +#include <tools/diagnose_ex.h> #include <unotools/configmgr.hxx> #include <vcl/graph.hxx> #include <map> @@ -458,9 +459,9 @@ bool SwCTB::ImportCustomToolBar( SwCTBWrapper& rWrapper, CustomToolBarImportHelp #endif bRes = true; } - catch( const uno::Exception& e ) + catch( const uno::Exception& ) { - SAL_INFO("sw.ww8","***** For some reason we have an " << e ); + TOOLS_INFO_EXCEPTION("sw.ww8","***** For some reason we have an" ); bRes = false; } return bRes; |