| 1639 | } |
| 1640 | |
| 1641 | LineRef DiffTextWindowData::convertLineOnScreenToLineInSource(const qint32 lineOnScreen, const e_CoordType coordType, const bool bFirstLine) const |
| 1642 | { |
| 1643 | LineRef line; |
| 1644 | if(lineOnScreen >= 0) |
| 1645 | { |
| 1646 | if(coordType == eWrapCoords) return lineOnScreen; |
| 1647 | LineType d3lIdx = m_pDiffTextWindow->convertLineToDiff3LineIdx(lineOnScreen); |
| 1648 | if(!bFirstLine && d3lIdx >= SafeInt<LineType>(mDiff3LineVector->size())) |
| 1649 | d3lIdx = SafeInt<LineType>(mDiff3LineVector->size() - 1); |
| 1650 | if(coordType == eD3LLineCoords) return d3lIdx; |
| 1651 | while(!line.isValid() && d3lIdx < SafeInt<LineType>(mDiff3LineVector->size()) && d3lIdx >= 0) |
| 1652 | { |
| 1653 | const Diff3Line* d3l = (*mDiff3LineVector)[d3lIdx]; |
| 1654 | if(getWindowIndex() == e_SrcSelector::A) line = d3l->getLineA(); |
| 1655 | if(getWindowIndex() == e_SrcSelector::B) line = d3l->getLineB(); |
| 1656 | if(getWindowIndex() == e_SrcSelector::C) line = d3l->getLineC(); |
| 1657 | if(bFirstLine) |
| 1658 | ++d3lIdx; |
| 1659 | else |
| 1660 | --d3lIdx; |
| 1661 | } |
| 1662 | assert(coordType == eFileCoords); |
| 1663 | } |
| 1664 | return line; |
| 1665 | } |
| 1666 | |
| 1667 | void DiffTextWindow::getSelectionRange(LineRef* pFirstLine, LineRef* pLastLine, e_CoordType coordType) const |
| 1668 | { |
no test coverage detected