| 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 "../../include/fpdfapi/fpdf_resource.h" | 7 #include "../../include/fpdfapi/fpdf_resource.h" |
| 8 #include "../../include/fpdfapi/fpdf_pageobj.h" | 8 #include "../../include/fpdfapi/fpdf_pageobj.h" |
| 9 #include "../../include/fpdftext/fpdf_text.h" | 9 #include "../../include/fpdftext/fpdf_text.h" |
| 10 #include "../../include/fpdfapi/fpdf_page.h" | 10 #include "../../include/fpdfapi/fpdf_page.h" |
| (...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1492 if (nContentMark < 1) { | 1492 if (nContentMark < 1) { |
| 1493 return; | 1493 return; |
| 1494 } | 1494 } |
| 1495 CFX_WideString actText; | 1495 CFX_WideString actText; |
| 1496 CPDF_Dictionary* pDict = NULL; | 1496 CPDF_Dictionary* pDict = NULL; |
| 1497 int n = 0; | 1497 int n = 0; |
| 1498 for (n = 0; n < nContentMark; n++) { | 1498 for (n = 0; n < nContentMark; n++) { |
| 1499 CPDF_ContentMarkItem& item = pMarkData->GetItem(n); | 1499 CPDF_ContentMarkItem& item = pMarkData->GetItem(n); |
| 1500 CFX_ByteString tagStr = (CFX_ByteString)item.GetName(); | 1500 CFX_ByteString tagStr = (CFX_ByteString)item.GetName(); |
| 1501 pDict = (CPDF_Dictionary*)item.GetParam(); | 1501 pDict = (CPDF_Dictionary*)item.GetParam(); |
| 1502 CPDF_String* temp = (CPDF_String*)pDict->GetElement(FX_BSTRC("ActualText
")); | 1502 CPDF_String* temp = (CPDF_String*)(pDict ? pDict->GetElement(FX_BSTRC("A
ctualText")) : NULL); |
| 1503 if (temp) { | 1503 if (temp) { |
| 1504 actText = temp->GetUnicodeText(); | 1504 actText = temp->GetUnicodeText(); |
| 1505 } | 1505 } |
| 1506 } | 1506 } |
| 1507 FX_STRSIZE nItems = actText.GetLength(); | 1507 FX_STRSIZE nItems = actText.GetLength(); |
| 1508 if (nItems < 1) { | 1508 if (nItems < 1) { |
| 1509 return; | 1509 return; |
| 1510 } | 1510 } |
| 1511 CPDF_Font* pFont = pTextObj->GetFont(); | 1511 CPDF_Font* pFont = pTextObj->GetFont(); |
| 1512 CFX_AffineMatrix formMatrix = Obj.m_formMatrix; | 1512 CFX_AffineMatrix formMatrix = Obj.m_formMatrix; |
| (...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2848 if (!m_IsParserd || index < 0 || index >= m_LinkList.GetSize()) { | 2848 if (!m_IsParserd || index < 0 || index >= m_LinkList.GetSize()) { |
| 2849 return; | 2849 return; |
| 2850 } | 2850 } |
| 2851 CPDF_LinkExt* link = NULL; | 2851 CPDF_LinkExt* link = NULL; |
| 2852 link = m_LinkList.GetAt(index); | 2852 link = m_LinkList.GetAt(index); |
| 2853 if (!link) { | 2853 if (!link) { |
| 2854 return ; | 2854 return ; |
| 2855 } | 2855 } |
| 2856 m_pTextPage->GetRectArray(link->m_Start, link->m_Count, rects); | 2856 m_pTextPage->GetRectArray(link->m_Start, link->m_Count, rects); |
| 2857 } | 2857 } |
| OLD | NEW |