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

Unified Diff: core/fpdfdoc/doc_vt.cpp

Issue 1938613003: Subtract instead of adding the negation. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nit Created 4 years, 8 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 | « no previous file | core/fxge/ge/fx_ge_text.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/doc_vt.cpp
diff --git a/core/fpdfdoc/doc_vt.cpp b/core/fpdfdoc/doc_vt.cpp
index b728c68af61fade85c2e699a3e35c581edb46437..88a4636bbc60beeb26c62b7d9f15bd784fa46ebf 100644
--- a/core/fpdfdoc/doc_vt.cpp
+++ b/core/fpdfdoc/doc_vt.cpp
@@ -372,7 +372,7 @@ CPVT_FloatRect CTypeset::CharArray() {
pLine->m_LineInfo.fLineWidth = x - pLine->m_LineInfo.fLineX;
pLine->m_LineInfo.fLineAscent = fLineAscent;
pLine->m_LineInfo.fLineDescent = fLineDescent;
- y += (-fLineDescent);
+ y -= fLineDescent;
}
return m_rcRet = CPVT_FloatRect(0, 0, x, y);
}
@@ -640,7 +640,7 @@ void CTypeset::SplitLines(FX_BOOL bTypeset, FX_FLOAT fFontSize) {
m_pSection->AddLine(line);
}
fMaxY += (fLineAscent + m_pVT->GetLineLeading(m_pSection->m_SecInfo));
- fMaxY += (-fLineDescent);
+ fMaxY -= fLineDescent;
fMaxX = std::max(fLineWidth, fMaxX);
nLineHead = i;
fLineWidth = 0.0f;
@@ -666,7 +666,7 @@ void CTypeset::SplitLines(FX_BOOL bTypeset, FX_FLOAT fFontSize) {
m_pSection->AddLine(line);
}
fMaxY += (fLineAscent + m_pVT->GetLineLeading(m_pSection->m_SecInfo));
- fMaxY += (-fLineDescent);
+ fMaxY -= fLineDescent;
fMaxX = std::max(fLineWidth, fMaxX);
}
} else {
@@ -688,8 +688,8 @@ void CTypeset::SplitLines(FX_BOOL bTypeset, FX_FLOAT fFontSize) {
line.fLineDescent = fLineDescent;
m_pSection->AddLine(line);
}
- fMaxY += (m_pVT->GetLineLeading(m_pSection->m_SecInfo) + fLineAscent +
- (-fLineDescent));
+ fMaxY += m_pVT->GetLineLeading(m_pSection->m_SecInfo) + fLineAscent -
+ fLineDescent;
}
m_rcRet = CPVT_FloatRect(0, 0, fMaxX, fMaxY);
}
@@ -761,7 +761,7 @@ void CTypeset::OutputLines() {
fPosX += m_pVT->GetWordWidth(*pWord);
}
}
- fPosY += (-pLine->m_LineInfo.fLineDescent);
+ fPosY -= pLine->m_LineInfo.fLineDescent;
}
}
}
« no previous file with comments | « no previous file | core/fxge/ge/fx_ge_text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698