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

Mark Hung marklh9 at gmail.com
Wed May 30 13:20:00 UTC 2018


 sd/source/ui/view/drviews3.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit b0f4a3be259566f275da60472e6012a1c524bee2
Author: Mark Hung <marklh9 at gmail.com>
Date:   Mon May 21 17:21:45 2018 +0800

    tdf#104376 Adjust SvxLRSpaceItem with right distance to border.
    
    Like what has been done with left distance to border, so that the
    ruler handle reflects the setting.
    
    Change-Id: I4ed920280aafc537ba3068f0f666778c2d723b6b
    Reviewed-on: https://gerrit.libreoffice.org/54618
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Mark Hung <marklh9 at gmail.com>

diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 11690795a70c..2a286ab4ba47 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -952,6 +952,14 @@ void  DrawViewShell::GetRulerState(SfxItemSet& rSet)
                     }
 
                     aLRSpace.SetRight(aRect.Right() + aPageSize.Width() - aParaRect.Right());
+
+                    if ( aEditAttr.GetItemState( SDRATTR_TEXT_RIGHTDIST ) == SfxItemState::SET )
+                    {
+                        const SdrMetricItem& rTRDItem = aEditAttr.Get( SDRATTR_TEXT_RIGHTDIST );
+                        long nRD = rTRDItem.GetValue();
+                        aLRSpace.SetRight( aLRSpace.GetRight() + nRD );
+                    }
+
                     aULSpace.SetUpper( aPagePos.Y() + maMarkRect.Top() );
                     aULSpace.SetLower( aRect.Bottom() + aPageSize.Height() - maMarkRect.Bottom() );
 


More information about the Libreoffice-commits mailing list