diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-02-03 16:13:17 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-02-04 11:01:03 +0100 |
commit | 739e3b25bbaf9305f779e8821fd7aee4fccc6f5d (patch) | |
tree | 2bf2ce2ee6def504cf7af356d5bbb03c0c20ba95 /sfx2/source/sidebar/SidebarPanelBase.cxx | |
parent | 55c724b93dfd4c9a1afb10d60fbc2d7a9a66cf61 (diff) |
weld MasterPagesSelector
Change-Id: Ie63d7f8f83bae4f9641ab9713c6e46cd2090767b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87906
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source/sidebar/SidebarPanelBase.cxx')
-rw-r--r-- | sfx2/source/sidebar/SidebarPanelBase.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sfx2/source/sidebar/SidebarPanelBase.cxx b/sfx2/source/sidebar/SidebarPanelBase.cxx index 0ada01c391cb..3f9d00fe59ba 100644 --- a/sfx2/source/sidebar/SidebarPanelBase.cxx +++ b/sfx2/source/sidebar/SidebarPanelBase.cxx @@ -156,15 +156,14 @@ ui::LayoutSize SAL_CALL SidebarPanelBase::getHeightForWidth (const sal_Int32 nWi else { ILayoutableWindow* pLayoutableWindow = dynamic_cast<ILayoutableWindow*>(mpControl.get()); - - if (isLayoutEnabled(mpControl)) + if (pLayoutableWindow) + return pLayoutableWindow->GetHeightForWidth(nWidth); + else if (isLayoutEnabled(mpControl)) { // widget layout-based sidebar Size aSize(mpControl->get_preferred_size()); return ui::LayoutSize(aSize.Height(), aSize.Height(), aSize.Height()); } - else if (pLayoutableWindow != nullptr) - return pLayoutableWindow->GetHeightForWidth(nWidth); else if (mpControl != nullptr) { const sal_Int32 nHeight (mpControl->GetSizePixel().Height()); |