diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2017-03-30 23:45:44 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-04-04 15:51:19 +0000 |
commit | c1351a7b1363dac4349f37ac8876fdf950e62b97 (patch) | |
tree | f6039cf084d262cbc6bf7a08428c726a8397a97f /sd | |
parent | Notebookbar: Separated paragraph spacing controls (diff) | |
download | core-c1351a7b1363dac4349f37ac8876fdf950e62b97.tar.gz core-c1351a7b1363dac4349f37ac8876fdf950e62b97.zip |
Make HangingIndent a command
New command .uno:HangingIndent.
Code moved from the sidebar to slots.
Change-Id: Ib389f9fb3368409a90cf90ad8b19f1be322fa120
Reviewed-on: https://gerrit.libreoffice.org/35930
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/sdi/drtxtob.sdi | 6 | ||||
-rw-r--r-- | sd/source/ui/view/drtxtob1.cxx | 17 |
2 files changed, 23 insertions, 0 deletions
diff --git a/sd/sdi/drtxtob.sdi b/sd/sdi/drtxtob.sdi index 88e2d7e5bc3e..325e03b0c663 100644 --- a/sd/sdi/drtxtob.sdi +++ b/sd/sdi/drtxtob.sdi @@ -197,6 +197,12 @@ shell TextObjectBar StateMethod = GetAttrState; ] + SID_HANGING_INDENT + [ + ExecMethod = Execute ; + StateMethod = GetAttrState; + ] + SID_OUTLINE_LEFT // ole : no, status : ? [ ExecMethod = Execute ; diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index e1b797dcdc53..6f88b159c6ac 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -277,6 +277,23 @@ void TextObjectBar::Execute( SfxRequest &rReq ) } break; + case SID_HANGING_INDENT: + { + SfxItemSet aLRSpaceSet( GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE ); + mpView->GetAttributes( aLRSpaceSet ); + SvxLRSpaceItem aParaMargin( static_cast<const SvxLRSpaceItem&>( aLRSpaceSet.Get( EE_PARA_LRSPACE ) ) ); + + SvxLRSpaceItem aNewMargin( EE_PARA_LRSPACE ); + aNewMargin.SetTextLeft( aParaMargin.GetTextLeft() + aParaMargin.GetTextFirstLineOfst() ); + aNewMargin.SetRight( aParaMargin.GetRight() ); + aNewMargin.SetTextFirstLineOfst( ( aParaMargin.GetTextFirstLineOfst() ) * (-1) ); + aLRSpaceSet.Put( aNewMargin ); + mpView->SetAttributes( aLRSpaceSet ); + + Invalidate(SID_ATTR_PARA_LRSPACE); + } + break; + case SID_OUTLINE_UP: { if (pOLV) |