sd/source/ui/view/drtxtob1.cxx | 8 ++++++++ 1 file changed, 8 insertions(+)
New commits: commit fc64cd7d85354fe2d554711974593e2866e38427 Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Wed Jan 15 21:49:18 2020 -0900 Commit: Xisco Faulí <xiscofa...@libreoffice.org> CommitDate: Tue Jan 21 09:16:36 2020 +0100 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 <rayk...@gmail.com> (cherry picked from commit d6628ddaf6e2acf53c5a7cbbcb201d700cd95f54) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87094 Reviewed-by: Xisco Faulí <xiscofa...@libreoffice.org> diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 6f6f84a3f753..f41a6a91a544 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 { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits