diff options
author | Mark Hung <marklh9@gmail.com> | 2017-12-18 23:02:34 +0800 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-02-01 21:32:14 +0100 |
commit | 520a00a7dd9772630346eb58bfe8c00790ec0920 (patch) | |
tree | c808d6ed85e296bf7f9770a8d98132303e2d3191 /sd | |
parent | 66baf6cf11e333936a4404d3a02d44a19e6a440c (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>
(cherry picked from commit 140aa3e7db0a4731f02ab078a1326b2f4523a4c5)
Reviewed-on: https://gerrit.libreoffice.org/48698
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
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 ); |