Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: core/src/fpdftext/fpdf_text_int.cpp

Issue 1653253002: Kill CFX_ByteArray in master. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: ... and its gone. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/src/fpdfdoc/doc_utils.cpp ('k') | fpdfsdk/include/fsdk_baseform.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/src/fpdftext/text_int.h" 7 #include "core/src/fpdftext/text_int.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cctype> 10 #include <cctype>
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 } 741 }
742 } 742 }
743 return breakPos; 743 return breakPos;
744 } 744 }
745 int32_t CPDF_TextPage::FindTextlineFlowDirection() { 745 int32_t CPDF_TextPage::FindTextlineFlowDirection() {
746 if (!m_pPage) { 746 if (!m_pPage) {
747 return -1; 747 return -1;
748 } 748 }
749 const int32_t nPageWidth = (int32_t)((CPDF_Page*)m_pPage)->GetPageWidth(); 749 const int32_t nPageWidth = (int32_t)((CPDF_Page*)m_pPage)->GetPageWidth();
750 const int32_t nPageHeight = (int32_t)((CPDF_Page*)m_pPage)->GetPageHeight(); 750 const int32_t nPageHeight = (int32_t)((CPDF_Page*)m_pPage)->GetPageHeight();
751 CFX_ByteArray nHorizontalMask; 751 std::vector<uint8_t> nHorizontalMask(nPageWidth);
752 if (!nHorizontalMask.SetSize(nPageWidth)) { 752 std::vector<uint8_t> nVerticalMask(nPageHeight);
753 return -1; 753 uint8_t* pDataH = nHorizontalMask.data();
754 } 754 uint8_t* pDataV = nVerticalMask.data();
755 uint8_t* pDataH = nHorizontalMask.GetData();
756 CFX_ByteArray nVerticalMask;
757 if (!nVerticalMask.SetSize(nPageHeight)) {
758 return -1;
759 }
760 uint8_t* pDataV = nVerticalMask.GetData();
761 int32_t index = 0; 755 int32_t index = 0;
762 FX_FLOAT fLineHeight = 0.0f; 756 FX_FLOAT fLineHeight = 0.0f;
763 CPDF_PageObject* pPageObj = NULL; 757 CPDF_PageObject* pPageObj = NULL;
764 FX_POSITION pos = NULL; 758 FX_POSITION pos = NULL;
765 pos = m_pPage->GetFirstObjectPosition(); 759 pos = m_pPage->GetFirstObjectPosition();
766 if (!pos) { 760 if (!pos) {
767 return -1; 761 return -1;
768 } 762 }
769 while (pos) { 763 while (pos) {
770 pPageObj = m_pPage->GetNextObject(pos); 764 pPageObj = m_pPage->GetNextObject(pos);
(...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after
2634 if (!m_bIsParsed || index < 0 || index >= m_LinkList.GetSize()) { 2628 if (!m_bIsParsed || index < 0 || index >= m_LinkList.GetSize()) {
2635 return; 2629 return;
2636 } 2630 }
2637 CPDF_LinkExt* link = NULL; 2631 CPDF_LinkExt* link = NULL;
2638 link = m_LinkList.GetAt(index); 2632 link = m_LinkList.GetAt(index);
2639 if (!link) { 2633 if (!link) {
2640 return; 2634 return;
2641 } 2635 }
2642 m_pTextPage->GetRectArray(link->m_Start, link->m_Count, rects); 2636 m_pTextPage->GetRectArray(link->m_Start, link->m_Count, rects);
2643 } 2637 }
OLDNEW
« no previous file with comments | « core/src/fpdfdoc/doc_utils.cpp ('k') | fpdfsdk/include/fsdk_baseform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698