summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-04-25 20:21:43 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-04-25 20:27:13 +0100
commit3b6e61c3968a4aaec0b594803219961f3fcc9232 (patch)
tree683cdafdfb3e1e69461b68edf3045f5511f09175 /include
parent4fc8209e91e3cefb3163e17d0cd97fad78165a0c (diff)
fix scrolling performance of listboxes with hundreds of entries
make it approximately infinitely faster a) add a method AdjustEntryHeightAndRecalc that just does AdjustEntryHeight and RecalcViewData and replace all the places that do the two of those together with that utility b) in our SetFont now only call AdjustEntryHeightAndRecalc if the new font is different to the old font, ignoring color which doesn't have a bearing on row size. c) where we originally called SetFont(GetFont()), which would have triggered AdjustEntryHeightAndRecalc, now call the new AdjustEntryHeightAndRecalc explicitly. The performance problem apparently a regression from ac7acb0ab1329913b0cec79790adcde0263960be where we seem to now end up drawing on ourself and calling SetFont on ourself rather than on a pImpl without an overridden SetFont. So when we redraw on scrolling we triggered a cascade of calculations and force text layout of every row. Change-Id: I3c284c360f06ac383e8c38045fc4c2946f505b35
Diffstat (limited to 'include')
-rw-r--r--include/svtools/treelistbox.hxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 180050560bf9..305cfbe04cf1 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -578,6 +578,7 @@ protected:
sal_Bool AreChildrenTransient() const;
void SetChildrenNotTransient();
+ void AdjustEntryHeightAndRecalc( const Font& rFont );
public:
void SetExtendedWinBits( ExtendedWinBits _nBits );