diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-03-13 15:32:07 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-14 14:13:24 +0000 |
commit | 893822aa5b6254591f8e80fbffcbb4fa6ad849aa (patch) | |
tree | 74e20ab6378d515c12a1ec9b9fc70d8e309b361b /core/fxcrt/cfx_char.h | |
parent | 80e370c7d8b6541f59d98b6cbfbaae51f7e139da (diff) | |
download | pdfium-893822aa5b6254591f8e80fbffcbb4fa6ad849aa.tar.xz |
Merge text breaking helper classes.
This Cl merges the CFX_TxtPiece and CFX_RTFPiece classes into
CFX_BreakPiece. CFX_TxtLine and CFX_RTFLine into CFX_BreakLine and
CFX_TxtChar and CFX_RTFChar into CFX_Char.
Change-Id: I95421bdf4cafd5e394db9238dea3603ccb8349c3
Reviewed-on: https://pdfium-review.googlesource.com/2966
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_char.h')
-rw-r--r-- | core/fxcrt/cfx_char.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/core/fxcrt/cfx_char.h b/core/fxcrt/cfx_char.h new file mode 100644 index 0000000000..bc91c91386 --- /dev/null +++ b/core/fxcrt/cfx_char.h @@ -0,0 +1,43 @@ +// Copyright 2017 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_CFX_CHAR_H_ +#define CORE_FXCRT_CFX_CHAR_H_ + +#include <stdint.h> + +#include "core/fxcrt/fx_ucd.h" + +enum class CFX_BreakType { None = 0, Piece, Line, Paragraph, Page }; + +class CFX_Char { + public: + CFX_Char(); + CFX_Char(uint16_t wCharCode, uint32_t dwCharProps); + CFX_Char(const CFX_Char& other); + ~CFX_Char(); + + FX_CHARTYPE GetCharType() const; + + CFX_BreakType m_dwStatus; + uint8_t m_nBreakType; + uint32_t m_dwCharStyles; + uint32_t m_dwCharProps; + int32_t m_iCharWidth; + int32_t m_iHorizontalScale; + int32_t m_iVerticalScale; + int16_t m_iBidiClass; + int16_t m_iBidiLevel; + int16_t m_iBidiPos; + int16_t m_iBidiOrder; + uint16_t m_wCharCode; + int32_t m_iFontSize; + int32_t m_iFontHeight; + uint32_t m_dwIdentity; + CFX_RetainPtr<CFX_Retainable> m_pUserData; +}; + +#endif // CORE_FXCRT_CFX_CHAR_H_ |