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/fxfa/xfa_ffapp.h" | 7 #include "xfa/fxfa/xfa_ffapp.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "xfa/fgas/font/fgas_stdfontmgr.h" | 12 #include "xfa/fgas/font/fgas_stdfontmgr.h" |
13 #include "xfa/fwl/core/cfwl_widgetmgr.h" | 13 #include "xfa/fwl/core/cfwl_widgetmgr.h" |
14 #include "xfa/fxfa/app/xfa_fwladapter.h" | 14 #include "xfa/fxfa/app/xfa_fwladapter.h" |
15 #include "xfa/fxfa/app/xfa_fwltheme.h" | 15 #include "xfa/fxfa/app/xfa_fwltheme.h" |
16 #include "xfa/fxfa/xfa_ffdoc.h" | 16 #include "xfa/fxfa/xfa_ffdoc.h" |
17 #include "xfa/fxfa/xfa_ffdochandler.h" | 17 #include "xfa/fxfa/xfa_ffdochandler.h" |
18 #include "xfa/fxfa/xfa_ffwidgethandler.h" | 18 #include "xfa/fxfa/xfa_ffwidgethandler.h" |
19 #include "xfa/fxfa/xfa_fontmgr.h" | 19 #include "xfa/fxfa/xfa_fontmgr.h" |
20 | 20 |
21 CXFA_FileRead::CXFA_FileRead(const CFX_ArrayTemplate<CPDF_Stream*>& streams) { | 21 CXFA_FileRead::CXFA_FileRead(const std::vector<CPDF_Stream*>& streams) { |
22 int32_t iCount = streams.GetSize(); | 22 for (CPDF_Stream* pStream : streams) { |
23 for (int32_t i = 0; i < iCount; i++) { | |
24 CPDF_StreamAcc& acc = m_Data.Add(); | 23 CPDF_StreamAcc& acc = m_Data.Add(); |
25 acc.LoadAllData(streams[i]); | 24 acc.LoadAllData(pStream); |
26 } | 25 } |
27 } | 26 } |
28 | 27 |
29 CXFA_FileRead::~CXFA_FileRead() {} | 28 CXFA_FileRead::~CXFA_FileRead() {} |
30 | 29 |
31 FX_FILESIZE CXFA_FileRead::GetSize() { | 30 FX_FILESIZE CXFA_FileRead::GetSize() { |
32 uint32_t dwSize = 0; | 31 uint32_t dwSize = 0; |
33 int32_t iCount = m_Data.GetSize(); | 32 int32_t iCount = m_Data.GetSize(); |
34 for (int32_t i = 0; i < iCount; i++) { | 33 for (int32_t i = 0; i < iCount; i++) { |
35 CPDF_StreamAcc& acc = m_Data[i]; | 34 CPDF_StreamAcc& acc = m_Data[i]; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 pDelegate->OnSetCapability(FWL_WGTMGR_DisableThread | | 148 pDelegate->OnSetCapability(FWL_WGTMGR_DisableThread | |
150 FWL_WGTMGR_DisableForm); | 149 FWL_WGTMGR_DisableForm); |
151 m_pWidgetMgrDelegate = pDelegate; | 150 m_pWidgetMgrDelegate = pDelegate; |
152 } | 151 } |
153 return m_pAdapterWidgetMgr.get(); | 152 return m_pAdapterWidgetMgr.get(); |
154 } | 153 } |
155 | 154 |
156 IFWL_AdapterTimerMgr* CXFA_FFApp::GetTimerMgr() const { | 155 IFWL_AdapterTimerMgr* CXFA_FFApp::GetTimerMgr() const { |
157 return m_pProvider->GetTimerMgr(); | 156 return m_pProvider->GetTimerMgr(); |
158 } | 157 } |
OLD | NEW |