diff options
author | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2015-05-01 12:20:19 +0200 |
---|---|---|
committer | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2015-05-01 14:18:42 +0200 |
commit | d2448a45767230d3e2913becb44f1a8bd2dfc46a (patch) | |
tree | 802a6c0d58d5705390abaeeb348393a133b4cbe1 /sw/source/uibase | |
parent | 0978dbbab46ce1f37ed4f27b8358c1a44c02143f (diff) |
tdf#90968: Highlighting is not repeated with Ctrl+Shft+Y (Edit>Repeat)
Regression from:
08cfbbaca2d23727bc95912082ae46b8f8a37f03
Use undo actions to make the shell handle all of the background
related changes in one piece.
Change-Id: Ia2b64267727693f663ace5daf1dc094a663ea345
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 0c0ed9b481da..ac1e4537ba48 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1176,6 +1176,7 @@ void SwTextShell::Execute(SfxRequest &rReq) if(!pApply && (rWrtSh.HasSelection() || rReq.IsAPI())) { + rWrtSh.StartUndo( UNDO_INSATTR ); SvxBrushItem aBrushItem(RES_CHRATR_BACKGROUND); aBrushItem.SetColor(aSet); rWrtSh.SetAttrItem( aBrushItem ); @@ -1199,6 +1200,7 @@ void SwTextShell::Execute(SfxRequest &rReq) } rWrtSh.SetAttrItem( aGrabBag ); } + rWrtSh.EndUndo( UNDO_INSATTR ); } else if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_BACKGROUND_EXT) { @@ -1229,6 +1231,7 @@ void SwTextShell::Execute(SfxRequest &rReq) { if(nSlot == SID_ATTR_CHAR_COLOR_BACKGROUND_EXT) { + rWrtSh.StartUndo( UNDO_INSATTR ); rWrtSh.SetAttrItem( SvxBrushItem( rEdtWin.GetTextBackColor(), RES_CHRATR_BACKGROUND) ); @@ -1251,6 +1254,7 @@ void SwTextShell::Execute(SfxRequest &rReq) } rWrtSh.SetAttrItem( aGrabBag ); } + rWrtSh.EndUndo( UNDO_INSATTR ); } else rWrtSh.SetAttrItem( |