diff options
author | thestig <thestig@chromium.org> | 2016-04-29 18:14:37 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-29 18:14:37 -0700 |
commit | 8c32dfa88b9deedb5add135301a0f6b1128882ed (patch) | |
tree | ea2b004c4286b3b16113189b16a274dafe9c8163 /core | |
parent | e801d4e064690fbe1815d25d220cfbca79976a4f (diff) | |
download | pdfium-8c32dfa88b9deedb5add135301a0f6b1128882ed.tar.xz |
Subtract instead of adding the negation.
Do more cleanup in modified files.
Review-Url: https://codereview.chromium.org/1938613003
Diffstat (limited to 'core')
-rw-r--r-- | core/fpdfdoc/doc_vt.cpp | 12 | ||||
-rw-r--r-- | core/fxge/ge/fx_ge_text.cpp | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/core/fpdfdoc/doc_vt.cpp b/core/fpdfdoc/doc_vt.cpp index b728c68af6..88a4636bbc 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; } } } diff --git a/core/fxge/ge/fx_ge_text.cpp b/core/fxge/ge/fx_ge_text.cpp index f65e34a3e8..9ad93d872a 100644 --- a/core/fxge/ge/fx_ge_text.cpp +++ b/core/fxge/ge/fx_ge_text.cpp @@ -1580,7 +1580,7 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(CFX_Font* pFont, if (pFont->IsVertical()) ft_matrix.yx += ft_matrix.yy * skew / 100; else - ft_matrix.xy += -ft_matrix.xx * skew / 100; + ft_matrix.xy -= ft_matrix.xx * skew / 100; } if (pSubstFont->m_SubstFlags & FXFONT_SUBST_MM) { pFont->AdjustMMParams(glyph_index, dest_width, @@ -1850,7 +1850,7 @@ CFX_PathData* CFX_Font::LoadGlyphPath(uint32_t glyph_index, int dest_width) { if (m_bVertical) ft_matrix.yx += ft_matrix.yy * skew / 100; else - ft_matrix.xy += -ft_matrix.xx * skew / 100; + ft_matrix.xy -= ft_matrix.xx * skew / 100; } if (m_pSubstFont->m_SubstFlags & FXFONT_SUBST_MM) { AdjustMMParams(glyph_index, dest_width, m_pSubstFont->m_Weight); |