summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-10-26 14:17:08 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-26 18:31:58 +0000
commitf0a7da7ec654a8a33b5f347074de69a5a8b769e2 (patch)
tree0e75d5842178767ba106aafcfaa66b0c51bd81eb
parent5d98f3044ed5fd3e41d1e764351a8829e1a47e4b (diff)
downloadpdfium-f0a7da7ec654a8a33b5f347074de69a5a8b769e2.tar.xz
[Merge M63] Fix cpdf_textpage so it doesn't omit spaces.
TBR=thestig@chromium.org Bug: pdfium:921,chromium:777024 Change-Id: I8864fd2ebdccc5f94aaf70cd8295068bf4db8b68 Reviewed-on: https://pdfium-review.googlesource.com/16492 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org> (cherry picked from commit 25e763e99932a4d12cbd51b3c36411b44163c5d8) Reviewed-on: https://pdfium-review.googlesource.com/16932
-rw-r--r--core/fpdftext/cpdf_textpage.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp
index fd33fb2f2f..82778b1658 100644
--- a/core/fpdftext/cpdf_textpage.cpp
+++ b/core/fpdftext/cpdf_textpage.cpp
@@ -1355,9 +1355,7 @@ CPDF_TextPage::GenerateCharacter CPDF_TextPage::ProcessInsertObject(
}
WideString PrevStr =
m_pPreTextObj->GetFont()->UnicodeFromCharCode(PrevItem.m_CharCode);
- if (PrevStr.IsEmpty())
- return GenerateCharacter::None;
- wchar_t preChar = PrevStr[PrevStr.GetLength() - 1];
+ wchar_t preChar = PrevStr.Last();
CFX_Matrix matrix = pObj->GetTextMatrix();
matrix.Concat(formMatrix);