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

Unified Diff: core/fpdftext/fpdf_text_int.cpp

Issue 2027273002: Fix all the code which has duplicate variable declarations (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 7 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/fpdfdoc/doc_annot.cpp ('k') | core/fxcodec/codec/fx_codec_fax.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdftext/fpdf_text_int.cpp
diff --git a/core/fpdftext/fpdf_text_int.cpp b/core/fpdftext/fpdf_text_int.cpp
index 136c44b5ed04280282354168c2e38eb3f5ae4c33..1f8ab75e85bc0be33ca195dbc098d00b8240e36d 100644
--- a/core/fpdftext/fpdf_text_int.cpp
+++ b/core/fpdftext/fpdf_text_int.cpp
@@ -988,19 +988,16 @@ void CPDF_TextPage::ProcessTextObject(
}
int i = 0;
for (i = count - 1; i >= 0; i--) {
- PDFTEXT_Obj prev_Obj = m_LineObj.GetAt(i);
- CFX_Matrix prev_matrix;
- prev_Obj.m_pTextObj->GetTextMatrix(&prev_matrix);
- FX_FLOAT Prev_x = prev_Obj.m_pTextObj->GetPosX(),
- Prev_y = prev_Obj.m_pTextObj->GetPosY();
- prev_Obj.m_formMatrix.Transform(Prev_x, Prev_y);
+ PDFTEXT_Obj prev_text_obj = m_LineObj.GetAt(i);
+ FX_FLOAT Prev_x = prev_text_obj.m_pTextObj->GetPosX(),
+ Prev_y = prev_text_obj.m_pTextObj->GetPosY();
+ prev_text_obj.m_formMatrix.Transform(Prev_x, Prev_y);
m_DisplayMatrix.Transform(Prev_x, Prev_y);
if (this_x >= Prev_x) {
- if (i == count - 1) {
+ if (i == count - 1)
m_LineObj.Add(Obj);
- } else {
+ else
m_LineObj.InsertAt(i + 1, Obj);
- }
break;
}
}
@@ -1611,9 +1608,9 @@ int CPDF_TextPage::ProcessInsertObject(const CPDF_TextObject* pObj,
if (re.Contains(pObj->GetPosX(), pObj->GetPosY())) {
bNewline = FALSE;
} else {
- CFX_FloatRect re(0, pObj->m_Bottom, 1000, pObj->m_Top);
- if (re.Contains(m_pPreTextObj->GetPosX(),
- m_pPreTextObj->GetPosY())) {
+ CFX_FloatRect rect(0, pObj->m_Bottom, 1000, pObj->m_Top);
+ if (rect.Contains(m_pPreTextObj->GetPosX(),
+ m_pPreTextObj->GetPosY())) {
bNewline = FALSE;
}
}
« no previous file with comments | « core/fpdfdoc/doc_annot.cpp ('k') | core/fxcodec/codec/fx_codec_fax.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698