Kaydet (Commit) 140aa3e7 authored tarafından Mark Hung's avatar Mark Hung

tdf#114045 do not add undo action for table attributes

CreateUndoAttrObject() create extra undo steps when using
table paint brush on table cells. Undo action for each selected
cell is processed individually in
SvxTableController::ApplyFormatPaintBrush().

Change-Id: I65034a2b510898db26a7a8ddc4b5f3b742fd9b88
Reviewed-on: https://gerrit.libreoffice.org/46729Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMark Hung <marklh9@gmail.com>
üst 4173798e
...@@ -251,7 +251,8 @@ void FuFormatPaintBrush::Paste( bool bNoCharacterFormats, bool bNoParagraphForma ...@@ -251,7 +251,8 @@ void FuFormatPaintBrush::Paste( bool bNoCharacterFormats, bool bNoParagraphForma
{ {
OUString sLabel( mpViewShell->GetViewShellBase().RetrieveLabelFromCommand(".uno:FormatPaintbrush" ) ); OUString sLabel( mpViewShell->GetViewShellBase().RetrieveLabelFromCommand(".uno:FormatPaintbrush" ) );
mpDoc->BegUndo( sLabel ); mpDoc->BegUndo( sLabel );
mpDoc->AddUndo( mpDoc->GetSdrUndoFactory().CreateUndoAttrObject( *pObj, false, true ) ); if (dynamic_cast< sdr::table::SdrTableObj* >( pObj ) == nullptr)
mpDoc->AddUndo( mpDoc->GetSdrUndoFactory().CreateUndoAttrObject( *pObj, false, true ) );
} }
mpView->ApplyFormatPaintBrush( *mxItemSet.get(), bNoCharacterFormats, bNoParagraphFormats ); mpView->ApplyFormatPaintBrush( *mxItemSet.get(), bNoCharacterFormats, bNoParagraphFormats );
......
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