diff options
author | Diana Gage <drgage@google.com> | 2017-07-21 11:33:18 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-07-21 22:11:19 +0000 |
commit | 22bf7a5f796155ee3d1a4ea32e237a6d2034996d (patch) | |
tree | 04820b859411e0d5c45cbb238ac8b8266df53ea4 /fpdfsdk/fxedit/fxet_edit.cpp | |
parent | 06ac9c95c25289e84de7b13ae6264ce5ecb3b1a5 (diff) | |
download | pdfium-22bf7a5f796155ee3d1a4ea32e237a6d2034996d.tar.xz |
Change Clear() to ClearSelection().
This CL renames Clear() in CPWL_EditCtrl, CPWL_ComboBox, and CFX_Edit
to ClearSelection(), as this function's behavior is clearing text selection.
Change-Id: Ia32f5347abc1960d7219684942df6a3fede9936c
Reviewed-on: https://pdfium-review.googlesource.com/8611
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Diana Gage <drgage@google.com>
Diffstat (limited to 'fpdfsdk/fxedit/fxet_edit.cpp')
-rw-r--r-- | fpdfsdk/fxedit/fxet_edit.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp index d00b4d6a61..96868d03c1 100644 --- a/fpdfsdk/fxedit/fxet_edit.cpp +++ b/fpdfsdk/fxedit/fxet_edit.cpp @@ -884,7 +884,7 @@ bool CFX_Edit::Delete() { return Delete(true, true); } -bool CFX_Edit::Clear() { +bool CFX_Edit::ClearSelection() { return Clear(true, true); } @@ -1736,9 +1736,10 @@ bool CFX_Edit::Clear(bool bAddUndo, bool bPaint) { return false; CPVT_WordRange range = m_SelState.ConvertToWordRange(); - if (bAddUndo && m_bEnableUndo) + if (bAddUndo && m_bEnableUndo) { AddEditUndoItem( pdfium::MakeUnique<CFXEU_Clear>(this, range, GetSelectedText())); + } SelectNone(); SetCaret(m_pVT->DeleteWords(range)); |