| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "../../../include/fpdfapi/fpdf_page.h" | 7 #include "../../../include/fpdfapi/fpdf_page.h" |
| 8 #include "../../../include/fpdfapi/fpdf_module.h" | 8 #include "../../../include/fpdfapi/fpdf_module.h" |
| 9 #include "../../../include/fdrm/fx_crypt.h" | 9 #include "../../../include/fdrm/fx_crypt.h" |
| 10 #include "../fpdf_font/font_int.h" | 10 #include "../fpdf_font/font_int.h" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 m_FontFileMap.RemoveKey(ftKey); | 222 m_FontFileMap.RemoveKey(ftKey); |
| 223 } | 223 } |
| 224 } | 224 } |
| 225 pos = m_PatternMap.GetStartPosition(); | 225 pos = m_PatternMap.GetStartPosition(); |
| 226 while (pos) { | 226 while (pos) { |
| 227 CPDF_Object* ptObj; | 227 CPDF_Object* ptObj; |
| 228 CPDF_CountedObject<CPDF_Pattern*>* ptData; | 228 CPDF_CountedObject<CPDF_Pattern*>* ptData; |
| 229 m_PatternMap.GetNextAssoc(pos, ptObj, ptData); | 229 m_PatternMap.GetNextAssoc(pos, ptObj, ptData); |
| 230 nCount = ptData->m_nCount; | 230 nCount = ptData->m_nCount; |
| 231 if (bForceRelease || nCount < 2) { | 231 if (bForceRelease || nCount < 2) { |
| 232 ptData->m_Obj->SetForceClear(bForceRelease); |
| 232 delete ptData->m_Obj; | 233 delete ptData->m_Obj; |
| 233 ptData->m_Obj = NULL; | 234 ptData->m_Obj = NULL; |
| 234 } | 235 } |
| 235 } | 236 } |
| 236 } | 237 } |
| 237 CPDF_Font* CPDF_DocPageData::GetFont(CPDF_Dictionary* pFontDict, FX_BOOL findOnl
y) | 238 CPDF_Font* CPDF_DocPageData::GetFont(CPDF_Dictionary* pFontDict, FX_BOOL findOnl
y) |
| 238 { | 239 { |
| 239 if (!pFontDict) { | 240 if (!pFontDict) { |
| 240 return NULL; | 241 return NULL; |
| 241 } | 242 } |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 m_FontFileMap.SetAt(pFontStream, ftData); | 629 m_FontFileMap.SetAt(pFontStream, ftData); |
| 629 return pFontFile; | 630 return pFontFile; |
| 630 } | 631 } |
| 631 void CPDF_DocPageData::ReleaseFontFileStreamAcc(CPDF_Stream* pFontStream, FX_BOO
L bForce) | 632 void CPDF_DocPageData::ReleaseFontFileStreamAcc(CPDF_Stream* pFontStream, FX_BOO
L bForce) |
| 632 { | 633 { |
| 633 if (!pFontStream) { | 634 if (!pFontStream) { |
| 634 return; | 635 return; |
| 635 } | 636 } |
| 636 PDF_DocPageData_Release<CPDF_Stream*, CPDF_StreamAcc*>(m_FontFileMap, pFontS
tream, NULL, bForce); | 637 PDF_DocPageData_Release<CPDF_Stream*, CPDF_StreamAcc*>(m_FontFileMap, pFontS
tream, NULL, bForce); |
| 637 } | 638 } |
| OLD | NEW |