diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-07 20:42:57 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-07 20:42:57 +0000 |
commit | 7a38ca461520ab6ad34dc1271a04c64dd71415c4 (patch) | |
tree | ed5f8dccff9994a01ac8e9dbd581b7ec9924c697 /core/fpdftext/cpdf_textpage.cpp | |
parent | e7207f33f8024b59fc85abb1b4594b0fbab5361b (diff) | |
download | pdfium-7a38ca461520ab6ad34dc1271a04c64dd71415c4.tar.xz |
Initialize CPDF_TextPage members in the header.
Change-Id: I667a3cd696d44692fa3d73bdee7c2f48d3039255
Reviewed-on: https://pdfium-review.googlesource.com/32152
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdftext/cpdf_textpage.cpp')
-rw-r--r-- | core/fpdftext/cpdf_textpage.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp index cc0c9db8a1..52b669638c 100644 --- a/core/fpdftext/cpdf_textpage.cpp +++ b/core/fpdftext/cpdf_textpage.cpp @@ -120,28 +120,18 @@ PDFTEXT_Obj::PDFTEXT_Obj(const PDFTEXT_Obj& that) = default; PDFTEXT_Obj::~PDFTEXT_Obj() {} -FPDF_CHAR_INFO::FPDF_CHAR_INFO() - : m_Unicode(0), - m_Charcode(0), - m_Flag(0), - m_FontSize(0), - m_pTextObj(nullptr) {} +FPDF_CHAR_INFO::FPDF_CHAR_INFO() {} FPDF_CHAR_INFO::~FPDF_CHAR_INFO() {} -PAGECHAR_INFO::PAGECHAR_INFO() - : m_Index(0), m_CharCode(0), m_Unicode(0), m_Flag(0), m_pTextObj(nullptr) {} +PAGECHAR_INFO::PAGECHAR_INFO() {} PAGECHAR_INFO::PAGECHAR_INFO(const PAGECHAR_INFO&) = default; PAGECHAR_INFO::~PAGECHAR_INFO() {} CPDF_TextPage::CPDF_TextPage(const CPDF_Page* pPage, FPDFText_Direction flags) - : m_pPage(pPage), - m_parserflag(flags), - m_pPreTextObj(nullptr), - m_bIsParsed(false), - m_TextlineDir(TextOrientation::Unknown) { + : m_pPage(pPage), m_parserflag(flags) { m_TextBuf.EstimateSize(0, 10240); const FX_RECT rect(0, 0, static_cast<int>(pPage->GetPageWidth()), static_cast<int>(pPage->GetPageHeight())); @@ -1446,9 +1436,8 @@ Optional<PAGECHAR_INFO> CPDF_TextPage::GenerateCharInfo(wchar_t unicode) { PAGECHAR_INFO info; info.m_Index = m_TextBuf.GetLength(); - info.m_Unicode = unicode; - info.m_pTextObj = nullptr; info.m_CharCode = CPDF_Font::kInvalidCharCode; + info.m_Unicode = unicode; info.m_Flag = FPDFTEXT_CHAR_GENERATED; int preWidth = 0; |