From 2d03e604b3979db45f6f2ea8c00c8d7fe0790790 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 14 Aug 2017 15:03:20 -0400 Subject: Cleaning up the visual set iterator This CL starts cleaning up the visual set iterator code. Change-Id: I643dc9edeeb0c7ff06ccd34a1977f811675413d8 Reviewed-on: https://pdfium-review.googlesource.com/10615 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- xfa/fde/cfde_txtedttextset.h | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'xfa/fde/cfde_txtedttextset.h') diff --git a/xfa/fde/cfde_txtedttextset.h b/xfa/fde/cfde_txtedttextset.h index 29303373da..71e1169dfb 100644 --- a/xfa/fde/cfde_txtedttextset.h +++ b/xfa/fde/cfde_txtedttextset.h @@ -9,29 +9,26 @@ #include -#include "xfa/fde/ifde_visualset.h" +#include "core/fxcrt/fx_coordinates.h" +#include "xfa/fde/cfde_txtedtpage.h" +#include "xfa/fgas/font/cfgas_gefont.h" -class CFDE_TxtEdtPage; - -class CFDE_TxtEdtTextSet : public IFDE_VisualSet { +class CFDE_TxtEdtTextSet { public: explicit CFDE_TxtEdtTextSet(CFDE_TxtEdtPage* pPage); - ~CFDE_TxtEdtTextSet() override; - - // IFDE_VisualSet - FDE_VISUALOBJTYPE GetType() override; - CFX_RectF GetRect(const FDE_TEXTEDITPIECE& hVisualObj) override; + ~CFDE_TxtEdtTextSet(); - int32_t GetString(FDE_TEXTEDITPIECE* pPiece, CFX_WideString& wsText); - CFX_RetainPtr GetFont(); - float GetFontSize(); - FX_ARGB GetFontColor(); + CFX_RectF GetRect(const FDE_TEXTEDITPIECE& hVisualObj) const; + int32_t GetString(FDE_TEXTEDITPIECE* pPiece, CFX_WideString& wsText) const; + CFX_RetainPtr GetFont() const; + float GetFontSize() const; + FX_ARGB GetFontColor() const; int32_t GetDisplayPos(const FDE_TEXTEDITPIECE& pPiece, FXTEXT_CHARPOS* pCharPos, bool bCharCode = false, - CFX_WideString* pWSForms = nullptr); + CFX_WideString* pWSForms = nullptr) const; std::vector GetCharRects(const FDE_TEXTEDITPIECE* pPiece, - bool bBBox); + bool bBBox) const; private: CFX_UnownedPtr const m_pPage; -- cgit v1.2.3