OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "core/fpdftext/fpdf_text_int.h" | 7 #include "core/fpdftext/fpdf_text_int.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <cctype> | 10 #include <cctype> |
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1118 CFX_WideString actText; | 1118 CFX_WideString actText; |
1119 FX_BOOL bExist = FALSE; | 1119 FX_BOOL bExist = FALSE; |
1120 CPDF_Dictionary* pDict = NULL; | 1120 CPDF_Dictionary* pDict = NULL; |
1121 int n = 0; | 1121 int n = 0; |
1122 for (n = 0; n < nContentMark; n++) { | 1122 for (n = 0; n < nContentMark; n++) { |
1123 CPDF_ContentMarkItem& item = pMarkData->GetItem(n); | 1123 CPDF_ContentMarkItem& item = pMarkData->GetItem(n); |
1124 if (item.GetParamType() == CPDF_ContentMarkItem::ParamType::None) | 1124 if (item.GetParamType() == CPDF_ContentMarkItem::ParamType::None) |
1125 continue; | 1125 continue; |
1126 pDict = item.GetParam(); | 1126 pDict = item.GetParam(); |
1127 CPDF_String* temp = | 1127 CPDF_String* temp = |
1128 ToString(pDict ? pDict->GetElement("ActualText") : nullptr); | 1128 ToString(pDict ? pDict->GetObjectBy("ActualText") : nullptr); |
1129 if (temp) { | 1129 if (temp) { |
1130 bExist = TRUE; | 1130 bExist = TRUE; |
1131 actText = temp->GetUnicodeText(); | 1131 actText = temp->GetUnicodeText(); |
1132 } | 1132 } |
1133 } | 1133 } |
1134 if (!bExist) | 1134 if (!bExist) |
1135 return FPDFTEXT_MC_PASS; | 1135 return FPDFTEXT_MC_PASS; |
1136 | 1136 |
1137 if (m_pPreTextObj) { | 1137 if (m_pPreTextObj) { |
1138 CPDF_ContentMarkData* pPreMarkData = | 1138 CPDF_ContentMarkData* pPreMarkData = |
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2511 if (!m_bIsParsed || index < 0 || index >= m_LinkList.GetSize()) { | 2511 if (!m_bIsParsed || index < 0 || index >= m_LinkList.GetSize()) { |
2512 return; | 2512 return; |
2513 } | 2513 } |
2514 CPDF_LinkExt* link = NULL; | 2514 CPDF_LinkExt* link = NULL; |
2515 link = m_LinkList.GetAt(index); | 2515 link = m_LinkList.GetAt(index); |
2516 if (!link) { | 2516 if (!link) { |
2517 return; | 2517 return; |
2518 } | 2518 } |
2519 m_pTextPage->GetRectArray(link->m_Start, link->m_Count, rects); | 2519 m_pTextPage->GetRectArray(link->m_Start, link->m_Count, rects); |
2520 } | 2520 } |
OLD | NEW |