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/include/xfa_ffapp.h" | 7 #include "xfa/fxfa/include/xfa_ffapp.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
| 11 #include "xfa/fgas/font/fgas_stdfontmgr.h" |
11 #include "xfa/fwl/core/ifwl_widgetmgrdelegate.h" | 12 #include "xfa/fwl/core/ifwl_widgetmgrdelegate.h" |
12 #include "xfa/fxfa/app/xfa_fwladapter.h" | 13 #include "xfa/fxfa/app/xfa_fwladapter.h" |
13 #include "xfa/fxfa/app/xfa_fwltheme.h" | 14 #include "xfa/fxfa/app/xfa_fwltheme.h" |
14 #include "xfa/fxfa/include/xfa_ffdoc.h" | 15 #include "xfa/fxfa/include/xfa_ffdoc.h" |
15 #include "xfa/fxfa/include/xfa_ffdochandler.h" | 16 #include "xfa/fxfa/include/xfa_ffdochandler.h" |
16 #include "xfa/fxfa/include/xfa_ffwidgethandler.h" | 17 #include "xfa/fxfa/include/xfa_ffwidgethandler.h" |
17 #include "xfa/fxfa/include/xfa_fontmgr.h" | 18 #include "xfa/fxfa/include/xfa_fontmgr.h" |
18 | 19 |
19 CXFA_FileRead::CXFA_FileRead(const CFX_ArrayTemplate<CPDF_Stream*>& streams) { | 20 CXFA_FileRead::CXFA_FileRead(const CFX_ArrayTemplate<CPDF_Stream*>& streams) { |
20 int32_t iCount = streams.GetSize(); | 21 int32_t iCount = streams.GetSize(); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 m_pFontMgr->SetDefFontMgr(pFontMgr); | 140 m_pFontMgr->SetDefFontMgr(pFontMgr); |
140 } | 141 } |
141 CXFA_FontMgr* CXFA_FFApp::GetXFAFontMgr() { | 142 CXFA_FontMgr* CXFA_FFApp::GetXFAFontMgr() { |
142 return m_pFontMgr; | 143 return m_pFontMgr; |
143 } | 144 } |
144 IFX_FontMgr* CXFA_FFApp::GetFDEFontMgr() { | 145 IFX_FontMgr* CXFA_FFApp::GetFDEFontMgr() { |
145 if (!m_pFDEFontMgr) { | 146 if (!m_pFDEFontMgr) { |
146 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 147 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
147 m_pFDEFontMgr = IFX_FontMgr::Create(FX_GetDefFontEnumerator()); | 148 m_pFDEFontMgr = IFX_FontMgr::Create(FX_GetDefFontEnumerator()); |
148 #else | 149 #else |
149 m_pFontSource = FX_CreateDefaultFontSourceEnum(); | 150 m_pFontSource = new CFX_FontSourceEnum_File; |
150 m_pFDEFontMgr = IFX_FontMgr::Create(m_pFontSource); | 151 m_pFDEFontMgr = IFX_FontMgr::Create(m_pFontSource); |
151 #endif | 152 #endif |
152 } | 153 } |
153 return m_pFDEFontMgr; | 154 return m_pFDEFontMgr; |
154 } | 155 } |
155 CXFA_FWLTheme* CXFA_FFApp::GetFWLTheme() { | 156 CXFA_FWLTheme* CXFA_FFApp::GetFWLTheme() { |
156 if (!m_pFWLTheme) { | 157 if (!m_pFWLTheme) { |
157 m_pFWLTheme = new CXFA_FWLTheme(this); | 158 m_pFWLTheme = new CXFA_FWLTheme(this); |
158 } | 159 } |
159 return m_pFWLTheme; | 160 return m_pFWLTheme; |
(...skipping 10 matching lines...) Expand all Loading... |
170 } | 171 } |
171 IFWL_AdapterThreadMgr* CXFA_FFApp::GetThreadMgr() { | 172 IFWL_AdapterThreadMgr* CXFA_FFApp::GetThreadMgr() { |
172 if (!m_pAdapterThreadMgr) { | 173 if (!m_pAdapterThreadMgr) { |
173 m_pAdapterThreadMgr = new CFWL_SDAdapterThreadMgr; | 174 m_pAdapterThreadMgr = new CFWL_SDAdapterThreadMgr; |
174 } | 175 } |
175 return m_pAdapterThreadMgr; | 176 return m_pAdapterThreadMgr; |
176 } | 177 } |
177 IFWL_AdapterTimerMgr* CXFA_FFApp::GetTimerMgr() { | 178 IFWL_AdapterTimerMgr* CXFA_FFApp::GetTimerMgr() { |
178 return m_pProvider->GetTimerMgr(); | 179 return m_pProvider->GetTimerMgr(); |
179 } | 180 } |
OLD | NEW |