summaryrefslogtreecommitdiff
path: root/fpdfsdk/pwl/cpwl_edit_impl.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-08-12 07:04:19 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-08-15 16:02:50 +0000
commit5688d624690e1fdc3cbbbbf23a5b475f40818728 (patch)
tree529079e7e8677d7ca305d4cf0dc0dd9b1bf96f3d /fpdfsdk/pwl/cpwl_edit_impl.cpp
parent28549c91b9fb7bdc637466218348b0759e251456 (diff)
downloadpdfium-5688d624690e1fdc3cbbbbf23a5b475f40818728.tar.xz
Remove CPWL_EditImpl::EnableOprNotify().
It's redundant with SetOprNotify(). Change-Id: Iee2741744017ea6bd1b9839fc6395197c560f1e7 Reviewed-on: https://pdfium-review.googlesource.com/10850 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/pwl/cpwl_edit_impl.cpp')
-rw-r--r--fpdfsdk/pwl/cpwl_edit_impl.cpp43
1 files changed, 16 insertions, 27 deletions
diff --git a/fpdfsdk/pwl/cpwl_edit_impl.cpp b/fpdfsdk/pwl/cpwl_edit_impl.cpp
index c59a74068d..b962e6d937 100644
--- a/fpdfsdk/pwl/cpwl_edit_impl.cpp
+++ b/fpdfsdk/pwl/cpwl_edit_impl.cpp
@@ -611,21 +611,14 @@ void CPWL_EditImpl::DrawEdit(CFX_RenderDevice* pDevice,
}
CPWL_EditImpl::CPWL_EditImpl()
- : m_pVT(new CPDF_VariableText),
- m_pNotify(nullptr),
- m_pOprNotify(nullptr),
- m_wpCaret(-1, -1, -1),
- m_wpOldCaret(-1, -1, -1),
- m_SelState(),
+ : m_pVT(pdfium::MakeUnique<CPDF_VariableText>()),
m_bEnableScroll(false),
m_Undo(kEditUndoMaxItems),
m_nAlignment(0),
m_bNotifyFlag(false),
m_bEnableOverflow(false),
m_bEnableRefresh(true),
- m_rcOldContent(0.0f, 0.0f, 0.0f, 0.0f),
- m_bEnableUndo(true),
- m_bOprNotify(false) {}
+ m_bEnableUndo(true) {}
CPWL_EditImpl::~CPWL_EditImpl() {}
@@ -644,8 +637,8 @@ void CPWL_EditImpl::SetNotify(CPWL_EditCtrl* pNotify) {
m_pNotify = pNotify;
}
-void CPWL_EditImpl::SetOprNotify(CPWL_Edit* pOprNotify) {
- m_pOprNotify = pOprNotify;
+void CPWL_EditImpl::SetOperationNotify(CPWL_Edit* pOperationNotify) {
+ m_pOperationNotify = pOperationNotify;
}
CPWL_EditImpl_Iterator* CPWL_EditImpl::GetIterator() {
@@ -1608,8 +1601,8 @@ bool CPWL_EditImpl::InsertWord(uint16_t word,
if (bPaint)
PaintInsertText(m_wpOldCaret, m_wpCaret);
- if (m_bOprNotify && m_pOprNotify)
- m_pOprNotify->OnInsertWord(m_wpCaret, m_wpOldCaret);
+ if (m_pOperationNotify)
+ m_pOperationNotify->OnInsertWord(m_wpCaret, m_wpOldCaret);
return true;
}
@@ -1638,8 +1631,8 @@ bool CPWL_EditImpl::InsertReturn(const CPVT_SecProps* pSecProps,
SetCaretOrigin();
SetCaretInfo();
}
- if (m_bOprNotify && m_pOprNotify)
- m_pOprNotify->OnInsertReturn(m_wpCaret, m_wpOldCaret);
+ if (m_pOperationNotify)
+ m_pOperationNotify->OnInsertReturn(m_wpCaret, m_wpOldCaret);
return true;
}
@@ -1680,8 +1673,8 @@ bool CPWL_EditImpl::Backspace(bool bAddUndo, bool bPaint) {
SetCaretOrigin();
SetCaretInfo();
}
- if (m_bOprNotify && m_pOprNotify)
- m_pOprNotify->OnBackSpace(m_wpCaret, m_wpOldCaret);
+ if (m_pOperationNotify)
+ m_pOperationNotify->OnBackSpace(m_wpCaret, m_wpOldCaret);
return true;
}
@@ -1720,8 +1713,8 @@ bool CPWL_EditImpl::Delete(bool bAddUndo, bool bPaint) {
SetCaretOrigin();
SetCaretInfo();
}
- if (m_bOprNotify && m_pOprNotify)
- m_pOprNotify->OnDelete(m_wpCaret, m_wpOldCaret);
+ if (m_pOperationNotify)
+ m_pOperationNotify->OnDelete(m_wpCaret, m_wpOldCaret);
return true;
}
@@ -1757,8 +1750,8 @@ bool CPWL_EditImpl::Clear(bool bAddUndo, bool bPaint) {
SetCaretOrigin();
SetCaretInfo();
}
- if (m_bOprNotify && m_pOprNotify)
- m_pOprNotify->OnClear(m_wpCaret, m_wpOldCaret);
+ if (m_pOperationNotify)
+ m_pOperationNotify->OnClear(m_wpCaret, m_wpOldCaret);
return true;
}
@@ -1783,8 +1776,8 @@ bool CPWL_EditImpl::InsertText(const CFX_WideString& sText,
if (bPaint)
PaintInsertText(m_wpOldCaret, m_wpCaret);
- if (m_bOprNotify && m_pOprNotify)
- m_pOprNotify->OnInsertText(m_wpCaret, m_wpOldCaret);
+ if (m_pOperationNotify)
+ m_pOperationNotify->OnInsertText(m_wpCaret, m_wpOldCaret);
return true;
}
@@ -1896,10 +1889,6 @@ void CPWL_EditImpl::EnableUndo(bool bUndo) {
m_bEnableUndo = bUndo;
}
-void CPWL_EditImpl::EnableOprNotify(bool bNotify) {
- m_bOprNotify = bNotify;
-}
-
CPVT_WordPlace CPWL_EditImpl::DoInsertText(const CPVT_WordPlace& place,
const CFX_WideString& sText,
int32_t charset) {