diff options
author | tsepez <tsepez@chromium.org> | 2016-09-08 11:28:14 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-08 11:28:14 -0700 |
commit | a31da74cffa8c3ff919051cc49bc006aeb55d345 (patch) | |
tree | 0457bd7c0a74298d47e25cd1cdbf13b2622493ef /fpdfsdk/fxedit/include | |
parent | cd5dc855df0ca37b7667b5f3ceb951d2d417d99f (diff) | |
download | pdfium-a31da74cffa8c3ff919051cc49bc006aeb55d345.tar.xz |
Pass CFX_WideString further down widget callers
Avoid a couple of places where we copy the raw string back into a
brand-new widestring.
There are a few places where the difference between a null
ptr and an empty string control the logic, and I left these
as-is. Other places can just take the string by const ref.
Review-Url: https://codereview.chromium.org/2323493002
Diffstat (limited to 'fpdfsdk/fxedit/include')
-rw-r--r-- | fpdfsdk/fxedit/include/fxet_edit.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/fxedit/include/fxet_edit.h b/fpdfsdk/fxedit/include/fxet_edit.h index 9adf17271b..e0fca92dd2 100644 --- a/fpdfsdk/fxedit/include/fxet_edit.h +++ b/fpdfsdk/fxedit/include/fxet_edit.h @@ -470,13 +470,13 @@ class CFX_Edit { void OnVK_RIGHT(FX_BOOL bShift, FX_BOOL bCtrl); void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl); void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl); - void SetText(const FX_WCHAR* text); + void SetText(const CFX_WideString& sText); FX_BOOL InsertWord(uint16_t word, int32_t charset); FX_BOOL InsertReturn(); FX_BOOL Backspace(); FX_BOOL Delete(); FX_BOOL Clear(); - FX_BOOL InsertText(const FX_WCHAR* text, int32_t charset); + FX_BOOL InsertText(const CFX_WideString& sText, int32_t charset); FX_BOOL Redo(); FX_BOOL Undo(); int32_t WordPlaceToWordIndex(const CPVT_WordPlace& place) const; @@ -525,7 +525,7 @@ class CFX_Edit { FX_BOOL Empty(); CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, - const FX_WCHAR* text, + const CFX_WideString& sText, int32_t charset); int32_t GetCharSetFromUnicode(uint16_t word, int32_t nOldCharset); @@ -563,7 +563,7 @@ class CFX_Edit { FX_BOOL Backspace(FX_BOOL bAddUndo, FX_BOOL bPaint); FX_BOOL Delete(FX_BOOL bAddUndo, FX_BOOL bPaint); FX_BOOL Clear(FX_BOOL bAddUndo, FX_BOOL bPaint); - FX_BOOL InsertText(const FX_WCHAR* text, + FX_BOOL InsertText(const CFX_WideString& sText, int32_t charset, FX_BOOL bAddUndo, FX_BOOL bPaint); |