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

Side by Side Diff: fpdfsdk/cpdfsdk_annothandlermgr.cpp

Issue 2391313002: Rename CPDFSDK_Environment to CPDFSDK_FormfillEnvironment (Closed)
Patch Set: Rebase to master Created 4 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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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 "fpdfsdk/cpdfsdk_annothandlermgr.h" 7 #include "fpdfsdk/cpdfsdk_annothandlermgr.h"
8 8
9 #include "core/fpdfdoc/cpdf_annot.h" 9 #include "core/fpdfdoc/cpdf_annot.h"
10 #include "fpdfsdk/cba_annotiterator.h" 10 #include "fpdfsdk/cba_annotiterator.h"
11 #include "fpdfsdk/cpdfsdk_annot.h" 11 #include "fpdfsdk/cpdfsdk_annot.h"
12 #include "fpdfsdk/cpdfsdk_baannot.h" 12 #include "fpdfsdk/cpdfsdk_baannot.h"
13 #include "fpdfsdk/cpdfsdk_baannothandler.h" 13 #include "fpdfsdk/cpdfsdk_baannothandler.h"
14 #include "fpdfsdk/cpdfsdk_datetime.h" 14 #include "fpdfsdk/cpdfsdk_datetime.h"
15 #include "fpdfsdk/cpdfsdk_document.h" 15 #include "fpdfsdk/cpdfsdk_document.h"
16 #include "fpdfsdk/cpdfsdk_environment.h" 16 #include "fpdfsdk/cpdfsdk_formfillenvironment.h"
17 #include "fpdfsdk/cpdfsdk_pageview.h" 17 #include "fpdfsdk/cpdfsdk_pageview.h"
18 #include "fpdfsdk/cpdfsdk_widgethandler.h" 18 #include "fpdfsdk/cpdfsdk_widgethandler.h"
19 19
20 #ifdef PDF_ENABLE_XFA 20 #ifdef PDF_ENABLE_XFA
21 #include "fpdfsdk/cpdfsdk_xfawidgethandler.h" 21 #include "fpdfsdk/cpdfsdk_xfawidgethandler.h"
22 #include "fpdfsdk/fpdfxfa/cpdfxfa_page.h" 22 #include "fpdfsdk/fpdfxfa/cpdfxfa_page.h"
23 #include "xfa/fxfa/xfa_ffpageview.h" 23 #include "xfa/fxfa/xfa_ffpageview.h"
24 #include "xfa/fxfa/xfa_ffwidget.h" 24 #include "xfa/fxfa/xfa_ffwidget.h"
25 #endif // PDF_ENABLE_XFA 25 #endif // PDF_ENABLE_XFA
26 26
27 CPDFSDK_AnnotHandlerMgr::CPDFSDK_AnnotHandlerMgr(CPDFSDK_Environment* pEnv) 27 CPDFSDK_AnnotHandlerMgr::CPDFSDK_AnnotHandlerMgr(
28 CPDFSDK_FormFillEnvironment* pEnv)
28 : m_pBAAnnotHandler(new CPDFSDK_BAAnnotHandler()), 29 : m_pBAAnnotHandler(new CPDFSDK_BAAnnotHandler()),
29 m_pWidgetHandler(new CPDFSDK_WidgetHandler(pEnv)), 30 m_pWidgetHandler(new CPDFSDK_WidgetHandler(pEnv)),
30 #ifdef PDF_ENABLE_XFA 31 #ifdef PDF_ENABLE_XFA
31 m_pXFAWidgetHandler(new CPDFSDK_XFAWidgetHandler(pEnv)), 32 m_pXFAWidgetHandler(new CPDFSDK_XFAWidgetHandler(pEnv)),
32 #endif // PDF_ENABLE_XFA 33 #endif // PDF_ENABLE_XFA
33 m_pEnv(pEnv) { 34 m_pEnv(pEnv) {
34 m_pWidgetHandler->SetFormFiller(m_pEnv->GetInteractiveFormFiller()); 35 m_pWidgetHandler->SetFormFiller(m_pEnv->GetInteractiveFormFiller());
35 } 36 }
36 37
37 CPDFSDK_AnnotHandlerMgr::~CPDFSDK_AnnotHandlerMgr() {} 38 CPDFSDK_AnnotHandlerMgr::~CPDFSDK_AnnotHandlerMgr() {}
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 bNext ? pWidgetIterator->MoveToNext() : pWidgetIterator->MoveToPrevious(); 303 bNext ? pWidgetIterator->MoveToNext() : pWidgetIterator->MoveToPrevious();
303 if (!hNextFocus && pSDKAnnot) 304 if (!hNextFocus && pSDKAnnot)
304 hNextFocus = pWidgetIterator->MoveToFirst(); 305 hNextFocus = pWidgetIterator->MoveToFirst();
305 306
306 return pPageView->GetAnnotByXFAWidget(hNextFocus); 307 return pPageView->GetAnnotByXFAWidget(hNextFocus);
307 #else // PDF_ENABLE_XFA 308 #else // PDF_ENABLE_XFA
308 CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), CPDF_Annot::Subtype::WIDGET); 309 CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), CPDF_Annot::Subtype::WIDGET);
309 return bNext ? ai.GetNextAnnot(pSDKAnnot) : ai.GetPrevAnnot(pSDKAnnot); 310 return bNext ? ai.GetNextAnnot(pSDKAnnot) : ai.GetPrevAnnot(pSDKAnnot);
310 #endif // PDF_ENABLE_XFA 311 #endif // PDF_ENABLE_XFA
311 } 312 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698