summaryrefslogtreecommitdiff
path: root/xfa/fde/cfde_txtedtengine.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-08-21 15:08:17 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-23 14:42:49 +0000
commit3bb0a34cc75abe49a59c6390353957bbb5c5ab38 (patch)
tree579b58399f24d3e12f39b4a0c9defcb1c56ad1bf /xfa/fde/cfde_txtedtengine.h
parent1d3696d091bd0485de55daedb000cef87fa35aae (diff)
downloadpdfium-3bb0a34cc75abe49a59c6390353957bbb5c5ab38.tar.xz
Convert the CFDE_TxtEdtEngine::Insert results into an enum class
This CL converts the return value to be an enum class and updates the usages to use the names instead of values. Change-Id: I8b6927551679ac4103775a04187daad2e0d6c569 Reviewed-on: https://pdfium-review.googlesource.com/11512 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_txtedtengine.h')
-rw-r--r--xfa/fde/cfde_txtedtengine.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/xfa/fde/cfde_txtedtengine.h b/xfa/fde/cfde_txtedtengine.h
index 3edd4dc872..b708984ac4 100644
--- a/xfa/fde/cfde_txtedtengine.h
+++ b/xfa/fde/cfde_txtedtengine.h
@@ -49,6 +49,13 @@ enum class FDE_CaretMove {
End,
};
+enum class FDE_EditResult {
+ kLocked = -5,
+ kInvalidate = -4,
+ kFull = -2,
+ kSuccess = 0,
+};
+
struct FDE_TXTEDTPARAMS {
FDE_TXTEDTPARAMS();
~FDE_TXTEDTPARAMS();
@@ -93,7 +100,7 @@ class CFDE_TxtEdtEngine {
int32_t SetCaretPos(int32_t nIndex, bool bBefore);
int32_t MoveCaretPos(FDE_CaretMove eMoveCaret, bool bShift);
- int32_t Insert(const CFX_WideString& str);
+ FDE_EditResult Insert(const CFX_WideString& str);
void Delete(bool bBackspace);
void SetLimit(int32_t nLimit) { m_nLimit = nLimit; }
@@ -144,7 +151,7 @@ class CFDE_TxtEdtEngine {
int32_t nCharIndex;
};
- enum class LineEnding {
+ enum class LineEnding : uint8_t {
kAuto,
kCRLF,
kCR,