Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: fpdfsdk/src/formfiller/FFL_FormFiller.cpp

Issue 1398703009: Next round of XFA changes to match master (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: remove arg Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../include/formfiller/FFL_FormFiller.h" 7 #include "../../include/formfiller/FFL_FormFiller.h"
8 #include "../../include/formfiller/FFL_Notify.h" 8 #include "../../include/formfiller/FFL_Notify.h"
9 #include "../../include/formfiller/FFL_CBA_Fontmap.h" 9 #include "../../include/formfiller/FFL_CBA_Fontmap.h"
10 10
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 FX_FLOAT fHeight = rectAnnot.top - rectAnnot.bottom; 457 FX_FLOAT fHeight = rectAnnot.top - rectAnnot.bottom;
458 if ((m_pWidget->GetRotate() / 90) & 0x01) 458 if ((m_pWidget->GetRotate() / 90) & 0x01)
459 return CPDF_Rect(0, 0, fHeight, fWidth); 459 return CPDF_Rect(0, 0, fHeight, fWidth);
460 460
461 return CPDF_Rect(0, 0, fWidth, fHeight); 461 return CPDF_Rect(0, 0, fWidth, fHeight);
462 } 462 }
463 463
464 CPDFSDK_PageView* CFFL_FormFiller::GetCurPageView() { 464 CPDFSDK_PageView* CFFL_FormFiller::GetCurPageView() {
465 CPDFXFA_Page* pPage = m_pAnnot->GetPDFXFAPage(); 465 CPDFXFA_Page* pPage = m_pAnnot->GetPDFXFAPage();
466 CPDFSDK_Document* pSDKDoc = m_pApp->GetSDKDocument(); 466 CPDFSDK_Document* pSDKDoc = m_pApp->GetSDKDocument();
467 if (!pSDKDoc) 467 return pSDKDoc ? pSDKDoc->GetPageView(pPage) : nullptr;
468 return NULL;
469 return pSDKDoc->GetPageView(pPage);
470 } 468 }
471 469
472 CPDF_Rect CFFL_FormFiller::GetFocusBox(CPDFSDK_PageView* pPageView) { 470 CPDF_Rect CFFL_FormFiller::GetFocusBox(CPDFSDK_PageView* pPageView) {
473 if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) { 471 if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) {
474 CPDF_Rect rcFocus = FFLtoWnd(pPageView, PWLtoFFL(pWnd->GetFocusRect())); 472 CPDF_Rect rcFocus = FFLtoWnd(pPageView, PWLtoFFL(pWnd->GetFocusRect()));
475 CPDF_Rect rcPage = pPageView->GetPDFPage()->GetPageBBox(); 473 CPDF_Rect rcPage = pPageView->GetPDFPage()->GetPageBBox();
476 if (rcPage.Contains(rcFocus)) 474 if (rcPage.Contains(rcFocus))
477 return rcFocus; 475 return rcFocus;
478 } 476 }
479 return CPDF_Rect(0, 0, 0, 0); 477 return CPDF_Rect(0, 0, 0, 0);
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); 718 pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL);
721 } 719 }
722 720
723 void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView* pPageView, 721 void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView* pPageView,
724 CPDFSDK_Annot* pAnnot, 722 CPDFSDK_Annot* pAnnot,
725 CFX_RenderDevice* pDevice, 723 CFX_RenderDevice* pDevice,
726 CPDF_Matrix* pUser2Device, 724 CPDF_Matrix* pUser2Device,
727 FX_DWORD dwFlags) { 725 FX_DWORD dwFlags) {
728 OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); 726 OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags);
729 } 727 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698