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

Unified Diff: core/fpdfapi/fpdf_page/fpdf_page_parser.cpp

Issue 2194853002: Cleanup CPDF_DocPageData release methods and callers. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_doc.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index 1881244a0f4929e837e4db037dadfc6c453025d0..5a77ba70b2426bd31bd09f4899fdc0a6add663a8 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -6,6 +6,8 @@
#include "core/fpdfapi/fpdf_page/pageint.h"
+#include <memory>
+#include <utility>
#include <vector>
#include "core/fpdfapi/fpdf_edit/include/cpdf_creator.h"
@@ -643,7 +645,7 @@ void CPDF_StreamContentParser::Handle_BeginImage() {
}
}
pDict->SetAtName("Subtype", "Image");
- CPDF_ImageObject* pImgObj = AddImage(pStream, nullptr, TRUE);
+ CPDF_ImageObject* pImgObj = AddImage(pStream, nullptr, true);
if (!pImgObj) {
if (pStream) {
pStream->Release();
@@ -724,7 +726,7 @@ void CPDF_StreamContentParser::Handle_ExecuteXObject() {
CFX_ByteString name = GetString(0);
if (name == m_LastImageName && m_pLastImage && m_pLastImage->GetStream() &&
m_pLastImage->GetStream()->GetObjNum()) {
- AddImage(nullptr, m_pLastImage, FALSE);
+ AddImage(nullptr, m_pLastImage, false);
return;
}
@@ -739,7 +741,7 @@ void CPDF_StreamContentParser::Handle_ExecuteXObject() {
type = pXObject->GetDict()->GetStringBy("Subtype");
if (type == "Image") {
- CPDF_ImageObject* pObj = AddImage(pXObject, nullptr, FALSE);
+ CPDF_ImageObject* pObj = AddImage(pXObject, nullptr, false);
m_LastImageName = name;
m_pLastImage = pObj->m_pImage;
if (!m_pObjectHolder->HasImageMask())
@@ -772,10 +774,10 @@ void CPDF_StreamContentParser::AddForm(CPDF_Stream* pStream) {
CPDF_ImageObject* CPDF_StreamContentParser::AddImage(CPDF_Stream* pStream,
CPDF_Image* pImage,
- FX_BOOL bInline) {
- if (!pStream && !pImage) {
+ bool bInline) {
+ if (!pStream && !pImage)
return nullptr;
- }
+
CFX_Matrix ImageMatrix;
ImageMatrix.Copy(m_pCurStates->m_CTM);
ImageMatrix.Concat(m_mtContentToUser);
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_doc.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698