summaryrefslogtreecommitdiff
path: root/xfa/src/fxfa/app/xfa_fftext.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-03-09 13:24:25 -0800
committerTom Sepez <tsepez@chromium.org>2016-03-09 13:24:25 -0800
commit4f6fdbe6adf0d90886b9deb5666996603cf1207c (patch)
tree4fee37f0d6711efbfdebbb72e0ba1746c95ad05e /xfa/src/fxfa/app/xfa_fftext.cpp
parent2e95951e06bd4d11459fb257c7c2b8fc881854e8 (diff)
downloadpdfium-4f6fdbe6adf0d90886b9deb5666996603cf1207c.tar.xz
Structs shouldn't inherit from CFX_Target.
There are some assumptions in the code that CAPS_NAMED structs are POD, and can be memcpy'd, malloc'd, etc. CFX_Target adds a virtual dtor, which is not what is desired for many of these, so resolve by making each a CAPS_Named class or by removing the inheritence. In the process XFA_TextPiece was found to be malloc'd despite having a ctor. Move this to |new|, noting that the object is never freed (and goes out of existence when the allocator's pool is destroyed). BUG=pdfium:432 R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1780753002 .
Diffstat (limited to 'xfa/src/fxfa/app/xfa_fftext.cpp')
-rw-r--r--xfa/src/fxfa/app/xfa_fftext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/xfa/src/fxfa/app/xfa_fftext.cpp b/xfa/src/fxfa/app/xfa_fftext.cpp
index 2e9abb9f81..95d408ce71 100644
--- a/xfa/src/fxfa/app/xfa_fftext.cpp
+++ b/xfa/src/fxfa/app/xfa_fftext.cpp
@@ -163,7 +163,7 @@ const FX_WCHAR* CXFA_FFText::GetLinkURLAtPoint(FX_FLOAT fx, FX_FLOAT fy) {
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);
+ XFA_TextPiece* pPiece = pPieceLine->m_textPieces.GetAt(j);
if (pPiece->pLinkData && pPiece->rtPiece.Contains(x, y)) {
return pPiece->pLinkData->GetLinkURL();
}