summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-25 15:53:57 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-25 23:07:41 +0000
commitd0409afc6a994a3e24043b8a96c83c022bcaa189 (patch)
tree15fa78b8a601ec97fc8bee39f8e56590c37babe3 /core/fpdfapi/page
parent2eddb665763f3e089d4c210d2a011d112683f3ea (diff)
downloadpdfium-d0409afc6a994a3e24043b8a96c83c022bcaa189.tar.xz
Mass conversion of remaining class members (non-xfa)
Change-Id: I8365ba80e3395d59a3cf35dbd9d9162e86e712e3 Reviewed-on: https://pdfium-review.googlesource.com/5970 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/page')
-rw-r--r--core/fpdfapi/page/cpdf_color.cpp2
-rw-r--r--core/fpdfapi/page/cpdf_colorspace.cpp2
-rw-r--r--core/fpdfapi/page/cpdf_shadingobject.h3
-rw-r--r--core/fpdfapi/page/cpdf_shadingpattern.h6
4 files changed, 7 insertions, 6 deletions
diff --git a/core/fpdfapi/page/cpdf_color.cpp b/core/fpdfapi/page/cpdf_color.cpp
index e6665c83ac..747e6844ec 100644
--- a/core/fpdfapi/page/cpdf_color.cpp
+++ b/core/fpdfapi/page/cpdf_color.cpp
@@ -160,6 +160,6 @@ CPDF_Pattern* CPDF_Color::GetPattern() const {
if (!m_pBuffer || m_pCS->GetFamily() != PDFCS_PATTERN)
return nullptr;
- PatternValue* pvalue = (PatternValue*)m_pBuffer;
+ PatternValue* pvalue = reinterpret_cast<PatternValue*>(m_pBuffer);
return pvalue->m_pPattern;
}
diff --git a/core/fpdfapi/page/cpdf_colorspace.cpp b/core/fpdfapi/page/cpdf_colorspace.cpp
index 345180f368..90ef8944d3 100644
--- a/core/fpdfapi/page/cpdf_colorspace.cpp
+++ b/core/fpdfapi/page/cpdf_colorspace.cpp
@@ -190,7 +190,7 @@ class CPDF_IndexedCS : public CPDF_ColorSpace {
void EnableStdConversion(bool bEnabled) override;
CPDF_ColorSpace* m_pBaseCS;
- CPDF_CountedColorSpace* m_pCountedBaseCS;
+ CFX_UnownedPtr<CPDF_CountedColorSpace> m_pCountedBaseCS;
int m_nBaseComponents;
int m_MaxIndex;
CFX_ByteString m_Table;
diff --git a/core/fpdfapi/page/cpdf_shadingobject.h b/core/fpdfapi/page/cpdf_shadingobject.h
index ffd622379e..9db6712824 100644
--- a/core/fpdfapi/page/cpdf_shadingobject.h
+++ b/core/fpdfapi/page/cpdf_shadingobject.h
@@ -8,6 +8,7 @@
#define CORE_FPDFAPI_PAGE_CPDF_SHADINGOBJECT_H_
#include "core/fpdfapi/page/cpdf_pageobject.h"
+#include "core/fxcrt/cfx_unowned_ptr.h"
#include "core/fxcrt/fx_coordinates.h"
class CPDF_ShadingPattern;
@@ -26,7 +27,7 @@ class CPDF_ShadingObject : public CPDF_PageObject {
void CalcBoundingBox();
- CPDF_ShadingPattern* m_pShading;
+ CFX_UnownedPtr<CPDF_ShadingPattern> m_pShading;
CFX_Matrix m_Matrix;
};
diff --git a/core/fpdfapi/page/cpdf_shadingpattern.h b/core/fpdfapi/page/cpdf_shadingpattern.h
index 068d772bc3..24ad4c200e 100644
--- a/core/fpdfapi/page/cpdf_shadingpattern.h
+++ b/core/fpdfapi/page/cpdf_shadingpattern.h
@@ -55,7 +55,7 @@ class CPDF_ShadingPattern : public CPDF_Pattern {
ShadingType GetShadingType() const { return m_ShadingType; }
bool IsShadingObject() const { return m_bShadingObj; }
CPDF_Object* GetShadingObject() const { return m_pShadingObj.Get(); }
- CPDF_ColorSpace* GetCS() const { return m_pCS; }
+ CPDF_ColorSpace* GetCS() const { return m_pCS.Get(); }
const std::vector<std::unique_ptr<CPDF_Function>>& GetFuncs() const {
return m_pFunctions;
}
@@ -67,9 +67,9 @@ class CPDF_ShadingPattern : public CPDF_Pattern {
// Still keep |m_pCS| as some CPDF_ColorSpace (name object) are not managed
// as counted objects. Refer to CPDF_DocPageData::GetColorSpace.
- CPDF_ColorSpace* m_pCS;
+ CFX_UnownedPtr<CPDF_ColorSpace> m_pCS;
- CPDF_CountedColorSpace* m_pCountedCS;
+ CFX_UnownedPtr<CPDF_CountedColorSpace> m_pCountedCS;
std::vector<std::unique_ptr<CPDF_Function>> m_pFunctions;
};