diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-10-05 12:02:15 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-10-05 17:12:31 +0000 |
commit | 3862d24efe5ca45f29e4404e674f3152f492cb01 (patch) | |
tree | 8346010ff49e719b121378246b13c64201542bbb /core/fpdfdoc/cpdf_variabletext.h | |
parent | 4ce4f5f8ab0b25ac10a5c66cac1a8c281e24a69b (diff) | |
download | pdfium-3862d24efe5ca45f29e4404e674f3152f492cb01.tar.xz |
Remove friends from CPDF_VariableText
This CL removes the friend class items from CPDF_VariableText and adds
accessor and makes methods public as needed.
Change-Id: Ic54732b25e9879c39a2276a89580cf42d3b3947f
Reviewed-on: https://pdfium-review.googlesource.com/15534
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_variabletext.h')
-rw-r--r-- | core/fpdfdoc/cpdf_variabletext.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/core/fpdfdoc/cpdf_variabletext.h b/core/fpdfdoc/cpdf_variabletext.h index 5b0c259952..2319df7cb9 100644 --- a/core/fpdfdoc/cpdf_variabletext.h +++ b/core/fpdfdoc/cpdf_variabletext.h @@ -128,6 +128,8 @@ class CPDF_VariableText { bool IsMultiLine() const { return m_bMultiLine; } int32_t GetHorzScale() const { return m_nHorzScale; } float GetCharSpace() const { return m_fCharSpace; } + bool IsAutoReturn() const { return m_bLimitWidth; } + CPVT_WordPlace GetBeginWordPlace() const; CPVT_WordPlace GetEndWordPlace() const; CPVT_WordPlace GetPrevWordPlace(const CPVT_WordPlace& place) const; @@ -160,15 +162,32 @@ class CPDF_VariableText { CFX_FloatRect InToOut(const CPVT_FloatRect& rect) const; CPVT_FloatRect OutToIn(const CFX_FloatRect& rect) const; - private: - friend class CTypeset; - friend class CSection; + float GetFontAscent(int32_t nFontIndex, float fFontSize); + float GetFontDescent(int32_t nFontIndex, float fFontSize); + int32_t GetDefaultFontIndex(); + float GetLineLeading(const CPVT_SectionInfo& SecInfo); + int32_t GetAlignment(const CPVT_SectionInfo& SecInfo); + float GetWordWidth(const CPVT_WordInfo& WordInfo); + float GetWordWidth(int32_t nFontIndex, + uint16_t Word, + uint16_t SubWord, + float fCharSpace, + int32_t nHorzScale, + float fFontSize, + float fWordTail); + float GetWordAscent(const CPVT_WordInfo& WordInfo); + float GetWordDescent(const CPVT_WordInfo& WordInfo); + float GetWordAscent(const CPVT_WordInfo& WordInfo, float fFontSize); + float GetWordDescent(const CPVT_WordInfo& WordInfo, float fFontSize); + float GetLineAscent(const CPVT_SectionInfo& SecInfo); + float GetLineDescent(const CPVT_SectionInfo& SecInfo); + float GetLineIndent(const CPVT_SectionInfo& SecInfo); + private: int32_t GetCharWidth(int32_t nFontIndex, uint16_t Word, uint16_t SubWord); int32_t GetTypeAscent(int32_t nFontIndex); int32_t GetTypeDescent(int32_t nFontIndex); int32_t GetWordFontIndex(uint16_t word, int32_t charset, int32_t nFontIndex); - int32_t GetDefaultFontIndex(); bool IsLatinWord(uint16_t word); CPVT_WordPlace AddSection(const CPVT_WordPlace& place, @@ -182,28 +201,9 @@ class CPDF_VariableText { bool GetLineInfo(const CPVT_WordPlace& place, CPVT_LineInfo& lineinfo); bool GetSectionInfo(const CPVT_WordPlace& place, CPVT_SectionInfo& secinfo); float GetWordFontSize(const CPVT_WordInfo& WordInfo); - float GetWordWidth(int32_t nFontIndex, - uint16_t Word, - uint16_t SubWord, - float fCharSpace, - int32_t nHorzScale, - float fFontSize, - float fWordTail); - float GetWordWidth(const CPVT_WordInfo& WordInfo); - float GetWordAscent(const CPVT_WordInfo& WordInfo, float fFontSize); - float GetWordDescent(const CPVT_WordInfo& WordInfo, float fFontSize); - float GetWordAscent(const CPVT_WordInfo& WordInfo); - float GetWordDescent(const CPVT_WordInfo& WordInfo); - float GetLineAscent(const CPVT_SectionInfo& SecInfo); - float GetLineDescent(const CPVT_SectionInfo& SecInfo); - float GetFontAscent(int32_t nFontIndex, float fFontSize); - float GetFontDescent(int32_t nFontIndex, float fFontSize); int32_t GetWordFontIndex(const CPVT_WordInfo& WordInfo); float GetCharSpace(const CPVT_WordInfo& WordInfo); int32_t GetHorzScale(const CPVT_WordInfo& WordInfo); - float GetLineLeading(const CPVT_SectionInfo& SecInfo); - float GetLineIndent(const CPVT_SectionInfo& SecInfo); - int32_t GetAlignment(const CPVT_SectionInfo& SecInfo); void ClearSectionRightWords(const CPVT_WordPlace& place); |