[Libreoffice-commits] core.git: sd/source

Jim Raykowski (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 20 16:10:40 UTC 2020


 sd/source/ui/view/drtxtob1.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit d6628ddaf6e2acf53c5a7cbbcb201d700cd95f54
Author:     Jim Raykowski <raykowj at gmail.com>
AuthorDate: Wed Jan 15 21:49:18 2020 -0900
Commit:     Jim Raykowski <raykowj at gmail.com>
CommitDate: Mon Jan 20 17:10:05 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 <raykowj at gmail.com>

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
             {


More information about the Libreoffice-commits mailing list