[Libreoffice-commits] core.git: svtools/source
Caolán McNamara
caolanm at redhat.com
Wed Apr 2 05:49:16 PDT 2014
svtools/source/control/ctrlbox.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit aa16ca73260681b19f0be8a58be95ed454580f7f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 2 13:47:54 2014 +0100
Resolves: fdo#76905 long delay when changing font size from % to pt
Change-Id: I33d72b51536ab96653ccda64c6e058c497289327
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 8082056..2afe11f 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -1899,13 +1899,13 @@ void FontSizeBox::SetRelative( bool bNewRelative )
if ( bPtRelative )
{
+ Clear(); //clear early because SetDecimalDigits is a slow recalc
+
SetDecimalDigits( 1 );
SetMin( nPtRelMin );
SetMax( nPtRelMax );
SetUnit( FUNIT_POINT );
- Clear();
-
short i = nPtRelMin, n = 0;
// JP 30.06.98: more than 100 values are not useful
while ( i <= nPtRelMax && n++ < 100 )
@@ -1916,12 +1916,13 @@ void FontSizeBox::SetRelative( bool bNewRelative )
}
else
{
+ Clear(); //clear early because SetDecimalDigits is a slow recalc
+
SetDecimalDigits( 0 );
SetMin( nRelMin );
SetMax( nRelMax );
SetUnit( FUNIT_PERCENT );
- Clear();
sal_uInt16 i = nRelMin;
while ( i <= nRelMax )
{
@@ -1932,6 +1933,8 @@ void FontSizeBox::SetRelative( bool bNewRelative )
}
else
{
+ if (pFontList)
+ Clear(); //clear early because SetDecimalDigits is a slow recalc
bRelative = bPtRelative = false;
SetDecimalDigits( 1 );
SetMin( 20 );
More information about the Libreoffice-commits
mailing list