diff options
author | Mark Hung <marklh9@gmail.com> | 2018-05-21 17:21:45 +0800 |
---|---|---|
committer | Mark Hung <marklh9@gmail.com> | 2018-05-30 15:19:37 +0200 |
commit | b0f4a3be259566f275da60472e6012a1c524bee2 (patch) | |
tree | 33b7304e2a47f406e3c33c0b7b5b11c98093a939 | |
parent | 2608e2c9808274a434c412b9ce4f7961a8c45cc9 (diff) |
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@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
-rw-r--r-- | sd/source/ui/view/drviews3.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
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() ); |