[Libreoffice-commits] core.git: vcl/source

Serge Krot (via logerrit) logerrit at kemper.freedesktop.org
Thu Oct 31 23:21:09 UTC 2019


 vcl/source/app/help.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 414cfd7a298cf378863cde992b2d7c69629fa791
Author:     Serge Krot <Serge.Krot at cib.de>
AuthorDate: Tue Oct 15 13:04:49 2019 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Fri Nov 1 00:20:26 2019 +0100

    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 at cib.de>
    Tested-by: Serge Krot (CIB) <Serge.Krot at cib.de>
    (cherry picked from commit ba5722319a585bf887965177f2d26e859b8e732b)
    Reviewed-on: https://gerrit.libreoffice.org/81641
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
old mode 100644
new mode 100755
index 035230c69235..ec0e1d0579fc
--- 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);


More information about the Libreoffice-commits mailing list