Kaydet (Commit) 198733f7 authored tarafından Adam Co's avatar Adam Co Kaydeden (comit) Miklos Vajna

Added some 'To-Do' notes regarding the new 'SwExtraRedlineTbl'

These notes are to make sure if logic needs to be added for the
'SwExtraRedlineTbl' in these functions, in addition to the
'SwRedlineTbl' that is already there.

Change-Id: I7778b4e20f5323a925d05a7df0c727f443566662
Reviewed-on: https://gerrit.libreoffice.org/7823Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 50eb0490
...@@ -868,6 +868,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart ) ...@@ -868,6 +868,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
if( !aBkmkArr.empty() ) if( !aBkmkArr.empty() )
_RestoreCntntIdx( this, aBkmkArr, rPos.nNode.GetIndex()-1, 0, true ); _RestoreCntntIdx( this, aBkmkArr, rPos.nNode.GetIndex()-1, 0, true );
// To-Do - add 'SwExtraRedlineTbl' also ?
if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() )) if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() ))
{ {
SwPaM aPam( rPos ); SwPaM aPam( rPos );
...@@ -906,6 +907,7 @@ bool SwDoc::AppendTxtNode( SwPosition& rPos ) ...@@ -906,6 +907,7 @@ bool SwDoc::AppendTxtNode( SwPosition& rPos )
GetIDocumentUndoRedo().AppendUndo( new SwUndoInsert( rPos.nNode ) ); GetIDocumentUndoRedo().AppendUndo( new SwUndoInsert( rPos.nNode ) );
} }
// To-Do - add 'SwExtraRedlineTbl' also ?
if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() )) if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() ))
{ {
SwPaM aPam( rPos ); SwPaM aPam( rPos );
...@@ -997,6 +999,7 @@ bool SwDoc::InsertString( const SwPaM &rRg, const OUString &rStr, ...@@ -997,6 +999,7 @@ bool SwDoc::InsertString( const SwPaM &rRg, const OUString &rStr,
} }
} }
// To-Do - add 'SwExtraRedlineTbl' also ?
if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() )) if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() ))
{ {
SwPaM aPam( rPos.nNode, aTmp.GetCntnt(), SwPaM aPam( rPos.nNode, aTmp.GetCntnt(),
......
...@@ -206,6 +206,8 @@ void SwDoc::CorrAbs(const SwNodeIndex& rOldNode, ...@@ -206,6 +206,8 @@ void SwDoc::CorrAbs(const SwNodeIndex& rOldNode,
++n; ++n;
} }
} }
// To-Do - need to add here 'SwExtraRedlineTbl' also ?
} }
if(bMoveCrsr) if(bMoveCrsr)
...@@ -311,6 +313,8 @@ void SwDoc::CorrRel(const SwNodeIndex& rOldNode, ...@@ -311,6 +313,8 @@ void SwDoc::CorrRel(const SwNodeIndex& rOldNode,
// lies on the position ?? // lies on the position ??
lcl_PaMCorrRel1( rTbl[ n ], &rOldNode.GetNode(), aNewPos, aNewPos.nContent.GetIndex() + nOffset ); lcl_PaMCorrRel1( rTbl[ n ], &rOldNode.GetNode(), aNewPos, aNewPos.nContent.GetIndex() + nOffset );
} }
// To-Do - need to add here 'SwExtraRedlineTbl' also ?
} }
if(bMoveCrsr) if(bMoveCrsr)
......
...@@ -188,6 +188,8 @@ void SwDoc::SetRedlineMode( RedlineMode_t eMode ) ...@@ -188,6 +188,8 @@ void SwDoc::SetRedlineMode( RedlineMode_t eMode )
meRedlineMode = eMode; meRedlineMode = eMode;
SetModified(); SetModified();
} }
// To-Do - add 'SwExtraRedlineTbl' also ?
} }
bool SwDoc::IsRedlineOn() const bool SwDoc::IsRedlineOn() const
...@@ -1277,6 +1279,8 @@ void SwDoc::CompressRedlines() ...@@ -1277,6 +1279,8 @@ void SwDoc::CompressRedlines()
} }
} }
_CHECK_REDLINE( this ) _CHECK_REDLINE( this )
// To-Do - add 'SwExtraRedlineTbl' also ?
} }
bool SwDoc::SplitRedline( const SwPaM& rRange ) bool SwDoc::SplitRedline( const SwPaM& rRange )
...@@ -1339,6 +1343,8 @@ bool SwDoc::SplitRedline( const SwPaM& rRange ) ...@@ -1339,6 +1343,8 @@ bool SwDoc::SplitRedline( const SwPaM& rRange )
break; break;
} }
return bChg; return bChg;
// To-Do - add 'SwExtraRedlineTbl' also ?
} }
bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo, bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
...@@ -1454,6 +1460,8 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo, ...@@ -1454,6 +1460,8 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
SetModified(); SetModified();
return bChg; return bChg;
// To-Do - add 'SwExtraRedlineTbl' also ?
} }
bool SwDoc::DeleteRedline( const SwStartNode& rNode, bool bSaveInUndo, bool SwDoc::DeleteRedline( const SwStartNode& rNode, bool bSaveInUndo,
...@@ -1481,6 +1489,8 @@ sal_uInt16 SwDoc::GetRedlinePos( const SwNode& rNd, sal_uInt16 nType ) const ...@@ -1481,6 +1489,8 @@ sal_uInt16 SwDoc::GetRedlinePos( const SwNode& rNd, sal_uInt16 nType ) const
break; break;
} }
return USHRT_MAX; return USHRT_MAX;
// To-Do - add 'SwExtraRedlineTbl' also ?
} }
const SwRangeRedline* SwDoc::GetRedline( const SwPosition& rPos, const SwRangeRedline* SwDoc::GetRedline( const SwPosition& rPos,
...@@ -1549,6 +1559,8 @@ const SwRangeRedline* SwDoc::GetRedline( const SwPosition& rPos, ...@@ -1549,6 +1559,8 @@ const SwRangeRedline* SwDoc::GetRedline( const SwPosition& rPos,
if( pFndPos ) if( pFndPos )
*pFndPos = nU; *pFndPos = nU;
return 0; return 0;
// To-Do - add 'SwExtraRedlineTbl' also ?
} }
typedef sal_Bool (*Fn_AcceptReject)( SwRedlineTbl& rArr, sal_uInt16& rPos, typedef sal_Bool (*Fn_AcceptReject)( SwRedlineTbl& rArr, sal_uInt16& rPos,
...@@ -2093,6 +2105,8 @@ bool SwDoc::AcceptRedline( sal_uInt16 nPos, bool bCallDelete ) ...@@ -2093,6 +2105,8 @@ bool SwDoc::AcceptRedline( sal_uInt16 nPos, bool bCallDelete )
} }
} }
return bRet; return bRet;
// To-Do - add 'SwExtraRedlineTbl' also ?
} }
bool SwDoc::AcceptRedline( const SwPaM& rPam, bool bCallDelete ) bool SwDoc::AcceptRedline( const SwPaM& rPam, bool bCallDelete )
...@@ -2137,6 +2151,8 @@ bool SwDoc::AcceptRedline( const SwPaM& rPam, bool bCallDelete ) ...@@ -2137,6 +2151,8 @@ bool SwDoc::AcceptRedline( const SwPaM& rPam, bool bCallDelete )
GetIDocumentUndoRedo().EndUndo( UNDO_ACCEPT_REDLINE, &aRewriter ); GetIDocumentUndoRedo().EndUndo( UNDO_ACCEPT_REDLINE, &aRewriter );
} }
return nRet != 0; return nRet != 0;
// To-Do - add 'SwExtraRedlineTbl' also ?
} }
bool SwDoc::RejectRedline( sal_uInt16 nPos, bool bCallDelete ) bool SwDoc::RejectRedline( sal_uInt16 nPos, bool bCallDelete )
...@@ -2203,6 +2219,8 @@ bool SwDoc::RejectRedline( sal_uInt16 nPos, bool bCallDelete ) ...@@ -2203,6 +2219,8 @@ bool SwDoc::RejectRedline( sal_uInt16 nPos, bool bCallDelete )
} }
} }
return bRet; return bRet;
// To-Do - add 'SwExtraRedlineTbl' also ?
} }
bool SwDoc::RejectRedline( const SwPaM& rPam, bool bCallDelete ) bool SwDoc::RejectRedline( const SwPaM& rPam, bool bCallDelete )
...@@ -2248,6 +2266,8 @@ bool SwDoc::RejectRedline( const SwPaM& rPam, bool bCallDelete ) ...@@ -2248,6 +2266,8 @@ bool SwDoc::RejectRedline( const SwPaM& rPam, bool bCallDelete )
} }
return nRet != 0; return nRet != 0;
// To-Do - add 'SwExtraRedlineTbl' also ?
} }
const SwRangeRedline* SwDoc::SelNextRedline( SwPaM& rPam ) const const SwRangeRedline* SwDoc::SelNextRedline( SwPaM& rPam ) const
...@@ -2365,6 +2385,8 @@ const SwRangeRedline* SwDoc::SelNextRedline( SwPaM& rPam ) const ...@@ -2365,6 +2385,8 @@ const SwRangeRedline* SwDoc::SelNextRedline( SwPaM& rPam ) const
} while( bRestart ); } while( bRestart );
return pFnd; return pFnd;
// To-Do - add 'SwExtraRedlineTbl' also ?
} }
const SwRangeRedline* SwDoc::SelPrevRedline( SwPaM& rPam ) const const SwRangeRedline* SwDoc::SelPrevRedline( SwPaM& rPam ) const
...@@ -2484,6 +2506,8 @@ const SwRangeRedline* SwDoc::SelPrevRedline( SwPaM& rPam ) const ...@@ -2484,6 +2506,8 @@ const SwRangeRedline* SwDoc::SelPrevRedline( SwPaM& rPam ) const
} while( bRestart ); } while( bRestart );
return pFnd; return pFnd;
// To-Do - add 'SwExtraRedlineTbl' also ?
} }
// Set comment at the Redline // Set comment at the Redline
...@@ -2512,6 +2536,8 @@ bool SwDoc::SetRedlineComment( const SwPaM& rPaM, const OUString& rS ) ...@@ -2512,6 +2536,8 @@ bool SwDoc::SetRedlineComment( const SwPaM& rPaM, const OUString& rS )
SetModified(); SetModified();
return bRet; return bRet;
// To-Do - add 'SwExtraRedlineTbl' also ?
} }
// Create a new author if necessary // Create a new author if necessary
...@@ -2535,6 +2561,8 @@ void SwDoc::UpdateRedlineAttr() ...@@ -2535,6 +2561,8 @@ void SwDoc::UpdateRedlineAttr()
if( pRedl->IsVisible() ) if( pRedl->IsVisible() )
pRedl->InvalidateRange(); pRedl->InvalidateRange();
} }
// To-Do - add 'SwExtraRedlineTbl' also ?
} }
/// Set comment text for the Redline, which is inserted later on via /// Set comment text for the Redline, which is inserted later on via
......
...@@ -326,6 +326,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt) ...@@ -326,6 +326,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
SwUndoRedlineSort* pRedlUndo = 0; SwUndoRedlineSort* pRedlUndo = 0;
SwUndoSort* pUndoSort = 0; SwUndoSort* pUndoSort = 0;
// To-Do - add 'SwExtraRedlineTbl' also ?
if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() )) if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() ))
{ {
pRedlPam = new SwPaM( pStart->nNode, pEnd->nNode, -1, 1 ); pRedlPam = new SwPaM( pStart->nNode, pEnd->nNode, -1, 1 );
......
...@@ -316,6 +316,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, ...@@ -316,6 +316,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
SetRedlineMode_intern( eOld ); SetRedlineMode_intern( eOld );
// To-Do - add 'SwExtraRedlineTbl' also ?
if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() )) if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() ))
{ {
SwPaM aPam( *pNewSectNode->EndOfSectionNode(), *pNewSectNode, 1 ); SwPaM aPam( *pNewSectNode->EndOfSectionNode(), *pNewSectNode, 1 );
......
...@@ -538,6 +538,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts, ...@@ -538,6 +538,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
GetNodes().GoNext( &aNdIdx ); // Go to the next ContentNode GetNodes().GoNext( &aNdIdx ); // Go to the next ContentNode
pTblNd->MakeFrms( &aNdIdx ); pTblNd->MakeFrms( &aNdIdx );
// To-Do - add 'SwExtraRedlineTbl' also ?
if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() )) if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() ))
{ {
SwPaM aPam( *pTblNd->EndOfSectionNode(), *pTblNd, 1 ); SwPaM aPam( *pTblNd->EndOfSectionNode(), *pTblNd, 1 );
......
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