summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorSerge Krot <Serge.Krot@cib.de>2019-10-15 13:04:49 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-11-01 00:20:26 +0100
commit414cfd7a298cf378863cde992b2d7c69629fa791 (patch)
tree10fd1e7936e01ac43d4a89acafde99690fd3e0da /vcl
parent62d5d041045add9cbc8bafcfd9650df1a3faad61 (diff)
Tooltips: Use HELPWINSTYLE_BALLOON when tooltip contains \n
Change-Id: I33ef48b5a90338471d85a613ede73eada323381c Reviewed-on: https://gerrit.libreoffice.org/80825 Reviewed-by: Serge Krot (CIB) <Serge.Krot@cib.de> Tested-by: Serge Krot (CIB) <Serge.Krot@cib.de> (cherry picked from commit ba5722319a585bf887965177f2d26e859b8e732b) Reviewed-on: https://gerrit.libreoffice.org/81641 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'vcl')
-rwxr-xr-x[-rw-r--r--]vcl/source/app/help.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index 035230c69235..ec0e1d0579fc 100644..100755
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -326,7 +326,7 @@ void HelpTextWindow::SetHelpText( const OUString& rHelpText )
{
maHelpText = rHelpText;
ApplySettings(*this);
- if ( mnHelpWinStyle == HELPWINSTYLE_QUICK && maHelpText.getLength() < HELPTEXTMAXLEN)
+ if ( mnHelpWinStyle == HELPWINSTYLE_QUICK && maHelpText.getLength() < HELPTEXTMAXLEN && maHelpText.indexOf('\n') < 0)
{
Size aSize;
aSize.setHeight( GetTextHeight() );
@@ -384,7 +384,7 @@ void HelpTextWindow::Paint( vcl::RenderContext& rRenderContext, const tools::Rec
}
// paint text
- if (mnHelpWinStyle == HELPWINSTYLE_QUICK && maHelpText.getLength() < HELPTEXTMAXLEN)
+ if (mnHelpWinStyle == HELPWINSTYLE_QUICK && maHelpText.getLength() < HELPTEXTMAXLEN && maHelpText.indexOf('\n') < 0)
{
if ( mnStyle & QuickHelpFlags::CtrlText )
rRenderContext.DrawCtrlText(maTextRect.TopLeft(), maHelpText);