[Libreoffice-commits] core.git: cui/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Jan 23 20:11:15 UTC 2019


 cui/source/tabpages/numpages.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 9223799e73177706bf3e2d3370b412b3d1fa531a
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Jan 23 18:33:57 2019 +0100
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Wed Jan 23 21:10:47 2019 +0100

    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 at collabora.com>

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);


More information about the Libreoffice-commits mailing list