diff options
author | Mark Hung <marklh9@gmail.com> | 2017-12-18 23:02:34 +0800 |
---|---|---|
committer | Mark Hung <marklh9@gmail.com> | 2017-12-31 08:34:15 +0100 |
commit | 140aa3e7db0a4731f02ab078a1326b2f4523a4c5 (patch) | |
tree | f25e5492972113935e12c3e177dfefc2c68c5dcc /sd | |
parent | 4173798ef73d3fc7da8c5b8fa575a36f05cd6f83 (diff) |
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/46729
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/func/fuformatpaintbrush.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx index 88b12b4d4188..1d19e9cc9ebc 100644 --- a/sd/source/ui/func/fuformatpaintbrush.cxx +++ b/sd/source/ui/func/fuformatpaintbrush.cxx @@ -251,7 +251,8 @@ void FuFormatPaintBrush::Paste( bool bNoCharacterFormats, bool bNoParagraphForma { OUString sLabel( mpViewShell->GetViewShellBase().RetrieveLabelFromCommand(".uno:FormatPaintbrush" ) ); 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 ); |