| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_ | 7 #ifndef CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_ |
| 8 #define CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_ | 8 #define CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_ |
| 9 | 9 |
| 10 #include "core/include/fpdfapi/fpdf_parser.h" | 10 #include "core/include/fpdfapi/fpdf_parser.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 #define FPDFTEXT_RLTB 1 | 60 #define FPDFTEXT_RLTB 1 |
| 61 #define FPDFTEXT_TBRL 2 | 61 #define FPDFTEXT_TBRL 2 |
| 62 #define FPDFTEXT_LEFT -1 | 62 #define FPDFTEXT_LEFT -1 |
| 63 #define FPDFTEXT_RIGHT 1 | 63 #define FPDFTEXT_RIGHT 1 |
| 64 #define FPDFTEXT_UP -2 | 64 #define FPDFTEXT_UP -2 |
| 65 #define FPDFTEXT_DOWN 2 | 65 #define FPDFTEXT_DOWN 2 |
| 66 #define FPDFTEXT_WRITINGMODE_UNKNOW 0 | 66 #define FPDFTEXT_WRITINGMODE_UNKNOW 0 |
| 67 #define FPDFTEXT_WRITINGMODE_LRTB 1 | 67 #define FPDFTEXT_WRITINGMODE_LRTB 1 |
| 68 #define FPDFTEXT_WRITINGMODE_RLTB 2 | 68 #define FPDFTEXT_WRITINGMODE_RLTB 2 |
| 69 #define FPDFTEXT_WRITINGMODE_TBRL 3 | 69 #define FPDFTEXT_WRITINGMODE_TBRL 3 |
| 70 class CPDFText_ParseOptions { | |
| 71 public: | |
| 72 CPDFText_ParseOptions(); | |
| 73 FX_BOOL m_bGetCharCodeOnly; | |
| 74 FX_BOOL m_bNormalizeObjs; | |
| 75 FX_BOOL m_bOutputHyphen; | |
| 76 }; | |
| 77 | 70 |
| 78 class IPDF_TextPage { | 71 class IPDF_TextPage { |
| 79 public: | 72 public: |
| 80 static IPDF_TextPage* CreateTextPage(const CPDF_Page* pPage, int flags = 0); | 73 static IPDF_TextPage* CreateTextPage(const CPDF_Page* pPage, int flags = 0); |
| 81 static IPDF_TextPage* CreateReflowTextPage(IPDF_ReflowedPage* pRefPage); | 74 static IPDF_TextPage* CreateReflowTextPage(IPDF_ReflowedPage* pRefPage); |
| 82 | 75 |
| 83 virtual ~IPDF_TextPage() {} | 76 virtual ~IPDF_TextPage() {} |
| 84 | 77 |
| 85 virtual void NormalizeObjects(FX_BOOL bNormalize) = 0; | |
| 86 | |
| 87 virtual FX_BOOL ParseTextPage() = 0; | 78 virtual FX_BOOL ParseTextPage() = 0; |
| 88 | 79 |
| 89 virtual bool IsParsed() const = 0; | 80 virtual bool IsParsed() const = 0; |
| 90 | 81 |
| 91 virtual int CharIndexFromTextIndex(int TextIndex) const = 0; | 82 virtual int CharIndexFromTextIndex(int TextIndex) const = 0; |
| 92 | 83 |
| 93 virtual int TextIndexFromCharIndex(int CharIndex) const = 0; | 84 virtual int TextIndexFromCharIndex(int CharIndex) const = 0; |
| 94 | 85 |
| 95 virtual int CountChars() const = 0; | 86 virtual int CountChars() const = 0; |
| 96 | 87 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 virtual int CountLinks() const = 0; | 166 virtual int CountLinks() const = 0; |
| 176 | 167 |
| 177 virtual CFX_WideString GetURL(int index) const = 0; | 168 virtual CFX_WideString GetURL(int index) const = 0; |
| 178 | 169 |
| 179 virtual void GetBoundedSegment(int index, int& start, int& count) const = 0; | 170 virtual void GetBoundedSegment(int index, int& start, int& count) const = 0; |
| 180 | 171 |
| 181 virtual void GetRects(int index, CFX_RectArray& rects) const = 0; | 172 virtual void GetRects(int index, CFX_RectArray& rects) const = 0; |
| 182 }; | 173 }; |
| 183 | 174 |
| 184 #endif // CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_ | 175 #endif // CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_ |
| OLD | NEW |