diff options
-rw-r--r-- | sw/inc/ndarr.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/undo/untbl.cxx | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx index e95d5bf7e7dc..386b01aae663 100644 --- a/sw/inc/ndarr.hxx +++ b/sw/inc/ndarr.hxx @@ -293,7 +293,7 @@ public: SwTableNode* SplitTable( const SwNodeIndex& rPos, bool bAfter = true, bool bCalcNewSize = false ); /// Two Tables that are following one another are merged. - bool MergeTable( const SwNodeIndex& rPos, bool bWithPrev = true, + bool MergeTable( SwNode& rPos, bool bWithPrev = true, sal_uInt16 nMode = 0 ); /// Insert a new SwSection. diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 9f8c6833ff3d..7b0641da54dc 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -3508,8 +3508,7 @@ bool SwDoc::MergeTable( const SwPosition& rPos, bool bWithPrev, sal_uInt16 nMode getIDocumentFieldsAccess().UpdateTableFields( &aMsgHint ); // The actual merge - SwNodeIndex aIdx( bWithPrev ? *pTableNd : *pDelTableNd ); - bool bRet = rNds.MergeTable( aIdx, !bWithPrev, nMode ); + bool bRet = rNds.MergeTable( bWithPrev ? *pTableNd : *pDelTableNd, !bWithPrev, nMode ); if( pHistory ) { @@ -3527,10 +3526,9 @@ bool SwDoc::MergeTable( const SwPosition& rPos, bool bWithPrev, sal_uInt16 nMode return bRet; } -bool SwNodes::MergeTable( const SwNodeIndex& rPos, bool bWithPrev, - sal_uInt16 nMode ) +bool SwNodes::MergeTable( SwNode& rPos, bool bWithPrev, sal_uInt16 nMode ) { - SwTableNode* pDelTableNd = rPos.GetNode().GetTableNode(); + SwTableNode* pDelTableNd = rPos.GetTableNode(); OSL_ENSURE( pDelTableNd, "Where did the TableNode go?" ); SwTableNode* pTableNd = (*this)[ rPos.GetIndex() - 1]->FindTableNode(); diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 7e96d8fe04bb..e27f534bd8a4 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -2893,7 +2893,7 @@ void SwUndoSplitTable::UndoImpl(::sw::UndoRedoContext & rContext) default: break; } - pDoc->GetNodes().MergeTable( rIdx ); + pDoc->GetNodes().MergeTable( rIdx.GetNode() ); if( m_pHistory ) { |