76 int GetIndexAtPos(
const CFX_PointF& point,
const CFX_SizeF& tolerance)
const;
90 enum class TextOrientation {
96 enum class GenerateCharacter {
103 enum class MarkedContentState { kPass = 0, kDone, kDelay };
105 struct TransformedTextObject {
106 TransformedTextObject();
107 TransformedTextObject(
const TransformedTextObject& that);
108 ~TransformedTextObject();
115 bool IsHyphen(
wchar_t curChar)
const;
116 void ProcessObject();
117 void ProcessFormObject(CPDF_FormObject* pFormObj,
119 void ProcessTextObject(
const TransformedTextObject& obj);
120 void ProcessTextObject(CPDF_TextObject* pTextObj,
123 CPDF_PageObjectHolder::const_iterator ObjPos);
124 GenerateCharacter ProcessInsertObject(
const CPDF_TextObject* pObj,
126 const CharInfo* GetPrevCharInfo()
const;
127 absl::optional<CharInfo> GenerateCharInfo(
wchar_t unicode);
128 bool IsSameAsPreTextObject(CPDF_TextObject* pTextObj,
130 CPDF_PageObjectHolder::const_iterator iter)
const;
131 bool IsSameTextObject(CPDF_TextObject* pTextObj1,
132 CPDF_TextObject* pTextObj2)
const;
133 void CloseTempLine();
134 MarkedContentState PreMarkedContent(
const CPDF_TextObject* pTextObj);
135 void ProcessMarkedContent(
const TransformedTextObject& obj);
136 void FindPreviousTextObject();
137 void AddCharInfoByLRDirection(
wchar_t wChar,
const CharInfo& info);
138 void AddCharInfoByRLDirection(
wchar_t wChar,
const CharInfo& info);
139 TextOrientation GetTextObjectWritingMode(
140 const CPDF_TextObject* pTextObj)
const;
141 TextOrientation FindTextlineFlowOrientation()
const;
142 void AppendGeneratedCharacter(
wchar_t unicode,
const CFX_Matrix& formMatrix);
143 void SwapTempTextBuf(size_t iCharListStartAppend, size_t iBufStartAppend);
144 WideString GetTextByPredicate(
145 const std::function<
bool(
const CharInfo&)>& predicate)
const;
148 DataVector<TextPageCharSegment> m_CharIndices;
149 std::deque<CharInfo> m_CharList;
150 std::deque<CharInfo> m_TempCharList;
151 WideTextBuffer m_TextBuf;
152 WideTextBuffer m_TempTextBuf;
153 UnownedPtr<
const CPDF_TextObject> m_pPrevTextObj;
157 std::vector<CFX_FloatRect> m_SelRects;
158 std::vector<TransformedTextObject> mTextObjects;
159 TextOrientation m_TextlineDir = TextOrientation::kUnknown;
CharInfo(const CharInfo &)
UnownedPtr< const CPDF_TextObject > m_pTextObj
int CharIndexFromTextIndex(int text_index) const
WideString GetAllPageText() const
bool GetRect(int rectIndex, CFX_FloatRect *pRect) const
WideString GetTextByRect(const CFX_FloatRect &rect) const
const CharInfo & GetCharInfo(size_t index) const
CFX_FloatRect GetCharLooseBounds(size_t index) const
CPDF_TextPage(const CPDF_Page *pPage, bool rtl)
WideString GetTextByObject(const CPDF_TextObject *pTextObj) const
int GetIndexAtPos(const CFX_PointF &point, const CFX_SizeF &tolerance) const
float GetCharFontSize(size_t index) const
int CountRects(int start, int nCount)
int TextIndexFromCharIndex(int char_index) const
std::vector< CFX_FloatRect > GetRectArray(int start, int count) const
WideString GetPageText(int start, int count) const