[Libreoffice-commits] .: Branch 'libreoffice-3-5' - vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Sep 7 03:37:06 PDT 2012


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

New commits:
commit a5d8d122dbef5c33f65d9e667989936a940b66de
Author: László Németh <nemeth at numbertext.org>
Date:   Fri Sep 7 08:52:52 2012 +0200

    multiline tooltip for very long (eg. footnote) texts #i42424#
    
    Change-Id: Ib6383220c3cdd6fef55dee82fcfdc3472da45163
    Signed-off-by: Andras Timar <atimar at suse.com>

diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index b968ca1..2dc76fb 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -52,6 +52,8 @@
 #define HELPDELAY_SHORT         2
 #define HELPDELAY_NONE          3
 
+#define HELPTEXTMAXLEN        150
+
 // =======================================================================
 
 Help::Help()
@@ -359,7 +361,7 @@ HelpTextWindow::~HelpTextWindow()
 void HelpTextWindow::SetHelpText( const String& rHelpText )
 {
     maHelpText = rHelpText;
-    if ( mnHelpWinStyle == HELPWINSTYLE_QUICK )
+    if ( mnHelpWinStyle == HELPWINSTYLE_QUICK && maHelpText.Len() < HELPTEXTMAXLEN)
     {
         Size aSize;
         aSize.Height() = GetTextHeight();
@@ -421,7 +423,7 @@ void HelpTextWindow::Paint( const Rectangle& )
     }
 
     // paint text
-    if ( mnHelpWinStyle == HELPWINSTYLE_QUICK )
+    if ( mnHelpWinStyle == HELPWINSTYLE_QUICK && maHelpText.Len() < HELPTEXTMAXLEN)
     {
         if ( mnStyle & QUICKHELP_CTRLTEXT )
             DrawCtrlText( maTextRect.TopLeft(), maHelpText );


More information about the Libreoffice-commits mailing list