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

Side by Side Diff: fpdfsdk/src/fsdk_baseannot.cpp

Issue 1399273003: fpdfsdk/ differences with XFA (for didactic purposes only). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Regenerate after taking juns patch Created 5 years 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/src/fsdk_annothandler.cpp ('k') | fpdfsdk/src/fsdk_baseform.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 "core/include/fxcrt/fx_ext.h" 7 #include "core/include/fxcrt/fx_ext.h"
8 #ifdef PDF_ENABLE_XFA
9 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h"
10 #endif
8 #include "fpdfsdk/include/fsdk_baseannot.h" 11 #include "fpdfsdk/include/fsdk_baseannot.h"
9 #include "fpdfsdk/include/fsdk_define.h" 12 #include "fpdfsdk/include/fsdk_define.h"
10 #include "fpdfsdk/include/fsdk_mgr.h" 13 #include "fpdfsdk/include/fsdk_mgr.h"
11 14
12 int _gAfxGetTimeZoneInSeconds(FX_CHAR tzhour, uint8_t tzminute) { 15 int _gAfxGetTimeZoneInSeconds(FX_CHAR tzhour, uint8_t tzminute) {
13 return (int)tzhour * 3600 + (int)tzminute * (tzhour >= 0 ? 60 : -60); 16 return (int)tzhour * 3600 + (int)tzminute * (tzhour >= 0 ? 60 : -60);
14 } 17 }
15 18
16 FX_BOOL _gAfxIsLeapYear(int16_t year) { 19 FX_BOOL _gAfxIsLeapYear(int16_t year) {
17 return ((year % 400 == 0) || ((year % 4 == 0) && (year % 100 != 0))); 20 return ((year % 400 == 0) || ((year % 4 == 0) && (year % 100 != 0)));
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 962
960 if (AAction.ActionExist(eAAT)) 963 if (AAction.ActionExist(eAAT))
961 return AAction.GetAction(eAAT); 964 return AAction.GetAction(eAAT);
962 965
963 if (eAAT == CPDF_AAction::ButtonUp) 966 if (eAAT == CPDF_AAction::ButtonUp)
964 return GetAction(); 967 return GetAction();
965 968
966 return CPDF_Action(); 969 return CPDF_Action();
967 } 970 }
968 971
972 #ifdef PDF_ENABLE_XFA
973 FX_BOOL CPDFSDK_BAAnnot::IsXFAField() {
974 return FALSE;
975 }
976
977 #endif
969 void CPDFSDK_BAAnnot::Annot_OnDraw(CFX_RenderDevice* pDevice, 978 void CPDFSDK_BAAnnot::Annot_OnDraw(CFX_RenderDevice* pDevice,
970 CPDF_Matrix* pUser2Device, 979 CPDF_Matrix* pUser2Device,
971 CPDF_RenderOptions* pOptions) { 980 CPDF_RenderOptions* pOptions) {
972 m_pAnnot->GetAPForm(m_pPageView->GetPDFPage(), CPDF_Annot::Normal); 981 m_pAnnot->GetAPForm(m_pPageView->GetPDFPage(), CPDF_Annot::Normal);
973 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device, 982 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device,
974 CPDF_Annot::Normal, NULL); 983 CPDF_Annot::Normal, NULL);
975 984
976 return; 985 return;
977 } 986 }
978 987
979 UnderlyingPageType* CPDFSDK_Annot::GetUnderlyingPage() { 988 UnderlyingPageType* CPDFSDK_Annot::GetUnderlyingPage() {
989 #ifndef PDF_ENABLE_XFA
980 return GetPDFPage(); 990 return GetPDFPage();
991 #else
992 return GetPDFXFAPage();
993 #endif
981 } 994 }
982 995
983 CPDF_Page* CPDFSDK_Annot::GetPDFPage() { 996 CPDF_Page* CPDFSDK_Annot::GetPDFPage() {
984 if (m_pPageView) 997 if (m_pPageView)
985 return m_pPageView->GetPDFPage(); 998 return m_pPageView->GetPDFPage();
986 return NULL; 999 return NULL;
987 } 1000 }
1001 #ifdef PDF_ENABLE_XFA
1002
1003 CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() {
1004 if (m_pPageView)
1005 return m_pPageView->GetPDFXFAPage();
1006 return NULL;
1007 }
1008 #endif
OLDNEW
« no previous file with comments | « fpdfsdk/src/fsdk_annothandler.cpp ('k') | fpdfsdk/src/fsdk_baseform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698