summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/numpages.cxx
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-01-23 18:33:57 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-01-23 21:10:47 +0100
commit9223799e73177706bf3e2d3370b412b3d1fa531a (patch)
tree82a58eb50be953a21e32d9608e897685429c4bd9 /cui/source/tabpages/numpages.cxx
parent1dcdb9b538b3afb3e439d780baa15e5eba4af31f (diff)
Bullets: Use relative size when it's supported
In Writer it might cause a problem to use relative size with text based numberings. Change-Id: Id19b5e45f0f932d1b69028f343daad7dec34ae23 Reviewed-on: https://gerrit.libreoffice.org/66811 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'cui/source/tabpages/numpages.cxx')
-rw-r--r--cui/source/tabpages/numpages.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 5db0609b5b81..16b1186583a1 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2438,10 +2438,13 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
{
vcl::Font aFont(aStdFont);
Size aTmpSize(aStdFont.GetFontSize());
- aTmpSize.setWidth( aTmpSize.Width() * ( rFmt.GetBulletRelSize()) );
- aTmpSize.setWidth( aTmpSize.Width() / 100 ) ;
- aTmpSize.setHeight( aTmpSize.Height() * ( rFmt.GetBulletRelSize()) );
- aTmpSize.setHeight( aTmpSize.Height() / 100 ) ;
+ if(pActNum->IsFeatureSupported(SvxNumRuleFlags::BULLET_REL_SIZE))
+ {
+ aTmpSize.setWidth( aTmpSize.Width() * ( rFmt.GetBulletRelSize()) );
+ aTmpSize.setWidth( aTmpSize.Width() / 100 ) ;
+ aTmpSize.setHeight( aTmpSize.Height() * ( rFmt.GetBulletRelSize()) );
+ aTmpSize.setHeight( aTmpSize.Height() / 100 ) ;
+ }
if(!aTmpSize.Height())
aTmpSize.setHeight( 1 );
aFont.SetFontSize(aTmpSize);