diff options
author | Alex Ivan <alexnivan@yahoo.com> | 2013-08-29 15:26:02 +0300 |
---|---|---|
committer | Alex Ivan <alexnivan@yahoo.com> | 2013-08-29 15:26:02 +0300 |
commit | 49d18eb95929b4d0fadfaa5ba553049922bd4fb4 (patch) | |
tree | ee0a0b8e760fff419d235614ed80c4f076b182c3 | |
parent | Fix copy-pasting table with no table style (diff) | |
download | core-49d18eb95929b4d0fadfaa5ba553049922bd4fb4.tar.gz core-49d18eb95929b4d0fadfaa5ba553049922bd4fb4.zip |
Reapply table styles after merging/spliting cells and corresponding undos
Change-Id: I0a0f1cd1ec05487230af568ab3350de04d98bfb6
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/undo/untbl.cxx | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 0a09ccd6b792..e6d582185022 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -2112,6 +2112,8 @@ sal_Bool SwDoc::SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert, sal_uInt16 n delete pUndo; } + SwTableFmt::AssignFormatParents( (SwTableFmt*)rTbl.GetTableFmt()->GetRegisteredIn(), rTbl ); + return bRet; } @@ -2217,6 +2219,10 @@ sal_uInt16 SwDoc::MergeTbl( SwPaM& rPam ) ::ClearFEShellTabCols(); SetRedlineMode_intern( eOld ); } + + SwTableFmt::AssignFormatParents( (SwTableFmt*)rTable.GetTableFmt()->GetRegisteredIn(), + rTable ); + GetIDocumentUndoRedo().EndUndo( UNDO_TABLE_MERGE, NULL ); return nRet; } diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index afba0c2b4e08..661ed33dc48f 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -2076,6 +2076,9 @@ CHECKTABLE(pTblNd->GetTable()) CHECKTABLE(pTblNd->GetTable()) ClearFEShellTabCols(); + + SwTableFmt::AssignFormatParents( (SwTableFmt*)pTblNd->GetTable().GetTableFmt()->GetRegisteredIn(), + pTblNd->GetTable() ); } void SwUndoTblMerge::RedoImpl(::sw::UndoRedoContext & rContext) |