diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-28 10:33:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-29 08:51:48 +0200 |
commit | 1ffba0e356608fb6dbf568248e2a953b4d7fb5d6 (patch) | |
tree | 5da59640441292421f2137bc85ee7291daed137e /sdext | |
parent | ce9a41dc387966c74c1af92783a97565b5af3668 (diff) |
loplugin:flatten check for throw in then clause
also make the plugin ignore the case where we have var decl's in the
clause we want to flatten, which could lead to problematic extension of
variable lifetime
Change-Id: I3061f7104e8c6a460bf74f5eac325a516ec50c59
Reviewed-on: https://gerrit.libreoffice.org/42889
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/presenter/PresenterPaneFactory.cxx | 9 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterViewFactory.cxx | 15 |
2 files changed, 9 insertions, 15 deletions
diff --git a/sdext/source/presenter/PresenterPaneFactory.cxx b/sdext/source/presenter/PresenterPaneFactory.cxx index e9a5f950557e..94f6335cdd79 100644 --- a/sdext/source/presenter/PresenterPaneFactory.cxx +++ b/sdext/source/presenter/PresenterPaneFactory.cxx @@ -92,12 +92,9 @@ void PresenterPaneFactory::Register (const Reference<frame::XController>& rxCont { throw RuntimeException(); } - else - { - xCC->addResourceFactory( - "private:resource/pane/Presenter/*", - this); - } + xCC->addResourceFactory( + "private:resource/pane/Presenter/*", + this); } catch (RuntimeException&) { diff --git a/sdext/source/presenter/PresenterViewFactory.cxx b/sdext/source/presenter/PresenterViewFactory.cxx index c471da4d71ab..983a17996e6c 100644 --- a/sdext/source/presenter/PresenterViewFactory.cxx +++ b/sdext/source/presenter/PresenterViewFactory.cxx @@ -150,15 +150,12 @@ void PresenterViewFactory::Register (const Reference<frame::XController>& rxCont { throw RuntimeException(); } - else - { - mxConfigurationController->addResourceFactory(msCurrentSlidePreviewViewURL, this); - mxConfigurationController->addResourceFactory(msNextSlidePreviewViewURL, this); - mxConfigurationController->addResourceFactory(msNotesViewURL, this); - mxConfigurationController->addResourceFactory(msToolBarViewURL, this); - mxConfigurationController->addResourceFactory(msSlideSorterURL, this); - mxConfigurationController->addResourceFactory(msHelpViewURL, this); - } + mxConfigurationController->addResourceFactory(msCurrentSlidePreviewViewURL, this); + mxConfigurationController->addResourceFactory(msNextSlidePreviewViewURL, this); + mxConfigurationController->addResourceFactory(msNotesViewURL, this); + mxConfigurationController->addResourceFactory(msToolBarViewURL, this); + mxConfigurationController->addResourceFactory(msSlideSorterURL, this); + mxConfigurationController->addResourceFactory(msHelpViewURL, this); } catch (RuntimeException&) { |