summaryrefslogtreecommitdiff
path: root/fpdfsdk/fxedit/fxet_edit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fxedit/fxet_edit.cpp')
-rw-r--r--fpdfsdk/fxedit/fxet_edit.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp
index 41019b3459..a1ddc149e5 100644
--- a/fpdfsdk/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/fxedit/fxet_edit.cpp
@@ -449,7 +449,7 @@ CFXEU_Clear::~CFXEU_Clear() {}
void CFXEU_Clear::Redo() {
if (m_pEdit) {
m_pEdit->SelectNone();
- m_pEdit->SetSel(m_wrSel.BeginPos, m_wrSel.EndPos);
+ m_pEdit->SetSelection(m_wrSel.BeginPos, m_wrSel.EndPos);
m_pEdit->Clear(false, true);
}
}
@@ -459,7 +459,7 @@ void CFXEU_Clear::Undo() {
m_pEdit->SelectNone();
m_pEdit->SetCaret(m_wrSel.BeginPos);
m_pEdit->InsertText(m_swText, FX_CHARSET_Default, false, true);
- m_pEdit->SetSel(m_wrSel.BeginPos, m_wrSel.EndPos);
+ m_pEdit->SetSelection(m_wrSel.BeginPos, m_wrSel.EndPos);
}
}
@@ -487,7 +487,7 @@ void CFXEU_InsertText::Redo() {
void CFXEU_InsertText::Undo() {
if (m_pEdit) {
m_pEdit->SelectNone();
- m_pEdit->SetSel(m_wpOld, m_wpNew);
+ m_pEdit->SetSelection(m_wpOld, m_wpNew);
m_pEdit->Clear(false, true);
}
}
@@ -733,7 +733,7 @@ void CFX_Edit::SetTextOverflow(bool bAllowed, bool bPaint) {
Paint();
}
-void CFX_Edit::SetSel(int32_t nStartChar, int32_t nEndChar) {
+void CFX_Edit::SetSelection(int32_t nStartChar, int32_t nEndChar) {
if (m_pVT->IsValid()) {
if (nStartChar == 0 && nEndChar < 0) {
SelectAll();
@@ -741,17 +741,18 @@ void CFX_Edit::SetSel(int32_t nStartChar, int32_t nEndChar) {
SelectNone();
} else {
if (nStartChar < nEndChar) {
- SetSel(m_pVT->WordIndexToWordPlace(nStartChar),
- m_pVT->WordIndexToWordPlace(nEndChar));
+ SetSelection(m_pVT->WordIndexToWordPlace(nStartChar),
+ m_pVT->WordIndexToWordPlace(nEndChar));
} else {
- SetSel(m_pVT->WordIndexToWordPlace(nEndChar),
- m_pVT->WordIndexToWordPlace(nStartChar));
+ SetSelection(m_pVT->WordIndexToWordPlace(nEndChar),
+ m_pVT->WordIndexToWordPlace(nStartChar));
}
}
}
}
-void CFX_Edit::SetSel(const CPVT_WordPlace& begin, const CPVT_WordPlace& end) {
+void CFX_Edit::SetSelection(const CPVT_WordPlace& begin,
+ const CPVT_WordPlace& end) {
if (!m_pVT->IsValid())
return;
@@ -764,7 +765,7 @@ void CFX_Edit::SetSel(const CPVT_WordPlace& begin, const CPVT_WordPlace& end) {
SetCaretInfo();
}
-void CFX_Edit::GetSel(int32_t& nStartChar, int32_t& nEndChar) const {
+void CFX_Edit::GetSelection(int32_t& nStartChar, int32_t& nEndChar) const {
nStartChar = -1;
nEndChar = -1;
if (!m_pVT->IsValid())