From 987f3ee94c3cb8e4a6113ad05453a2948469386c Mon Sep 17 00:00:00 2001 From: tsepez Date: Fri, 26 Aug 2016 15:17:12 -0700 Subject: Make CFX_CountRef<>::m_pObject private, add accessors, fix const-ness. Hide the CountedObj class from the rest of the code. Rename GetModify() to GetPrivateCopy(), since it turns out there are places where we modify a potentially-shared copy. Add non-const version of GetObject() to permit these. Review-Url: https://codereview.chromium.org/2287633002 --- core/fpdfapi/fpdf_page/cpdf_textstate.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'core/fpdfapi/fpdf_page/cpdf_textstate.h') diff --git a/core/fpdfapi/fpdf_page/cpdf_textstate.h b/core/fpdfapi/fpdf_page/cpdf_textstate.h index cfb4b28a21..59c988de06 100644 --- a/core/fpdfapi/fpdf_page/cpdf_textstate.h +++ b/core/fpdfapi/fpdf_page/cpdf_textstate.h @@ -14,11 +14,13 @@ class CPDF_Font; class CPDF_TextState : public CFX_CountRef { public: - CPDF_Font* GetFont() const { return m_pObject->m_pFont; } + CPDF_Font* GetFont() const { return GetObject()->m_pFont; } void SetFont(CPDF_Font* pFont); - FX_FLOAT GetFontSize() const { return m_pObject->m_FontSize; } - FX_FLOAT* GetMatrix() const { return m_pObject->m_Matrix; } + FX_FLOAT GetFontSize() const { return GetObject()->m_FontSize; } + FX_FLOAT* GetMatrix() { return GetObject()->m_Matrix; } + const FX_FLOAT* GetMatrix() const { return GetObject()->m_Matrix; } + FX_FLOAT GetFontSizeV() const; FX_FLOAT GetFontSizeH() const; FX_FLOAT GetBaselineAngle() const; -- cgit v1.2.3