diff options
author | Lei Zhang <thestig@chromium.org> | 2015-10-01 22:31:56 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-10-01 22:31:56 -0700 |
commit | 028ded15d2a90b8d1c20a49648054c6b34ee039a (patch) | |
tree | 741a30d91edf32321f3988e888495a950a5d7d36 /core/src/fpdftext/fpdf_text.cpp | |
parent | 78b2a931e4e4ff4dc667bc358560e896601c2f50 (diff) | |
download | pdfium-028ded15d2a90b8d1c20a49648054c6b34ee039a.tar.xz |
XFA: remove new tests from fpdftext
This is a manual merge of 7f6b6677665588a27b9d14babc6358840454ce17
Original review: https://codereview.chromium.org/1085363003
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1381513005 .
Diffstat (limited to 'core/src/fpdftext/fpdf_text.cpp')
-rw-r--r-- | core/src/fpdftext/fpdf_text.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp index 0659024d90..0b53338ea0 100644 --- a/core/src/fpdftext/fpdf_text.cpp +++ b/core/src/fpdftext/fpdf_text.cpp @@ -187,9 +187,6 @@ CTextBaseLine* CTextPage::InsertTextBox(CTextBaseLine* pBaseLine, } if (pBaseLine == NULL) { pBaseLine = new CTextBaseLine; - if (NULL == pBaseLine) { - return NULL; - } pBaseLine->m_BaseLine = basey; m_BaseLines.InsertAt(i, pBaseLine); } @@ -461,12 +458,10 @@ void CTextPage::FindColumns() { CTextColumn* pColumn = FindColumn(pTextBox->m_Right); if (pColumn == NULL) { pColumn = new CTextColumn; - if (pColumn) { - pColumn->m_Count = 1; - pColumn->m_AvgPos = pTextBox->m_Right; - pColumn->m_TextPos = -1; - m_TextColumns.Add(pColumn); - } + pColumn->m_Count = 1; + pColumn->m_AvgPos = pTextBox->m_Right; + pColumn->m_TextPos = -1; + m_TextColumns.Add(pColumn); } else { pColumn->m_AvgPos = (pColumn->m_Count * pColumn->m_AvgPos + pTextBox->m_Right) / @@ -540,9 +535,6 @@ void CTextBaseLine::InsertTextBox(FX_FLOAT leftx, } } CTextBox* pText = new CTextBox; - if (NULL == pText) { - return; - } pText->m_Text = text; pText->m_Left = leftx; pText->m_Right = rightx; |