diff options
author | Alex Ivan <alexnivan@yahoo.com> | 2013-08-28 18:52:39 +0300 |
---|---|---|
committer | Alex Ivan <alexnivan@yahoo.com> | 2013-08-28 18:52:39 +0300 |
commit | 453ddd7267b539e755cdc63eb8cbd6fa24ec4998 (patch) | |
tree | 851a8ba0645c63b86270170fe1397d3aadd0c2b0 | |
parent | 5766905d06fbc4d280d7f5d94b5167b5d42324b2 (diff) |
Fix copy-pasting table with no table style
Change-Id: I11eee9b3a7762dd2500129994e4da61b5b149520
-rw-r--r-- | sw/source/core/docnode/ndcopy.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index 692d23e6dabb..370807d94ffa 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -429,11 +429,11 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const } SwTableFmt* pStyle = (SwTableFmt*)GetTable().GetTableFmt()->GetRegisteredIn(); - SwTableFmt* pActualStyle = pDoc->FindTblFmtByName( pStyle->GetName(), sal_True ); + SwTableFmt* pActualStyle = pStyle ? pDoc->FindTblFmtByName( pStyle->GetName() , sal_True ) : 0; if( !pActualStyle ) pActualStyle = pStyle; - SwFrmFmt* pTblFmt = pDoc->MakeTblFrmFmt( sTblName, pStyle ? pStyle : pDoc->GetDfltFrmFmt() ); + SwFrmFmt* pTblFmt = pDoc->MakeTblFrmFmt( sTblName, pActualStyle ? pActualStyle : pDoc->GetDfltFrmFmt() ); pTblFmt->CopyAttrs( *GetTable().GetFrmFmt() ); SwTableNode* pTblNd = new SwTableNode( rIdx ); SwEndNode* pEndNd = new SwEndNode( rIdx, *pTblNd ); |