diff options
author | Jim Raykowski <raykowj@gmail.com> | 2020-01-15 21:49:18 -0900 |
---|---|---|
committer | Jim Raykowski <raykowj@gmail.com> | 2020-01-20 17:10:05 +0100 |
commit | d6628ddaf6e2acf53c5a7cbbcb201d700cd95f54 (patch) | |
tree | 41ac6f76b08a3b602b13689b4826fc59666df965 /sd | |
parent | 74d1991352bc21ec46759a932887e08a25bb5387 (diff) |
tdf#129481 Combine outliner indent and spacing undos
Makes one undo when indent or spacing attribute is applied to outliner
Change-Id: I1aefff746022552dec96f7cf76a5cb9540c84fc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86903
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/drtxtob1.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index efb60baf216a..b7ceab073a9f 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -175,6 +175,8 @@ void TextObjectBar::Execute( SfxRequest &rReq ) nStartPara = 0; nEndPara = pOLV->GetOutliner()->GetParagraphCount() - 1; } + + pOLV->GetOutliner()->UndoActionStart( OLUNDO_ATTR ); for( sal_Int32 nPara = nStartPara; nPara <= nEndPara; nPara++ ) { SfxStyleSheet* pStyleSheet = nullptr; @@ -204,6 +206,8 @@ void TextObjectBar::Execute( SfxRequest &rReq ) pOLV->GetOutliner()->SetParaAttribs( nPara, aNewAttrs ); } } + pOLV->GetOutliner()->UndoActionEnd(); + mpViewShell->Invalidate( SID_UNDO ); } rReq.Done(); @@ -228,6 +232,8 @@ void TextObjectBar::Execute( SfxRequest &rReq ) nStartPara = 0; nEndPara = pOLV->GetOutliner()->GetParagraphCount() - 1; } + + pOLV->GetOutliner()->UndoActionStart( OLUNDO_ATTR ); for( sal_Int32 nPara = nStartPara; nPara <= nEndPara; nPara++ ) { SfxStyleSheet* pStyleSheet = nullptr; @@ -267,6 +273,8 @@ void TextObjectBar::Execute( SfxRequest &rReq ) pOLV->GetOutliner()->SetParaAttribs( nPara, aNewAttrs ); } } + pOLV->GetOutliner()->UndoActionEnd(); + mpViewShell->Invalidate( SID_UNDO ); } else { |