diff options
author | Jim Raykowski <raykowj@gmail.com> | 2019-09-08 21:37:43 -0800 |
---|---|---|
committer | Jim Raykowski <raykowj@gmail.com> | 2019-09-12 00:20:05 +0200 |
commit | 1d5b89eccdccb3090b5503a60f829c54c077f328 (patch) | |
tree | 50553e0a8f7e3e0383522fa7470ae1c5cc9f95d2 | |
parent | Fix missing dependency (diff) | |
download | core-1d5b89eccdccb3090b5503a60f829c54c077f328.tar.gz core-1d5b89eccdccb3090b5503a60f829c54c077f328.zip |
tdf#126833 fix table auto format undo/redo
Fixes regression caused by fix for tdf#123516
Change-Id: If7b6bf9cba30085585fc495898f3dfb308197495
Reviewed-on: https://gerrit.libreoffice.org/78770
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
-rw-r--r-- | sw/source/uibase/shells/basesh.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 0479fca697e0..cf1b2296ca80 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -118,6 +118,7 @@ #include <SwStyleNameMapper.hxx> #include <poolfmt.hxx> #include <shellres.hxx> +#include <UndoTable.hxx> FlyMode SwBaseShell::eFrameMode = FLY_DRAG_END; @@ -2746,7 +2747,12 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) { SwTableNode* pTableNode = const_cast<SwTableNode*>( rSh.IsCursorInTable() ); if ( pTableNode ) + { pTableNode->GetTable().SetTableStyleName( aAutoName ); + SwUndoTableAutoFormat* pUndo = new SwUndoTableAutoFormat( *pTableNode, *pTAFormat ); + if ( pUndo ) + rSh.GetIDocumentUndoRedo().AppendUndo( std::unique_ptr<SwUndo>(pUndo) ); + } } rSh.EndAllAction(); |