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_SRC_FPDFDOC_PDF_VT_H_ | 7 #ifndef CORE_SRC_FPDFDOC_PDF_VT_H_ |
8 #define CORE_SRC_FPDFDOC_PDF_VT_H_ | 8 #define CORE_SRC_FPDFDOC_PDF_VT_H_ |
9 | 9 |
10 class CPVT_Size; | 10 class CPVT_Size; |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 private: | 299 private: |
300 void SplitLines(FX_BOOL bTypeset, FX_FLOAT fFontSize); | 300 void SplitLines(FX_BOOL bTypeset, FX_FLOAT fFontSize); |
301 void OutputLines(); | 301 void OutputLines(); |
302 | 302 |
303 CPVT_FloatRect m_rcRet; | 303 CPVT_FloatRect m_rcRet; |
304 CPDF_VariableText* m_pVT; | 304 CPDF_VariableText* m_pVT; |
305 CSection* m_pSection; | 305 CSection* m_pSection; |
306 }; | 306 }; |
307 class CPDF_EditContainer { | 307 class CPDF_EditContainer { |
308 public: | 308 public: |
309 CPDF_EditContainer() : m_rcPlate(0, 0, 0, 0), m_rcContent(0, 0, 0, 0){}; | 309 CPDF_EditContainer() : m_rcPlate(0, 0, 0, 0), m_rcContent(0, 0, 0, 0) {} |
310 virtual ~CPDF_EditContainer(){}; | 310 virtual ~CPDF_EditContainer() {} |
311 virtual void SetPlateRect(const CPDF_Rect& rect) { m_rcPlate = rect; }; | 311 virtual void SetPlateRect(const CPDF_Rect& rect) { m_rcPlate = rect; } |
312 virtual const CPDF_Rect& GetPlateRect() const { return m_rcPlate; }; | 312 virtual const CPDF_Rect& GetPlateRect() const { return m_rcPlate; } |
313 virtual void SetContentRect(const CPVT_FloatRect& rect) { | 313 virtual void SetContentRect(const CPVT_FloatRect& rect) { |
314 m_rcContent = rect; | 314 m_rcContent = rect; |
315 }; | 315 }; |
316 virtual CPDF_Rect GetContentRect() const { return m_rcContent; }; | 316 virtual CPDF_Rect GetContentRect() const { return m_rcContent; } |
317 FX_FLOAT GetPlateWidth() const { return m_rcPlate.right - m_rcPlate.left; }; | 317 FX_FLOAT GetPlateWidth() const { return m_rcPlate.right - m_rcPlate.left; } |
318 FX_FLOAT GetPlateHeight() const { return m_rcPlate.top - m_rcPlate.bottom; }; | 318 FX_FLOAT GetPlateHeight() const { return m_rcPlate.top - m_rcPlate.bottom; } |
319 CPVT_Size GetPlateSize() const { | 319 CPVT_Size GetPlateSize() const { |
320 return CPVT_Size(GetPlateWidth(), GetPlateHeight()); | 320 return CPVT_Size(GetPlateWidth(), GetPlateHeight()); |
321 }; | 321 }; |
322 CPDF_Point GetBTPoint() const { | 322 CPDF_Point GetBTPoint() const { |
323 return CPDF_Point(m_rcPlate.left, m_rcPlate.top); | 323 return CPDF_Point(m_rcPlate.left, m_rcPlate.top); |
324 }; | 324 }; |
325 CPDF_Point GetETPoint() const { | 325 CPDF_Point GetETPoint() const { |
326 return CPDF_Point(m_rcPlate.right, m_rcPlate.bottom); | 326 return CPDF_Point(m_rcPlate.right, m_rcPlate.bottom); |
327 }; | 327 }; |
328 inline CPDF_Point InToOut(const CPDF_Point& point) const { | 328 inline CPDF_Point InToOut(const CPDF_Point& point) const { |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 FX_BOOL PrevLine() override; | 554 FX_BOOL PrevLine() override; |
555 FX_BOOL NextSection() override; | 555 FX_BOOL NextSection() override; |
556 FX_BOOL PrevSection() override; | 556 FX_BOOL PrevSection() override; |
557 FX_BOOL SetWord(const CPVT_Word& word) override; | 557 FX_BOOL SetWord(const CPVT_Word& word) override; |
558 FX_BOOL GetWord(CPVT_Word& word) const override; | 558 FX_BOOL GetWord(CPVT_Word& word) const override; |
559 FX_BOOL GetLine(CPVT_Line& line) const override; | 559 FX_BOOL GetLine(CPVT_Line& line) const override; |
560 FX_BOOL GetSection(CPVT_Section& section) const override; | 560 FX_BOOL GetSection(CPVT_Section& section) const override; |
561 FX_BOOL SetSection(const CPVT_Section& section) override; | 561 FX_BOOL SetSection(const CPVT_Section& section) override; |
562 void SetAt(int32_t nWordIndex) override; | 562 void SetAt(int32_t nWordIndex) override; |
563 void SetAt(const CPVT_WordPlace& place) override; | 563 void SetAt(const CPVT_WordPlace& place) override; |
564 const CPVT_WordPlace& GetAt() const override { return m_CurPos; }; | 564 const CPVT_WordPlace& GetAt() const override { return m_CurPos; } |
565 | 565 |
566 private: | 566 private: |
567 CPVT_WordPlace m_CurPos; | 567 CPVT_WordPlace m_CurPos; |
568 CPDF_VariableText* m_pVT; | 568 CPDF_VariableText* m_pVT; |
569 }; | 569 }; |
570 | 570 |
571 #endif // CORE_SRC_FPDFDOC_PDF_VT_H_ | 571 #endif // CORE_SRC_FPDFDOC_PDF_VT_H_ |
OLD | NEW |