diff options
Diffstat (limited to 'core/fpdftext')
-rw-r--r-- | core/fpdftext/cpdf_textpage.cpp | 12 | ||||
-rw-r--r-- | core/fpdftext/cpdf_textpage.h | 6 |
2 files changed, 14 insertions, 4 deletions
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp index 7a493c004d..e3db1c62c9 100644 --- a/core/fpdftext/cpdf_textpage.cpp +++ b/core/fpdftext/cpdf_textpage.cpp @@ -108,6 +108,12 @@ float MaskPercentFilled(const std::vector<bool>& mask, } // namespace +PDFTEXT_Obj::PDFTEXT_Obj() {} + +PDFTEXT_Obj::PDFTEXT_Obj(const PDFTEXT_Obj& that) = default; + +PDFTEXT_Obj::~PDFTEXT_Obj() {} + FPDF_CHAR_INFO::FPDF_CHAR_INFO() : m_Unicode(0), m_Charcode(0), @@ -799,7 +805,7 @@ void CPDF_TextPage::ProcessTextObject( } FPDFText_MarkedContent CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj) { - CPDF_TextObject* pTextObj = Obj.m_pTextObj; + CPDF_TextObject* pTextObj = Obj.m_pTextObj.Get(); if (!pTextObj->m_ContentMark.HasRef()) return FPDFText_MarkedContent::Pass; @@ -862,7 +868,7 @@ FPDFText_MarkedContent CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj) { } void CPDF_TextPage::ProcessMarkedContent(PDFTEXT_Obj Obj) { - CPDF_TextObject* pTextObj = Obj.m_pTextObj; + CPDF_TextObject* pTextObj = Obj.m_pTextObj.Get(); if (!pTextObj->m_ContentMark.HasRef()) return; @@ -952,7 +958,7 @@ bool CPDF_TextPage::IsRightToLeft(const CPDF_TextObject* pTextObj, } void CPDF_TextPage::ProcessTextObject(PDFTEXT_Obj Obj) { - CPDF_TextObject* pTextObj = Obj.m_pTextObj; + CPDF_TextObject* pTextObj = Obj.m_pTextObj.Get(); if (fabs(pTextObj->m_Right - pTextObj->m_Left) < 0.01f) return; CFX_Matrix formMatrix = Obj.m_formMatrix; diff --git a/core/fpdftext/cpdf_textpage.h b/core/fpdftext/cpdf_textpage.h index a18310667d..0f507de4aa 100644 --- a/core/fpdftext/cpdf_textpage.h +++ b/core/fpdftext/cpdf_textpage.h @@ -84,7 +84,11 @@ class PAGECHAR_INFO { }; struct PDFTEXT_Obj { - CPDF_TextObject* m_pTextObj; + PDFTEXT_Obj(); + PDFTEXT_Obj(const PDFTEXT_Obj& that); + ~PDFTEXT_Obj(); + + CFX_UnownedPtr<CPDF_TextObject> m_pTextObj; CFX_Matrix m_formMatrix; }; |