| OLD | NEW |
| 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 |
| 11 CFDE_VisualSetIterator::CFDE_VisualSetIterator() : m_dwFilter(0) {} | 11 CFDE_VisualSetIterator::CFDE_VisualSetIterator() |
| 12 : m_dwFilter(0), m_CanvasStack(100) {} |
| 12 | 13 |
| 13 CFDE_VisualSetIterator::~CFDE_VisualSetIterator() { | 14 CFDE_VisualSetIterator::~CFDE_VisualSetIterator() { |
| 14 m_CanvasStack.RemoveAll(); | 15 m_CanvasStack.RemoveAll(FALSE); |
| 15 } | 16 } |
| 16 | 17 |
| 17 FX_BOOL CFDE_VisualSetIterator::AttachCanvas(IFDE_CanvasSet* pCanvas) { | 18 FX_BOOL CFDE_VisualSetIterator::AttachCanvas(IFDE_CanvasSet* pCanvas) { |
| 18 ASSERT(pCanvas); | 19 ASSERT(pCanvas); |
| 19 | 20 |
| 20 m_CanvasStack.RemoveAll(); | 21 m_CanvasStack.RemoveAll(FALSE); |
| 21 FDE_CANVASITEM canvas; | 22 FDE_CANVASITEM canvas; |
| 22 canvas.hCanvas = nullptr; | 23 canvas.hCanvas = nullptr; |
| 23 canvas.pCanvas = pCanvas; | 24 canvas.pCanvas = pCanvas; |
| 24 canvas.hPos = pCanvas->GetFirstPosition(); | 25 canvas.hPos = pCanvas->GetFirstPosition(); |
| 25 if (!canvas.hPos) | 26 if (!canvas.hPos) |
| 26 return FALSE; | 27 return FALSE; |
| 27 | 28 |
| 28 return m_CanvasStack.Push(canvas) == 0; | 29 return m_CanvasStack.Push(canvas) == 0; |
| 29 } | 30 } |
| 30 | 31 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } while (pCanvas->hPos); | 89 } while (pCanvas->hPos); |
| 89 } | 90 } |
| 90 if (ppCanvasSet) | 91 if (ppCanvasSet) |
| 91 *ppCanvasSet = nullptr; | 92 *ppCanvasSet = nullptr; |
| 92 if (phCanvasObj) | 93 if (phCanvasObj) |
| 93 *phCanvasObj = nullptr; | 94 *phCanvasObj = nullptr; |
| 94 | 95 |
| 95 pVisualSet = nullptr; | 96 pVisualSet = nullptr; |
| 96 return nullptr; | 97 return nullptr; |
| 97 } | 98 } |
| OLD | NEW |