summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-02 13:47:54 +0100
committerTor Lillqvist <tml@collabora.com>2014-04-08 11:05:25 +0300
commitc90af0c028040242d789ef5be5fc1c03f26396cf (patch)
tree327e24b022c87694bb30c11693e8abd942b15e84
parent27a15d36e11b90d91ca05bea10a11d29451b9426 (diff)
Resolves: fdo#76905 long delay when changing font size from % to pt
(cherry picked from commit aa16ca73260681b19f0be8a58be95ed454580f7f) Conflicts: svtools/source/control/ctrlbox.cxx Change-Id: I33d72b51536ab96653ccda64c6e058c497289327 Reviewed-on: https://gerrit.libreoffice.org/8814 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
-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 fe489702aa53..9250f3070e34 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -1879,13 +1879,13 @@ void FontSizeBox::SetRelative( sal_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 )
@@ -1896,13 +1896,14 @@ void FontSizeBox::SetRelative( sal_Bool bNewRelative )
}
else
{
+ Clear(); //clear early because SetDecimalDigits is a slow recalc
+
SetDecimalDigits( 0 );
SetMin( nRelMin );
SetMax( nRelMax );
SetCustomUnitText(OUString('%'));
SetUnit( FUNIT_CUSTOM );
- Clear();
sal_uInt16 i = nRelMin;
while ( i <= nRelMax )
{
@@ -1913,6 +1914,8 @@ void FontSizeBox::SetRelative( sal_Bool bNewRelative )
}
else
{
+ if (pFontList)
+ Clear(); //clear early because SetDecimalDigits is a slow recalc
bRelative = bPtRelative = sal_False;
SetDecimalDigits( 1 );
SetMin( 20 );