| 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/parser/xfa_object.h" | 7 #include "xfa/fxfa/parser/xfa_object.h" |
| 8 | 8 |
| 9 #include "core/fxcrt/include/fx_ext.h" | 9 #include "core/fxcrt/include/fx_ext.h" |
| 10 #include "xfa/fde/xml/fde_xml_imp.h" | 10 #include "xfa/fde/xml/fde_xml_imp.h" |
| 11 #include "xfa/fgas/crt/fgas_codepage.h" | 11 #include "xfa/fgas/crt/fgas_codepage.h" |
| 12 #include "xfa/fgas/crt/fgas_system.h" | 12 #include "xfa/fgas/crt/fgas_system.h" |
| 13 #include "xfa/fxfa/app/xfa_ffnotify.h" | 13 #include "xfa/fxfa/app/xfa_ffnotify.h" |
| 14 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" | 14 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" |
| 15 #include "xfa/fxfa/parser/cxfa_occur.h" |
| 15 #include "xfa/fxfa/parser/xfa_basic_imp.h" | 16 #include "xfa/fxfa/parser/xfa_basic_imp.h" |
| 16 #include "xfa/fxfa/parser/xfa_docdata.h" | 17 #include "xfa/fxfa/parser/xfa_docdata.h" |
| 17 #include "xfa/fxfa/parser/xfa_doclayout.h" | 18 #include "xfa/fxfa/parser/xfa_doclayout.h" |
| 18 #include "xfa/fxfa/parser/xfa_document.h" | 19 #include "xfa/fxfa/parser/xfa_document.h" |
| 19 #include "xfa/fxfa/parser/xfa_document_layout_imp.h" | 20 #include "xfa/fxfa/parser/xfa_document_layout_imp.h" |
| 20 #include "xfa/fxfa/parser/xfa_localemgr.h" | 21 #include "xfa/fxfa/parser/xfa_localemgr.h" |
| 21 #include "xfa/fxfa/parser/xfa_parser.h" | 22 #include "xfa/fxfa/parser/xfa_parser.h" |
| 22 #include "xfa/fxfa/parser/xfa_parser_imp.h" | 23 #include "xfa/fxfa/parser/xfa_parser_imp.h" |
| 23 #include "xfa/fxfa/parser/xfa_script.h" | 24 #include "xfa/fxfa/parser/xfa_script.h" |
| 24 #include "xfa/fxfa/parser/xfa_script_imp.h" | 25 #include "xfa/fxfa/parser/xfa_script_imp.h" |
| (...skipping 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2002 FXJSE_Value_ToUTF8String(hValue, newValue); | 2003 FXJSE_Value_ToUTF8String(hValue, newValue); |
| 2003 } | 2004 } |
| 2004 CFX_WideString wsNewText = | 2005 CFX_WideString wsNewText = |
| 2005 CFX_WideString::FromUTF8(newValue, newValue.GetLength()); | 2006 CFX_WideString::FromUTF8(newValue, newValue.GetLength()); |
| 2006 CXFA_Node* pUIChild = pWidgetData->GetUIChild(); | 2007 CXFA_Node* pUIChild = pWidgetData->GetUIChild(); |
| 2007 if (pUIChild->GetClassID() == XFA_ELEMENT_NumericEdit) { | 2008 if (pUIChild->GetClassID() == XFA_ELEMENT_NumericEdit) { |
| 2008 int32_t iLeadDigits = 0; | 2009 int32_t iLeadDigits = 0; |
| 2009 int32_t iFracDigits = 0; | 2010 int32_t iFracDigits = 0; |
| 2010 pWidgetData->GetLeadDigits(iLeadDigits); | 2011 pWidgetData->GetLeadDigits(iLeadDigits); |
| 2011 pWidgetData->GetFracDigits(iFracDigits); | 2012 pWidgetData->GetFracDigits(iFracDigits); |
| 2012 wsNewText = XFA_NumericLimit(wsNewText, iLeadDigits, iFracDigits); | 2013 wsNewText = |
| 2014 pWidgetData->NumericLimit(wsNewText, iLeadDigits, iFracDigits); |
| 2013 } | 2015 } |
| 2014 CXFA_WidgetData* pContainerWidgetData = GetContainerWidgetData(); | 2016 CXFA_WidgetData* pContainerWidgetData = GetContainerWidgetData(); |
| 2015 CFX_WideString wsFormatText(wsNewText); | 2017 CFX_WideString wsFormatText(wsNewText); |
| 2016 if (pContainerWidgetData) { | 2018 if (pContainerWidgetData) { |
| 2017 pContainerWidgetData->GetFormatDataValue(wsNewText.AsWideStringC(), | 2019 pContainerWidgetData->GetFormatDataValue(wsNewText.AsWideStringC(), |
| 2018 wsFormatText); | 2020 wsFormatText); |
| 2019 } | 2021 } |
| 2020 SetScriptContent(wsNewText, wsFormatText, TRUE, TRUE); | 2022 SetScriptContent(wsNewText, wsFormatText, TRUE, TRUE); |
| 2021 } else { | 2023 } else { |
| 2022 CFX_WideString content = GetScriptContent(TRUE); | 2024 CFX_WideString content = GetScriptContent(TRUE); |
| (...skipping 3416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5439 return m_pAttachNode->InsertChild(pNewNode, pBeforeNode); | 5441 return m_pAttachNode->InsertChild(pNewNode, pBeforeNode); |
| 5440 } | 5442 } |
| 5441 FX_BOOL CXFA_AttachNodeList::Remove(CXFA_Node* pNode) { | 5443 FX_BOOL CXFA_AttachNodeList::Remove(CXFA_Node* pNode) { |
| 5442 return m_pAttachNode->RemoveChild(pNode); | 5444 return m_pAttachNode->RemoveChild(pNode); |
| 5443 } | 5445 } |
| 5444 CXFA_Node* CXFA_AttachNodeList::Item(int32_t iIndex) { | 5446 CXFA_Node* CXFA_AttachNodeList::Item(int32_t iIndex) { |
| 5445 return m_pAttachNode->GetChild( | 5447 return m_pAttachNode->GetChild( |
| 5446 iIndex, XFA_ELEMENT_UNKNOWN, | 5448 iIndex, XFA_ELEMENT_UNKNOWN, |
| 5447 m_pAttachNode->GetClassID() == XFA_ELEMENT_Subform); | 5449 m_pAttachNode->GetClassID() == XFA_ELEMENT_Subform); |
| 5448 } | 5450 } |
| OLD | NEW |