Kaydet (Commit) d2448a45 authored tarafından Zolnai Tamás's avatar Zolnai Tamás

tdf#90968: Highlighting is not repeated with Ctrl+Shft+Y (Edit>Repeat)

Regression from:
08cfbbac

Use undo actions to make the shell handle all of the background
related changes in one piece.

Change-Id: Ia2b64267727693f663ace5daf1dc094a663ea345
üst 0978dbba
......@@ -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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment