| Index: fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
|
| diff --git a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
|
| index cd4b45b06293b5e9355d36d2575dd053682e76fd..6989a99abfb92024a451fc2d95b701f498a91ca3 100644
|
| --- a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
|
| +++ b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
|
| @@ -44,27 +44,16 @@ FX_BOOL CFFL_IFormFiller::Annot_HitTest(CPDFSDK_PageView* pPageView,CPDFSDK_Anno
|
| FX_RECT CFFL_IFormFiller::GetViewBBox(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot)
|
| {
|
| if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
|
| - {
|
| return pFormFiller->GetViewBBox(pPageView, pAnnot);
|
| - }
|
| - else
|
| - {
|
| - ASSERT(pPageView != NULL);
|
| - ASSERT(pAnnot != NULL);
|
| -
|
| - CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot();
|
| - ASSERT(pPDFAnnot != NULL);
|
|
|
| - CPDF_Rect rcAnnot;
|
| - pPDFAnnot->GetRect(rcAnnot);
|
| + ASSERT(pPageView != NULL);
|
|
|
| -// CRect rcWin;
|
| -// pPageView->DocToWindow(rcAnnot, rcWin);
|
| - CPDF_Rect rcWin = CPWL_Utils::InflateRect(rcAnnot,1);
|
| -// rcWin.InflateRect(1, 1);
|
| + CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot();
|
| + CPDF_Rect rcAnnot;
|
| + pPDFAnnot->GetRect(rcAnnot);
|
|
|
| - return rcWin.GetOutterRect();
|
| - }
|
| + CPDF_Rect rcWin = CPWL_Utils::InflateRect(rcAnnot, 1);
|
| + return rcWin.GetOutterRect();
|
| }
|
|
|
| void CFFL_IFormFiller::OnDraw(CPDFSDK_PageView* pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot,
|
| @@ -439,22 +428,21 @@ FX_BOOL CFFL_IFormFiller::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_
|
|
|
| FX_BOOL CFFL_IFormFiller::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
|
| {
|
| - ASSERT(pAnnot != NULL);
|
| ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
|
| -
|
| - if (nChar == FWL_VKEY_Tab) return TRUE;
|
| + if (nChar == FWL_VKEY_Tab)
|
| + return TRUE;
|
|
|
| if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
|
| - {
|
| return pFormFiller->OnChar(pAnnot, nChar, nFlags);
|
| - }
|
|
|
| return FALSE;
|
| }
|
|
|
| FX_BOOL CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
|
| {
|
| - if(!pAnnot) return FALSE;
|
| + if (!pAnnot)
|
| + return FALSE;
|
| +
|
| ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
|
|
|
| if (!m_bNotifying)
|
| @@ -464,10 +452,10 @@ FX_BOOL CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
|
| {
|
| m_bNotifying = TRUE;
|
| pWidget->GetAppearanceAge();
|
| +
|
| int nValueAge = pWidget->GetValueAge();
|
| pWidget->ClearAppModified();
|
|
|
| -
|
| CPDFSDK_PageView* pPageView = pAnnot->GetPageView();
|
| ASSERT(pPageView != NULL);
|
|
|
| @@ -475,16 +463,12 @@ FX_BOOL CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
|
| fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
|
| fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
|
|
|
| -
|
| CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, TRUE);
|
| if(!pFormFiller) return FALSE;
|
| pFormFiller->GetActionData(pPageView, CPDF_AAction::GetFocus, fa);
|
| -
|
| pWidget->OnAAction(CPDF_AAction::GetFocus, fa, pPageView);
|
| m_bNotifying = FALSE;
|
|
|
| - // if (!IsValidAnnot(m_pApp, pDocument, pDocView, pPageView, pAnnot)) return FALSE;
|
| -
|
| if (pWidget->IsAppModified())
|
| {
|
| if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE))
|
| @@ -496,14 +480,7 @@ FX_BOOL CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
|
| }
|
|
|
| if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE))
|
| - {
|
| - if (pFormFiller->OnSetFocus(pAnnot, nFlag))
|
| - {
|
| - return TRUE;
|
| - }
|
| - else
|
| - return FALSE;
|
| - }
|
| + return pFormFiller->OnSetFocus(pAnnot, nFlag);
|
|
|
| return TRUE;
|
| }
|
|
|