diff options
author | Alex Ivan <alexnivan@yahoo.com> | 2013-08-29 18:15:44 +0300 |
---|---|---|
committer | Alex Ivan <alexnivan@yahoo.com> | 2013-08-29 18:15:44 +0300 |
commit | 758c691d749b3e2770a4b7a14579e5bbfde5114a (patch) | |
tree | 5ab03075a59efae781ab676d30a740c86fcfb901 | |
parent | Reapply table styles after merging/spliting cells and corresponding undos (diff) | |
download | core-758c691d749b3e2770a4b7a14579e5bbfde5114a.tar.gz core-758c691d749b3e2770a4b7a14579e5bbfde5114a.zip |
Reapply table style after spliting table and undo
Change-Id: I32fea8b4679809070a47368de65d57ce5df7ed9d
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/undo/untbl.cxx | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index e6d582185022..8133065110fe 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -3153,6 +3153,9 @@ sal_Bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode, // TL_CHART2: need to inform chart of probably changed cell names UpdateCharts( rTbl.GetFrmFmt()->GetName() ); + SwTableFmt::AssignFormatParents( (SwTableFmt*)rTbl.GetTableFmt()->GetRegisteredIn(), rTbl ); + SwTableFmt::AssignFormatParents( (SwTableFmt*)rTbl.GetTableFmt()->GetRegisteredIn(), pNew->GetTable() ); + SetFieldsDirty( true, NULL, 0 ); return 0 != pNew; diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 661ed33dc48f..5fa3d2affa8e 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -2927,6 +2927,12 @@ void SwUndoSplitTbl::UndoImpl(::sw::UndoRedoContext & rContext) pTblNd->GetTable().RestoreRowSpan( *mpSaveRowSpan ); } ClearFEShellTabCols(); + + pTblNd = rIdx.GetNode().FindTableNode(); + if( pTblNd ) + SwTableFmt::AssignFormatParents( (SwTableFmt*)pTblNd->GetTable(). + GetTableFmt()->GetRegisteredIn(), + pTblNd->GetTable() ); } void SwUndoSplitTbl::RedoImpl(::sw::UndoRedoContext & rContext) |