diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-10-05 15:12:58 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-10-05 19:31:08 +0000 |
commit | ce813f82c914ad560e429a0685553b1e3e8797ac (patch) | |
tree | 7410dfd203edbaeca8989566143ac166a6fb5ce0 /core/fpdfdoc/ctypeset.cpp | |
parent | 480ca10f7a20dd65921dcec046d91b503f3599c3 (diff) | |
download | pdfium-ce813f82c914ad560e429a0685553b1e3e8797ac.tar.xz |
Remove CPVT_WordProps
Only one of the props was being used and that prop always had the same
value. This CL removes CPVT_WordProps.
Change-Id: I8cf64f0e9b80c5af18b8fc40ef7b602ffeec7f93
Reviewed-on: https://pdfium-review.googlesource.com/15672
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfdoc/ctypeset.cpp')
-rw-r--r-- | core/fpdfdoc/ctypeset.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/core/fpdfdoc/ctypeset.cpp b/core/fpdfdoc/ctypeset.cpp index 856377e598..090985e436 100644 --- a/core/fpdfdoc/ctypeset.cpp +++ b/core/fpdfdoc/ctypeset.cpp @@ -9,6 +9,7 @@ #include <algorithm> #include "core/fpdfdoc/cline.h" +#include "core/fpdfdoc/cpdf_variabletext.h" #include "core/fpdfdoc/cpvt_wordinfo.h" #include "core/fpdfdoc/csection.h" #include "third_party/base/stl_util.h" @@ -470,22 +471,8 @@ void CTypeset::OutputLines() { if (pdfium::IndexInBounds(m_pSection->m_WordArray, w)) { CPVT_WordInfo* pWord = m_pSection->m_WordArray[w].get(); pWord->fWordX = fPosX - fMinX; - if (pWord->pWordProps) { - switch (pWord->pWordProps->nScriptType) { - default: - case CPDF_VariableText::ScriptType::Normal: - pWord->fWordY = fPosY - fMinY; - break; - case CPDF_VariableText::ScriptType::Super: - pWord->fWordY = fPosY - m_pVT->GetWordAscent(*pWord) - fMinY; - break; - case CPDF_VariableText::ScriptType::Sub: - pWord->fWordY = fPosY - m_pVT->GetWordDescent(*pWord) - fMinY; - break; - } - } else { - pWord->fWordY = fPosY - fMinY; - } + pWord->fWordY = fPosY - fMinY; + fPosX += m_pVT->GetWordWidth(*pWord); } } |