summaryrefslogtreecommitdiff
path: root/xfa/fde/cfde_texteditengine.h
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-09-18 14:23:18 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-18 18:40:16 +0000
commit275e260a6cd4a8e506ba974feb85ebcd926c1739 (patch)
tree2029b9158ec044764ceff122fe5fb5d0a3f123d1 /xfa/fde/cfde_texteditengine.h
parent450fbeaaabf1ab340c1018de2e58f1950657517e (diff)
downloadpdfium-275e260a6cd4a8e506ba974feb85ebcd926c1739.tar.xz
Convert string class names
Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_texteditengine.h')
-rw-r--r--xfa/fde/cfde_texteditengine.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/xfa/fde/cfde_texteditengine.h b/xfa/fde/cfde_texteditengine.h
index aa8a24381d..750b62a2e1 100644
--- a/xfa/fde/cfde_texteditengine.h
+++ b/xfa/fde/cfde_texteditengine.h
@@ -66,9 +66,9 @@ class CFDE_TextEditEngine {
virtual ~Delegate() = default;
virtual void NotifyTextFull() = 0;
virtual void OnCaretChanged() = 0;
- virtual void OnTextChanged(const CFX_WideString& prevText) = 0;
+ virtual void OnTextChanged(const WideString& prevText) = 0;
virtual void OnSelChanged() = 0;
- virtual bool OnValidate(const CFX_WideString& wsText) = 0;
+ virtual bool OnValidate(const WideString& wsText) = 0;
virtual void SetScrollOffset(float fScrollOffset) = 0;
};
@@ -84,13 +84,13 @@ class CFDE_TextEditEngine {
void Clear();
void Insert(size_t idx,
- const CFX_WideString& text,
+ const WideString& text,
RecordOperation add_operation = RecordOperation::kInsertRecord);
- CFX_WideString Delete(
+ WideString Delete(
size_t start_idx,
size_t length,
RecordOperation add_operation = RecordOperation::kInsertRecord);
- CFX_WideString GetText() const;
+ WideString GetText() const;
size_t GetLength() const;
// Non-const so we can force a layout.
@@ -147,10 +147,10 @@ class CFDE_TextEditEngine {
std::pair<size_t, size_t> GetSelection() const {
return {selection_.start_idx, selection_.end_idx};
}
- CFX_WideString GetSelectedText() const;
- CFX_WideString DeleteSelectedText(
+ WideString GetSelectedText() const;
+ WideString DeleteSelectedText(
RecordOperation add_operation = RecordOperation::kInsertRecord);
- void ReplaceSelectedText(const CFX_WideString& str);
+ void ReplaceSelectedText(const WideString& str);
void Layout();
@@ -183,8 +183,7 @@ class CFDE_TextEditEngine {
void SetCombTextWidth();
void AdjustGap(size_t idx, size_t length);
void RebuildPieces();
- size_t CountCharsExceedingSize(const CFX_WideString& str,
- size_t num_to_check);
+ size_t CountCharsExceedingSize(const WideString& str, size_t num_to_check);
void AddOperationRecord(std::unique_ptr<Operation> op);
bool IsAlignedRight() const {
@@ -210,7 +209,7 @@ class CFDE_TextEditEngine {
FX_ARGB font_color_;
float font_size_;
float line_spacing_;
- std::vector<CFX_WideString::CharType> content_;
+ std::vector<WideString::CharType> content_;
size_t text_length_;
size_t gap_position_;
size_t gap_size_;