diff options
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/pwl/cpwl_combo_box.cpp | 7 | ||||
-rw-r--r-- | fpdfsdk/pwl/cpwl_combo_box.h | 2 | ||||
-rw-r--r-- | fpdfsdk/pwl/cpwl_edit_ctrl.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/pwl/cpwl_edit_ctrl.h | 2 | ||||
-rw-r--r-- | fpdfsdk/pwl/cpwl_list_box.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/pwl/cpwl_list_box.h | 3 | ||||
-rw-r--r-- | fpdfsdk/pwl/cpwl_wnd.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/pwl/cpwl_wnd.h | 1 |
8 files changed, 12 insertions, 11 deletions
diff --git a/fpdfsdk/pwl/cpwl_combo_box.cpp b/fpdfsdk/pwl/cpwl_combo_box.cpp index 3adbebcadb..1576b022fd 100644 --- a/fpdfsdk/pwl/cpwl_combo_box.cpp +++ b/fpdfsdk/pwl/cpwl_combo_box.cpp @@ -196,11 +196,8 @@ void CPWL_ComboBox::ReplaceSelection(const WideString& text) { m_pEdit->ReplaceSelection(text); } -WideString CPWL_ComboBox::GetText() const { - if (m_pEdit) { - return m_pEdit->GetText(); - } - return WideString(); +WideString CPWL_ComboBox::GetText() { + return m_pEdit ? m_pEdit->GetText() : WideString(); } void CPWL_ComboBox::SetText(const WideString& text) { diff --git a/fpdfsdk/pwl/cpwl_combo_box.h b/fpdfsdk/pwl/cpwl_combo_box.h index 6db721369b..28c063d5fd 100644 --- a/fpdfsdk/pwl/cpwl_combo_box.h +++ b/fpdfsdk/pwl/cpwl_combo_box.h @@ -60,12 +60,12 @@ class CPWL_ComboBox : public CPWL_Wnd { CFX_FloatRect GetFocusRect() const override; void SetFocus() override; void KillFocus() override; + WideString GetText() override; WideString GetSelectedText() override; void ReplaceSelection(const WideString& text) override; void SetFillerNotify(IPWL_Filler_Notify* pNotify); - WideString GetText() const; void SetText(const WideString& text); void AddString(const WideString& str); int32_t GetSelect() const; diff --git a/fpdfsdk/pwl/cpwl_edit_ctrl.cpp b/fpdfsdk/pwl/cpwl_edit_ctrl.cpp index 06b5dedbf0..5e2f7acda6 100644 --- a/fpdfsdk/pwl/cpwl_edit_ctrl.cpp +++ b/fpdfsdk/pwl/cpwl_edit_ctrl.cpp @@ -346,7 +346,7 @@ bool CPWL_EditCtrl::SetCaret(bool bVisible, return true; } -WideString CPWL_EditCtrl::GetText() const { +WideString CPWL_EditCtrl::GetText() { return m_pEdit->GetText(); } diff --git a/fpdfsdk/pwl/cpwl_edit_ctrl.h b/fpdfsdk/pwl/cpwl_edit_ctrl.h index 31140e3038..544464770f 100644 --- a/fpdfsdk/pwl/cpwl_edit_ctrl.h +++ b/fpdfsdk/pwl/cpwl_edit_ctrl.h @@ -25,7 +25,6 @@ class CPWL_EditCtrl : public CPWL_Wnd { CPWL_EditCtrl(); ~CPWL_EditCtrl() override; - WideString GetText() const; void SetSelection(int32_t nStartChar, int32_t nEndChar); void GetSelection(int32_t& nStartChar, int32_t& nEndChar) const; void ClearSelection(); @@ -60,6 +59,7 @@ class CPWL_EditCtrl : public CPWL_Wnd { void SetFontSize(float fFontSize) override; float GetFontSize() const override; void SetCursor() override; + WideString GetText() override; WideString GetSelectedText() override; void ReplaceSelection(const WideString& text) override; diff --git a/fpdfsdk/pwl/cpwl_list_box.cpp b/fpdfsdk/pwl/cpwl_list_box.cpp index a7c02e4692..03b649834d 100644 --- a/fpdfsdk/pwl/cpwl_list_box.cpp +++ b/fpdfsdk/pwl/cpwl_list_box.cpp @@ -294,7 +294,7 @@ void CPWL_ListBox::AddString(const WideString& str) { m_pList->AddString(str); } -WideString CPWL_ListBox::GetText() const { +WideString CPWL_ListBox::GetText() { return m_pList->GetText(); } diff --git a/fpdfsdk/pwl/cpwl_list_box.h b/fpdfsdk/pwl/cpwl_list_box.h index 9a725d14e3..b424afc51e 100644 --- a/fpdfsdk/pwl/cpwl_list_box.h +++ b/fpdfsdk/pwl/cpwl_list_box.h @@ -56,6 +56,7 @@ class CPWL_ListBox : public CPWL_Wnd { const CFX_PointF& point, uint32_t nFlag) override; void KillFocus() override; + WideString GetText() override; void SetScrollInfo(const PWL_SCROLL_INFO& info) override; void SetScrollPosition(float pos) override; void ScrollWindowVertically(float pos) override; @@ -64,8 +65,6 @@ class CPWL_ListBox : public CPWL_Wnd { void SetFontSize(float fFontSize) override; float GetFontSize() const override; - virtual WideString GetText() const; - bool OnNotifySelectionChanged(bool bKeyDown, uint32_t nFlag); void AddString(const WideString& str); diff --git a/fpdfsdk/pwl/cpwl_wnd.cpp b/fpdfsdk/pwl/cpwl_wnd.cpp index 368db74ec4..c6d6b79136 100644 --- a/fpdfsdk/pwl/cpwl_wnd.cpp +++ b/fpdfsdk/pwl/cpwl_wnd.cpp @@ -355,6 +355,10 @@ PWL_IMPLEMENT_MOUSE_METHOD(OnRButtonUp) PWL_IMPLEMENT_MOUSE_METHOD(OnMouseMove) #undef PWL_IMPLEMENT_MOUSE_METHOD +WideString CPWL_Wnd::GetText() { + return WideString(); +} + WideString CPWL_Wnd::GetSelectedText() { return WideString(); } diff --git a/fpdfsdk/pwl/cpwl_wnd.h b/fpdfsdk/pwl/cpwl_wnd.h index ba52420ade..9c790eb5b8 100644 --- a/fpdfsdk/pwl/cpwl_wnd.h +++ b/fpdfsdk/pwl/cpwl_wnd.h @@ -181,6 +181,7 @@ class CPWL_Wnd : public CPWL_TimerHandler, public Observable<CPWL_Wnd> { virtual void SetFontSize(float fFontSize); virtual float GetFontSize() const; + virtual WideString GetText(); virtual WideString GetSelectedText(); virtual void ReplaceSelection(const WideString& text); virtual CFX_FloatRect GetFocusRect() const; |