DocDiff application: document view update

This commit is contained in:
Jakub Melka
2021-10-13 17:51:16 +02:00
parent 8975a18d93
commit 41889070fb
10 changed files with 407 additions and 21 deletions

View File

@ -1200,6 +1200,32 @@ bool PDFDiffResult::isReplaceDifference(size_t index) const
return getTypeFlags(index) & FLAGS_TYPE_REPLACE;
}
std::vector<PDFInteger> PDFDiffResult::getChangedLeftPageIndices() const
{
std::set<PDFInteger> changedPageIndices;
for (size_t i = 0; i < m_differences.size(); ++i)
{
changedPageIndices.insert(getLeftPage(i));
}
changedPageIndices.erase(-1);
return std::vector<PDFInteger>(changedPageIndices.cbegin(), changedPageIndices.cend());
}
std::vector<PDFInteger> PDFDiffResult::getChangedRightPageIndices() const
{
std::set<PDFInteger> changedPageIndices;
for (size_t i = 0; i < m_differences.size(); ++i)
{
changedPageIndices.insert(getRightPage(i));
}
changedPageIndices.erase(-1);
return std::vector<PDFInteger>(changedPageIndices.cbegin(), changedPageIndices.cend());
}
PDFDiffResult PDFDiffResult::filter(bool filterPageMoveDifferences,
bool filterTextDifferences,
bool filterVectorGraphicsDifferences,