From cbcae9be4461b9271315038bc5a30262d26626c1 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Wed, 3 Jan 2018 15:43:25 -0500 Subject: Remove unused methods from CPDF_VariableText MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id8012a5769df68d29da5c58cc821c71ca93240e1 Reviewed-on: https://pdfium-review.googlesource.com/22111 Reviewed-by: dsinclair Commit-Queue: Nicolás Peña Moreno --- core/fpdfdoc/cpdf_variabletext.cpp | 49 +------------------------------------- 1 file changed, 1 insertion(+), 48 deletions(-) (limited to 'core/fpdfdoc/cpdf_variabletext.cpp') diff --git a/core/fpdfdoc/cpdf_variabletext.cpp b/core/fpdfdoc/cpdf_variabletext.cpp index 82a8d6757b..74ea239cc6 100644 --- a/core/fpdfdoc/cpdf_variabletext.cpp +++ b/core/fpdfdoc/cpdf_variabletext.cpp @@ -192,9 +192,7 @@ CPDF_VariableText::CPDF_VariableText() m_bInitialized(false), m_pVTProvider(nullptr) {} -CPDF_VariableText::~CPDF_VariableText() { - ResetAll(); -} +CPDF_VariableText::~CPDF_VariableText() {} void CPDF_VariableText::Initialize() { if (m_bInitialized) @@ -215,11 +213,6 @@ void CPDF_VariableText::Initialize() { m_bInitialized = true; } -void CPDF_VariableText::ResetAll() { - m_bInitialized = false; - m_SectionArray.clear(); -} - CPVT_WordPlace CPDF_VariableText::InsertWord(const CPVT_WordPlace& place, uint16_t word, int32_t charset) { @@ -267,42 +260,6 @@ CPVT_WordPlace CPDF_VariableText::InsertSection(const CPVT_WordPlace& place) { return result; } -CPVT_WordPlace CPDF_VariableText::InsertText(const CPVT_WordPlace& place, - const wchar_t* text) { - WideString swText = text; - CPVT_WordPlace wp = place; - for (int32_t i = 0, sz = swText.GetLength(); i < sz; i++) { - CPVT_WordPlace oldwp = wp; - uint16_t word = swText[i]; - switch (word) { - case 0x0D: - if (m_bMultiLine) { - if (swText[i + 1] == 0x0A) - i += 1; - - wp = InsertSection(wp); - } - break; - case 0x0A: - if (m_bMultiLine) { - if (swText[i + 1] == 0x0D) - i += 1; - - wp = InsertSection(wp); - } - break; - case 0x09: - word = 0x20; - default: - wp = InsertWord(wp, word, FX_CHARSET_Default); - break; - } - if (wp == oldwp) - break; - } - return wp; -} - CPVT_WordPlace CPDF_VariableText::DeleteWords( const CPVT_WordRange& PlaceRange) { bool bLastSecPos = @@ -1003,10 +960,6 @@ void CPDF_VariableText::SetProvider(CPDF_VariableText::Provider* pProvider) { m_pVTProvider = pProvider; } -CFX_SizeF CPDF_VariableText::GetPlateSize() const { - return CFX_SizeF(GetPlateWidth(), GetPlateHeight()); -} - CFX_PointF CPDF_VariableText::GetBTPoint() const { return CFX_PointF(m_rcPlate.left, m_rcPlate.top); } -- cgit v1.2.3