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

Side by Side Diff: core/fpdfapi/fpdf_parser/cpdf_document.cpp

Issue 2385303002: Rename CFX_WeakPtr::Clear() to DestroyObject() (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « core/fpdfapi/fpdf_parser/cfdf_document.cpp ('k') | core/fxcrt/cfx_weak_ptr.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "core/fpdfapi/fpdf_parser/cpdf_document.h" 7 #include "core/fpdfapi/fpdf_parser/cpdf_document.h"
8 8
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 m_pDocPage(new CPDF_DocPageData(this)), 416 m_pDocPage(new CPDF_DocPageData(this)),
417 m_pDocRender(new CPDF_DocRenderData(this)), 417 m_pDocRender(new CPDF_DocRenderData(this)),
418 m_pByteStringPool(WrapUnique(new CFX_ByteStringPool)) { 418 m_pByteStringPool(WrapUnique(new CFX_ByteStringPool)) {
419 if (pParser) 419 if (pParser)
420 SetLastObjNum(m_pParser->GetLastObjNum()); 420 SetLastObjNum(m_pParser->GetLastObjNum());
421 } 421 }
422 422
423 CPDF_Document::~CPDF_Document() { 423 CPDF_Document::~CPDF_Document() {
424 delete m_pDocPage; 424 delete m_pDocPage;
425 CPDF_ModuleMgr::Get()->GetPageModule()->ClearStockFont(this); 425 CPDF_ModuleMgr::Get()->GetPageModule()->ClearStockFont(this);
426 m_pByteStringPool.Clear(); // Make weak. 426 m_pByteStringPool.DeleteObject(); // Make weak.
427 } 427 }
428 428
429 CPDF_Object* CPDF_Document::ParseIndirectObject(uint32_t objnum) { 429 CPDF_Object* CPDF_Document::ParseIndirectObject(uint32_t objnum) {
430 return m_pParser ? m_pParser->ParseIndirectObject(this, objnum) : nullptr; 430 return m_pParser ? m_pParser->ParseIndirectObject(this, objnum) : nullptr;
431 } 431 }
432 432
433 void CPDF_Document::LoadDocInternal() { 433 void CPDF_Document::LoadDocInternal() {
434 SetLastObjNum(m_pParser->GetLastObjNum()); 434 SetLastObjNum(m_pParser->GetLastObjNum());
435 435
436 CPDF_Object* pRootObj = GetOrParseIndirectObject(m_pParser->GetRootObjNum()); 436 CPDF_Object* pRootObj = GetOrParseIndirectObject(m_pParser->GetRootObjNum());
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 pBBox, pLogFont->lfWeight / 5); 1010 pBBox, pLogFont->lfWeight / 5);
1011 pFontDesc->SetIntegerFor("CapHeight", capheight); 1011 pFontDesc->SetIntegerFor("CapHeight", capheight);
1012 pFontDict->SetReferenceFor("FontDescriptor", this, 1012 pFontDict->SetReferenceFor("FontDescriptor", this,
1013 AddIndirectObject(pFontDesc)); 1013 AddIndirectObject(pFontDesc));
1014 hFont = SelectObject(hDC, hFont); 1014 hFont = SelectObject(hDC, hFont);
1015 DeleteObject(hFont); 1015 DeleteObject(hFont);
1016 DeleteDC(hDC); 1016 DeleteDC(hDC);
1017 return LoadFont(pBaseDict); 1017 return LoadFont(pBaseDict);
1018 } 1018 }
1019 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 1019 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_parser/cfdf_document.cpp ('k') | core/fxcrt/cfx_weak_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698