summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cba_fontmap.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-10-14 17:45:56 -0700
committerTom Sepez <tsepez@chromium.org>2016-10-14 17:45:56 -0700
commitc25a4219431c90a95233a08f25eecc921abbf3ed (patch)
treebd2ad923d527440785c19623fe2d19cc1a70a92d /fpdfsdk/formfiller/cba_fontmap.cpp
parent62f367348ff8ff1e64c6f52c1ee5f77c3a89edc1 (diff)
downloadpdfium-c25a4219431c90a95233a08f25eecc921abbf3ed.tar.xz
Revert "Update CPDF_IndirectObjectHolder APIs for unique objects."
This reverts commit 3ba098595ae56b64eacc0c25ab76b89a4d78d920. TBR=thestig@chromium.org,weili@chromium.org Review URL: https://codereview.chromium.org/2424533003 .
Diffstat (limited to 'fpdfsdk/formfiller/cba_fontmap.cpp')
-rw-r--r--fpdfsdk/formfiller/cba_fontmap.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/fpdfsdk/formfiller/cba_fontmap.cpp b/fpdfsdk/formfiller/cba_fontmap.cpp
index af518fe956..7178b902d0 100644
--- a/fpdfsdk/formfiller/cba_fontmap.cpp
+++ b/fpdfsdk/formfiller/cba_fontmap.cpp
@@ -166,8 +166,9 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont,
CPDF_Stream* pStream = pAPDict->GetStreamFor(m_sAPType);
if (!pStream) {
- pStream = m_pDocument->AddIndirectStream();
- pAPDict->SetReferenceFor(m_sAPType, m_pDocument, pStream);
+ pStream = new CPDF_Stream;
+ pAPDict->SetReferenceFor(m_sAPType, m_pDocument,
+ m_pDocument->AddIndirectObject(pStream));
}
CPDF_Dictionary* pStreamDict = pStream->GetDict();
@@ -185,12 +186,14 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont,
CPDF_Dictionary* pStreamResFontList = pStreamResList->GetDictFor("Font");
if (!pStreamResFontList) {
pStreamResFontList =
- m_pDocument->AddIndirectDictionary(m_pDocument->GetByteStringPool());
- pStreamResList->SetReferenceFor("Font", m_pDocument, pStreamResFontList);
+ new CPDF_Dictionary(m_pDocument->GetByteStringPool());
+ pStreamResList->SetReferenceFor(
+ "Font", m_pDocument,
+ m_pDocument->AddIndirectObject(pStreamResFontList));
}
if (!pStreamResFontList->KeyExist(sAlias)) {
pStreamResFontList->SetReferenceFor(sAlias, m_pDocument,
- pFont->GetFontDict());
+ pFont->GetFontDict()->GetObjNum());
}
}
}