sw/inc/doc.hxx                   |    3 +--
 sw/inc/ndarr.hxx                 |    3 +--
 sw/source/core/docnode/ndtbl.cxx |   13 ++++---------
 sw/source/core/inc/UndoTable.hxx |    3 +--
 sw/source/core/undo/untbl.cxx    |    8 ++++----
 5 files changed, 11 insertions(+), 19 deletions(-)

New commits:
commit 3438939b831f555301305ace110e734bc02078fc
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sat Sep 3 21:07:48 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Sep 4 08:26:40 2022 +0200

    the mode parameter to MergeTable is unused
    
    and has been since initial import
    
    Change-Id: I0bf75a001e4d4b17729f3810210b8db295480697
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139332
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index f6e31d3d7d57..978e95d38737 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1287,8 +1287,7 @@ public:
 
     /** And vice versa: rPos must be in the table that remains. The flag 
indicates
      whether the current table is merged with the one before or behind it. */
-    bool MergeTable( const SwPosition& rPos, bool bWithPrev,
-                        sal_uInt16 nMode = 0 );
+    bool MergeTable( const SwPosition& rPos, bool bWithPrev );
 
     // Make charts of given table update.
     void UpdateCharts( const OUString& rName ) const;
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index 8f8cce07a4dd..a3fe64b5cc15 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -296,8 +296,7 @@ public:
     SwTableNode* SplitTable( SwNode& rPos, bool bAfter = true,
                                 bool bCalcNewSize = false );
     /// Two Tables that are following one another are merged.
-    bool MergeTable( SwNode& rPos, bool bWithPrev = true,
-                    sal_uInt16 nMode = 0 );
+    bool MergeTable( SwNode& rPos, bool bWithPrev = true );
 
     /// Insert a new SwSection.
     SwSectionNode* InsertTextSection(SwNode& rNd,
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index d2828fabc69e..9efdf5628bb0 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -3462,7 +3462,7 @@ SwTableNode* SwNodes::SplitTable( SwNode& rPos, bool 
bAfter,
  * @param bWithPrev  merge the current Table with the preceding
  *                   or succeeding one
  */
-bool SwDoc::MergeTable( const SwPosition& rPos, bool bWithPrev, sal_uInt16 
nMode )
+bool SwDoc::MergeTable( const SwPosition& rPos, bool bWithPrev )
 {
     SwTableNode* pTableNd = rPos.GetNode().FindTableNode(), *pDelTableNd;
     if( !pTableNd )
@@ -3489,7 +3489,7 @@ bool SwDoc::MergeTable( const SwPosition& rPos, bool 
bWithPrev, sal_uInt16 nMode
     std::unique_ptr<SwHistory> pHistory;
     if (GetIDocumentUndoRedo().DoesUndo())
     {
-        pUndo = new SwUndoMergeTable( *pTableNd, *pDelTableNd, bWithPrev, 
nMode );
+        pUndo = new SwUndoMergeTable( *pTableNd, *pDelTableNd, bWithPrev );
         GetIDocumentUndoRedo().AppendUndo(std::unique_ptr<SwUndo>(pUndo));
         pHistory.reset(new SwHistory);
     }
@@ -3502,7 +3502,7 @@ bool SwDoc::MergeTable( const SwPosition& rPos, bool 
bWithPrev, sal_uInt16 nMode
     getIDocumentFieldsAccess().UpdateTableFields( &aMsgHint );
 
     // The actual merge
-    bool bRet = rNds.MergeTable( bWithPrev ? *pTableNd : *pDelTableNd, 
!bWithPrev, nMode );
+    bool bRet = rNds.MergeTable( bWithPrev ? *pTableNd : *pDelTableNd, 
!bWithPrev );
 
     if( pHistory )
     {
@@ -3520,7 +3520,7 @@ bool SwDoc::MergeTable( const SwPosition& rPos, bool 
bWithPrev, sal_uInt16 nMode
     return bRet;
 }
 
-bool SwNodes::MergeTable( SwNode& rPos, bool bWithPrev, sal_uInt16 nMode )
+bool SwNodes::MergeTable( SwNode& rPos, bool bWithPrev )
 {
     SwTableNode* pDelTableNd = rPos.GetTableNode();
     OSL_ENSURE( pDelTableNd, "Where did the TableNode go?" );
@@ -3601,11 +3601,6 @@ bool SwNodes::MergeTable( SwNode& rPos, bool bWithPrev, 
sal_uInt16 nMode )
 
     // tweak the conditional styles at the first inserted Line
     const SwTableLine* pFirstLn = rTable.GetTabLines()[ nOldSize ];
-    if( 1 == nMode )
-    {
-        // Set Header Template in the Line and save in the History
-        // if needed for Undo!
-    }
     sw_LineSetHeadCondColl( pFirstLn );
 
     // Clean up the Borders
diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index e43ed4847b3d..e0f8dd5fb58d 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -348,12 +348,11 @@ class SwUndoMergeTable final : public SwUndo
     SwNodeOffset m_nTableNode;
     std::unique_ptr<SaveTable> m_pSaveTable, m_pSaveHdl;
     std::unique_ptr<SwHistory> m_pHistory;
-    sal_uInt16 m_nMode;
     bool m_bWithPrev;
 
 public:
     SwUndoMergeTable( const SwTableNode& rTableNd, const SwTableNode& 
rDelTableNd,
-                    bool bWithPrev, sal_uInt16 nMode );
+                    bool bWithPrev );
 
     virtual ~SwUndoMergeTable() override;
 
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index fb7d2eb1e5e9..6e3befe85104 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -2934,9 +2934,9 @@ void SwUndoSplitTable::SaveFormula( SwHistory& rHistory )
 
 SwUndoMergeTable::SwUndoMergeTable( const SwTableNode& rTableNd,
                                 const SwTableNode& rDelTableNd,
-                                bool bWithPrv, sal_uInt16 nMd )
+                                bool bWithPrv )
     : SwUndo( SwUndoId::MERGE_TABLE, &rTableNd.GetDoc() ),
-    m_nMode( nMd ), m_bWithPrev( bWithPrv )
+    m_bWithPrev( bWithPrv )
 {
     // memorize end node of the last table cell that'll stay in position
     if( m_bWithPrev )
@@ -3032,7 +3032,7 @@ void SwUndoMergeTable::RedoImpl(::sw::UndoRedoContext & 
rContext)
     else
         pPam->GetPoint()->Assign( m_nTableNode );
 
-    pDoc->MergeTable( *pPam->GetPoint(), m_bWithPrev, m_nMode );
+    pDoc->MergeTable( *pPam->GetPoint(), m_bWithPrev );
 
     ClearFEShellTabCols(*pDoc, nullptr);
 }
@@ -3042,7 +3042,7 @@ void SwUndoMergeTable::RepeatImpl(::sw::RepeatContext & 
rContext)
     SwDoc *const pDoc = & rContext.GetDoc();
     SwPaM *const pPam = & rContext.GetRepeatPaM();
 
-    pDoc->MergeTable( *pPam->GetPoint(), m_bWithPrev, m_nMode );
+    pDoc->MergeTable( *pPam->GetPoint(), m_bWithPrev );
     ClearFEShellTabCols(*pDoc, nullptr);
 }
 

Reply via email to