sfx2/source/view/classificationcontroller.cxx | 4 +++- vcl/source/window/toolbox2.cxx | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-)
New commits: commit 1cf7025df7f825326ce57b4e2817ee9544f059b7 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Tue Jul 12 10:13:22 2016 +0200 tdf#100600 sfx2 classification: never replace the control with label Thanks to Caolán McNamara for pointing out where is the condition of the replacement in VCL. (cherry picked from commit 8192da8e4de7a058ef95253f992f4143f83fa0f1) Change-Id: I7e1ef4a016a37b25e084c4c6467a42ca557069a4 Reviewed-on: https://gerrit.libreoffice.org/27214 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sfx2/source/view/classificationcontroller.cxx b/sfx2/source/view/classificationcontroller.cxx index 1e932c8..f37490c 100644 --- a/sfx2/source/view/classificationcontroller.cxx +++ b/sfx2/source/view/classificationcontroller.cxx @@ -234,7 +234,9 @@ void ClassificationCategoriesController::removeEntries() } ClassificationControl::ClassificationControl(vcl::Window* pParent) - : Window(pParent, WB_DIALOGCONTROL) + // WB_NOLABEL means here that the control won't be replaced with a label + // when it wouldn't fit the available space. + : Window(pParent, WB_DIALOGCONTROL | WB_NOLABEL) { m_pLabels[SfxClassificationPolicyType::IntellectualProperty] = VclPtr<FixedText>::Create(this, WB_CENTER); m_pLabels[SfxClassificationPolicyType::NationalSecurity] = VclPtr<FixedText>::Create(this, WB_CENTER); diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 7a93e50..a7fc473 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -214,6 +214,12 @@ Size ImplToolItem::GetSize( bool bHorz, bool bCheckMaxWidth, long maxWidth, cons // get size of item window and check if it fits // no windows in vertical toolbars (the default is mbShowWindow=false) Size aWinSize = mpWindow->GetSizePixel(); + + if (mpWindow->GetStyle() & WB_NOLABEL) + // Window wants no label? Then don't check width, it'll be just + // clipped. + bCheckMaxWidth = false; + if ( !bCheckMaxWidth || (aWinSize.Width() <= maxWidth) ) { aSize.Width() = aWinSize.Width();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits