diff options
Diffstat (limited to 'xfa/fwl')
-rw-r--r-- | xfa/fwl/cfwl_edit.cpp | 12 | ||||
-rw-r--r-- | xfa/fwl/cfwl_edit.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp index 127c258d04..6e56ab2485 100644 --- a/xfa/fwl/cfwl_edit.cpp +++ b/xfa/fwl/cfwl_edit.cpp @@ -351,8 +351,8 @@ bool CFWL_Edit::Cut(CFX_WideString& wsCut) { } bool CFWL_Edit::Paste(const CFX_WideString& wsPaste) { - int32_t iError = m_EdtEngine.Insert(wsPaste); - if (iError < 0) { + FDE_EditResult iError = m_EdtEngine.Insert(wsPaste); + if (iError != FDE_EditResult::kSuccess) { ProcessInsertError(iError); return false; } @@ -1188,11 +1188,11 @@ void CFWL_Edit::ClearRecord() { m_DoRecords.clear(); } -void CFWL_Edit::ProcessInsertError(int32_t iError) { +void CFWL_Edit::ProcessInsertError(FDE_EditResult iError) { // TODO(dsinclair): This should probably also send events for Validation // failure .... - if (iError != -2) + if (iError != FDE_EditResult::kFull) return; CFWL_Event textFullEvent(CFWL_Event::Type::TextFull, this); @@ -1432,7 +1432,7 @@ void CFWL_Edit::OnChar(CFWL_MessageKey* pMsg) { return; } - int32_t iError = 0; + FDE_EditResult iError = FDE_EditResult::kSuccess; wchar_t c = static_cast<wchar_t>(pMsg->m_dwKeyCode); switch (c) { case FWL_VKEY_Back: @@ -1475,7 +1475,7 @@ void CFWL_Edit::OnChar(CFWL_MessageKey* pMsg) { break; } } - if (iError < 0) + if (iError != FDE_EditResult::kSuccess) ProcessInsertError(iError); } diff --git a/xfa/fwl/cfwl_edit.h b/xfa/fwl/cfwl_edit.h index 23d6158ee6..c0583cd7af 100644 --- a/xfa/fwl/cfwl_edit.h +++ b/xfa/fwl/cfwl_edit.h @@ -139,7 +139,7 @@ class CFWL_Edit : public CFWL_Widget { bool IsShowScrollBar(bool bVert); bool IsContentHeightOverflow(); int32_t AddDoRecord(std::unique_ptr<IFDE_TxtEdtDoRecord> pRecord); - void ProcessInsertError(int32_t iError); + void ProcessInsertError(FDE_EditResult iError); void AddSpellCheckObj(CXFA_Path& PathData, int32_t nStart, int32_t nCount, |