| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "xfa/fxfa/app/xfa_fftextedit.h" | 7 #include "xfa/fxfa/app/xfa_fftextedit.h" |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 if (pAcc && pAcc->GetUIType() == XFA_ELEMENT_NumericEdit) { | 192 if (pAcc && pAcc->GetUIType() == XFA_ELEMENT_NumericEdit) { |
| 193 IXFA_AppProvider* pAppProvider = GetApp()->GetAppProvider(); | 193 IXFA_AppProvider* pAppProvider = GetApp()->GetAppProvider(); |
| 194 if (pAppProvider) { | 194 if (pAppProvider) { |
| 195 CFX_WideString wsTitle; | 195 CFX_WideString wsTitle; |
| 196 pAppProvider->LoadString(XFA_IDS_AppName, wsTitle); | 196 pAppProvider->LoadString(XFA_IDS_AppName, wsTitle); |
| 197 CFX_WideString wsMessage; | 197 CFX_WideString wsMessage; |
| 198 CFX_WideString wsError; | 198 CFX_WideString wsError; |
| 199 pAppProvider->LoadString(XFA_IDS_ValidateNumberError, wsError); | 199 pAppProvider->LoadString(XFA_IDS_ValidateNumberError, wsError); |
| 200 CFX_WideString wsSomField; | 200 CFX_WideString wsSomField; |
| 201 pAcc->GetNode()->GetSOMExpression(wsSomField); | 201 pAcc->GetNode()->GetSOMExpression(wsSomField); |
| 202 wsMessage.Format(wsError, (const FX_WCHAR*)wsText, | 202 wsMessage.Format(wsError.c_str(), wsText.c_str(), wsSomField.c_str()); |
| 203 (const FX_WCHAR*)wsSomField); | |
| 204 pAppProvider->MsgBox(wsMessage.AsStringC(), wsTitle.AsStringC(), | 203 pAppProvider->MsgBox(wsMessage.AsStringC(), wsTitle.AsStringC(), |
| 205 XFA_MBICON_Error, XFA_MB_OK); | 204 XFA_MBICON_Error, XFA_MB_OK); |
| 206 } | 205 } |
| 207 } | 206 } |
| 208 } | 207 } |
| 209 FX_BOOL CXFA_FFTextEdit::IsDataChanged() { | 208 FX_BOOL CXFA_FFTextEdit::IsDataChanged() { |
| 210 return (m_dwStatus & XFA_WIDGETSTATUS_TextEditValueChanged) != 0; | 209 return (m_dwStatus & XFA_WIDGETSTATUS_TextEditValueChanged) != 0; |
| 211 } | 210 } |
| 212 uint32_t CXFA_FFTextEdit::GetAlignment() { | 211 uint32_t CXFA_FFTextEdit::GetAlignment() { |
| 213 uint32_t dwExtendedStyle = 0; | 212 uint32_t dwExtendedStyle = 0; |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 uint32_t dwEventID = pEvent->GetClassID(); | 789 uint32_t dwEventID = pEvent->GetClassID(); |
| 791 if (dwEventID == FWL_EVTHASH_DTP_SelectChanged) { | 790 if (dwEventID == FWL_EVTHASH_DTP_SelectChanged) { |
| 792 CFWL_Event_DtpSelectChanged* event = (CFWL_Event_DtpSelectChanged*)pEvent; | 791 CFWL_Event_DtpSelectChanged* event = (CFWL_Event_DtpSelectChanged*)pEvent; |
| 793 OnSelectChanged(m_pNormalWidget->GetWidget(), event->iYear, event->iMonth, | 792 OnSelectChanged(m_pNormalWidget->GetWidget(), event->iYear, event->iMonth, |
| 794 event->iDay); | 793 event->iDay); |
| 795 return TRUE; | 794 return TRUE; |
| 796 } else { | 795 } else { |
| 797 return CXFA_FFTextEdit::OnProcessEvent(pEvent); | 796 return CXFA_FFTextEdit::OnProcessEvent(pEvent); |
| 798 } | 797 } |
| 799 } | 798 } |
| OLD | NEW |