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

Unified Diff: fpdfsdk/formfiller/cba_fontmap.cpp

Issue 2345063002: Use string pools in some dictionaries (Closed)
Patch Set: windows compile Created 4 years, 3 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
« no previous file with comments | « fpdfsdk/cpdfsdk_widget.cpp ('k') | fpdfsdk/fpdf_flatten.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/formfiller/cba_fontmap.cpp
diff --git a/fpdfsdk/formfiller/cba_fontmap.cpp b/fpdfsdk/formfiller/cba_fontmap.cpp
index 04d6a72ec557527e99861ac9eac4d0c4019976ee..09c54ca6f3cf0ef58f401f41656f94c323420a28 100644
--- a/fpdfsdk/formfiller/cba_fontmap.cpp
+++ b/fpdfsdk/formfiller/cba_fontmap.cpp
@@ -155,7 +155,7 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont,
CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDictFor("AP");
if (!pAPDict) {
- pAPDict = new CPDF_Dictionary;
+ pAPDict = new CPDF_Dictionary(m_pDocument->GetByteStringPool());
m_pAnnotDict->SetFor("AP", pAPDict);
}
@@ -173,19 +173,20 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont,
CPDF_Dictionary* pStreamDict = pStream->GetDict();
if (!pStreamDict) {
- pStreamDict = new CPDF_Dictionary;
+ pStreamDict = new CPDF_Dictionary(m_pDocument->GetByteStringPool());
pStream->InitStream(nullptr, 0, pStreamDict);
}
if (pStreamDict) {
CPDF_Dictionary* pStreamResList = pStreamDict->GetDictFor("Resources");
if (!pStreamResList) {
- pStreamResList = new CPDF_Dictionary();
+ pStreamResList = new CPDF_Dictionary(m_pDocument->GetByteStringPool());
pStreamDict->SetFor("Resources", pStreamResList);
}
CPDF_Dictionary* pStreamResFontList = pStreamResList->GetDictFor("Font");
if (!pStreamResFontList) {
- pStreamResFontList = new CPDF_Dictionary;
+ pStreamResFontList =
+ new CPDF_Dictionary(m_pDocument->GetByteStringPool());
pStreamResList->SetReferenceFor(
"Font", m_pDocument,
m_pDocument->AddIndirectObject(pStreamResFontList));
« no previous file with comments | « fpdfsdk/cpdfsdk_widget.cpp ('k') | fpdfsdk/fpdf_flatten.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698