summaryrefslogtreecommitdiff
path: root/svtools/source/control
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-02 13:47:54 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-04-02 13:47:54 +0100
commitaa16ca73260681b19f0be8a58be95ed454580f7f (patch)
tree8eb93e6a1ea0a60821ab4e0c080790e4b47844e6 /svtools/source/control
parent586612e4f51500a3ff7611f5446d5ee4757c7d8a (diff)
Resolves: fdo#76905 long delay when changing font size from % to pt
Change-Id: I33d72b51536ab96653ccda64c6e058c497289327
Diffstat (limited to 'svtools/source/control')
-rw-r--r--svtools/source/control/ctrlbox.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 8082056ca21e..2afe11f7ae6a 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 );