diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-12 12:31:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-12 13:01:50 +0100 |
commit | 58e31745600757f3d95085e67aa6bf13d7b9878b (patch) | |
tree | e165629c049dccdc3c991d40e07de0401b6f9b0f /sdext/source/presenter/PresenterHelpView.cxx | |
parent | a8f21e120b1073d7019d41e85cc9a15104ed5c93 (diff) |
loplugin:flatten in sdext
Change-Id: I5a7c2d38ef2e4af54316becd807bffab83d402d0
Reviewed-on: https://gerrit.libreoffice.org/67715
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext/source/presenter/PresenterHelpView.cxx')
-rw-r--r-- | sdext/source/presenter/PresenterHelpView.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sdext/source/presenter/PresenterHelpView.cxx b/sdext/source/presenter/PresenterHelpView.cxx index 0bce7633dcec..57dd858a2ea1 100644 --- a/sdext/source/presenter/PresenterHelpView.cxx +++ b/sdext/source/presenter/PresenterHelpView.cxx @@ -466,21 +466,21 @@ void PresenterHelpView::ProvideCanvas() void PresenterHelpView::Resize() { - if (mpCloseButton.get() != nullptr && mxWindow.is()) - { - const awt::Rectangle aWindowBox (mxWindow->getPosSize()); - mnMaximalWidth = (mxWindow->getPosSize().Width - 4*gnHorizontalGap) / 2; + if (!(mpCloseButton.get() != nullptr && mxWindow.is())) + return; - // Place vertical separator. - mnSeparatorY = aWindowBox.Height - - mpCloseButton->GetSize().Height - gnVerticalButtonPadding; + const awt::Rectangle aWindowBox (mxWindow->getPosSize()); + mnMaximalWidth = (mxWindow->getPosSize().Width - 4*gnHorizontalGap) / 2; - mpCloseButton->SetCenter(geometry::RealPoint2D( - aWindowBox.Width/2.0, - aWindowBox.Height - mpCloseButton->GetSize().Height/2.0)); + // Place vertical separator. + mnSeparatorY = aWindowBox.Height + - mpCloseButton->GetSize().Height - gnVerticalButtonPadding; - CheckFontSize(); - } + mpCloseButton->SetCenter(geometry::RealPoint2D( + aWindowBox.Width/2.0, + aWindowBox.Height - mpCloseButton->GetSize().Height/2.0)); + + CheckFontSize(); } void PresenterHelpView::ThrowIfDisposed() |