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

Unified Diff: core/fpdfapi/page/cpdf_image.cpp

Issue 2513273003: Fix CPDFImage::IsInline(). (Closed)
Patch Set: Created 4 years, 1 month 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/page/cpdf_image.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/page/cpdf_image.cpp
diff --git a/core/fpdfapi/page/cpdf_image.cpp b/core/fpdfapi/page/cpdf_image.cpp
index 8ded34e6306bdd3dba9628190946a5fe92fa867f..60ac1c98152506cd8e1e3718e7b07b5a5f14f6bb 100644
--- a/core/fpdfapi/page/cpdf_image.cpp
+++ b/core/fpdfapi/page/cpdf_image.cpp
@@ -7,12 +7,10 @@
#include "core/fpdfapi/page/cpdf_image.h"
#include <algorithm>
-#include <memory>
#include <utility>
#include <vector>
#include "core/fpdfapi/cpdf_modulemgr.h"
-#include "core/fpdfapi/page/cpdf_docpagedata.h"
#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fpdfapi/parser/cpdf_array.h"
#include "core/fpdfapi/parser/cpdf_boolean.h"
@@ -31,7 +29,8 @@ CPDF_Image::CPDF_Image(CPDF_Document* pDoc) : m_pDocument(pDoc) {}
CPDF_Image::CPDF_Image(CPDF_Document* pDoc,
std::unique_ptr<CPDF_Stream> pStream)
- : m_pDocument(pDoc),
+ : m_bIsInline(true),
+ m_pDocument(pDoc),
m_pStream(pStream.get()),
m_pOwnedStream(std::move(pStream)) {
m_pOwnedDict =
@@ -60,16 +59,15 @@ void CPDF_Image::FinishInitialization() {
CPDF_Image* CPDF_Image::Clone() {
CPDF_Image* pImage = new CPDF_Image(m_pDocument);
+ pImage->m_bIsInline = m_bIsInline;
if (m_pOwnedStream) {
- pImage->m_pOwnedStream =
- ToStream(std::unique_ptr<CPDF_Object>(m_pOwnedStream->Clone()));
+ pImage->m_pOwnedStream = ToStream(m_pOwnedStream->Clone());
pImage->m_pStream = pImage->m_pOwnedStream.get();
} else {
pImage->m_pStream = m_pStream;
}
if (m_pOwnedDict) {
- pImage->m_pOwnedDict =
- ToDictionary(std::unique_ptr<CPDF_Object>(m_pOwnedDict->Clone()));
+ pImage->m_pOwnedDict = ToDictionary(m_pOwnedDict->Clone());
pImage->m_pDict = pImage->m_pOwnedDict.get();
} else {
pImage->m_pDict = m_pDict;
« no previous file with comments | « core/fpdfapi/page/cpdf_image.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698