summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drviews3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/view/drviews3.cxx')
-rw-r--r--sd/source/ui/view/drviews3.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 2c3b0bd4a796..6701a62656a5 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -709,8 +709,18 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
const SvxNumberFormat& rFormat = rNumBulletItem.GetNumRule()->GetLevel(nOutlineLevel);
SvxNumberFormat aFormat(rFormat);
- // left margin always controls LRSpace item
- aLRSpaceItem.SetTxtLeft(rItem.GetTxtLeft() - aFormat.GetAbsLSpace());
+ // left margin gets distributed onto LRSpace item
+ // and number format AbsLSpace - this fixes
+ // n#707779 (previously, LRSpace left indent could
+ // become negative - EditEngine really does not
+ // like that.
+ const short nAbsLSpace=aFormat.GetAbsLSpace();
+ const long nTxtLeft=rItem.GetTxtLeft();
+ const long nLeftIndent=std::max(0L,nTxtLeft - nAbsLSpace);
+ aLRSpaceItem.SetTxtLeft(nLeftIndent);
+ // control for clipped left indent - remainder
+ // reduces number format first line indent
+ aFormat.SetAbsLSpace(nTxtLeft - nLeftIndent);
// negative first line indent goes to the number
// format, positive to the lrSpace item