summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-06-23 09:26:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-06-23 10:55:49 +0100
commitf489bbfd954e359d611b29a2824018b8e9575519 (patch)
treea3459f193ce6bcdc2931c2cd1b790261695cf59d /cui/source
parent493450087c6de7692478af6823841a119adf221d (diff)
silence some unique_ptr warnings
Change-Id: Ibf3a8d00e8b91be79117d9c060b4cb2a7bafe651
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/options/optgdlg.cxx22
1 files changed, 14 insertions, 8 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index b21e1c839f4b..2f798cc5cf25 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -120,7 +120,7 @@ private:
public:
OpenGLCfg();
- ~OpenGLCfg() COVERITY_NOEXCEPT_FALSE;
+ ~OpenGLCfg();
bool useOpenGL() const;
bool forceOpenGL() const;
@@ -144,16 +144,22 @@ void OpenGLCfg::reset()
mbModified = false;
}
-OpenGLCfg::~OpenGLCfg() COVERITY_NOEXCEPT_FALSE
+OpenGLCfg::~OpenGLCfg()
{
if (mbModified)
{
- std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
- if (!officecfg::Office::Common::VCL::UseOpenGL::isReadOnly())
- officecfg::Office::Common::VCL::UseOpenGL::set(mbUseOpenGL, batch);
- if (!officecfg::Office::Common::VCL::ForceOpenGL::isReadOnly())
- officecfg::Office::Common::VCL::ForceOpenGL::set(mbForceOpenGL, batch);
- batch->commit();
+ try
+ {
+ std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
+ if (!officecfg::Office::Common::VCL::UseOpenGL::isReadOnly())
+ officecfg::Office::Common::VCL::UseOpenGL::set(mbUseOpenGL, batch);
+ if (!officecfg::Office::Common::VCL::ForceOpenGL::isReadOnly())
+ officecfg::Office::Common::VCL::ForceOpenGL::set(mbForceOpenGL, batch);
+ batch->commit();
+ }
+ catch (...)
+ {
+ }
}
}