Kaydet (Commit) e6c28812 authored tarafından Michael Stahl's avatar Michael Stahl

sw_redlinehide_2: SplitNode: move more code into restoreFunc

In DocumentContentOperationsManager::SplitNode(), ensure that all
redline updating is done in the restoreFunc.

Change-Id: I918b8f24dcda0cc181cb0f33bb2ca170a14b0e98
üst 71532ba5
...@@ -2954,22 +2954,29 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b ...@@ -2954,22 +2954,29 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b
{ // move all bookmarks, TOXMarks, FlyAtCnt { // move all bookmarks, TOXMarks, FlyAtCnt
pContentStore->Restore(&m_rDoc, rPos.nNode.GetIndex()-1, 0, true, eMode); pContentStore->Restore(&m_rDoc, rPos.nNode.GetIndex()-1, 0, true, eMode);
} }
if (eMode & sw::mark::RestoreMode::NonFlys)
{
// To-Do - add 'SwExtraRedlineTable' also ?
if (m_rDoc.getIDocumentRedlineAccess().IsRedlineOn() ||
(!m_rDoc.getIDocumentRedlineAccess().IsIgnoreRedline() &&
!m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty()))
{
SwPaM aPam( rPos );
aPam.SetMark();
aPam.Move( fnMoveBackward );
if (m_rDoc.getIDocumentRedlineAccess().IsRedlineOn())
{
m_rDoc.getIDocumentRedlineAccess().AppendRedline(
new SwRangeRedline(nsRedlineType_t::REDLINE_INSERT, aPam), true);
}
else
{
m_rDoc.getIDocumentRedlineAccess().SplitRedline(aPam);
}
}
}
}); });
pNode = pNode->GetTextNode()->SplitContentNode(rPos, &restoreFunc); pNode->GetTextNode()->SplitContentNode(rPos, &restoreFunc);
if (pNode)
{
// To-Do - add 'SwExtraRedlineTable' also ?
if( m_rDoc.getIDocumentRedlineAccess().IsRedlineOn() || (!m_rDoc.getIDocumentRedlineAccess().IsIgnoreRedline() && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() ))
{
SwPaM aPam( rPos );
aPam.SetMark();
aPam.Move( fnMoveBackward );
if( m_rDoc.getIDocumentRedlineAccess().IsRedlineOn() )
m_rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
else
m_rDoc.getIDocumentRedlineAccess().SplitRedline( aPam );
}
}
m_rDoc.getIDocumentState().SetModified(); m_rDoc.getIDocumentState().SetModified();
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment