diff options
author | Jan Holesovsky <kendy@suse.cz> | 2013-06-02 04:46:58 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2013-06-02 04:54:55 +0200 |
commit | e66be44b69ee2a1b99bda32af93ea453c669b319 (patch) | |
tree | 707027d8074f61a6e6fc8fab3c7a797117d1b8f3 /sfx2/source/sidebar/SidebarPanelBase.cxx | |
parent | b441420e072a1f09098f89ed646e423c60e1895b (diff) |
sidebar: Restrict the minimal width of the sidebar.
Change-Id: I99051830c4393b420125332e787c3abdc5a6aa61
Diffstat (limited to 'sfx2/source/sidebar/SidebarPanelBase.cxx')
-rw-r--r-- | sfx2/source/sidebar/SidebarPanelBase.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sfx2/source/sidebar/SidebarPanelBase.cxx b/sfx2/source/sidebar/SidebarPanelBase.cxx index 263e9706e924..a4e037a8c4a1 100644 --- a/sfx2/source/sidebar/SidebarPanelBase.cxx +++ b/sfx2/source/sidebar/SidebarPanelBase.cxx @@ -248,4 +248,15 @@ ui::LayoutSize SAL_CALL SidebarPanelBase::getHeightForWidth (const sal_Int32 nWi return ui::LayoutSize(0,0,0); } +sal_Int32 SAL_CALL SidebarPanelBase::getMinimalWidth () throw(cssu::RuntimeException) +{ + if (isLayoutEnabled(mpControl)) + { + // widget layout-based sidebar + Size aSize(mpControl->GetOptimalSize()); + return aSize.Width(); + } + return 0; +} + } } // end of namespace sfx2::sidebar |