summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-02-23 15:23:29 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-02-23 15:23:29 -0500
commit2c8fad44315db58f5b3222161dcb699691dca904 (patch)
tree70e9bdf55e1e3197d8bd088abd103012b602e32f /core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
parent2886a25b68225ad3ad70d417b01108ad1d126488 (diff)
downloadpdfium-2c8fad44315db58f5b3222161dcb699691dca904.tar.xz
Remove FXSYS_Mul.
This define just multiples the two parameters together. Inline the *'s. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1729613003 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp')
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index efe0f25a9f..fe07a63bca 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -1351,12 +1351,10 @@ void CPDF_StreamContentParser::AddTextObject(CFX_ByteString* pStrs,
if (fInitKerning != 0) {
if (!pFont->IsVertWriting()) {
m_pCurStates->m_TextX -=
- FXSYS_Mul(fInitKerning, m_pCurStates->m_TextState.GetFontSize()) /
- 1000;
+ (fInitKerning * m_pCurStates->m_TextState.GetFontSize()) / 1000;
} else {
m_pCurStates->m_TextY -=
- FXSYS_Mul(fInitKerning, m_pCurStates->m_TextState.GetFontSize()) /
- 1000;
+ (fInitKerning * m_pCurStates->m_TextState.GetFontSize()) / 1000;
}
}
if (nsegs == 0) {
@@ -1396,13 +1394,11 @@ void CPDF_StreamContentParser::AddTextObject(CFX_ByteString* pStrs,
if (pKerning && pKerning[nsegs - 1] != 0) {
if (!pFont->IsVertWriting()) {
m_pCurStates->m_TextX -=
- FXSYS_Mul(pKerning[nsegs - 1],
- m_pCurStates->m_TextState.GetFontSize()) /
+ (pKerning[nsegs - 1] * m_pCurStates->m_TextState.GetFontSize()) /
1000;
} else {
m_pCurStates->m_TextY -=
- FXSYS_Mul(pKerning[nsegs - 1],
- m_pCurStates->m_TextState.GetFontSize()) /
+ (pKerning[nsegs - 1] * m_pCurStates->m_TextState.GetFontSize()) /
1000;
}
}
@@ -1430,8 +1426,7 @@ void CPDF_StreamContentParser::Handle_ShowText_Positioning() {
if (nsegs == 0) {
for (int i = 0; i < n; i++) {
m_pCurStates->m_TextX -=
- FXSYS_Mul(pArray->GetNumberAt(i),
- m_pCurStates->m_TextState.GetFontSize()) /
+ (pArray->GetNumberAt(i) * m_pCurStates->m_TextState.GetFontSize()) /
1000;
}
return;