summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_variabletext.cpp
diff options
context:
space:
mode:
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) {