| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 m_ColorSpaceMap.InitHashTable(32); | 139 m_ColorSpaceMap.InitHashTable(32); |
| 140 m_PatternMap.InitHashTable(16); | 140 m_PatternMap.InitHashTable(16); |
| 141 m_ImageMap.InitHashTable(64); | 141 m_ImageMap.InitHashTable(64); |
| 142 m_IccProfileMap.InitHashTable(16); | 142 m_IccProfileMap.InitHashTable(16); |
| 143 m_FontFileMap.InitHashTable(32); | 143 m_FontFileMap.InitHashTable(32); |
| 144 } | 144 } |
| 145 CPDF_DocPageData::~CPDF_DocPageData() | 145 CPDF_DocPageData::~CPDF_DocPageData() |
| 146 { | 146 { |
| 147 Clear(FALSE); | 147 Clear(FALSE); |
| 148 Clear(TRUE); | 148 Clear(TRUE); |
| 149 FX_POSITION pos = NULL; | |
| 150 } | 149 } |
| 151 void CPDF_DocPageData::Clear(FX_BOOL bRelease) | 150 void CPDF_DocPageData::Clear(FX_BOOL bRelease) |
| 152 { | 151 { |
| 153 FX_POSITION pos; | 152 FX_POSITION pos; |
| 154 FX_DWORD nCount; | 153 FX_DWORD nCount; |
| 155 { | 154 { |
| 156 pos = m_PatternMap.GetStartPosition(); | 155 pos = m_PatternMap.GetStartPosition(); |
| 157 while (pos) { | 156 while (pos) { |
| 158 CPDF_Object* ptObj; | 157 CPDF_Object* ptObj; |
| 159 CPDF_CountedObject<CPDF_Pattern*>* ptData; | 158 CPDF_CountedObject<CPDF_Pattern*>* ptData; |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 m_FontFileMap.SetAt(pFontStream, ftData); | 637 m_FontFileMap.SetAt(pFontStream, ftData); |
| 639 return pFontFile; | 638 return pFontFile; |
| 640 } | 639 } |
| 641 void CPDF_DocPageData::ReleaseFontFileStreamAcc(CPDF_Stream* pFontStream, FX_BOO
L bForce) | 640 void CPDF_DocPageData::ReleaseFontFileStreamAcc(CPDF_Stream* pFontStream, FX_BOO
L bForce) |
| 642 { | 641 { |
| 643 if (!pFontStream) { | 642 if (!pFontStream) { |
| 644 return; | 643 return; |
| 645 } | 644 } |
| 646 PDF_DocPageData_Release<CPDF_Stream*, CPDF_StreamAcc*>(m_FontFileMap, pFontS
tream, NULL, bForce); | 645 PDF_DocPageData_Release<CPDF_Stream*, CPDF_StreamAcc*>(m_FontFileMap, pFontS
tream, NULL, bForce); |
| 647 } | 646 } |
| OLD | NEW |