summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx2
-rw-r--r--sw/source/core/inc/UndoDelete.hxx2
-rw-r--r--sw/source/core/undo/undel.cxx6
3 files changed, 7 insertions, 3 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index fd5590cc89ee..dc7a6319f426 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -3590,7 +3590,7 @@ bool DocumentContentOperationsManager::DeleteAndJoinWithRedlineImpl( SwPaM & rPa
SwUndoDelete * const pUndoDel( dynamic_cast< SwUndoDelete* >( pLastUndo ) );
if( pUndoDel )
{
- bMerged = pUndoDel->CanGrouping( &m_rDoc, rPam );
+ bMerged = pUndoDel->CanGrouping( &m_rDoc, rPam, bRedlineDelete );
// if CanGrouping() returns true it's already merged
}
}
diff --git a/sw/source/core/inc/UndoDelete.hxx b/sw/source/core/inc/UndoDelete.hxx
index ac22b3217a1e..fc934aa702ad 100644
--- a/sw/source/core/inc/UndoDelete.hxx
+++ b/sw/source/core/inc/UndoDelete.hxx
@@ -88,7 +88,7 @@ public:
*/
virtual SwRewriter GetRewriter() const override;
- bool CanGrouping( SwDoc*, const SwPaM& );
+ bool CanGrouping( SwDoc*, const SwPaM&, bool bRedlineDelete = false );
void SetTableDelLastNd() { m_bTableDelLastNd = true; }
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 9e82c2541e88..0e9681af5b6d 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -444,8 +444,12 @@ bool SwUndoDelete::SaveContent( const SwPosition* pStt, const SwPosition* pEnd,
return true; // move Nodes lying in between
}
-bool SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
+bool SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam, bool bRedlineDelete )
{
+ // Make sure the Track Changes mode is the same
+ if( m_bRedlineDelete != bRedlineDelete )
+ return false;
+
// Is Undo greater than one Node (that is Start and EndString)?
if( !m_pSttStr || m_pSttStr->isEmpty() || m_pEndStr )
return false;