From ce813f82c914ad560e429a0685553b1e3e8797ac Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 5 Oct 2017 15:12:58 -0400 Subject: 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 Commit-Queue: dsinclair --- core/fpdfdoc/ctypeset.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'core/fpdfdoc/ctypeset.cpp') 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 #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); } } -- cgit v1.2.3