summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-06-14 15:29:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-06-15 12:24:53 +0200
commit4466466a5c57a0d19ad8559ac699cf073f7e3e97 (patch)
treedba94658e41dcad542edd2f3f36a7ae8c0744eb1 /cui
parent5195c5bcd8be5f3b183659ead272cd86b8774cc1 (diff)
loplugin:logexceptionnicely in cui
Change-Id: I0a3186b7f6d28725aff0e73d8f2cc4d5bc259a92 Reviewed-on: https://gerrit.libreoffice.org/74044 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/SvxToolbarConfigPage.cxx12
-rw-r--r--cui/source/customize/cfg.cxx8
-rw-r--r--cui/source/customize/cfgutil.cxx5
-rw-r--r--cui/source/dialogs/linkdlg.cxx5
-rw-r--r--cui/source/dialogs/scriptdlg.cxx4
-rw-r--r--cui/source/options/certpath.cxx13
-rw-r--r--cui/source/options/optaboutconfig.cxx5
-rw-r--r--cui/source/options/optgdlg.cxx9
-rw-r--r--cui/source/options/optinet2.cxx5
-rw-r--r--cui/source/options/optjava.cxx4
-rw-r--r--cui/source/options/optpath.cxx4
-rw-r--r--cui/source/options/tsaurls.cxx5
12 files changed, 43 insertions, 36 deletions
diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx
index fde5b58dd58b..b49e349ba245 100644
--- a/cui/source/customize/SvxToolbarConfigPage.cxx
+++ b/cui/source/customize/SvxToolbarConfigPage.cxx
@@ -628,9 +628,9 @@ IMPL_LINK(SvxToolbarConfigPage, ModifyItemHdl, const OString&, rIdent, void)
GetSaveInData()->PersistChanges(
GetSaveInData()->GetImageManager() );
}
- catch ( css::uno::Exception& e)
+ catch ( const css::uno::Exception&)
{
- SAL_WARN("cui.customize", "Error replacing image: " << e);
+ TOOLS_WARN_EXCEPTION("cui.customize", "Error replacing image");
}
}
}
@@ -672,9 +672,9 @@ IMPL_LINK(SvxToolbarConfigPage, ModifyItemHdl, const OString&, rIdent, void)
GetSaveInData()->PersistChanges(
GetSaveInData()->GetImageManager() );
}
- catch ( css::uno::Exception& e )
+ catch ( const css::uno::Exception& )
{
- SAL_WARN("cui.customize", "Error resetting image: " << e);
+ TOOLS_WARN_EXCEPTION("cui.customize", "Error resetting image");
}
}
else if (rIdent == "restoreItem")
@@ -724,9 +724,9 @@ IMPL_LINK(SvxToolbarConfigPage, ModifyItemHdl, const OString&, rIdent, void)
bNeedsApply = true;
}
- catch ( css::uno::Exception& e )
+ catch ( const css::uno::Exception& )
{
- SAL_WARN("cui.customize", "Error restoring image: " << e);
+ TOOLS_WARN_EXCEPTION("cui.customize", "Error restoring image");
}
}
else
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index d89aaa99acec..d9f3b6dca4c0 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -900,9 +900,9 @@ void ContextMenuSaveInData::Reset()
{
GetConfigManager()->removeSettings( pEntry->GetCommand() );
}
- catch ( const css::uno::Exception& e )
+ catch ( const css::uno::Exception& )
{
- SAL_WARN("cui.customize", "Exception caught while resetting context menus: " << e);
+ TOOLS_WARN_EXCEPTION("cui.customize", "Exception caught while resetting context menus");
}
}
PersistChanges( GetConfigManager() );
@@ -915,9 +915,9 @@ void ContextMenuSaveInData::ResetContextMenu( const SvxConfigEntry* pEntry )
{
GetConfigManager()->removeSettings( pEntry->GetCommand() );
}
- catch ( const css::uno::Exception& e )
+ catch ( const css::uno::Exception& )
{
- SAL_WARN("cui.customize", "Exception caught while resetting context menu: " << e);
+ TOOLS_WARN_EXCEPTION("cui.customize", "Exception caught while resetting context menu");
}
PersistChanges( GetConfigManager() );
m_pRootEntry.reset();
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index c081a5e83394..7a58aa96ab77 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -58,6 +58,7 @@
#include <unotools/configmgr.hxx>
#include <dialmgr.hxx>
#include <svl/stritem.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/commandinfoprovider.hxx>
#include <vcl/help.hxx>
#include <vcl/svapp.hxx>
@@ -649,9 +650,9 @@ void CuiConfigGroupListBox::Init(const css::uno::Reference< css::uno::XComponent
Reference< browse::XBrowseNodeFactory > xFac = browse::theBrowseNodeFactory::get( m_xContext );
rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) );
}
- catch( Exception& e )
+ catch( const Exception& )
{
- SAL_INFO("cui.customize", "Caught some exception whilst retrieving browse nodes from factory... Exception: " << e);
+ TOOLS_WARN_EXCEPTION("cui.customize", "Caught some exception whilst retrieving browse nodes from factory");
// TODO exception handling
}
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 0141f908c38d..238156007a7e 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -21,6 +21,7 @@
#include <sal/log.hxx>
#include <vcl/svapp.hxx>
+#include <tools/diagnose_ex.h>
#include <tools/debug.hxx>
#include <tools/urlobj.hxx>
#include <vcl/idle.hxx>
@@ -333,9 +334,9 @@ IMPL_LINK_NOARG(SvBaseLinksDlg, ChangeSourceClickHdl, weld::Button&, void)
SetManager( pNewMgr );
}
}
- catch (uno::Exception & e)
+ catch (const uno::Exception &)
{
- SAL_WARN("cui.dialogs", "SvBaseLinksDlg: " << e);
+ TOOLS_WARN_EXCEPTION("cui.dialogs", "SvBaseLinksDlg");
}
}
else
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 75e89daf48ec..564dc5920466 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -150,9 +150,9 @@ void SvxScriptOrgDialog::Init( const OUString& language )
children = rootNode->getChildNodes();
}
}
- catch( Exception& e )
+ catch( const Exception& )
{
- SAL_WARN("cui.dialogs", "Exception getting root browse node from factory: " << e );
+ TOOLS_WARN_EXCEPTION("cui.dialogs", "Exception getting root browse node from factory");
// TODO exception handling
}
diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx
index 316639f29460..9e3406d07016 100644
--- a/cui/source/options/certpath.cxx
+++ b/cui/source/options/certpath.cxx
@@ -12,6 +12,7 @@
#include <osl/security.hxx>
#include <osl/thread.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <unotools/securityoptions.hxx>
#include "certpath.hxx"
@@ -91,9 +92,9 @@ CertPathDialog::CertPathDialog(weld::Window* pParent)
if (!sUserSetCertPath.isEmpty())
AddCertPath(m_sManual, sUserSetCertPath);
}
- catch (const uno::Exception &e)
+ catch (const uno::Exception &)
{
- SAL_WARN("cui.options", "CertPathDialog::CertPathDialog(): " << e);
+ TOOLS_WARN_EXCEPTION("cui.options", "CertPathDialog::CertPathDialog()");
}
const char* pEnv = getenv("MOZILLA_CERTIFICATE_FOLDER");
@@ -117,9 +118,9 @@ IMPL_LINK_NOARG(CertPathDialog, OKHdl_Impl, weld::Button&, void)
getDirectory(), batch);
batch->commit();
}
- catch (const uno::Exception &e)
+ catch (const uno::Exception &)
{
- SAL_WARN("cui.options", "CertPathDialog::OKHdl_Impl(): " << e);
+ TOOLS_WARN_EXCEPTION("cui.options", "CertPathDialog::OKHdl_Impl()");
}
m_xDialog->response(RET_OK);
@@ -200,9 +201,9 @@ IMPL_LINK_NOARG(CertPathDialog, AddHdl_Impl, weld::Button&, void)
AddCertPath(m_sManual, aPath);
}
}
- catch (uno::Exception & e)
+ catch (const uno::Exception &)
{
- SAL_WARN("cui.options", e);
+ TOOLS_WARN_EXCEPTION("cui.options", "");
}
}
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index b7a02eff8287..b1d156aab5c7 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/util/SearchAlgorithms2.hpp>
#include <unotools/textsearch.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <memory>
#include <vector>
@@ -264,9 +265,9 @@ void CuiAboutConfigTabPage::FillItems(const Reference< XNameAccess >& xNameAcces
xNextNameAccess.set(aNode, uno::UNO_QUERY);
bNotLeaf = xNextNameAccess.is();
}
- catch (const RuntimeException& e)
+ catch (const RuntimeException&)
{
- SAL_WARN( "cui.options", "CuiAboutConfigTabPage: " << e);
+ TOOLS_WARN_EXCEPTION( "cui.options", "CuiAboutConfigTabPage");
}
if (bNotLeaf)
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 46bd0996cca1..1ff24bd88405 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -67,6 +67,7 @@
#include <officecfg/Office/Common.hxx>
#include <officecfg/Setup.hxx>
#include <comphelper/configuration.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -1218,11 +1219,11 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(vcl::Window* pParent, const SfxItemSet&
}
}
- catch (const Exception &e)
+ catch (const Exception &)
{
// we'll just leave the box in its default setting and won't
// even give it event handler...
- SAL_WARN("cui.options", "ignoring " << e);
+ TOOLS_WARN_EXCEPTION("cui.options", "ignoring" );
}
m_pWesternLanguageLB->SetLanguageList( SvxLanguageListFlags::WESTERN | SvxLanguageListFlags::ONLY_KNOWN, true, true );
@@ -1398,11 +1399,11 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet )
css::office::Quickstart::createAndSetVeto(xContext, false, false, false/*DisableVeto*/);
}
}
- catch (const Exception& e)
+ catch (const Exception&)
{
// we'll just leave the box in its default setting and won't
// even give it event handler...
- SAL_WARN("cui.options", "ignoring Exception \"" << e << "\"");
+ TOOLS_WARN_EXCEPTION("cui.options", "ignoring");
}
LanguageTag aLanguageTag( pLangConfig->aSysLocaleOptions.GetLanguageTag());
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 9353b990e847..e4a16a298cf6 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -48,6 +48,7 @@
#include <unotools/securityoptions.hxx>
#include <unotools/extendedsecurityoptions.hxx>
#include <com/sun/star/uno/Sequence.hxx>
+#include <tools/diagnose_ex.h>
#include <dialmgr.hxx>
#include "optinet2.hxx"
@@ -825,9 +826,9 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, MacroSecPBHdl, Button*, void)
xD->setParentWindow(VCLUnoHelper::GetInterface(GetParentDialog()));
xD->manageTrustedSources();
}
- catch (const Exception& e)
+ catch (const Exception&)
{
- SAL_WARN( "cui.options", e);
+ TOOLS_WARN_EXCEPTION( "cui.options", "");
}
}
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 4c2a9d1f2c8c..4383aed75f31 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -254,9 +254,9 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, AddHdl_Impl, Button*, void)
else if ( xFolderPicker.is() && xFolderPicker->execute() == ExecutableDialogResults::OK )
AddFolder( xFolderPicker->getDirectory() );
}
- catch (const Exception& e)
+ catch (const Exception&)
{
- SAL_WARN( "cui.options", "SvxJavaOptionsPage::AddHdl_Impl(): " << e);
+ TOOLS_WARN_EXCEPTION( "cui.options", "SvxJavaOptionsPage::AddHdl_Impl()");
}
}
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 4e53c34fdb3a..1543e1c964b9 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -816,9 +816,9 @@ void SvxPathTabPage::SetPathList(
pImpl->m_xPathSettings->setPropertyValue(
sCfgName + POSTFIX_WRITABLE, aValue);
}
- catch( const Exception& e )
+ catch( const Exception& )
{
- SAL_WARN("cui.options", "caught: " << e);
+ TOOLS_WARN_EXCEPTION("cui.options", "");
}
}
diff --git a/cui/source/options/tsaurls.cxx b/cui/source/options/tsaurls.cxx
index 7b91900d97bd..1cb21dab8eae 100644
--- a/cui/source/options/tsaurls.cxx
+++ b/cui/source/options/tsaurls.cxx
@@ -11,6 +11,7 @@
#include <svx/svxdlg.hxx>
#include <comphelper/sequence.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/fixed.hxx>
#include "tsaurls.hxx"
@@ -48,9 +49,9 @@ TSAURLsDialog::TSAURLsDialog(weld::Window* pParent)
}
}
}
- catch (const uno::Exception &e)
+ catch (const uno::Exception &)
{
- SAL_WARN("cui.options", "TSAURLsDialog::TSAURLsDialog(): " << e);
+ TOOLS_WARN_EXCEPTION("cui.options", "TSAURLsDialog::TSAURLsDialog()");
}
if (m_xURLListBox->get_selected_index() == -1)