diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-07-06 12:11:33 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-07-06 19:41:39 +0000 |
commit | 1f9d2338feb75d62bb28e116df7243dd567fded8 (patch) | |
tree | 3828f7c8212bfe30510e0975331060ec020c72d9 /fpdfsdk/pdfwindow/cpwl_list_box.cpp | |
parent | 16fea94c94006c25b878ef0acd0bb835397f62bb (diff) | |
download | pdfium-1f9d2338feb75d62bb28e116df7243dd567fded8.tar.xz |
Remove in-out param from OnNotifySelChangedchromium/3151
This CL converts OnNotifySelChanged to return instead of accepting an
in-out parameter.
Change-Id: I42ab220b1f3af304493496ada5624677652bf10f
Reviewed-on: https://pdfium-review.googlesource.com/7336
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/pdfwindow/cpwl_list_box.cpp')
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_list_box.cpp | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/fpdfsdk/pdfwindow/cpwl_list_box.cpp b/fpdfsdk/pdfwindow/cpwl_list_box.cpp index 8691898763..bd2bdb5d19 100644 --- a/fpdfsdk/pdfwindow/cpwl_list_box.cpp +++ b/fpdfsdk/pdfwindow/cpwl_list_box.cpp @@ -223,10 +223,7 @@ bool CPWL_ListBox::OnKeyDown(uint16_t nChar, uint32_t nFlag) { case FWL_VKEY_Delete: break; } - - bool bExit = false; - OnNotifySelChanged(true, bExit, nFlag); - + OnNotifySelChanged(true, nFlag); return true; } @@ -236,9 +233,7 @@ bool CPWL_ListBox::OnChar(uint16_t nChar, uint32_t nFlag) { if (!m_pList->OnChar(nChar, IsSHIFTpressed(nFlag), IsCTRLpressed(nFlag))) return false; - bool bExit = false; - OnNotifySelChanged(true, bExit, nFlag); - + OnNotifySelChanged(true, nFlag); return true; } @@ -263,10 +258,7 @@ bool CPWL_ListBox::OnLButtonUp(const CFX_PointF& point, uint32_t nFlag) { ReleaseCapture(); m_bMouseDown = false; } - - bool bExit = false; - OnNotifySelChanged(false, bExit, nFlag); - + OnNotifySelChanged(false, nFlag); return true; } @@ -309,13 +301,12 @@ void CPWL_ListBox::RePosChildWnd() { m_pList->SetPlateRect(GetListRect()); } -void CPWL_ListBox::OnNotifySelChanged(bool bKeyDown, - bool& bExit, - uint32_t nFlag) { +bool CPWL_ListBox::OnNotifySelChanged(bool bKeyDown, uint32_t nFlag) { if (!m_pFillerNotify) - return; + return false; bool bRC = true; + bool bExit = false; CFX_WideString swChange = GetText(); CFX_WideString strChangeEx; int nSelStart = 0; @@ -323,6 +314,7 @@ void CPWL_ListBox::OnNotifySelChanged(bool bKeyDown, m_pFillerNotify->OnBeforeKeyStroke(GetAttachedData(), swChange, strChangeEx, nSelStart, nSelEnd, bKeyDown, bRC, bExit, nFlag); + return bExit; } CFX_FloatRect CPWL_ListBox::GetFocusRect() const { @@ -425,7 +417,6 @@ bool CPWL_ListBox::OnMouseWheel(short zDelta, else m_pList->OnVK_UP(IsSHIFTpressed(nFlag), IsCTRLpressed(nFlag)); - bool bExit = false; - OnNotifySelChanged(false, bExit, nFlag); + OnNotifySelChanged(false, nFlag); return true; } |