From 58e4c5ac24a88f83d1ba8277dee87baf4cba36a0 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Mon, 13 Feb 2017 16:08:51 -0500 Subject: Clean up CPDF_TextObject a bit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modernizing CPDF_TextObject a little bit, in preparation for the addition of APIs for adding text to PDFs. m_pCharCodes, m_pCharPos are now vectors, this caused some propagation to other classes. Also m_Pos is now a point. Note that GetItemInfo is being changed in another CL, so did minimal changes there. Change-Id: I6e5f19b5d45872e3e714a7cb587c81c92e640ea3 Reviewed-on: https://pdfium-review.googlesource.com/2614 Commit-Queue: Nicolás Peña Reviewed-by: Tom Sepez --- fpdfsdk/javascript/Document.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fpdfsdk/javascript') diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp index 4bf1afd5a3..1a0a53cce2 100644 --- a/fpdfsdk/javascript/Document.cpp +++ b/fpdfsdk/javascript/Document.cpp @@ -1543,7 +1543,7 @@ int Document::CountWords(CPDF_TextObject* pTextObj) { uint32_t charcode = CPDF_Font::kInvalidCharCode; FX_FLOAT kerning; - pTextObj->GetCharInfo(i, charcode, kerning); + pTextObj->GetCharInfo(i, &charcode, &kerning); CFX_WideString swUnicode = pFont->UnicodeFromCharCode(charcode); uint16_t unicode = 0; @@ -1576,7 +1576,7 @@ CFX_WideString Document::GetObjWordStr(CPDF_TextObject* pTextObj, uint32_t charcode = CPDF_Font::kInvalidCharCode; FX_FLOAT kerning; - pTextObj->GetCharInfo(i, charcode, kerning); + pTextObj->GetCharInfo(i, &charcode, &kerning); CFX_WideString swUnicode = pFont->UnicodeFromCharCode(charcode); uint16_t unicode = 0; -- cgit v1.2.3