diff options
author | tsepez <tsepez@chromium.org> | 2016-08-26 15:17:12 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-26 15:17:13 -0700 |
commit | 987f3ee94c3cb8e4a6113ad05453a2948469386c (patch) | |
tree | fbd1fdc800c2510c89ae043331a799a42c3251af /core/fpdfapi/fpdf_page/cpdf_textstate.h | |
parent | 83d2351fd64128156c9abfb70266133d58a5e525 (diff) | |
download | pdfium-987f3ee94c3cb8e4a6113ad05453a2948469386c.tar.xz |
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
Diffstat (limited to 'core/fpdfapi/fpdf_page/cpdf_textstate.h')
-rw-r--r-- | core/fpdfapi/fpdf_page/cpdf_textstate.h | 8 |
1 files changed, 5 insertions, 3 deletions
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<CPDF_TextStateData> { 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; |