diff options
author | dsinclair <dsinclair@chromium.org> | 2016-04-05 12:01:42 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-05 12:01:42 -0700 |
commit | c7a7349cf316af37d4ad4b71c5742159deccbf33 (patch) | |
tree | 5006913b93a6d498e3df158bc644400e3a1a0c7c /core/fpdfdoc/csection.h | |
parent | 179bebb9a14dfd3ba91e9e068d4d436657a7c780 (diff) | |
download | pdfium-c7a7349cf316af37d4ad4b71c5742159deccbf33.tar.xz |
Remove core/include/fpdfdoc/fpdf_vt.h
This CL removes the core/include/fpdfdoc/fpdf_vt.h file. The IPDF_VariableText
class was removed in favour of the only concrete class of CPD_VariableText.
CPVT_Provider was moved to CPDF_VariableText::Provider and
CPDF_VariableText_Iterator was moved to CPDF_VariableText::Iterator.
The IFX_Edit_FontMap interface was merged into the IPVT_FontMap interface so
there is only one.
Other classes were split out as needed in order to keep things compiling.
BUG=pdfium:468
Review URL: https://codereview.chromium.org/1860063002
Diffstat (limited to 'core/fpdfdoc/csection.h')
-rw-r--r-- | core/fpdfdoc/csection.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/core/fpdfdoc/csection.h b/core/fpdfdoc/csection.h new file mode 100644 index 0000000000..d8974cb020 --- /dev/null +++ b/core/fpdfdoc/csection.h @@ -0,0 +1,62 @@ +// Copyright 2016 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_FPDFDOC_CSECTION_H_ +#define CORE_FPDFDOC_CSECTION_H_ + +#include "core/fpdfdoc/cpvt_sectioninfo.h" +#include "core/fpdfdoc/ctypeset.h" +#include "core/fxcrt/include/fx_coordinates.h" +#include "core/fxcrt/include/fx_system.h" + +class CPDF_VariableText; + +struct CPVT_LineInfo; +struct CPVT_WordLine; +struct CPVT_WordPlace; + +class CSection { + public: + explicit CSection(CPDF_VariableText* pVT); + virtual ~CSection(); + void ResetAll(); + void ResetLineArray(); + void ResetWordArray(); + void ResetLinePlace(); + CPVT_WordPlace AddWord(const CPVT_WordPlace& place, + const CPVT_WordInfo& wordinfo); + CPVT_WordPlace AddLine(const CPVT_LineInfo& lineinfo); + void ClearWords(const CPVT_WordRange& PlaceRange); + void ClearWord(const CPVT_WordPlace& place); + CPVT_FloatRect Rearrange(); + CPVT_Size GetSectionSize(FX_FLOAT fFontSize); + CPVT_WordPlace GetBeginWordPlace() const; + CPVT_WordPlace GetEndWordPlace() const; + CPVT_WordPlace GetPrevWordPlace(const CPVT_WordPlace& place) const; + CPVT_WordPlace GetNextWordPlace(const CPVT_WordPlace& place) const; + void UpdateWordPlace(CPVT_WordPlace& place) const; + CPVT_WordPlace SearchWordPlace(const CFX_FloatPoint& point) const; + CPVT_WordPlace SearchWordPlace(FX_FLOAT fx, + const CPVT_WordPlace& lineplace) const; + CPVT_WordPlace SearchWordPlace(FX_FLOAT fx, + const CPVT_WordRange& range) const; + + CPVT_WordPlace SecPlace; + CPVT_SectionInfo m_SecInfo; + CLines m_LineArray; + CPVT_ArrayTemplate<CPVT_WordInfo*> m_WordArray; + + private: + friend class CTypeset; + + void ClearLeftWords(int32_t nWordIndex); + void ClearRightWords(int32_t nWordIndex); + void ClearMidWords(int32_t nBeginIndex, int32_t nEndIndex); + + CPDF_VariableText* m_pVT; +}; + +#endif // CORE_FPDFDOC_CSECTION_H_ |