| Index: fpdfsdk/formfiller/cba_fontmap.cpp
|
| diff --git a/fpdfsdk/formfiller/cba_fontmap.cpp b/fpdfsdk/formfiller/cba_fontmap.cpp
|
| index 7178b902d022fbe3773464a0df97075f8b3d8305..af518fe9566fe33d889f832d9e5a4c9869bf6f28 100644
|
| --- a/fpdfsdk/formfiller/cba_fontmap.cpp
|
| +++ b/fpdfsdk/formfiller/cba_fontmap.cpp
|
| @@ -166,9 +166,8 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont,
|
|
|
| CPDF_Stream* pStream = pAPDict->GetStreamFor(m_sAPType);
|
| if (!pStream) {
|
| - pStream = new CPDF_Stream;
|
| - pAPDict->SetReferenceFor(m_sAPType, m_pDocument,
|
| - m_pDocument->AddIndirectObject(pStream));
|
| + pStream = m_pDocument->AddIndirectStream();
|
| + pAPDict->SetReferenceFor(m_sAPType, m_pDocument, pStream);
|
| }
|
|
|
| CPDF_Dictionary* pStreamDict = pStream->GetDict();
|
| @@ -186,14 +185,12 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont,
|
| CPDF_Dictionary* pStreamResFontList = pStreamResList->GetDictFor("Font");
|
| if (!pStreamResFontList) {
|
| pStreamResFontList =
|
| - new CPDF_Dictionary(m_pDocument->GetByteStringPool());
|
| - pStreamResList->SetReferenceFor(
|
| - "Font", m_pDocument,
|
| - m_pDocument->AddIndirectObject(pStreamResFontList));
|
| + m_pDocument->AddIndirectDictionary(m_pDocument->GetByteStringPool());
|
| + pStreamResList->SetReferenceFor("Font", m_pDocument, pStreamResFontList);
|
| }
|
| if (!pStreamResFontList->KeyExist(sAlias)) {
|
| pStreamResFontList->SetReferenceFor(sAlias, m_pDocument,
|
| - pFont->GetFontDict()->GetObjNum());
|
| + pFont->GetFontDict());
|
| }
|
| }
|
| }
|
|
|