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

Side by Side Diff: fpdfsdk/fsdk_baseform.cpp

Issue 2062313002: Make code compile with clang_use_chrome_plugin (part IV) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: remove unused file Created 4 years, 6 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
« no previous file with comments | « fpdfsdk/fsdk_baseannot.cpp ('k') | fpdfsdk/fsdk_mgr.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "fpdfsdk/include/fsdk_baseform.h" 7 #include "fpdfsdk/include/fsdk_baseform.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 11 matching lines...) Expand all
22 #include "fpdfsdk/include/fsdk_baseannot.h" 22 #include "fpdfsdk/include/fsdk_baseannot.h"
23 #include "fpdfsdk/include/fsdk_define.h" 23 #include "fpdfsdk/include/fsdk_define.h"
24 #include "fpdfsdk/include/fsdk_mgr.h" 24 #include "fpdfsdk/include/fsdk_mgr.h"
25 #include "fpdfsdk/javascript/ijs_context.h" 25 #include "fpdfsdk/javascript/ijs_context.h"
26 #include "fpdfsdk/javascript/ijs_runtime.h" 26 #include "fpdfsdk/javascript/ijs_runtime.h"
27 #include "fpdfsdk/pdfwindow/PWL_Utils.h" 27 #include "fpdfsdk/pdfwindow/PWL_Utils.h"
28 28
29 #ifdef PDF_ENABLE_XFA 29 #ifdef PDF_ENABLE_XFA
30 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h" 30 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h"
31 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_util.h" 31 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_util.h"
32 #include "xfa/fxfa/include/cxfa_eventparam.h"
33 #include "xfa/fxfa/include/xfa_ffdocview.h"
32 #include "xfa/fxfa/include/xfa_ffwidget.h" 34 #include "xfa/fxfa/include/xfa_ffwidget.h"
35 #include "xfa/fxfa/include/xfa_ffwidgethandler.h"
33 #endif // PDF_ENABLE_XFA 36 #endif // PDF_ENABLE_XFA
34 37
38 PDFSDK_FieldAction::PDFSDK_FieldAction()
39 : bModifier(FALSE),
40 bShift(FALSE),
41 nCommitKey(0),
42 bKeyDown(FALSE),
43 nSelEnd(0),
44 nSelStart(0),
45 bWillCommit(FALSE),
46 bFieldFull(FALSE),
47 bRC(TRUE) {}
48
35 CPDFSDK_Widget::CPDFSDK_Widget(CPDF_Annot* pAnnot, 49 CPDFSDK_Widget::CPDFSDK_Widget(CPDF_Annot* pAnnot,
36 CPDFSDK_PageView* pPageView, 50 CPDFSDK_PageView* pPageView,
37 CPDFSDK_InterForm* pInterForm) 51 CPDFSDK_InterForm* pInterForm)
38 : CPDFSDK_BAAnnot(pAnnot, pPageView), 52 : CPDFSDK_BAAnnot(pAnnot, pPageView),
39 m_pInterForm(pInterForm), 53 m_pInterForm(pInterForm),
40 m_nAppAge(0), 54 m_nAppAge(0),
41 m_nValueAge(0) 55 m_nValueAge(0)
42 #ifdef PDF_ENABLE_XFA 56 #ifdef PDF_ENABLE_XFA
43 , 57 ,
44 m_hMixXFAWidget(nullptr), 58 m_hMixXFAWidget(nullptr),
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 #ifdef PDF_ENABLE_XFA 492 #ifdef PDF_ENABLE_XFA
479 CPDFSDK_Document* pSDKDoc = m_pPageView->GetSDKDocument(); 493 CPDFSDK_Document* pSDKDoc = m_pPageView->GetSDKDocument();
480 CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument(); 494 CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument();
481 int nDocType = pDoc->GetDocType(); 495 int nDocType = pDoc->GetDocType();
482 if (nDocType != DOCTYPE_PDF && nDocType != DOCTYPE_STATIC_XFA) 496 if (nDocType != DOCTYPE_PDF && nDocType != DOCTYPE_STATIC_XFA)
483 return TRUE; 497 return TRUE;
484 #endif // PDF_ENABLE_XFA 498 #endif // PDF_ENABLE_XFA
485 return CPDFSDK_BAAnnot::IsAppearanceValid(); 499 return CPDFSDK_BAAnnot::IsAppearanceValid();
486 } 500 }
487 501
502 int CPDFSDK_Widget::GetLayoutOrder() const {
503 return 2;
504 }
505
488 int CPDFSDK_Widget::GetFieldFlags() const { 506 int CPDFSDK_Widget::GetFieldFlags() const {
489 CPDF_InterForm* pPDFInterForm = m_pInterForm->GetInterForm(); 507 CPDF_InterForm* pPDFInterForm = m_pInterForm->GetInterForm();
490 CPDF_FormControl* pFormControl = 508 CPDF_FormControl* pFormControl =
491 pPDFInterForm->GetControlByDict(m_pAnnot->GetAnnotDict()); 509 pPDFInterForm->GetControlByDict(m_pAnnot->GetAnnotDict());
492 CPDF_FormField* pFormField = pFormControl->GetField(); 510 CPDF_FormField* pFormField = pFormControl->GetField();
493 return pFormField->GetFieldFlags(); 511 return pFormField->GetFieldFlags();
494 } 512 }
495 513
496 CFX_ByteString CPDFSDK_Widget::GetSubType() const { 514 CFX_ByteString CPDFSDK_Widget::GetSubType() const {
497 int nType = GetFieldType(); 515 int nType = GetFieldType();
(...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1947 CPDFSDK_PageView* pPageView, 1965 CPDFSDK_PageView* pPageView,
1948 CPDFSDK_InterForm* pInterForm) 1966 CPDFSDK_InterForm* pInterForm)
1949 : CPDFSDK_Annot(pPageView), 1967 : CPDFSDK_Annot(pPageView),
1950 m_pInterForm(pInterForm), 1968 m_pInterForm(pInterForm),
1951 m_hXFAWidget(pAnnot) {} 1969 m_hXFAWidget(pAnnot) {}
1952 1970
1953 FX_BOOL CPDFSDK_XFAWidget::IsXFAField() { 1971 FX_BOOL CPDFSDK_XFAWidget::IsXFAField() {
1954 return TRUE; 1972 return TRUE;
1955 } 1973 }
1956 1974
1975 CXFA_FFWidget* CPDFSDK_XFAWidget::GetXFAWidget() const {
1976 return m_hXFAWidget;
1977 }
1978
1957 CFX_ByteString CPDFSDK_XFAWidget::GetType() const { 1979 CFX_ByteString CPDFSDK_XFAWidget::GetType() const {
1958 return FSDK_XFAWIDGET_TYPENAME; 1980 return FSDK_XFAWIDGET_TYPENAME;
1959 } 1981 }
1960 1982
1983 CFX_ByteString CPDFSDK_XFAWidget::GetSubType() const {
1984 return "";
1985 }
1986
1961 CFX_FloatRect CPDFSDK_XFAWidget::GetRect() const { 1987 CFX_FloatRect CPDFSDK_XFAWidget::GetRect() const {
1962 CFX_RectF rcBBox; 1988 CFX_RectF rcBBox;
1963 GetXFAWidget()->GetRect(rcBBox); 1989 GetXFAWidget()->GetRect(rcBBox);
1964 return CFX_FloatRect(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width, 1990 return CFX_FloatRect(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width,
1965 rcBBox.top + rcBBox.height); 1991 rcBBox.top + rcBBox.height);
1966 } 1992 }
1967 #endif // PDF_ENABLE_XFA 1993 #endif // PDF_ENABLE_XFA
1968 1994
1969 CPDFSDK_InterForm::CPDFSDK_InterForm(CPDFSDK_Document* pDocument) 1995 CPDFSDK_InterForm::CPDFSDK_InterForm(CPDFSDK_Document* pDocument)
1970 : m_pDocument(pDocument), 1996 : m_pDocument(pDocument),
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
2804 break; 2830 break;
2805 } 2831 }
2806 } 2832 }
2807 } 2833 }
2808 2834
2809 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { 2835 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) {
2810 CFX_FloatRect rcAnnot; 2836 CFX_FloatRect rcAnnot;
2811 pAnnot->GetPDFAnnot()->GetRect(rcAnnot); 2837 pAnnot->GetPDFAnnot()->GetRect(rcAnnot);
2812 return rcAnnot; 2838 return rcAnnot;
2813 } 2839 }
OLDNEW
« no previous file with comments | « fpdfsdk/fsdk_baseannot.cpp ('k') | fpdfsdk/fsdk_mgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698