diff options
Diffstat (limited to 'core/fpdfapi/page')
-rw-r--r-- | core/fpdfapi/page/cpdf_color.cpp | 2 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_colorspace.cpp | 2 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_shadingobject.h | 3 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_shadingpattern.h | 6 |
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; }; |