summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-07-12 10:13:22 +0200
committerCaolán McNamara <caolanm@redhat.com>2016-07-18 10:01:04 +0000
commit1cf7025df7f825326ce57b4e2817ee9544f059b7 (patch)
tree4d3126ca33a4befdc796ed59209870d983fbea66 /vcl
parentd1fe0d67111cfca14eae447a6c35541292f20228 (diff)
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 <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/toolbox2.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 7a93e507f185..a7fc4738f0a1 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();