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

Side by Side Diff: xfa/fde/fde_iterator.cpp

Issue 1866333003: Remove IFDE_Image, IFDE_PathSet, IFDE_ImageSet, and IFDE_WidgetSet. (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
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/fde/fde_iterator.h" 7 #include "xfa/fde/fde_iterator.h"
8 8
9 #include "xfa/fgas/crt/fgas_utils.h" 9 #include "xfa/fgas/crt/fgas_utils.h"
10 10
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 return m_CanvasStack.Push(canvas) == 0; 28 return m_CanvasStack.Push(canvas) == 0;
29 } 29 }
30 FX_BOOL CFDE_VisualSetIterator::FilterObjects(uint32_t dwObjects) { 30 FX_BOOL CFDE_VisualSetIterator::FilterObjects(uint32_t dwObjects) {
31 if (m_CanvasStack.GetSize() == 0) { 31 if (m_CanvasStack.GetSize() == 0) {
32 return FALSE; 32 return FALSE;
33 } 33 }
34 while (m_CanvasStack.GetSize() > 1) { 34 while (m_CanvasStack.GetSize() > 1) {
35 m_CanvasStack.Pop(); 35 m_CanvasStack.Pop();
36 } 36 }
37 m_dwFilter = dwObjects & ~(uint32_t)FDE_VISUALOBJ_Widget; 37
38 if (dwObjects & FDE_VISUALOBJ_Widget) {
39 m_dwFilter |= 0xFF00;
40 }
41 FDE_CANVASITEM* pCanvas = m_CanvasStack.GetTopElement(); 38 FDE_CANVASITEM* pCanvas = m_CanvasStack.GetTopElement();
42 FXSYS_assert(pCanvas != NULL && pCanvas->pCanvas != NULL); 39 FXSYS_assert(pCanvas != NULL && pCanvas->pCanvas != NULL);
43 pCanvas->hPos = pCanvas->pCanvas->GetFirstPosition(NULL); 40 pCanvas->hPos = pCanvas->pCanvas->GetFirstPosition(NULL);
44 return pCanvas->hPos != NULL; 41 return pCanvas->hPos != NULL;
45 } 42 }
46 void CFDE_VisualSetIterator::Reset() { 43 void CFDE_VisualSetIterator::Reset() {
47 FilterObjects(m_dwFilter); 44 FilterObjects(m_dwFilter);
48 } 45 }
49 FDE_HVISUALOBJ CFDE_VisualSetIterator::GetNext(IFDE_VisualSet*& pVisualSet, 46 FDE_HVISUALOBJ CFDE_VisualSetIterator::GetNext(IFDE_VisualSet*& pVisualSet,
50 FDE_HVISUALOBJ* phCanvasObj, 47 FDE_HVISUALOBJ* phCanvasObj,
(...skipping 14 matching lines...) Expand all
65 FXSYS_assert(hObj != NULL); 62 FXSYS_assert(hObj != NULL);
66 FDE_VISUALOBJTYPE eType = pVisualSet->GetType(); 63 FDE_VISUALOBJTYPE eType = pVisualSet->GetType();
67 if (eType == FDE_VISUALOBJ_Canvas) { 64 if (eType == FDE_VISUALOBJ_Canvas) {
68 FDE_CANVASITEM canvas; 65 FDE_CANVASITEM canvas;
69 canvas.hCanvas = hObj; 66 canvas.hCanvas = hObj;
70 canvas.pCanvas = (IFDE_CanvasSet*)pVisualSet; 67 canvas.pCanvas = (IFDE_CanvasSet*)pVisualSet;
71 canvas.hPos = canvas.pCanvas->GetFirstPosition(hObj); 68 canvas.hPos = canvas.pCanvas->GetFirstPosition(hObj);
72 m_CanvasStack.Push(canvas); 69 m_CanvasStack.Push(canvas);
73 break; 70 break;
74 } 71 }
75 uint32_t dwObj = 72 uint32_t dwObj = (uint32_t)eType;
76 (eType == FDE_VISUALOBJ_Widget)
dsinclair 2016/04/07 14:35:27 eType was set from pVisualSet->GetType of which th
77 ? (uint32_t)((IFDE_WidgetSet*)pVisualSet)->GetWidgetType(hObj)
78 : (uint32_t)eType;
79 if ((m_dwFilter & dwObj) != 0) { 73 if ((m_dwFilter & dwObj) != 0) {
80 if (ppCanvasSet) { 74 if (ppCanvasSet) {
81 *ppCanvasSet = pCanvas->pCanvas; 75 *ppCanvasSet = pCanvas->pCanvas;
82 } 76 }
83 if (phCanvasObj) { 77 if (phCanvasObj) {
84 *phCanvasObj = pCanvas->hCanvas; 78 *phCanvasObj = pCanvas->hCanvas;
85 } 79 }
86 return hObj; 80 return hObj;
87 } 81 }
88 } while (pCanvas->hPos != NULL); 82 } while (pCanvas->hPos != NULL);
89 } 83 }
90 if (ppCanvasSet) { 84 if (ppCanvasSet) {
91 *ppCanvasSet = NULL; 85 *ppCanvasSet = NULL;
92 } 86 }
93 if (phCanvasObj) { 87 if (phCanvasObj) {
94 *phCanvasObj = NULL; 88 *phCanvasObj = NULL;
95 } 89 }
96 pVisualSet = NULL; 90 pVisualSet = NULL;
97 return NULL; 91 return NULL;
98 } 92 }
OLDNEW
« xfa/fde/fde_gedevice.cpp ('K') | « xfa/fde/fde_iterator.h ('k') | xfa/fde/fde_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698