diff options
Diffstat (limited to 'fpdfsdk/fxedit')
-rw-r--r-- | fpdfsdk/fxedit/fxet_edit.cpp | 21 | ||||
-rw-r--r-- | fpdfsdk/fxedit/fxet_edit.h | 6 |
2 files changed, 14 insertions, 13 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()) diff --git a/fpdfsdk/fxedit/fxet_edit.h b/fpdfsdk/fxedit/fxet_edit.h index c0c8442d52..4ae03e2303 100644 --- a/fpdfsdk/fxedit/fxet_edit.h +++ b/fpdfsdk/fxedit/fxet_edit.h @@ -361,8 +361,8 @@ class CFX_Edit { CFX_WideString GetRangeText(const CPVT_WordRange& range) const; int32_t GetHorzScale() const; float GetCharSpace() const; - void SetSel(int32_t nStartChar, int32_t nEndChar); - void GetSel(int32_t& nStartChar, int32_t& nEndChar) const; + void SetSelection(int32_t nStartChar, int32_t nEndChar); + void GetSelection(int32_t& nStartChar, int32_t& nEndChar) const; void SelectAll(); void SelectNone(); bool IsSelected() const; @@ -397,7 +397,7 @@ class CFX_Edit { friend class CFXEU_Clear; friend class CFXEU_InsertText; - void SetSel(const CPVT_WordPlace& begin, const CPVT_WordPlace& end); + void SetSelection(const CPVT_WordPlace& begin, const CPVT_WordPlace& end); void RearrangeAll(); void RearrangePart(const CPVT_WordRange& range); |