From ab27768d235985c0789a10ab490be43e262f48f6 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 17 Feb 2016 10:07:21 -0800 Subject: Banish CFX_ByteArray and CFX_WideArray to the XFA side. Fix IWYU and include paths as we go. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1701883004 . --- xfa/include/fwl/basewidget/fwl_edit.h | 21 ++++++++++++++------- xfa/include/fwl/lightwidget/edit.h | 18 ++++++++++++------ xfa/include/fxfa/fxfa.h | 6 ++++-- 3 files changed, 30 insertions(+), 15 deletions(-) (limited to 'xfa/include') diff --git a/xfa/include/fwl/basewidget/fwl_edit.h b/xfa/include/fwl/basewidget/fwl_edit.h index b92c20f00d..878e5319fc 100644 --- a/xfa/include/fwl/basewidget/fwl_edit.h +++ b/xfa/include/fwl/basewidget/fwl_edit.h @@ -4,12 +4,16 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#ifndef _FWL_EDIT_H -#define _FWL_EDIT_H +#ifndef FWL_EDIT_H_ +#define FWL_EDIT_H_ + +#include + +#include "xfa/include/fwl/lightwidget/widget.h" + class CFWL_WidgetImpProperties; -class IFWL_Widget; -class IFWL_EditDP; class IFWL_Edit; + #define FWL_CLASS_Edit L"FWL_EDIT" #define FWL_CLASSHASH_Edit 2893987822 #define FWL_STYLEEXT_EDT_ReadOnly (1L << 0) @@ -99,7 +103,7 @@ END_FWL_EVENT_DEF BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtGetSuggestWords, FWL_EVTHASH_EDT_GetSuggestWords) FX_BOOL bSuggestWords; CFX_ByteString bsWord; -CFX_ByteStringArray bsArraySuggestWords; +std::vector bsArraySuggestWords; END_FWL_EVENT_DEF class IFWL_EditDP : public IFWL_DataProvider {}; #define FWL_EDT_FIND_FLAGS_Prev (0L << 0) @@ -107,6 +111,7 @@ class IFWL_EditDP : public IFWL_DataProvider {}; #define FWL_EDT_FIND_FLAGS_WholeWord (1L << 1) #define FWL_EDT_FIND_FLAGS_NoCase (1L << 2) typedef struct _FWL_HEDTFIND { void* pData; } * FWL_HEDTFIND; + class IFWL_Edit : public IFWL_Widget { public: static IFWL_Edit* Create(const CFWL_WidgetImpProperties& properties, @@ -154,11 +159,13 @@ class IFWL_Edit : public IFWL_Widget { FWL_ERR SetBackColor(FX_DWORD dwColor); FWL_ERR SetFont(const CFX_WideString& wsFont, FX_FLOAT fSize); void SetScrollOffset(FX_FLOAT fScrollOffset); - FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray& sSuggest); + FX_BOOL GetSuggestWords(CFX_PointF pointf, + std::vector& sSuggest); FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, const CFX_ByteStringC& bsReplace); protected: IFWL_Edit(); }; -#endif + +#endif // FWL_EDIT_H_ diff --git a/xfa/include/fwl/lightwidget/edit.h b/xfa/include/fwl/lightwidget/edit.h index 42bb5e374a..b1dc79cfc7 100644 --- a/xfa/include/fwl/lightwidget/edit.h +++ b/xfa/include/fwl/lightwidget/edit.h @@ -4,11 +4,15 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#ifndef _FWL_EDIT_LIGHT_H -#define _FWL_EDIT_LIGHT_H -class CFWL_Widget; +#ifndef FWL_LIGHTWIDGET_EDIT_H_ +#define FWL_LIGHTWIDGET_EDIT_H_ + +#include + +#include "xfa/include/fwl/lightwidget/widget.h" + class CFWL_WidgetProperties; -class CFWL_Edit; + class CFWL_Edit : public CFWL_Widget { public: static CFWL_Edit* Create(); @@ -52,10 +56,12 @@ class CFWL_Edit : public CFWL_Widget { FX_BOOL Paste(const CFX_WideString& wsPaste); FX_BOOL Delete(); void SetScrollOffset(FX_FLOAT fScrollOffset); - FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray& sSuggest); + FX_BOOL GetSuggestWords(CFX_PointF pointf, + std::vector& sSuggest); FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, const CFX_ByteStringC& bsReplace); CFWL_Edit(); virtual ~CFWL_Edit(); }; -#endif + +#endif // FWL_LIGHTWIDGET_EDIT_H_ diff --git a/xfa/include/fxfa/fxfa.h b/xfa/include/fxfa/fxfa.h index 5fbd829c4e..5a1b18469c 100644 --- a/xfa/include/fxfa/fxfa.h +++ b/xfa/include/fxfa/fxfa.h @@ -7,6 +7,8 @@ #ifndef FXFA_H_ #define FXFA_H_ +#include + class CFX_Graphics; class CPDF_Document; class CXFA_Node; @@ -338,7 +340,7 @@ class IXFA_MenuHandler { virtual FX_BOOL Redo(IXFA_Widget* hWidget) = 0; virtual FX_BOOL GetSuggestWords(IXFA_Widget* hWidget, CFX_PointF pointf, - CFX_ByteStringArray& sSuggest) = 0; + std::vector& sSuggest) = 0; virtual FX_BOOL ReplaceSpellCheckWord(IXFA_Widget* hWidget, CFX_PointF pointf, const CFX_ByteStringC& bsReplace) = 0; @@ -442,7 +444,7 @@ class IXFA_DocProvider { virtual FX_BOOL CheckWord(IXFA_Doc* hDoc, const CFX_ByteStringC& sWord) = 0; virtual FX_BOOL GetSuggestWords(IXFA_Doc* hDoc, const CFX_ByteStringC& sWord, - CFX_ByteStringArray& sSuggest) = 0; + std::vector& sSuggest) = 0; virtual FX_BOOL GetPDFScriptObject(IXFA_Doc* hDoc, const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue) = 0; -- cgit v1.2.3