diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2015-10-21 13:29:23 -0400 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2015-10-21 13:29:23 -0400 |
commit | 316eb864137a0b8eeb0d0d4d698ba83f4946a89c (patch) | |
tree | 9268f9369d9382ca3ee8f7496ab71394dfa9daef /core/src/fpdftext | |
parent | 43ce9035a026c7b4f15aa938dc39444d9253ea9f (diff) | |
download | pdfium-316eb864137a0b8eeb0d0d4d698ba83f4946a89c.tar.xz |
Merge to XFA: Add type cast definitions for CPDF_String.
This Cl adds ToString, CPDF_Object::AsString and CPDF_Object::IsString and
updates the src to use them as needed.
BUG=pdfium:201
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1417933002 .
(cherry picked from commit 53d3ab125ef583be8cfac907b308a6551b93067a)
Review URL: https://codereview.chromium.org/1408323006 .
Diffstat (limited to 'core/src/fpdftext')
-rw-r--r-- | core/src/fpdftext/fpdf_text_int.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp index 152bb4448f..8931acdde4 100644 --- a/core/src/fpdftext/fpdf_text_int.cpp +++ b/core/src/fpdftext/fpdf_text_int.cpp @@ -1341,8 +1341,7 @@ int32_t CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj) { CFX_ByteString tagStr = (CFX_ByteString)item.GetName(); pDict = ToDictionary(static_cast<CPDF_Object*>(item.GetParam())); CPDF_String* temp = - (CPDF_String*)(pDict ? pDict->GetElement(FX_BSTRC("ActualText")) - : NULL); + ToString(pDict ? pDict->GetElement(FX_BSTRC("ActualText")) : nullptr); if (temp) { bExist = TRUE; actText = temp->GetUnicodeText(); @@ -1413,9 +1412,7 @@ void CPDF_TextPage::ProcessMarkedContent(PDFTEXT_Obj Obj) { pDict = ToDictionary(static_cast<CPDF_Object*>(item.GetParam())); CPDF_String* temp = - (CPDF_String*)(pDict ? pDict->GetElement(FX_BSTRC("ActualText")) - : NULL); - + ToString(pDict ? pDict->GetElement(FX_BSTRC("ActualText")) : nullptr); if (temp) { actText = temp->GetUnicodeText(); } |