summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ivan <alexnivan@yahoo.com>2013-08-29 19:02:57 +0300
committerAlex Ivan <alexnivan@yahoo.com>2013-08-29 19:02:57 +0300
commit452435c85c5fbe1e62ec81bc39deccb646a78bf6 (patch)
tree44df1a480d13160e092aa38e7fd8b5788bc1a072
parent758c691d749b3e2770a4b7a14579e5bbfde5114a (diff)
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
-rw-r--r--sw/source/core/docnode/ndtbl.cxx5
1 files changed, 5 insertions, 0 deletions
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 );
}