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

Unified Diff: core/src/fpdftext/fpdf_text_int.cpp

Issue 1655423002: Merge to XFA: Kill CFX_ByteArray in master. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Still wonked. Created 4 years, 11 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdftext/fpdf_text_int.cpp
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index 55f736ee9c48499eef30f098feec585bdfe5a806..66d20aff0839bf8a1dcbcead43fec1509cfb7d11 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -10,6 +10,7 @@
#include <cctype>
#include <cwctype>
#include <memory>
+#include <vector>
#include "core/include/fpdfapi/fpdf_module.h"
#include "core/include/fpdfapi/fpdf_page.h"
@@ -748,16 +749,10 @@ int32_t CPDF_TextPage::FindTextlineFlowDirection() {
}
const int32_t nPageWidth = (int32_t)((CPDF_Page*)m_pPage)->GetPageWidth();
const int32_t nPageHeight = (int32_t)((CPDF_Page*)m_pPage)->GetPageHeight();
- CFX_ByteArray nHorizontalMask;
- if (!nHorizontalMask.SetSize(nPageWidth)) {
- return -1;
- }
- uint8_t* pDataH = nHorizontalMask.GetData();
- CFX_ByteArray nVerticalMask;
- if (!nVerticalMask.SetSize(nPageHeight)) {
- return -1;
- }
- uint8_t* pDataV = nVerticalMask.GetData();
+ std::vector<uint8_t> nHorizontalMask(nPageWidth);
+ std::vector<uint8_t> nVerticalMask(nPageHeight);
+ uint8_t* pDataH = nHorizontalMask.data();
+ uint8_t* pDataV = nVerticalMask.data();
int32_t index = 0;
FX_FLOAT fLineHeight = 0.0f;
CPDF_PageObject* pPageObj = NULL;
« 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