| Index: xfa/fxfa/app/xfa_fftext.cpp
|
| diff --git a/xfa/fxfa/app/xfa_fftext.cpp b/xfa/fxfa/app/xfa_fftext.cpp
|
| index 2307ea0dc47306f888e9d8cef0108d6e76384729..3d2c9a6ea0f222bf38628d5f7d5d78fa8c1d6e3e 100644
|
| --- a/xfa/fxfa/app/xfa_fftext.cpp
|
| +++ b/xfa/fxfa/app/xfa_fftext.cpp
|
| @@ -153,22 +153,17 @@ FWL_WidgetHit CXFA_FFText::OnHitTest(FX_FLOAT fx, FX_FLOAT fy) {
|
| }
|
| const FX_WCHAR* CXFA_FFText::GetLinkURLAtPoint(FX_FLOAT fx, FX_FLOAT fy) {
|
| CXFA_TextLayout* pTextLayout = m_pDataAcc->GetTextLayout();
|
| - if (!pTextLayout) {
|
| + if (!pTextLayout)
|
| return nullptr;
|
| - }
|
| - FX_FLOAT x(fx), y(fy);
|
| +
|
| + FX_FLOAT x(fx);
|
| + FX_FLOAT y(fy);
|
| FWLToClient(x, y);
|
| - const CFX_ArrayTemplate<CXFA_PieceLine*>* pPieceLines =
|
| - pTextLayout->GetPieceLines();
|
| - int32_t iCount = pPieceLines->GetSize();
|
| - for (int32_t i = 0; i < iCount; i++) {
|
| - CXFA_PieceLine* pPieceLine = pPieceLines->GetAt(i);
|
| - int32_t iPieces = pPieceLine->m_textPieces.GetSize();
|
| - for (int32_t j = 0; j < iPieces; j++) {
|
| - XFA_TextPiece* pPiece = pPieceLine->m_textPieces.GetAt(j);
|
| - if (pPiece->pLinkData && pPiece->rtPiece.Contains(x, y)) {
|
| +
|
| + for (const auto& pPieceLine : *pTextLayout->GetPieceLines()) {
|
| + for (const auto& pPiece : pPieceLine->m_textPieces) {
|
| + if (pPiece->pLinkData && pPiece->rtPiece.Contains(x, y))
|
| return pPiece->pLinkData->GetLinkURL();
|
| - }
|
| }
|
| }
|
| return nullptr;
|
|
|