summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2020-01-15 21:49:18 -0900
committerXisco FaulĂ­ <xiscofauli@libreoffice.org>2020-01-21 09:16:36 +0100
commitfc64cd7d85354fe2d554711974593e2866e38427 (patch)
tree1c3155272c430efe6219a1d20575477a4516edeb /sd
parent1411c9c598f1e42a7e96c55b60051394389cd45e (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> (cherry picked from commit d6628ddaf6e2acf53c5a7cbbcb201d700cd95f54) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87094 Reviewed-by: Xisco FaulĂ­ <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drtxtob1.cxx8
1 files changed, 8 insertions, 0 deletions
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
{