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

Unified Diff: xfa/fxfa/app/xfa_fontmgr.cpp

Issue 1846993002: Remove IXFA_* interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: xfa/fxfa/app/xfa_fontmgr.cpp
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp
index 256af6cf21f101204bc11bf47536a7cf60dffd99..401353a778bd3c79a26bbdefecffc97fc2d42e01 100644
--- a/xfa/fxfa/app/xfa_fontmgr.cpp
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp
@@ -4,15 +4,15 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "xfa/fxfa/app/xfa_fontmgr.h"
+#include "xfa/include/fxfa/xfa_fontmgr.h"
#include <algorithm>
#include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
#include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h"
#include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
-#include "xfa/fxfa/app/xfa_ffapp.h"
-#include "xfa/fxfa/app/xfa_ffdoc.h"
+#include "xfa/include/fxfa/xfa_ffapp.h"
+#include "xfa/include/fxfa/xfa_ffdoc.h"
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
static const XFA_FONTINFO g_XFAFontsMap[] = {
@@ -1748,12 +1748,7 @@ const XFA_FONTINFO* XFA_GetFontINFOByFontName(
return NULL;
#endif
}
-// static
-IXFA_FontMgr* IXFA_FontMgr::CreateDefault() {
- return new CXFA_DefFontMgr;
-}
-// virtual
-IXFA_FontMgr::~IXFA_FontMgr() {}
+
CXFA_DefFontMgr::~CXFA_DefFontMgr() {
int32_t iCounts = m_CacheFonts.GetSize();
for (int32_t i = 0; i < iCounts; i++) {
@@ -1762,7 +1757,7 @@ CXFA_DefFontMgr::~CXFA_DefFontMgr() {
m_CacheFonts.RemoveAll();
}
-IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc,
+IFX_Font* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc,
const CFX_WideStringC& wsFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage) {
@@ -1806,7 +1801,7 @@ IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc,
return pFont;
}
-IFX_Font* CXFA_DefFontMgr::GetDefaultFont(IXFA_Doc* hDoc,
+IFX_Font* CXFA_DefFontMgr::GetDefaultFont(CXFA_FFDoc* hDoc,
const CFX_WideStringC& wsFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage) {
@@ -2018,7 +2013,7 @@ CXFA_FontMgr::CXFA_FontMgr() : m_pDefFontMgr(NULL) {}
CXFA_FontMgr::~CXFA_FontMgr() {
DelAllMgrMap();
}
-IFX_Font* CXFA_FontMgr::GetFont(IXFA_Doc* hDoc,
+IFX_Font* CXFA_FontMgr::GetFont(CXFA_FFDoc* hDoc,
const CFX_WideStringC& wsFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage) {
@@ -2061,12 +2056,12 @@ IFX_Font* CXFA_FontMgr::GetFont(IXFA_Doc* hDoc,
}
return pFont;
}
-void CXFA_FontMgr::LoadDocFonts(IXFA_Doc* hDoc) {
+void CXFA_FontMgr::LoadDocFonts(CXFA_FFDoc* hDoc) {
if (!m_PDFFontMgrArray.GetValueAt(hDoc)) {
m_PDFFontMgrArray.SetAt(hDoc, new CXFA_PDFFontMgr((CXFA_FFDoc*)hDoc));
Tom Sepez 2016/03/31 17:01:57 like here.
dsinclair 2016/03/31 19:52:27 Done.
}
}
-void CXFA_FontMgr::ReleaseDocFonts(IXFA_Doc* hDoc) {
+void CXFA_FontMgr::ReleaseDocFonts(CXFA_FFDoc* hDoc) {
CXFA_PDFFontMgr* pMgr = NULL;
if (m_PDFFontMgrArray.Lookup(hDoc, (void*&)pMgr)) {
delete pMgr;
@@ -2076,7 +2071,7 @@ void CXFA_FontMgr::ReleaseDocFonts(IXFA_Doc* hDoc) {
void CXFA_FontMgr::DelAllMgrMap() {
FX_POSITION ps = m_PDFFontMgrArray.GetStartPosition();
while (ps) {
- IXFA_Doc* hDoc = NULL;
+ CXFA_FFDoc* hDoc = NULL;
CXFA_PDFFontMgr* pMgr = NULL;
m_PDFFontMgrArray.GetNextAssoc(ps, (void*&)hDoc, (void*&)pMgr);
delete pMgr;
@@ -2084,6 +2079,6 @@ void CXFA_FontMgr::DelAllMgrMap() {
m_PDFFontMgrArray.RemoveAll();
m_FontMap.clear();
}
-void CXFA_FontMgr::SetDefFontMgr(IXFA_FontMgr* pFontMgr) {
+void CXFA_FontMgr::SetDefFontMgr(CXFA_DefFontMgr* pFontMgr) {
m_pDefFontMgr = pFontMgr;
}

Powered by Google App Engine
This is Rietveld 408576698