diff options
author | dsinclair <dsinclair@chromium.org> | 2016-06-07 10:10:45 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-07 10:10:45 -0700 |
commit | 705f829624bfc53e316f750bf91a32c8ae3ad1b5 (patch) | |
tree | e5ec525491a494bc34f2a34bbace458d2b433331 /xfa/fde/fde_visualset.h | |
parent | 8975902470dbfc15289b69f41e43ad0433ca51ae (diff) | |
download | pdfium-705f829624bfc53e316f750bf91a32c8ae3ad1b5.tar.xz |
Remove FDE_HVISUALOBJ.
This CL removes the FDE_HVISUALOBJ in favour of the concrete FDE_TEXTEDITPIECE
class. The parameter was removed from any method which didn't use it and the
non-implemented methods were removed.
Review-Url: https://codereview.chromium.org/2047693002
Diffstat (limited to 'xfa/fde/fde_visualset.h')
-rw-r--r-- | xfa/fde/fde_visualset.h | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/xfa/fde/fde_visualset.h b/xfa/fde/fde_visualset.h index 48b2ae7b94..e6898d83fa 100644 --- a/xfa/fde/fde_visualset.h +++ b/xfa/fde/fde_visualset.h @@ -20,40 +20,42 @@ enum FDE_VISUALOBJTYPE { FDE_VISUALOBJ_Text = 0x01 }; -typedef struct FDE_HVISUALOBJ_ { void* pData; } const* FDE_HVISUALOBJ; +struct FDE_TEXTEDITPIECE { + int32_t nStart; + int32_t nCount; + int32_t nBidiLevel; + CFX_RectF rtPiece; + uint32_t dwCharStyles; +}; class IFDE_VisualSet { public: virtual ~IFDE_VisualSet() {} virtual FDE_VISUALOBJTYPE GetType() = 0; - virtual FX_BOOL GetBBox(FDE_HVISUALOBJ hVisualObj, CFX_RectF& bbox) = 0; - virtual FX_BOOL GetMatrix(FDE_HVISUALOBJ hVisualObj, CFX_Matrix& matrix) = 0; - virtual FX_BOOL GetRect(FDE_HVISUALOBJ hVisualObj, CFX_RectF& rt) = 0; - virtual FX_BOOL GetClip(FDE_HVISUALOBJ hVisualObj, CFX_RectF& rt) = 0; + virtual void GetRect(FDE_TEXTEDITPIECE* hVisualObj, CFX_RectF& rt) = 0; }; class IFDE_CanvasSet : public IFDE_VisualSet { public: - virtual FX_POSITION GetFirstPosition(FDE_HVISUALOBJ hCanvas) = 0; - virtual FDE_HVISUALOBJ GetNext(FDE_HVISUALOBJ hCanvas, - FX_POSITION& pos, - IFDE_VisualSet*& pVisualSet) = 0; - virtual FDE_HVISUALOBJ GetParentCanvas(FDE_HVISUALOBJ hCanvas, - IFDE_VisualSet*& pVisualSet) = 0; + virtual FX_POSITION GetFirstPosition() = 0; + virtual FDE_TEXTEDITPIECE* GetNext(FX_POSITION& pos, + IFDE_VisualSet*& pVisualSet) = 0; }; class IFDE_TextSet : public IFDE_VisualSet { public: - virtual int32_t GetString(FDE_HVISUALOBJ hText, CFX_WideString& wsText) = 0; - virtual IFGAS_Font* GetFont(FDE_HVISUALOBJ hText) = 0; - virtual FX_FLOAT GetFontSize(FDE_HVISUALOBJ hText) = 0; - virtual FX_ARGB GetFontColor(FDE_HVISUALOBJ hText) = 0; - virtual int32_t GetDisplayPos(FDE_HVISUALOBJ hText, + virtual int32_t GetString(FDE_TEXTEDITPIECE* hText, + CFX_WideString& wsText) = 0; + virtual IFGAS_Font* GetFont() = 0; + virtual FX_FLOAT GetFontSize() = 0; + virtual FX_ARGB GetFontColor() = 0; + virtual int32_t GetDisplayPos(FDE_TEXTEDITPIECE* hText, FXTEXT_CHARPOS* pCharPos, FX_BOOL bCharCode = FALSE, - CFX_WideString* pWSForms = NULL) = 0; - virtual int32_t GetCharRects(FDE_HVISUALOBJ hText, - CFX_RectFArray& rtArray) = 0; + CFX_WideString* pWSForms = nullptr) = 0; + virtual int32_t GetCharRects(const FDE_TEXTEDITPIECE* hText, + CFX_RectFArray& rtArray, + FX_BOOL bbox) = 0; }; #endif // XFA_FDE_FDE_VISUALSET_H_ |