From 452435c85c5fbe1e62ec81bc39deccb646a78bf6 Mon Sep 17 00:00:00 2001 From: Alex Ivan Date: Thu, 29 Aug 2013 19:02:57 +0300 Subject: Reapply table style after merging tables The undo part was inadvertedly already fixed since it used the same mechanics as some of the previously fixed undo actions. Change-Id: I75380513945a6b84fa8f18ab77c756b4e8c358c1 --- sw/source/core/docnode/ndtbl.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 8133065110fe..d67ca3af7860 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -3390,6 +3390,9 @@ sal_Bool SwDoc::MergeTable( const SwPosition& rPos, sal_Bool bWithPrev, sal_uInt if( !pDelTblNd ) return sal_False; + SwTableFmt* pStyle = (SwTableFmt*)pTblNd->GetTable().GetTableFmt()->GetRegisteredIn(); + SwTable& rTable = (bWithPrev ? pDelTblNd : pTblNd)->GetTable(); + if( pTblNd->GetTable().ISA( SwDDETable ) || pDelTblNd->GetTable().ISA( SwDDETable )) return sal_False; @@ -3427,6 +3430,8 @@ sal_Bool SwDoc::MergeTable( const SwPosition& rPos, sal_Bool bWithPrev, sal_uInt } if( bRet ) { + SwTableFmt::AssignFormatParents( pStyle, rTable ); + SetModified(); SetFieldsDirty( true, NULL, 0 ); } -- cgit v1.2.3