summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-02 13:47:54 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-04-03 16:19:13 +0000
commit3b39a6e87a7f81f90a0e41924750148d74bed3b9 (patch)
tree65cb12a9312595d973c8191f8012937779a8de00 /svtools
parent6749b28c53903924d865a9001a9cb28c27284ba2 (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>
Diffstat (limited to 'svtools')
-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 );