summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffdoc.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-09-21 10:45:18 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-21 19:31:12 +0000
commita44a48043e54eac6126c9a2cfae9e6055ef4a15f (patch)
tree9d9c10223c60257e000aa8b9f3ef5236798891c1 /xfa/fxfa/cxfa_ffdoc.cpp
parent959c2bebde7f46b194f0f83ba5626cb982213638 (diff)
downloadpdfium-a44a48043e54eac6126c9a2cfae9e6055ef4a15f.tar.xz
Move CFGAS_PDFFontMgr to the CXFA_FFDoc
This CL removes the map of CXFA_FFDoc -> CFGAS_PDFFontMgr from the CXFA_FontMgr and moves the storage of the PDFFontMgr into the CXFA_FFDoc itself. Change-Id: Ia725ddd94b1ac2c9504bfd6370040ab6ac01e272 Reviewed-on: https://pdfium-review.googlesource.com/14590 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffdoc.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffdoc.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/xfa/fxfa/cxfa_ffdoc.cpp b/xfa/fxfa/cxfa_ffdoc.cpp
index b3ff3c9930..316987fcc3 100644
--- a/xfa/fxfa/cxfa_ffdoc.cpp
+++ b/xfa/fxfa/cxfa_ffdoc.cpp
@@ -241,7 +241,9 @@ int32_t CXFA_FFDoc::DoLoad() {
}
void CXFA_FFDoc::StopLoad() {
- m_pApp->GetXFAFontMgr()->LoadDocFonts(this);
+ m_pPDFFontMgr = pdfium::MakeUnique<CFGAS_PDFFontMgr>(
+ GetPDFDoc(), GetApp()->GetFDEFontMgr());
+
m_dwDocType = XFA_DocType::Static;
CXFA_Node* pConfig = ToNode(
m_pDocumentParser->GetDocument()->GetXFAObject(XFA_HASHCODE_Config));
@@ -327,7 +329,7 @@ void CXFA_FFDoc::CloseDoc() {
doc->ClearLayoutData();
m_pNotify.reset();
- m_pApp->GetXFAFontMgr()->ReleaseDocFonts(this);
+ m_pPDFFontMgr.reset();
m_HashToDibDpiMap.clear();
m_pApp->ClearEventTargets();
}