svtools/source/contnr/svtreebx.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 3da2a6a58784a3c607ea4e440865478f1a4fe56e
Author: Tomaž Vajngerl <qui...@gmail.com>
Date:   Thu Sep 20 20:52:04 2012 +0200

    fdo#49350 Speedup entry painting for SvTreeListBox
    
    Painting code for entry in SvTreeListBox switches between default
    and highlight font (which is only the default font with a different
    colour). This is done using SetFont which assumes that the font
    changes entry dimensions, which then recalculates everything. This
    is done for every entry so it is slow if there are a moderate number
    of entries. Fix here is to call Control::SetFont - we can do this
    because we know that switching between highlight and default font
    wont change the font dimensions.
    
    On the other hand - this highlighting entries when selected is
    (at least on linux) already supported by the native widget.
    
    Change-Id: I12d32f6f7b43e669442e462ad4dd80cde24b9e74

diff --git a/svtools/source/contnr/svtreebx.cxx 
b/svtools/source/contnr/svtreebx.cxx
index 8e37676..92d91d2 100644
--- a/svtools/source/contnr/svtreebx.cxx
+++ b/svtools/source/contnr/svtreebx.cxx
@@ -1587,7 +1587,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long 
nLine,sal_uInt16 nTabFl
                     if ( !bCurFontIsSel )
                     {
                         SetTextColor( aHighlightTextColor );
-                        SetFont( aHighlightFont );
+                        Control::SetFont( aHighlightFont );
                         bCurFontIsSel = true;
                     }
                 }
@@ -1601,7 +1601,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long 
nLine,sal_uInt16 nTabFl
                 {
                     bCurFontIsSel = false;
                     SetTextColor( aBackupTextColor );
-                    SetFont( aBackupFont );
+                    Control::SetFont( aBackupFont );
                 }
             }
 
@@ -1681,7 +1681,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long 
nLine,sal_uInt16 nTabFl
     if( bCurFontIsSel )
     {
         SetTextColor( aBackupTextColor );
-        SetFont( aBackupFont );
+        Control::SetFont( aBackupFont );
     }
 
     sal_uInt16 nFirstDynTabPos;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to