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

Side by Side Diff: xfa/fxfa/app/xfa_ffpageview.cpp

Issue 1830323006: Remove FX_DWORD from XFA. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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 | « xfa/fxfa/app/xfa_ffnotify.cpp ('k') | xfa/fxfa/app/xfa_ffpath.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 "xfa/fxfa/app/xfa_ffpageview.h" 7 #include "xfa/fxfa/app/xfa_ffpageview.h"
8 8
9 #include "xfa/fde/fde_render.h" 9 #include "xfa/fde/fde_render.h"
10 #include "xfa/fxfa/app/xfa_ffcheckbutton.h" 10 #include "xfa/fxfa/app/xfa_ffcheckbutton.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 continue; 69 continue;
70 } 70 }
71 CXFA_WidgetAcc* pAcc = pWidget->GetDataAcc(); 71 CXFA_WidgetAcc* pAcc = pWidget->GetDataAcc();
72 int32_t type = pAcc->GetClassID(); 72 int32_t type = pAcc->GetClassID();
73 if (type != XFA_ELEMENT_Field && type != XFA_ELEMENT_Draw) { 73 if (type != XFA_ELEMENT_Field && type != XFA_ELEMENT_Draw) {
74 continue; 74 continue;
75 } 75 }
76 FX_FLOAT fWidgetx = fx; 76 FX_FLOAT fWidgetx = fx;
77 FX_FLOAT fWidgety = fy; 77 FX_FLOAT fWidgety = fy;
78 pWidget->Rotate2Normal(fWidgetx, fWidgety); 78 pWidget->Rotate2Normal(fWidgetx, fWidgety);
79 FX_DWORD dwFlag = pWidget->OnHitTest(fWidgetx, fWidgety); 79 uint32_t dwFlag = pWidget->OnHitTest(fWidgetx, fWidgety);
80 if ((FWL_WGTHITTEST_Client == dwFlag || 80 if ((FWL_WGTHITTEST_Client == dwFlag ||
81 FWL_WGTHITTEST_HyperLink == dwFlag)) { 81 FWL_WGTHITTEST_HyperLink == dwFlag)) {
82 break; 82 break;
83 } 83 }
84 } 84 }
85 pIterator->Release(); 85 pIterator->Release();
86 return pWidget; 86 return pWidget;
87 } 87 }
88 IXFA_WidgetIterator* CXFA_FFPageView::CreateWidgetIterator( 88 IXFA_WidgetIterator* CXFA_FFPageView::CreateWidgetIterator(
89 FX_DWORD dwTraverseWay, 89 uint32_t dwTraverseWay,
90 FX_DWORD dwWidgetFilter) { 90 uint32_t dwWidgetFilter) {
91 switch (dwTraverseWay) { 91 switch (dwTraverseWay) {
92 case XFA_TRAVERSEWAY_Tranvalse: 92 case XFA_TRAVERSEWAY_Tranvalse:
93 return new CXFA_FFTabOrderPageWidgetIterator(this, dwWidgetFilter); 93 return new CXFA_FFTabOrderPageWidgetIterator(this, dwWidgetFilter);
94 case XFA_TRAVERSEWAY_Form: 94 case XFA_TRAVERSEWAY_Form:
95 return new CXFA_FFPageWidgetIterator(this, dwWidgetFilter); 95 return new CXFA_FFPageWidgetIterator(this, dwWidgetFilter);
96 } 96 }
97 return NULL; 97 return NULL;
98 } 98 }
99 static FX_BOOL XFA_PageWidgetFilter(CXFA_FFWidget* pWidget, 99 static FX_BOOL XFA_PageWidgetFilter(CXFA_FFWidget* pWidget,
100 FX_DWORD dwFilter, 100 uint32_t dwFilter,
101 FX_BOOL bTraversal, 101 FX_BOOL bTraversal,
102 FX_BOOL bIgnorerelevant) { 102 FX_BOOL bIgnorerelevant) {
103 CXFA_WidgetAcc* pWidgetAcc = pWidget->GetDataAcc(); 103 CXFA_WidgetAcc* pWidgetAcc = pWidget->GetDataAcc();
104 FX_DWORD dwType = dwFilter & XFA_WIDGETFILTER_AllType; 104 uint32_t dwType = dwFilter & XFA_WIDGETFILTER_AllType;
105 if ((dwType == XFA_WIDGETFILTER_Field) && 105 if ((dwType == XFA_WIDGETFILTER_Field) &&
106 (pWidgetAcc->GetClassID() != XFA_ELEMENT_Field)) { 106 (pWidgetAcc->GetClassID() != XFA_ELEMENT_Field)) {
107 return FALSE; 107 return FALSE;
108 } 108 }
109 FX_DWORD dwStatus = pWidget->GetStatus(); 109 uint32_t dwStatus = pWidget->GetStatus();
110 if (bTraversal && (dwStatus & XFA_WIDGETSTATUS_Disabled)) { 110 if (bTraversal && (dwStatus & XFA_WIDGETSTATUS_Disabled)) {
111 return FALSE; 111 return FALSE;
112 } 112 }
113 if (bIgnorerelevant) { 113 if (bIgnorerelevant) {
114 return (dwStatus & XFA_WIDGETFILTER_Visible) != 0; 114 return (dwStatus & XFA_WIDGETFILTER_Visible) != 0;
115 } 115 }
116 dwFilter &= (XFA_WIDGETFILTER_Visible | XFA_WIDGETFILTER_Viewable | 116 dwFilter &= (XFA_WIDGETFILTER_Visible | XFA_WIDGETFILTER_Viewable |
117 XFA_WIDGETFILTER_Printable); 117 XFA_WIDGETFILTER_Printable);
118 return (dwFilter & dwStatus) == dwFilter; 118 return (dwFilter & dwStatus) == dwFilter;
119 } 119 }
120 CXFA_FFPageWidgetIterator::CXFA_FFPageWidgetIterator(CXFA_FFPageView* pPageView, 120 CXFA_FFPageWidgetIterator::CXFA_FFPageWidgetIterator(CXFA_FFPageView* pPageView,
121 FX_DWORD dwFilter) { 121 uint32_t dwFilter) {
122 m_pPageView = pPageView; 122 m_pPageView = pPageView;
123 m_dwFilter = dwFilter; 123 m_dwFilter = dwFilter;
124 m_sIterator.Init(pPageView); 124 m_sIterator.Init(pPageView);
125 m_bIgnorerelevant = ((CXFA_FFDoc*)m_pPageView->GetDocView()->GetDoc()) 125 m_bIgnorerelevant = ((CXFA_FFDoc*)m_pPageView->GetDocView()->GetDoc())
126 ->GetXFADoc() 126 ->GetXFADoc()
127 ->GetCurVersionMode() < XFA_VERSION_205; 127 ->GetCurVersionMode() < XFA_VERSION_205;
128 } 128 }
129 CXFA_FFPageWidgetIterator::~CXFA_FFPageWidgetIterator() {} 129 CXFA_FFPageWidgetIterator::~CXFA_FFPageWidgetIterator() {}
130 void CXFA_FFPageWidgetIterator::Reset() { 130 void CXFA_FFPageWidgetIterator::Reset() {
131 m_sIterator.Reset(); 131 m_sIterator.Reset();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 if (!pWidget->IsLoaded() && 179 if (!pWidget->IsLoaded() &&
180 (pWidget->GetStatus() & XFA_WIDGETSTATUS_Visible) != 0) { 180 (pWidget->GetStatus() & XFA_WIDGETSTATUS_Visible) != 0) {
181 pWidget->LoadWidget(); 181 pWidget->LoadWidget();
182 } 182 }
183 return pWidget; 183 return pWidget;
184 } 184 }
185 return NULL; 185 return NULL;
186 } 186 }
187 CXFA_FFTabOrderPageWidgetIterator::CXFA_FFTabOrderPageWidgetIterator( 187 CXFA_FFTabOrderPageWidgetIterator::CXFA_FFTabOrderPageWidgetIterator(
188 CXFA_FFPageView* pPageView, 188 CXFA_FFPageView* pPageView,
189 FX_DWORD dwFilter) 189 uint32_t dwFilter)
190 : m_pPageView(pPageView), m_dwFilter(dwFilter), m_iCurWidget(-1) { 190 : m_pPageView(pPageView), m_dwFilter(dwFilter), m_iCurWidget(-1) {
191 m_bIgnorerelevant = ((CXFA_FFDoc*)m_pPageView->GetDocView()->GetDoc()) 191 m_bIgnorerelevant = ((CXFA_FFDoc*)m_pPageView->GetDocView()->GetDoc())
192 ->GetXFADoc() 192 ->GetXFADoc()
193 ->GetCurVersionMode() < XFA_VERSION_205; 193 ->GetCurVersionMode() < XFA_VERSION_205;
194 Reset(); 194 Reset();
195 } 195 }
196 CXFA_FFTabOrderPageWidgetIterator::~CXFA_FFTabOrderPageWidgetIterator() {} 196 CXFA_FFTabOrderPageWidgetIterator::~CXFA_FFTabOrderPageWidgetIterator() {}
197 void CXFA_FFTabOrderPageWidgetIterator::Release() { 197 void CXFA_FFTabOrderPageWidgetIterator::Release() {
198 delete this; 198 delete this;
199 } 199 }
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 CXFA_LayoutItem* pLayoutItem) { 415 CXFA_LayoutItem* pLayoutItem) {
416 if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) { 416 if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) {
417 if (!pWidget->IsLoaded() && 417 if (!pWidget->IsLoaded() &&
418 (pWidget->GetStatus() & XFA_WIDGETSTATUS_Visible)) { 418 (pWidget->GetStatus() & XFA_WIDGETSTATUS_Visible)) {
419 pWidget->LoadWidget(); 419 pWidget->LoadWidget();
420 } 420 }
421 return pWidget; 421 return pWidget;
422 } 422 }
423 return NULL; 423 return NULL;
424 } 424 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffnotify.cpp ('k') | xfa/fxfa/app/xfa_ffpath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698