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.cpp49
1 files changed, 1 insertions, 48 deletions
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);
}