summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRosemary Sebastian <rosemary.seb8@gmail.com>2017-08-14 16:25:03 +0530
committerRosemary Sebastian <rosemary.seb8@gmail.com>2017-08-30 20:18:35 +0530
commit626dab43b49639d96d2e28821cb29975aafbfb2f (patch)
tree98cd53c06dd3d70467c6d083a7231fa0d1034863
parent67263a70cb0e9cc581c316ef50e7703fc0c24c1d (diff)
Do not continue grouping if the Track Changes mode has changed
Change-Id: I8331c11fd7ce3b7b464a57a5710e9f4ee0cfb4fb
-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;