summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_variabletext.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-05 15:12:58 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-05 19:31:08 +0000
commitce813f82c914ad560e429a0685553b1e3e8797ac (patch)
tree7410dfd203edbaeca8989566143ac166a6fb5ce0 /core/fpdfdoc/cpdf_variabletext.cpp
parent480ca10f7a20dd65921dcec046d91b503f3599c3 (diff)
downloadpdfium-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/cpdf_variabletext.cpp')
-rw-r--r--core/fpdfdoc/cpdf_variabletext.cpp30
1 files changed, 1 insertions, 29 deletions
diff --git a/core/fpdfdoc/cpdf_variabletext.cpp b/core/fpdfdoc/cpdf_variabletext.cpp
index e22e954f12..8e5a74e171 100644
--- a/core/fpdfdoc/cpdf_variabletext.cpp
+++ b/core/fpdfdoc/cpdf_variabletext.cpp
@@ -188,27 +188,11 @@ bool CPDF_VariableText::Iterator::GetWord(CPVT_Word& word) const {
pWord->fWordY + pSection->m_SecInfo.rcSection.top));
word.fAscent = m_pVT->GetWordAscent(*pWord);
word.fDescent = m_pVT->GetWordDescent(*pWord);
- if (pWord->pWordProps)
- word.WordProps = *pWord->pWordProps;
word.nFontIndex = m_pVT->GetWordFontIndex(*pWord);
word.fFontSize = m_pVT->GetWordFontSize();
return true;
}
-bool CPDF_VariableText::Iterator::SetWord(const CPVT_Word& word) {
- if (!pdfium::IndexInBounds(m_pVT->m_SectionArray, m_CurPos.nSecIndex))
- return false;
-
- CSection* pSection = m_pVT->m_SectionArray[m_CurPos.nSecIndex].get();
- if (!pdfium::IndexInBounds(pSection->m_WordArray, m_CurPos.nWordIndex))
- return false;
-
- CPVT_WordInfo* pWord = pSection->m_WordArray[m_CurPos.nWordIndex].get();
- if (pWord->pWordProps)
- *pWord->pWordProps = word.WordProps;
- return true;
-}
-
bool CPDF_VariableText::Iterator::GetLine(CPVT_Line& line) const {
ASSERT(m_pVT);
line.lineplace = CPVT_WordPlace(m_CurPos.nSecIndex, m_CurPos.nLineIndex, -1);
@@ -237,18 +221,6 @@ bool CPDF_VariableText::Iterator::GetSection(CPVT_Section& section) const {
CSection* pSection = m_pVT->m_SectionArray[m_CurPos.nSecIndex].get();
section.rcSection = m_pVT->InToOut(pSection->m_SecInfo.rcSection);
- if (pSection->m_SecInfo.pWordProps)
- section.WordProps = *pSection->m_SecInfo.pWordProps;
- return true;
-}
-
-bool CPDF_VariableText::Iterator::SetSection(const CPVT_Section& section) {
- if (!pdfium::IndexInBounds(m_pVT->m_SectionArray, m_CurPos.nSecIndex))
- return false;
-
- CSection* pSection = m_pVT->m_SectionArray[m_CurPos.nSecIndex].get();
- if (pSection->m_SecInfo.pWordProps)
- *pSection->m_SecInfo.pWordProps = section.WordProps;
return true;
}
@@ -310,7 +282,7 @@ CPVT_WordPlace CPDF_VariableText::InsertWord(const CPVT_WordPlace& place,
int32_t nFontIndex =
GetSubWord() > 0 ? GetDefaultFontIndex()
: GetWordFontIndex(word, charset, GetDefaultFontIndex());
- return AddWord(newplace, CPVT_WordInfo(word, charset, nFontIndex, nullptr));
+ return AddWord(newplace, CPVT_WordInfo(word, charset, nFontIndex));
}
CPVT_WordPlace CPDF_VariableText::InsertSection(const CPVT_WordPlace& place) {