diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-02-02 16:02:03 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-02-02 16:02:03 -0800 |
commit | ed5d7aa789ec5ef7b440d7e56b71804b41a928e3 (patch) | |
tree | 028bced4e1203313752240a1a3de7fbf998611c3 /core/src/fpdftext | |
parent | 23bf560507a8e03968e66480281597be9161abf4 (diff) | |
download | pdfium-ed5d7aa789ec5ef7b440d7e56b71804b41a928e3.tar.xz |
Merge to XFA: Kill CFX_ByteArray in master.
One trivial edit in fx_basic.h
Includes both fixes for build breakage.
Review URL: https://codereview.chromium.org/1653253002 .
(cherry picked from commit 9b0a59d659d8083802385649ba74370d65c41e36)
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1655423002 .
Diffstat (limited to 'core/src/fpdftext')
-rw-r--r-- | core/src/fpdftext/fpdf_text_int.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp index 55f736ee9c..66d20aff08 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; |