diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-19 15:43:36 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-19 21:53:06 +0100 |
commit | 7df7545fc9ac4aa55403998b2d65e1b147a9f037 (patch) | |
tree | dfb7d9671ea79e9995501417fd585df413d0a916 | |
parent | afe4dfe1d60b81ff673f0859c8c79c19ef26356c (diff) |
coverity#1430074 Uncaught exception
and
coverity#1430066 Uncaught exception
coverity#1430095 Uncaught exception
Change-Id: Idca2e12d3911e3ea768a2a9fb8e7f3b03a2c887f
Reviewed-on: https://gerrit.libreoffice.org/51567
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sfx2/source/dialog/alienwarn.cxx | 16 | ||||
-rw-r--r-- | svx/source/dialog/linkwarn.cxx | 16 | ||||
-rw-r--r-- | sw/source/ui/table/tautofmt.cxx | 10 |
3 files changed, 30 insertions, 12 deletions
diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx index d5b45ba091a6..d3ffe5c13c8d 100644 --- a/sfx2/source/dialog/alienwarn.cxx +++ b/sfx2/source/dialog/alienwarn.cxx @@ -63,11 +63,17 @@ SfxAlienWarningDialog::SfxAlienWarningDialog(weld::Window* pParent, const OUStri SfxAlienWarningDialog::~SfxAlienWarningDialog() { - // save value of "warning off" checkbox, if necessary - SvtSaveOptions aSaveOpt; - bool bChecked = m_xWarningOnBox->get_active(); - if (aSaveOpt.IsWarnAlienFormat() != bChecked) - aSaveOpt.SetWarnAlienFormat(bChecked); + try + { + // save value of "warning off" checkbox, if necessary + SvtSaveOptions aSaveOpt; + bool bChecked = m_xWarningOnBox->get_active(); + if (aSaveOpt.IsWarnAlienFormat() != bChecked) + aSaveOpt.SetWarnAlienFormat(bChecked); + } + catch (...) + { + } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/linkwarn.cxx b/svx/source/dialog/linkwarn.cxx index 2dcf5be18747..8d7c23d08e20 100644 --- a/svx/source/dialog/linkwarn.cxx +++ b/svx/source/dialog/linkwarn.cxx @@ -42,11 +42,17 @@ SvxLinkWarningDialog::SvxLinkWarningDialog(weld::Widget* pParent, const OUString SvxLinkWarningDialog::~SvxLinkWarningDialog() { - // save value of "warning off" checkbox, if necessary - SvtMiscOptions aMiscOpt; - bool bChecked = m_xWarningOnBox->get_active(); - if (aMiscOpt.ShowLinkWarningDialog() != bChecked) - aMiscOpt.SetShowLinkWarningDialog(bChecked); + try + { + // save value of "warning off" checkbox, if necessary + SvtMiscOptions aMiscOpt; + bool bChecked = m_xWarningOnBox->get_active(); + if (aMiscOpt.ShowLinkWarningDialog() != bChecked) + aMiscOpt.SetShowLinkWarningDialog(bChecked); + } + catch (...) + { + } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 37deeb341cfc..a66761b483d4 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -93,8 +93,14 @@ SwAutoFormatDlg::SwAutoFormatDlg(weld::Window* pParent, SwWrtShell* pWrtShell, SwAutoFormatDlg::~SwAutoFormatDlg() { - if (m_bCoreDataChanged) - m_xTableTable->Save(); + try + { + if (m_bCoreDataChanged) + m_xTableTable->Save(); + } + catch (...) + { + } m_xTableTable.reset(); } |