summaryrefslogtreecommitdiff
path: root/xfa/fde
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-04-19 21:59:33 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-19 21:59:33 +0000
commitc831580e1b4547d5fcbe74864e657c1c4ebffc12 (patch)
tree56ced70e887dd87c15588a6a2c65276334b0c971 /xfa/fde
parent8549ab48a5f8b613ea35dfd64f925fd0438efd0d (diff)
downloadpdfium-c831580e1b4547d5fcbe74864e657c1c4ebffc12.tar.xz
Fix duplicated text in each line in XFA widgets.
When calculating the characters to display, the run offset was not added to the offset inside the run, so characters from the first run were always used instead of from the run that the line should display. Bug: chromium:832909 Change-Id: I4d1d284894ce6ac9c7a49976aa6a6d0cf21f1382 Reviewed-on: https://pdfium-review.googlesource.com/30993 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde')
-rw-r--r--xfa/fde/cfde_texteditengine.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/xfa/fde/cfde_texteditengine.cpp b/xfa/fde/cfde_texteditengine.cpp
index ac66fd7f99..a423ba6eb4 100644
--- a/xfa/fde/cfde_texteditengine.cpp
+++ b/xfa/fde/cfde_texteditengine.cpp
@@ -953,6 +953,7 @@ std::vector<CFX_RectF> CFDE_TextEditEngine::GetCharRects(
FX_TXTRUN tr;
tr.pEdtEngine = this;
+ tr.iStart = piece.nStart;
tr.iLength = piece.nCount;
tr.pFont = font_;
tr.fFontSize = font_size_;
@@ -969,6 +970,7 @@ std::vector<FXTEXT_CHARPOS> CFDE_TextEditEngine::GetDisplayPos(
FX_TXTRUN tr;
tr.pEdtEngine = this;
+ tr.iStart = piece.nStart;
tr.iLength = piece.nCount;
tr.pFont = font_;
tr.fFontSize = font_size_;