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

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

Issue 2467203003: Remove FX_BOOL from xfa. (Closed)
Patch Set: Created 4 years, 1 month 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/xfa_ffpageview.h" 7 #include "xfa/fxfa/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"
11 #include "xfa/fxfa/app/xfa_ffchoicelist.h" 11 #include "xfa/fxfa/app/xfa_ffchoicelist.h"
12 #include "xfa/fxfa/app/xfa_fffield.h" 12 #include "xfa/fxfa/app/xfa_fffield.h"
13 #include "xfa/fxfa/app/xfa_ffimageedit.h" 13 #include "xfa/fxfa/app/xfa_ffimageedit.h"
14 #include "xfa/fxfa/app/xfa_ffpushbutton.h" 14 #include "xfa/fxfa/app/xfa_ffpushbutton.h"
15 #include "xfa/fxfa/app/xfa_fftextedit.h" 15 #include "xfa/fxfa/app/xfa_fftextedit.h"
16 #include "xfa/fxfa/app/xfa_fwladapter.h" 16 #include "xfa/fxfa/app/xfa_fwladapter.h"
17 #include "xfa/fxfa/xfa_ffdoc.h" 17 #include "xfa/fxfa/xfa_ffdoc.h"
18 #include "xfa/fxfa/xfa_ffdocview.h" 18 #include "xfa/fxfa/xfa_ffdocview.h"
19 #include "xfa/fxfa/xfa_ffwidget.h" 19 #include "xfa/fxfa/xfa_ffwidget.h"
20 20
21 namespace { 21 namespace {
22 22
23 void GetPageMatrix(CFX_Matrix& pageMatrix, 23 void GetPageMatrix(CFX_Matrix& pageMatrix,
24 const CFX_RectF& docPageRect, 24 const CFX_RectF& docPageRect,
25 const CFX_Rect& devicePageRect, 25 const CFX_Rect& devicePageRect,
26 int32_t iRotate, 26 int32_t iRotate,
27 uint32_t dwCoordinatesType) { 27 uint32_t dwCoordinatesType) {
28 ASSERT(iRotate >= 0 && iRotate <= 3); 28 ASSERT(iRotate >= 0 && iRotate <= 3);
29 FX_BOOL bFlipX = (dwCoordinatesType & 0x01) != 0; 29 bool bFlipX = (dwCoordinatesType & 0x01) != 0;
30 FX_BOOL bFlipY = (dwCoordinatesType & 0x02) != 0; 30 bool bFlipY = (dwCoordinatesType & 0x02) != 0;
31 CFX_Matrix m; 31 CFX_Matrix m;
32 m.Set((bFlipX ? -1.0f : 1.0f), 0, 0, (bFlipY ? -1.0f : 1.0f), 0, 0); 32 m.Set((bFlipX ? -1.0f : 1.0f), 0, 0, (bFlipY ? -1.0f : 1.0f), 0, 0);
33 if (iRotate == 0 || iRotate == 2) { 33 if (iRotate == 0 || iRotate == 2) {
34 m.a *= (FX_FLOAT)devicePageRect.width / docPageRect.width; 34 m.a *= (FX_FLOAT)devicePageRect.width / docPageRect.width;
35 m.d *= (FX_FLOAT)devicePageRect.height / docPageRect.height; 35 m.d *= (FX_FLOAT)devicePageRect.height / docPageRect.height;
36 } else { 36 } else {
37 m.a *= (FX_FLOAT)devicePageRect.height / docPageRect.width; 37 m.a *= (FX_FLOAT)devicePageRect.height / docPageRect.width;
38 m.d *= (FX_FLOAT)devicePageRect.width / docPageRect.height; 38 m.d *= (FX_FLOAT)devicePageRect.width / docPageRect.height;
39 } 39 }
40 m.Rotate(iRotate * 1.57079632675f); 40 m.Rotate(iRotate * 1.57079632675f);
(...skipping 23 matching lines...) Expand all
64 : (FX_FLOAT)devicePageRect.bottom(); 64 : (FX_FLOAT)devicePageRect.bottom();
65 break; 65 break;
66 default: 66 default:
67 break; 67 break;
68 } 68 }
69 pageMatrix = m; 69 pageMatrix = m;
70 } 70 }
71 71
72 bool PageWidgetFilter(CXFA_FFWidget* pWidget, 72 bool PageWidgetFilter(CXFA_FFWidget* pWidget,
73 uint32_t dwFilter, 73 uint32_t dwFilter,
74 FX_BOOL bTraversal, 74 bool bTraversal,
75 FX_BOOL bIgnorerelevant) { 75 bool bIgnorerelevant) {
76 CXFA_WidgetAcc* pWidgetAcc = pWidget->GetDataAcc(); 76 CXFA_WidgetAcc* pWidgetAcc = pWidget->GetDataAcc();
77 77
78 if (!!(dwFilter & XFA_WidgetStatus_Focused) && 78 if (!!(dwFilter & XFA_WidgetStatus_Focused) &&
79 pWidgetAcc->GetElementType() != XFA_Element::Field) { 79 pWidgetAcc->GetElementType() != XFA_Element::Field) {
80 return false; 80 return false;
81 } 81 }
82 82
83 uint32_t dwStatus = pWidget->GetStatus(); 83 uint32_t dwStatus = pWidget->GetStatus();
84 if (bTraversal && (dwStatus & XFA_WidgetStatus_Disabled)) 84 if (bTraversal && (dwStatus & XFA_WidgetStatus_Disabled))
85 return false; 85 return false;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 if (CXFA_FFWidget* hWidget = GetWidget(pLayoutItem)) { 187 if (CXFA_FFWidget* hWidget = GetWidget(pLayoutItem)) {
188 return hWidget; 188 return hWidget;
189 } 189 }
190 } 190 }
191 return nullptr; 191 return nullptr;
192 } 192 }
193 CXFA_FFWidget* CXFA_FFPageWidgetIterator::GetCurrentWidget() { 193 CXFA_FFWidget* CXFA_FFPageWidgetIterator::GetCurrentWidget() {
194 CXFA_LayoutItem* pLayoutItem = m_sIterator.GetCurrent(); 194 CXFA_LayoutItem* pLayoutItem = m_sIterator.GetCurrent();
195 return pLayoutItem ? XFA_GetWidgetFromLayoutItem(pLayoutItem) : nullptr; 195 return pLayoutItem ? XFA_GetWidgetFromLayoutItem(pLayoutItem) : nullptr;
196 } 196 }
197 FX_BOOL CXFA_FFPageWidgetIterator::SetCurrentWidget(CXFA_FFWidget* hWidget) { 197 bool CXFA_FFPageWidgetIterator::SetCurrentWidget(CXFA_FFWidget* hWidget) {
198 return hWidget && m_sIterator.SetCurrent(hWidget); 198 return hWidget && m_sIterator.SetCurrent(hWidget);
199 } 199 }
200 CXFA_FFWidget* CXFA_FFPageWidgetIterator::GetWidget( 200 CXFA_FFWidget* CXFA_FFPageWidgetIterator::GetWidget(
201 CXFA_LayoutItem* pLayoutItem) { 201 CXFA_LayoutItem* pLayoutItem) {
202 if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) { 202 if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) {
203 if (!PageWidgetFilter(pWidget, m_dwFilter, FALSE, m_bIgnorerelevant)) { 203 if (!PageWidgetFilter(pWidget, m_dwFilter, false, m_bIgnorerelevant)) {
204 return nullptr; 204 return nullptr;
205 } 205 }
206 if (!pWidget->IsLoaded() && 206 if (!pWidget->IsLoaded() &&
207 (pWidget->GetStatus() & XFA_WidgetStatus_Visible) != 0) { 207 (pWidget->GetStatus() & XFA_WidgetStatus_Visible) != 0) {
208 pWidget->LoadWidget(); 208 pWidget->LoadWidget();
209 } 209 }
210 return pWidget; 210 return pWidget;
211 } 211 }
212 return nullptr; 212 return nullptr;
213 } 213 }
(...skipping 10 matching lines...) Expand all
224 224
225 CXFA_FFTabOrderPageWidgetIterator::~CXFA_FFTabOrderPageWidgetIterator() {} 225 CXFA_FFTabOrderPageWidgetIterator::~CXFA_FFTabOrderPageWidgetIterator() {}
226 226
227 void CXFA_FFTabOrderPageWidgetIterator::Reset() { 227 void CXFA_FFTabOrderPageWidgetIterator::Reset() {
228 CreateTabOrderWidgetArray(); 228 CreateTabOrderWidgetArray();
229 m_iCurWidget = -1; 229 m_iCurWidget = -1;
230 } 230 }
231 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToFirst() { 231 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToFirst() {
232 if (m_TabOrderWidgetArray.GetSize() > 0) { 232 if (m_TabOrderWidgetArray.GetSize() > 0) {
233 for (int32_t i = 0; i < m_TabOrderWidgetArray.GetSize(); i++) { 233 for (int32_t i = 0; i < m_TabOrderWidgetArray.GetSize(); i++) {
234 if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE, 234 if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, true,
235 m_bIgnorerelevant)) { 235 m_bIgnorerelevant)) {
236 m_iCurWidget = i; 236 m_iCurWidget = i;
237 return m_TabOrderWidgetArray[m_iCurWidget]; 237 return m_TabOrderWidgetArray[m_iCurWidget];
238 } 238 }
239 } 239 }
240 } 240 }
241 return nullptr; 241 return nullptr;
242 } 242 }
243 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToLast() { 243 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToLast() {
244 if (m_TabOrderWidgetArray.GetSize() > 0) { 244 if (m_TabOrderWidgetArray.GetSize() > 0) {
245 for (int32_t i = m_TabOrderWidgetArray.GetSize() - 1; i >= 0; i--) { 245 for (int32_t i = m_TabOrderWidgetArray.GetSize() - 1; i >= 0; i--) {
246 if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE, 246 if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, true,
247 m_bIgnorerelevant)) { 247 m_bIgnorerelevant)) {
248 m_iCurWidget = i; 248 m_iCurWidget = i;
249 return m_TabOrderWidgetArray[m_iCurWidget]; 249 return m_TabOrderWidgetArray[m_iCurWidget];
250 } 250 }
251 } 251 }
252 } 252 }
253 return nullptr; 253 return nullptr;
254 } 254 }
255 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToNext() { 255 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToNext() {
256 for (int32_t i = m_iCurWidget + 1; i < m_TabOrderWidgetArray.GetSize(); i++) { 256 for (int32_t i = m_iCurWidget + 1; i < m_TabOrderWidgetArray.GetSize(); i++) {
257 if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE, 257 if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, true,
258 m_bIgnorerelevant)) { 258 m_bIgnorerelevant)) {
259 m_iCurWidget = i; 259 m_iCurWidget = i;
260 return m_TabOrderWidgetArray[m_iCurWidget]; 260 return m_TabOrderWidgetArray[m_iCurWidget];
261 } 261 }
262 } 262 }
263 m_iCurWidget = -1; 263 m_iCurWidget = -1;
264 return nullptr; 264 return nullptr;
265 } 265 }
266 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToPrevious() { 266 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToPrevious() {
267 for (int32_t i = m_iCurWidget - 1; i >= 0; i--) { 267 for (int32_t i = m_iCurWidget - 1; i >= 0; i--) {
268 if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE, 268 if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, true,
269 m_bIgnorerelevant)) { 269 m_bIgnorerelevant)) {
270 m_iCurWidget = i; 270 m_iCurWidget = i;
271 return m_TabOrderWidgetArray[m_iCurWidget]; 271 return m_TabOrderWidgetArray[m_iCurWidget];
272 } 272 }
273 } 273 }
274 m_iCurWidget = -1; 274 m_iCurWidget = -1;
275 return nullptr; 275 return nullptr;
276 } 276 }
277 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetCurrentWidget() { 277 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetCurrentWidget() {
278 if (m_iCurWidget >= 0) { 278 if (m_iCurWidget >= 0) {
279 return m_TabOrderWidgetArray[m_iCurWidget]; 279 return m_TabOrderWidgetArray[m_iCurWidget];
280 } 280 }
281 return nullptr; 281 return nullptr;
282 } 282 }
283 FX_BOOL CXFA_FFTabOrderPageWidgetIterator::SetCurrentWidget( 283 bool CXFA_FFTabOrderPageWidgetIterator::SetCurrentWidget(
284 CXFA_FFWidget* hWidget) { 284 CXFA_FFWidget* hWidget) {
285 int32_t iWidgetIndex = m_TabOrderWidgetArray.Find(hWidget); 285 int32_t iWidgetIndex = m_TabOrderWidgetArray.Find(hWidget);
286 if (iWidgetIndex >= 0) { 286 if (iWidgetIndex >= 0) {
287 m_iCurWidget = iWidgetIndex; 287 m_iCurWidget = iWidgetIndex;
288 return TRUE; 288 return true;
289 } 289 }
290 return FALSE; 290 return false;
291 } 291 }
292 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetTraverseWidget( 292 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetTraverseWidget(
293 CXFA_FFWidget* pWidget) { 293 CXFA_FFWidget* pWidget) {
294 CXFA_WidgetAcc* pAcc = pWidget->GetDataAcc(); 294 CXFA_WidgetAcc* pAcc = pWidget->GetDataAcc();
295 CXFA_Node* pTraversal = pAcc->GetNode()->GetChild(0, XFA_Element::Traversal); 295 CXFA_Node* pTraversal = pAcc->GetNode()->GetChild(0, XFA_Element::Traversal);
296 if (pTraversal) { 296 if (pTraversal) {
297 CXFA_Node* pTraverse = pTraversal->GetChild(0, XFA_Element::Traverse); 297 CXFA_Node* pTraverse = pTraversal->GetChild(0, XFA_Element::Traverse);
298 if (pTraverse) { 298 if (pTraverse) {
299 CFX_WideString wsTraverseWidgetName; 299 CFX_WideString wsTraverseWidgetName;
300 if (pTraverse->GetAttribute(XFA_ATTRIBUTE_Ref, wsTraverseWidgetName)) { 300 if (pTraverse->GetAttribute(XFA_ATTRIBUTE_Ref, wsTraverseWidgetName)) {
(...skipping 16 matching lines...) Expand all
317 if (nWidgetCount < 1) { 317 if (nWidgetCount < 1) {
318 return; 318 return;
319 } 319 }
320 CXFA_FFWidget* hWidget = SpaceOrderWidgetArray[0]; 320 CXFA_FFWidget* hWidget = SpaceOrderWidgetArray[0];
321 for (; m_TabOrderWidgetArray.GetSize() < nWidgetCount;) { 321 for (; m_TabOrderWidgetArray.GetSize() < nWidgetCount;) {
322 if (m_TabOrderWidgetArray.Find(hWidget) < 0) { 322 if (m_TabOrderWidgetArray.Find(hWidget) < 0) {
323 m_TabOrderWidgetArray.Add(hWidget); 323 m_TabOrderWidgetArray.Add(hWidget);
324 CXFA_WidgetAcc* pWidgetAcc = hWidget->GetDataAcc(); 324 CXFA_WidgetAcc* pWidgetAcc = hWidget->GetDataAcc();
325 if (pWidgetAcc->GetUIType() == XFA_Element::ExclGroup) { 325 if (pWidgetAcc->GetUIType() == XFA_Element::ExclGroup) {
326 int32_t iWidgetIndex = SpaceOrderWidgetArray.Find(hWidget) + 1; 326 int32_t iWidgetIndex = SpaceOrderWidgetArray.Find(hWidget) + 1;
327 while (TRUE) { 327 while (true) {
328 CXFA_FFWidget* pRadio = 328 CXFA_FFWidget* pRadio =
329 SpaceOrderWidgetArray[(iWidgetIndex) % nWidgetCount]; 329 SpaceOrderWidgetArray[(iWidgetIndex) % nWidgetCount];
330 if (pRadio->GetDataAcc()->GetExclGroup() != pWidgetAcc) { 330 if (pRadio->GetDataAcc()->GetExclGroup() != pWidgetAcc) {
331 break; 331 break;
332 } 332 }
333 if (m_TabOrderWidgetArray.Find(hWidget) < 0) { 333 if (m_TabOrderWidgetArray.Find(hWidget) < 0) {
334 m_TabOrderWidgetArray.Add(pRadio); 334 m_TabOrderWidgetArray.Add(pRadio);
335 } 335 }
336 iWidgetIndex++; 336 iWidgetIndex++;
337 } 337 }
(...skipping 17 matching lines...) Expand all
355 FX_FLOAT x1 = rt1.left, y1 = rt1.top, x2 = rt2.left, y2 = rt2.top; 355 FX_FLOAT x1 = rt1.left, y1 = rt1.top, x2 = rt2.left, y2 = rt2.top;
356 if (y1 < y2 || (y1 - y2 < XFA_FLOAT_PERCISION && x1 < x2)) { 356 if (y1 < y2 || (y1 - y2 < XFA_FLOAT_PERCISION && x1 < x2)) {
357 return -1; 357 return -1;
358 } 358 }
359 return 1; 359 return 1;
360 } 360 }
361 void CXFA_FFTabOrderPageWidgetIterator::OrderContainer( 361 void CXFA_FFTabOrderPageWidgetIterator::OrderContainer(
362 CXFA_LayoutItemIterator* sIterator, 362 CXFA_LayoutItemIterator* sIterator,
363 CXFA_LayoutItem* pContainerItem, 363 CXFA_LayoutItem* pContainerItem,
364 CXFA_TabParam* pContainer, 364 CXFA_TabParam* pContainer,
365 FX_BOOL& bCurrentItem, 365 bool& bCurrentItem,
366 FX_BOOL& bContentArea, 366 bool& bContentArea,
367 FX_BOOL bMarsterPage) { 367 bool bMarsterPage) {
368 CFX_ArrayTemplate<CXFA_TabParam*> tabParams; 368 CFX_ArrayTemplate<CXFA_TabParam*> tabParams;
369 CXFA_LayoutItem* pSearchItem = sIterator->MoveToNext(); 369 CXFA_LayoutItem* pSearchItem = sIterator->MoveToNext();
370 while (pSearchItem) { 370 while (pSearchItem) {
371 if (!pSearchItem->IsContentLayoutItem()) { 371 if (!pSearchItem->IsContentLayoutItem()) {
372 bContentArea = TRUE; 372 bContentArea = true;
373 pSearchItem = sIterator->MoveToNext(); 373 pSearchItem = sIterator->MoveToNext();
374 continue; 374 continue;
375 } 375 }
376 if (bMarsterPage && bContentArea) { 376 if (bMarsterPage && bContentArea) {
377 break; 377 break;
378 } 378 }
379 if (bMarsterPage || bContentArea) { 379 if (bMarsterPage || bContentArea) {
380 CXFA_FFWidget* hWidget = GetWidget(pSearchItem); 380 CXFA_FFWidget* hWidget = GetWidget(pSearchItem);
381 if (!hWidget) { 381 if (!hWidget) {
382 pSearchItem = sIterator->MoveToNext(); 382 pSearchItem = sIterator->MoveToNext();
383 continue; 383 continue;
384 } 384 }
385 if (pContainerItem && (pSearchItem->GetParent() != pContainerItem)) { 385 if (pContainerItem && (pSearchItem->GetParent() != pContainerItem)) {
386 bCurrentItem = TRUE; 386 bCurrentItem = true;
387 break; 387 break;
388 } 388 }
389 CXFA_TabParam* pParam = new CXFA_TabParam; 389 CXFA_TabParam* pParam = new CXFA_TabParam;
390 pParam->m_pWidget = hWidget; 390 pParam->m_pWidget = hWidget;
391 tabParams.Add(pParam); 391 tabParams.Add(pParam);
392 if (IsLayoutElement(pSearchItem->GetFormNode()->GetElementType(), true)) { 392 if (IsLayoutElement(pSearchItem->GetFormNode()->GetElementType(), true)) {
393 OrderContainer(sIterator, pSearchItem, pParam, bCurrentItem, 393 OrderContainer(sIterator, pSearchItem, pParam, bCurrentItem,
394 bContentArea, bMarsterPage); 394 bContentArea, bMarsterPage);
395 } 395 }
396 } 396 }
397 if (bCurrentItem) { 397 if (bCurrentItem) {
398 pSearchItem = sIterator->GetCurrent(); 398 pSearchItem = sIterator->GetCurrent();
399 bCurrentItem = FALSE; 399 bCurrentItem = false;
400 } else { 400 } else {
401 pSearchItem = sIterator->MoveToNext(); 401 pSearchItem = sIterator->MoveToNext();
402 } 402 }
403 } 403 }
404 int32_t iChildren = tabParams.GetSize(); 404 int32_t iChildren = tabParams.GetSize();
405 if (iChildren > 1) { 405 if (iChildren > 1) {
406 FXSYS_qsort(tabParams.GetData(), iChildren, sizeof(void*), 406 FXSYS_qsort(tabParams.GetData(), iChildren, sizeof(void*),
407 XFA_TabOrderWidgetComparator); 407 XFA_TabOrderWidgetComparator);
408 } 408 }
409 for (int32_t iStart = 0; iStart < iChildren; iStart++) { 409 for (int32_t iStart = 0; iStart < iChildren; iStart++) {
410 CXFA_TabParam* pParam = tabParams[iStart]; 410 CXFA_TabParam* pParam = tabParams[iStart];
411 pContainer->m_Children.Add(pParam->m_pWidget); 411 pContainer->m_Children.Add(pParam->m_pWidget);
412 if (pParam->m_Children.GetSize() > 0) { 412 if (pParam->m_Children.GetSize() > 0) {
413 pContainer->m_Children.Append(pParam->m_Children); 413 pContainer->m_Children.Append(pParam->m_Children);
414 } 414 }
415 delete pParam; 415 delete pParam;
416 } 416 }
417 tabParams.RemoveAll(); 417 tabParams.RemoveAll();
418 } 418 }
419 void CXFA_FFTabOrderPageWidgetIterator::CreateSpaceOrderWidgetArray( 419 void CXFA_FFTabOrderPageWidgetIterator::CreateSpaceOrderWidgetArray(
420 CXFA_WidgetArray& WidgetArray) { 420 CXFA_WidgetArray& WidgetArray) {
421 CXFA_LayoutItemIterator sIterator; 421 CXFA_LayoutItemIterator sIterator;
422 sIterator.Init(m_pPageView); 422 sIterator.Init(m_pPageView);
423 CXFA_TabParam* pParam = new CXFA_TabParam; 423 CXFA_TabParam* pParam = new CXFA_TabParam;
424 FX_BOOL bCurrentItem = FALSE; 424 bool bCurrentItem = false;
425 FX_BOOL bContentArea = FALSE; 425 bool bContentArea = false;
426 OrderContainer(&sIterator, nullptr, pParam, bCurrentItem, bContentArea); 426 OrderContainer(&sIterator, nullptr, pParam, bCurrentItem, bContentArea);
427 if (pParam->m_Children.GetSize() > 0) { 427 if (pParam->m_Children.GetSize() > 0) {
428 WidgetArray.Append(pParam->m_Children); 428 WidgetArray.Append(pParam->m_Children);
429 } 429 }
430 sIterator.Reset(); 430 sIterator.Reset();
431 bCurrentItem = FALSE; 431 bCurrentItem = false;
432 bContentArea = FALSE; 432 bContentArea = false;
433 pParam->m_Children.RemoveAll(); 433 pParam->m_Children.RemoveAll();
434 OrderContainer(&sIterator, nullptr, pParam, bCurrentItem, bContentArea, TRUE); 434 OrderContainer(&sIterator, nullptr, pParam, bCurrentItem, bContentArea, true);
435 if (pParam->m_Children.GetSize() > 0) { 435 if (pParam->m_Children.GetSize() > 0) {
436 WidgetArray.Append(pParam->m_Children); 436 WidgetArray.Append(pParam->m_Children);
437 } 437 }
438 delete pParam; 438 delete pParam;
439 } 439 }
440 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetWidget( 440 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetWidget(
441 CXFA_LayoutItem* pLayoutItem) { 441 CXFA_LayoutItem* pLayoutItem) {
442 if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) { 442 if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) {
443 if (!pWidget->IsLoaded() && 443 if (!pWidget->IsLoaded() &&
444 (pWidget->GetStatus() & XFA_WidgetStatus_Visible)) { 444 (pWidget->GetStatus() & XFA_WidgetStatus_Visible)) {
445 pWidget->LoadWidget(); 445 pWidget->LoadWidget();
446 } 446 }
447 return pWidget; 447 return pWidget;
448 } 448 }
449 return nullptr; 449 return nullptr;
450 } 450 }
451 451
452 CXFA_TabParam::CXFA_TabParam() : m_pWidget(nullptr) {} 452 CXFA_TabParam::CXFA_TabParam() : m_pWidget(nullptr) {}
453 453
454 CXFA_TabParam::~CXFA_TabParam() {} 454 CXFA_TabParam::~CXFA_TabParam() {}
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