diff options
Diffstat (limited to 'fpdfsdk/formfiller')
-rw-r--r-- | fpdfsdk/formfiller/cffl_combobox.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/formfiller/cffl_formfiller.cpp | 12 | ||||
-rw-r--r-- | fpdfsdk/formfiller/cffl_formfiller.h | 2 | ||||
-rw-r--r-- | fpdfsdk/formfiller/cffl_textfield.cpp | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/fpdfsdk/formfiller/cffl_combobox.cpp b/fpdfsdk/formfiller/cffl_combobox.cpp index 4b84733890..d66977a0b1 100644 --- a/fpdfsdk/formfiller/cffl_combobox.cpp +++ b/fpdfsdk/formfiller/cffl_combobox.cpp @@ -274,7 +274,7 @@ CFX_WideString CFFL_ComboBox::GetSelectExportText() { CFX_WideString swRet; int nExport = -1; - CPDFSDK_PageView* pPageView = GetCurPageView(); + CPDFSDK_PageView* pPageView = GetCurPageView(true); if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE)) { nExport = pComboBox->GetSelect(); diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp index d7bc9586a4..479a1bc169 100644 --- a/fpdfsdk/formfiller/cffl_formfiller.cpp +++ b/fpdfsdk/formfiller/cffl_formfiller.cpp @@ -220,7 +220,7 @@ FX_BOOL CFFL_FormFiller::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags) { if (IsValid()) { - CPDFSDK_PageView* pPageView = GetCurPageView(); + CPDFSDK_PageView* pPageView = GetCurPageView(true); ASSERT(pPageView); if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) { @@ -235,7 +235,7 @@ FX_BOOL CFFL_FormFiller::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags) { if (IsValid()) { - CPDFSDK_PageView* pPageView = GetCurPageView(); + CPDFSDK_PageView* pPageView = GetCurPageView(true); ASSERT(pPageView); if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) { @@ -250,7 +250,7 @@ void CFFL_FormFiller::SetFocusForAnnot(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) { CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; UnderlyingPageType* pPage = pWidget->GetUnderlyingPage(); CPDFSDK_Document* pDoc = m_pApp->GetSDKDocument(); - CPDFSDK_PageView* pPageView = pDoc->GetPageView(pPage); + CPDFSDK_PageView* pPageView = pDoc->GetPageView(pPage, true); if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, TRUE)) pWnd->SetFocus(); @@ -263,7 +263,7 @@ void CFFL_FormFiller::KillFocusForAnnot(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) { if (!IsValid()) return; - CPDFSDK_PageView* pPageView = GetCurPageView(); + CPDFSDK_PageView* pPageView = GetCurPageView(false); if (!pPageView) return; @@ -456,10 +456,10 @@ CFX_FloatRect CFFL_FormFiller::GetPDFWindowRect() const { return CFX_FloatRect(0, 0, fWidth, fHeight); } -CPDFSDK_PageView* CFFL_FormFiller::GetCurPageView() { +CPDFSDK_PageView* CFFL_FormFiller::GetCurPageView(bool renew) { UnderlyingPageType* pPage = m_pAnnot->GetUnderlyingPage(); CPDFSDK_Document* pSDKDoc = m_pApp->GetSDKDocument(); - return pSDKDoc ? pSDKDoc->GetPageView(pPage) : nullptr; + return pSDKDoc ? pSDKDoc->GetPageView(pPage, renew) : nullptr; } CFX_FloatRect CFFL_FormFiller::GetFocusBox(CPDFSDK_PageView* pPageView) { diff --git a/fpdfsdk/formfiller/cffl_formfiller.h b/fpdfsdk/formfiller/cffl_formfiller.h index 7360957256..7ae724d7ff 100644 --- a/fpdfsdk/formfiller/cffl_formfiller.h +++ b/fpdfsdk/formfiller/cffl_formfiller.h @@ -141,7 +141,7 @@ class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler { FX_BOOL IsValid() const; CFX_FloatRect GetPDFWindowRect() const; - CPDFSDK_PageView* GetCurPageView(); + CPDFSDK_PageView* GetCurPageView(bool renew); void SetChangeMark(); virtual void InvalidateRect(double left, diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp index 5e690313be..d24452fd45 100644 --- a/fpdfsdk/formfiller/cffl_textfield.cpp +++ b/fpdfsdk/formfiller/cffl_textfield.cpp @@ -106,7 +106,7 @@ FX_BOOL CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot, switch (nChar) { case FWL_VKEY_Return: if (!(m_pWidget->GetFieldFlags() & FIELDFLAG_MULTILINE)) { - CPDFSDK_PageView* pPageView = GetCurPageView(); + CPDFSDK_PageView* pPageView = GetCurPageView(true); ASSERT(pPageView); m_bValid = !m_bValid; CFX_FloatRect rcAnnot = pAnnot->GetRect(); @@ -126,7 +126,7 @@ FX_BOOL CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot, } break; case FWL_VKEY_Escape: { - CPDFSDK_PageView* pPageView = GetCurPageView(); + CPDFSDK_PageView* pPageView = GetCurPageView(true); ASSERT(pPageView); EscapeFiller(pPageView, TRUE); return TRUE; |