LibreOffice Module sw (master)  1
Public Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
CompareData Class Referenceabstract
Inheritance diagram for CompareData:
[legend]
Collaboration diagram for CompareData:
[legend]

Public Member Functions

 CompareData (SwDoc &rD, bool bRecordDiff)
 
virtual ~CompareData ()
 
bool HasDiffs (const CompareData &rData) const
 
void CompareLines (CompareData &rData)
 
sal_uLong ShowDiffs (const CompareData &rData)
 
void ShowInsert (sal_uLong nStt, sal_uLong nEnd)
 
void ShowDelete (const CompareData &rData, sal_uLong nStt, sal_uLong nEnd, sal_uLong nInsPos)
 
void CheckForChangesInLine (const CompareData &rData, sal_uLong nStt, sal_uLong nEnd, sal_uLong nThisStt, sal_uLong nThisEnd)
 
void SetIndex (size_t nLine, size_t nIndex)
 
size_t GetIndex (size_t nLine) const
 
void SetChanged (size_t nLine, bool bFlag=true)
 
bool GetChanged (size_t nLine) const
 
size_t GetLineCount () const
 
const SwCompareLineGetLine (size_t nLine) const
 
void InsertLine (SwCompareLine *pLine)
 
void SetRedlinesToDoc (bool bUseDocInfo)
 

Protected Attributes

SwDocrDoc
 

Private Member Functions

void CheckRanges (CompareData &)
 
virtual const SwNodeGetEndOfContent ()=0
 

Static Private Member Functions

static sal_uLong PrevIdx (const SwNode *pNd)
 
static sal_uLong NextIdx (const SwNode *pNd)
 

Private Attributes

std::unique_ptr< size_t[]> pIndex
 
std::unique_ptr< bool[]> pChangedFlag
 
std::unique_ptr< SwPaMpInsRing
 
std::unique_ptr< SwPaMpDelRing
 
vector< SwCompareLine * > aLines
 
bool const m_bRecordDiff
 

Detailed Description

Definition at line 76 of file doccomp.cxx.

Constructor & Destructor Documentation

CompareData::CompareData ( SwDoc rD,
bool  bRecordDiff 
)
inline

Definition at line 98 of file doccomp.cxx.

CompareData::~CompareData ( )
virtual

Definition at line 375 of file doccomp.cxx.

References pDelRing, and pInsRing.

Member Function Documentation

void CompareData::CheckForChangesInLine ( const CompareData rData,
sal_uLong  nStt,
sal_uLong  nEnd,
sal_uLong  nThisStt,
sal_uLong  nThisEnd 
)
void CompareData::CheckRanges ( CompareData rData)
private
void CompareData::CompareLines ( CompareData rData)

Definition at line 413 of file doccomp.cxx.

References Hash::CalcHashValue(), CheckRanges(), and GetLineCount().

Referenced by SwDoc::CompareDoc(), and SwDoc::MergeDoc().

bool CompareData::GetChanged ( size_t  nLine) const
inline

Definition at line 129 of file doccomp.cxx.

Referenced by HasDiffs(), and ShowDiffs().

virtual const SwNode& CompareData::GetEndOfContent ( )
privatepure virtual

Implemented in CompareFrameFormatText, and CompareMainText.

Referenced by CheckRanges().

size_t CompareData::GetIndex ( size_t  nLine) const
inline
const SwCompareLine* CompareData::GetLine ( size_t  nLine) const
inline
size_t CompareData::GetLineCount ( ) const
inline
bool CompareData::HasDiffs ( const CompareData rData) const

Definition at line 460 of file doccomp.cxx.

References GetChanged(), and GetLineCount().

Referenced by SwDoc::MergeDoc().

void CompareData::InsertLine ( SwCompareLine pLine)
inline

Definition at line 138 of file doccomp.cxx.

Referenced by CheckRanges().

sal_uLong CompareData::NextIdx ( const SwNode pNd)
staticprivate
sal_uLong CompareData::PrevIdx ( const SwNode pNd)
staticprivate
void CompareData::SetChanged ( size_t  nLine,
bool  bFlag = true 
)

Definition at line 402 of file doccomp.cxx.

References aLines, and pChangedFlag.

Referenced by Compare::MovedData::MovedData().

void CompareData::SetIndex ( size_t  nLine,
size_t  nIndex 
)

Definition at line 391 of file doccomp.cxx.

References aLines, and pIndex.

Referenced by Hash::CalcHashValue().

void CompareData::SetRedlinesToDoc ( bool  bUseDocInfo)
void CompareData::ShowDelete ( const CompareData rData,
sal_uLong  nStt,
sal_uLong  nEnd,
sal_uLong  nInsPos 
)
sal_uLong CompareData::ShowDiffs ( const CompareData rData)

Definition at line 429 of file doccomp.cxx.

References CheckForChangesInLine(), GetChanged(), GetLineCount(), and m_bRecordDiff.

Referenced by SwDoc::CompareDoc().

void CompareData::ShowInsert ( sal_uLong  nStt,
sal_uLong  nEnd 
)

Definition at line 1477 of file doccomp.cxx.

References GetEndNode(), and GetNode().

Member Data Documentation

vector< SwCompareLine* > CompareData::aLines
private

Definition at line 89 of file doccomp.cxx.

Referenced by SetChanged(), and SetIndex().

bool const CompareData::m_bRecordDiff
private

Definition at line 90 of file doccomp.cxx.

Referenced by ShowDiffs().

std::unique_ptr<bool[]> CompareData::pChangedFlag
private

Definition at line 82 of file doccomp.cxx.

Referenced by SetChanged().

std::unique_ptr<SwPaM> CompareData::pDelRing
private

Definition at line 84 of file doccomp.cxx.

Referenced by ~CompareData().

std::unique_ptr<size_t[]> CompareData::pIndex
private

Definition at line 81 of file doccomp.cxx.

Referenced by SetIndex().

std::unique_ptr<SwPaM> CompareData::pInsRing
private

Definition at line 84 of file doccomp.cxx.

Referenced by ~CompareData().

SwDoc& CompareData::rDoc
protected

Definition at line 79 of file doccomp.cxx.

Referenced by CheckRanges(), CompareMainText::GetEndOfContent(), and ShowDelete().


The documentation for this class was generated from the following file: