| 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_script_eventpseudomodel.h" | 7 #include "xfa/fxfa/parser/xfa_script_eventpseudomodel.h" |
| 8 | 8 |
| 9 #include "xfa/fxfa/app/xfa_ffnotify.h" | 9 #include "xfa/fxfa/app/xfa_ffnotify.h" |
| 10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" | 10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" |
| 11 #include "xfa/fxfa/include/xfa_ffwidgethandler.h" | 11 #include "xfa/fxfa/include/xfa_ffwidgethandler.h" |
| 12 #include "xfa/fxfa/parser/xfa_doclayout.h" | 12 #include "xfa/fxfa/parser/xfa_doclayout.h" |
| 13 #include "xfa/fxfa/parser/xfa_document.h" | 13 #include "xfa/fxfa/parser/xfa_document.h" |
| 14 #include "xfa/fxfa/parser/xfa_localemgr.h" | 14 #include "xfa/fxfa/parser/xfa_localemgr.h" |
| 15 #include "xfa/fxfa/parser/xfa_object.h" | 15 #include "xfa/fxfa/parser/xfa_object.h" |
| 16 #include "xfa/fxfa/parser/xfa_parser.h" | 16 #include "xfa/fxfa/parser/xfa_parser.h" |
| 17 #include "xfa/fxfa/parser/xfa_parser_imp.h" | 17 #include "xfa/fxfa/parser/xfa_parser_imp.h" |
| 18 #include "xfa/fxfa/parser/xfa_script.h" | 18 #include "xfa/fxfa/parser/xfa_script.h" |
| 19 #include "xfa/fxfa/parser/xfa_script_imp.h" | 19 #include "xfa/fxfa/parser/xfa_script_imp.h" |
| 20 #include "xfa/fxfa/parser/xfa_utils.h" | 20 #include "xfa/fxfa/parser/xfa_utils.h" |
| 21 #include "xfa/fxjse/cfxjse_arguments.h" | 21 #include "xfa/fxjse/cfxjse_arguments.h" |
| 22 | 22 |
| 23 CScript_EventPseudoModel::CScript_EventPseudoModel(CXFA_Document* pDocument) | 23 CScript_EventPseudoModel::CScript_EventPseudoModel(CXFA_Document* pDocument) |
| 24 : CXFA_OrdinaryObject(pDocument, XFA_ELEMENT_EventPseudoModel) { | 24 : CXFA_OrdinaryObject(pDocument, XFA_ELEMENT_EventPseudoModel) { |
| 25 m_uScriptHash = XFA_HASHCODE_Event; | 25 m_uScriptHash = XFA_HASHCODE_Event; |
| 26 } | 26 } |
| 27 CScript_EventPseudoModel::~CScript_EventPseudoModel() {} | 27 CScript_EventPseudoModel::~CScript_EventPseudoModel() {} |
| 28 void Script_EventPseudoModel_StringProperty(FXJSE_HVALUE hValue, | 28 void Script_EventPseudoModel_StringProperty(CFXJSE_Value* pValue, |
| 29 CFX_WideString& wsValue, | 29 CFX_WideString& wsValue, |
| 30 FX_BOOL bSetting) { | 30 FX_BOOL bSetting) { |
| 31 if (bSetting) { | 31 if (bSetting) { |
| 32 CFX_ByteString bsValue; | 32 CFX_ByteString bsValue; |
| 33 FXJSE_Value_ToUTF8String(hValue, bsValue); | 33 FXJSE_Value_ToUTF8String(pValue, bsValue); |
| 34 wsValue = CFX_WideString::FromUTF8(bsValue.AsStringC()); | 34 wsValue = CFX_WideString::FromUTF8(bsValue.AsStringC()); |
| 35 } else { | 35 } else { |
| 36 FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsStringC()); | 36 FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsValue).AsStringC()); |
| 37 } | 37 } |
| 38 } | 38 } |
| 39 void Script_EventPseudoModel_InterProperty(FXJSE_HVALUE hValue, | 39 void Script_EventPseudoModel_InterProperty(CFXJSE_Value* pValue, |
| 40 int32_t& iValue, | 40 int32_t& iValue, |
| 41 FX_BOOL bSetting) { | 41 FX_BOOL bSetting) { |
| 42 if (bSetting) { | 42 if (bSetting) { |
| 43 iValue = FXJSE_Value_ToInteger(hValue); | 43 iValue = FXJSE_Value_ToInteger(pValue); |
| 44 } else { | 44 } else { |
| 45 FXJSE_Value_SetInteger(hValue, iValue); | 45 FXJSE_Value_SetInteger(pValue, iValue); |
| 46 } | 46 } |
| 47 } | 47 } |
| 48 void Script_EventPseudoModel_BooleanProperty(FXJSE_HVALUE hValue, | 48 void Script_EventPseudoModel_BooleanProperty(CFXJSE_Value* pValue, |
| 49 FX_BOOL& bValue, | 49 FX_BOOL& bValue, |
| 50 FX_BOOL bSetting) { | 50 FX_BOOL bSetting) { |
| 51 if (bSetting) | 51 if (bSetting) |
| 52 bValue = FXJSE_Value_ToBoolean(hValue); | 52 bValue = FXJSE_Value_ToBoolean(pValue); |
| 53 else | 53 else |
| 54 FXJSE_Value_SetBoolean(hValue, bValue); | 54 FXJSE_Value_SetBoolean(pValue, bValue); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void CScript_EventPseudoModel::Script_EventPseudoModel_Property( | 57 void CScript_EventPseudoModel::Script_EventPseudoModel_Property( |
| 58 FXJSE_HVALUE hValue, | 58 CFXJSE_Value* pValue, |
| 59 XFA_Event dwFlag, | 59 XFA_Event dwFlag, |
| 60 FX_BOOL bSetting) { | 60 FX_BOOL bSetting) { |
| 61 CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext(); | 61 CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext(); |
| 62 if (!pScriptContext) | 62 if (!pScriptContext) |
| 63 return; | 63 return; |
| 64 | 64 |
| 65 CXFA_EventParam* pEventParam = pScriptContext->GetEventParam(); | 65 CXFA_EventParam* pEventParam = pScriptContext->GetEventParam(); |
| 66 if (!pEventParam) | 66 if (!pEventParam) |
| 67 return; | 67 return; |
| 68 | 68 |
| 69 switch (dwFlag) { | 69 switch (dwFlag) { |
| 70 case XFA_Event::CancelAction: | 70 case XFA_Event::CancelAction: |
| 71 Script_EventPseudoModel_BooleanProperty( | 71 Script_EventPseudoModel_BooleanProperty( |
| 72 hValue, pEventParam->m_bCancelAction, bSetting); | 72 pValue, pEventParam->m_bCancelAction, bSetting); |
| 73 break; | 73 break; |
| 74 case XFA_Event::Change: | 74 case XFA_Event::Change: |
| 75 Script_EventPseudoModel_StringProperty(hValue, pEventParam->m_wsChange, | 75 Script_EventPseudoModel_StringProperty(pValue, pEventParam->m_wsChange, |
| 76 bSetting); | 76 bSetting); |
| 77 break; | 77 break; |
| 78 case XFA_Event::CommitKey: | 78 case XFA_Event::CommitKey: |
| 79 Script_EventPseudoModel_InterProperty(hValue, pEventParam->m_iCommitKey, | 79 Script_EventPseudoModel_InterProperty(pValue, pEventParam->m_iCommitKey, |
| 80 bSetting); | 80 bSetting); |
| 81 break; | 81 break; |
| 82 case XFA_Event::FullText: | 82 case XFA_Event::FullText: |
| 83 Script_EventPseudoModel_StringProperty(hValue, pEventParam->m_wsFullText, | 83 Script_EventPseudoModel_StringProperty(pValue, pEventParam->m_wsFullText, |
| 84 bSetting); | 84 bSetting); |
| 85 break; | 85 break; |
| 86 case XFA_Event::Keydown: | 86 case XFA_Event::Keydown: |
| 87 Script_EventPseudoModel_BooleanProperty(hValue, pEventParam->m_bKeyDown, | 87 Script_EventPseudoModel_BooleanProperty(pValue, pEventParam->m_bKeyDown, |
| 88 bSetting); | 88 bSetting); |
| 89 break; | 89 break; |
| 90 case XFA_Event::Modifier: | 90 case XFA_Event::Modifier: |
| 91 Script_EventPseudoModel_BooleanProperty(hValue, pEventParam->m_bModifier, | 91 Script_EventPseudoModel_BooleanProperty(pValue, pEventParam->m_bModifier, |
| 92 bSetting); | 92 bSetting); |
| 93 break; | 93 break; |
| 94 case XFA_Event::NewContentType: | 94 case XFA_Event::NewContentType: |
| 95 Script_EventPseudoModel_StringProperty( | 95 Script_EventPseudoModel_StringProperty( |
| 96 hValue, pEventParam->m_wsNewContentType, bSetting); | 96 pValue, pEventParam->m_wsNewContentType, bSetting); |
| 97 break; | 97 break; |
| 98 case XFA_Event::NewText: | 98 case XFA_Event::NewText: |
| 99 Script_EventPseudoModel_StringProperty(hValue, pEventParam->m_wsNewText, | 99 Script_EventPseudoModel_StringProperty(pValue, pEventParam->m_wsNewText, |
| 100 bSetting); | 100 bSetting); |
| 101 break; | 101 break; |
| 102 case XFA_Event::PreviousContentType: | 102 case XFA_Event::PreviousContentType: |
| 103 Script_EventPseudoModel_StringProperty( | 103 Script_EventPseudoModel_StringProperty( |
| 104 hValue, pEventParam->m_wsPrevContentType, bSetting); | 104 pValue, pEventParam->m_wsPrevContentType, bSetting); |
| 105 break; | 105 break; |
| 106 case XFA_Event::PreviousText: | 106 case XFA_Event::PreviousText: |
| 107 Script_EventPseudoModel_StringProperty(hValue, pEventParam->m_wsPrevText, | 107 Script_EventPseudoModel_StringProperty(pValue, pEventParam->m_wsPrevText, |
| 108 bSetting); | 108 bSetting); |
| 109 break; | 109 break; |
| 110 case XFA_Event::Reenter: | 110 case XFA_Event::Reenter: |
| 111 Script_EventPseudoModel_BooleanProperty(hValue, pEventParam->m_bReenter, | 111 Script_EventPseudoModel_BooleanProperty(pValue, pEventParam->m_bReenter, |
| 112 bSetting); | 112 bSetting); |
| 113 break; | 113 break; |
| 114 case XFA_Event::SelectionEnd: | 114 case XFA_Event::SelectionEnd: |
| 115 Script_EventPseudoModel_InterProperty(hValue, pEventParam->m_iSelEnd, | 115 Script_EventPseudoModel_InterProperty(pValue, pEventParam->m_iSelEnd, |
| 116 bSetting); | 116 bSetting); |
| 117 break; | 117 break; |
| 118 case XFA_Event::SelectionStart: | 118 case XFA_Event::SelectionStart: |
| 119 Script_EventPseudoModel_InterProperty(hValue, pEventParam->m_iSelStart, | 119 Script_EventPseudoModel_InterProperty(pValue, pEventParam->m_iSelStart, |
| 120 bSetting); | 120 bSetting); |
| 121 break; | 121 break; |
| 122 case XFA_Event::Shift: | 122 case XFA_Event::Shift: |
| 123 Script_EventPseudoModel_BooleanProperty(hValue, pEventParam->m_bShift, | 123 Script_EventPseudoModel_BooleanProperty(pValue, pEventParam->m_bShift, |
| 124 bSetting); | 124 bSetting); |
| 125 break; | 125 break; |
| 126 case XFA_Event::SoapFaultCode: | 126 case XFA_Event::SoapFaultCode: |
| 127 Script_EventPseudoModel_StringProperty( | 127 Script_EventPseudoModel_StringProperty( |
| 128 hValue, pEventParam->m_wsSoapFaultCode, bSetting); | 128 pValue, pEventParam->m_wsSoapFaultCode, bSetting); |
| 129 break; | 129 break; |
| 130 case XFA_Event::SoapFaultString: | 130 case XFA_Event::SoapFaultString: |
| 131 Script_EventPseudoModel_StringProperty( | 131 Script_EventPseudoModel_StringProperty( |
| 132 hValue, pEventParam->m_wsSoapFaultString, bSetting); | 132 pValue, pEventParam->m_wsSoapFaultString, bSetting); |
| 133 break; | 133 break; |
| 134 case XFA_Event::Target: | 134 case XFA_Event::Target: |
| 135 break; | 135 break; |
| 136 default: | 136 default: |
| 137 break; | 137 break; |
| 138 } | 138 } |
| 139 } | 139 } |
| 140 void CScript_EventPseudoModel::Script_EventPseudoModel_Change( | 140 void CScript_EventPseudoModel::Script_EventPseudoModel_Change( |
| 141 FXJSE_HVALUE hValue, | 141 CFXJSE_Value* pValue, |
| 142 FX_BOOL bSetting, | 142 FX_BOOL bSetting, |
| 143 XFA_ATTRIBUTE eAttribute) { | 143 XFA_ATTRIBUTE eAttribute) { |
| 144 Script_EventPseudoModel_Property(hValue, XFA_Event::Change, bSetting); | 144 Script_EventPseudoModel_Property(pValue, XFA_Event::Change, bSetting); |
| 145 } | 145 } |
| 146 void CScript_EventPseudoModel::Script_EventPseudoModel_CommitKey( | 146 void CScript_EventPseudoModel::Script_EventPseudoModel_CommitKey( |
| 147 FXJSE_HVALUE hValue, | 147 CFXJSE_Value* pValue, |
| 148 FX_BOOL bSetting, | 148 FX_BOOL bSetting, |
| 149 XFA_ATTRIBUTE eAttribute) { | 149 XFA_ATTRIBUTE eAttribute) { |
| 150 Script_EventPseudoModel_Property(hValue, XFA_Event::CommitKey, bSetting); | 150 Script_EventPseudoModel_Property(pValue, XFA_Event::CommitKey, bSetting); |
| 151 } | 151 } |
| 152 void CScript_EventPseudoModel::Script_EventPseudoModel_FullText( | 152 void CScript_EventPseudoModel::Script_EventPseudoModel_FullText( |
| 153 FXJSE_HVALUE hValue, | 153 CFXJSE_Value* pValue, |
| 154 FX_BOOL bSetting, | 154 FX_BOOL bSetting, |
| 155 XFA_ATTRIBUTE eAttribute) { | 155 XFA_ATTRIBUTE eAttribute) { |
| 156 Script_EventPseudoModel_Property(hValue, XFA_Event::FullText, bSetting); | 156 Script_EventPseudoModel_Property(pValue, XFA_Event::FullText, bSetting); |
| 157 } | 157 } |
| 158 void CScript_EventPseudoModel::Script_EventPseudoModel_KeyDown( | 158 void CScript_EventPseudoModel::Script_EventPseudoModel_KeyDown( |
| 159 FXJSE_HVALUE hValue, | 159 CFXJSE_Value* pValue, |
| 160 FX_BOOL bSetting, | 160 FX_BOOL bSetting, |
| 161 XFA_ATTRIBUTE eAttribute) { | 161 XFA_ATTRIBUTE eAttribute) { |
| 162 Script_EventPseudoModel_Property(hValue, XFA_Event::Keydown, bSetting); | 162 Script_EventPseudoModel_Property(pValue, XFA_Event::Keydown, bSetting); |
| 163 } | 163 } |
| 164 void CScript_EventPseudoModel::Script_EventPseudoModel_Modifier( | 164 void CScript_EventPseudoModel::Script_EventPseudoModel_Modifier( |
| 165 FXJSE_HVALUE hValue, | 165 CFXJSE_Value* pValue, |
| 166 FX_BOOL bSetting, | 166 FX_BOOL bSetting, |
| 167 XFA_ATTRIBUTE eAttribute) { | 167 XFA_ATTRIBUTE eAttribute) { |
| 168 Script_EventPseudoModel_Property(hValue, XFA_Event::Modifier, bSetting); | 168 Script_EventPseudoModel_Property(pValue, XFA_Event::Modifier, bSetting); |
| 169 } | 169 } |
| 170 void CScript_EventPseudoModel::Script_EventPseudoModel_NewContentType( | 170 void CScript_EventPseudoModel::Script_EventPseudoModel_NewContentType( |
| 171 FXJSE_HVALUE hValue, | 171 CFXJSE_Value* pValue, |
| 172 FX_BOOL bSetting, | 172 FX_BOOL bSetting, |
| 173 XFA_ATTRIBUTE eAttribute) { | 173 XFA_ATTRIBUTE eAttribute) { |
| 174 Script_EventPseudoModel_Property(hValue, XFA_Event::NewContentType, bSetting); | 174 Script_EventPseudoModel_Property(pValue, XFA_Event::NewContentType, bSetting); |
| 175 } | 175 } |
| 176 void CScript_EventPseudoModel::Script_EventPseudoModel_NewText( | 176 void CScript_EventPseudoModel::Script_EventPseudoModel_NewText( |
| 177 FXJSE_HVALUE hValue, | 177 CFXJSE_Value* pValue, |
| 178 FX_BOOL bSetting, | 178 FX_BOOL bSetting, |
| 179 XFA_ATTRIBUTE eAttribute) { | 179 XFA_ATTRIBUTE eAttribute) { |
| 180 Script_EventPseudoModel_Property(hValue, XFA_Event::NewText, bSetting); | 180 Script_EventPseudoModel_Property(pValue, XFA_Event::NewText, bSetting); |
| 181 } | 181 } |
| 182 void CScript_EventPseudoModel::Script_EventPseudoModel_PrevContentType( | 182 void CScript_EventPseudoModel::Script_EventPseudoModel_PrevContentType( |
| 183 FXJSE_HVALUE hValue, | 183 CFXJSE_Value* pValue, |
| 184 FX_BOOL bSetting, | 184 FX_BOOL bSetting, |
| 185 XFA_ATTRIBUTE eAttribute) { | 185 XFA_ATTRIBUTE eAttribute) { |
| 186 Script_EventPseudoModel_Property(hValue, XFA_Event::PreviousContentType, | 186 Script_EventPseudoModel_Property(pValue, XFA_Event::PreviousContentType, |
| 187 bSetting); | 187 bSetting); |
| 188 } | 188 } |
| 189 void CScript_EventPseudoModel::Script_EventPseudoModel_PrevText( | 189 void CScript_EventPseudoModel::Script_EventPseudoModel_PrevText( |
| 190 FXJSE_HVALUE hValue, | 190 CFXJSE_Value* pValue, |
| 191 FX_BOOL bSetting, | 191 FX_BOOL bSetting, |
| 192 XFA_ATTRIBUTE eAttribute) { | 192 XFA_ATTRIBUTE eAttribute) { |
| 193 Script_EventPseudoModel_Property(hValue, XFA_Event::PreviousText, bSetting); | 193 Script_EventPseudoModel_Property(pValue, XFA_Event::PreviousText, bSetting); |
| 194 } | 194 } |
| 195 void CScript_EventPseudoModel::Script_EventPseudoModel_Reenter( | 195 void CScript_EventPseudoModel::Script_EventPseudoModel_Reenter( |
| 196 FXJSE_HVALUE hValue, | 196 CFXJSE_Value* pValue, |
| 197 FX_BOOL bSetting, | 197 FX_BOOL bSetting, |
| 198 XFA_ATTRIBUTE eAttribute) { | 198 XFA_ATTRIBUTE eAttribute) { |
| 199 Script_EventPseudoModel_Property(hValue, XFA_Event::Reenter, bSetting); | 199 Script_EventPseudoModel_Property(pValue, XFA_Event::Reenter, bSetting); |
| 200 } | 200 } |
| 201 void CScript_EventPseudoModel::Script_EventPseudoModel_SelEnd( | 201 void CScript_EventPseudoModel::Script_EventPseudoModel_SelEnd( |
| 202 FXJSE_HVALUE hValue, | 202 CFXJSE_Value* pValue, |
| 203 FX_BOOL bSetting, | 203 FX_BOOL bSetting, |
| 204 XFA_ATTRIBUTE eAttribute) { | 204 XFA_ATTRIBUTE eAttribute) { |
| 205 Script_EventPseudoModel_Property(hValue, XFA_Event::SelectionEnd, bSetting); | 205 Script_EventPseudoModel_Property(pValue, XFA_Event::SelectionEnd, bSetting); |
| 206 } | 206 } |
| 207 void CScript_EventPseudoModel::Script_EventPseudoModel_SelStart( | 207 void CScript_EventPseudoModel::Script_EventPseudoModel_SelStart( |
| 208 FXJSE_HVALUE hValue, | 208 CFXJSE_Value* pValue, |
| 209 FX_BOOL bSetting, | 209 FX_BOOL bSetting, |
| 210 XFA_ATTRIBUTE eAttribute) { | 210 XFA_ATTRIBUTE eAttribute) { |
| 211 Script_EventPseudoModel_Property(hValue, XFA_Event::SelectionStart, bSetting); | 211 Script_EventPseudoModel_Property(pValue, XFA_Event::SelectionStart, bSetting); |
| 212 } | 212 } |
| 213 void CScript_EventPseudoModel::Script_EventPseudoModel_Shift( | 213 void CScript_EventPseudoModel::Script_EventPseudoModel_Shift( |
| 214 FXJSE_HVALUE hValue, | 214 CFXJSE_Value* pValue, |
| 215 FX_BOOL bSetting, | 215 FX_BOOL bSetting, |
| 216 XFA_ATTRIBUTE eAttribute) { | 216 XFA_ATTRIBUTE eAttribute) { |
| 217 Script_EventPseudoModel_Property(hValue, XFA_Event::Shift, bSetting); | 217 Script_EventPseudoModel_Property(pValue, XFA_Event::Shift, bSetting); |
| 218 } | 218 } |
| 219 void CScript_EventPseudoModel::Script_EventPseudoModel_SoapFaultCode( | 219 void CScript_EventPseudoModel::Script_EventPseudoModel_SoapFaultCode( |
| 220 FXJSE_HVALUE hValue, | 220 CFXJSE_Value* pValue, |
| 221 FX_BOOL bSetting, | 221 FX_BOOL bSetting, |
| 222 XFA_ATTRIBUTE eAttribute) { | 222 XFA_ATTRIBUTE eAttribute) { |
| 223 Script_EventPseudoModel_Property(hValue, XFA_Event::SoapFaultCode, bSetting); | 223 Script_EventPseudoModel_Property(pValue, XFA_Event::SoapFaultCode, bSetting); |
| 224 } | 224 } |
| 225 void CScript_EventPseudoModel::Script_EventPseudoModel_SoapFaultString( | 225 void CScript_EventPseudoModel::Script_EventPseudoModel_SoapFaultString( |
| 226 FXJSE_HVALUE hValue, | 226 CFXJSE_Value* pValue, |
| 227 FX_BOOL bSetting, | 227 FX_BOOL bSetting, |
| 228 XFA_ATTRIBUTE eAttribute) { | 228 XFA_ATTRIBUTE eAttribute) { |
| 229 Script_EventPseudoModel_Property(hValue, XFA_Event::SoapFaultString, | 229 Script_EventPseudoModel_Property(pValue, XFA_Event::SoapFaultString, |
| 230 bSetting); | 230 bSetting); |
| 231 } | 231 } |
| 232 void CScript_EventPseudoModel::Script_EventPseudoModel_Target( | 232 void CScript_EventPseudoModel::Script_EventPseudoModel_Target( |
| 233 FXJSE_HVALUE hValue, | 233 CFXJSE_Value* pValue, |
| 234 FX_BOOL bSetting, | 234 FX_BOOL bSetting, |
| 235 XFA_ATTRIBUTE eAttribute) { | 235 XFA_ATTRIBUTE eAttribute) { |
| 236 Script_EventPseudoModel_Property(hValue, XFA_Event::Target, bSetting); | 236 Script_EventPseudoModel_Property(pValue, XFA_Event::Target, bSetting); |
| 237 } | 237 } |
| 238 void CScript_EventPseudoModel::Script_EventPseudoModel_Emit( | 238 void CScript_EventPseudoModel::Script_EventPseudoModel_Emit( |
| 239 CFXJSE_Arguments* pArguments) { | 239 CFXJSE_Arguments* pArguments) { |
| 240 CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext(); | 240 CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext(); |
| 241 if (!pScriptContext) { | 241 if (!pScriptContext) { |
| 242 return; | 242 return; |
| 243 } | 243 } |
| 244 CXFA_EventParam* pEventParam = pScriptContext->GetEventParam(); | 244 CXFA_EventParam* pEventParam = pScriptContext->GetEventParam(); |
| 245 if (!pEventParam) { | 245 if (!pEventParam) { |
| 246 return; | 246 return; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 260 CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext(); | 260 CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext(); |
| 261 if (!pScriptContext) { | 261 if (!pScriptContext) { |
| 262 return; | 262 return; |
| 263 } | 263 } |
| 264 CXFA_EventParam* pEventParam = pScriptContext->GetEventParam(); | 264 CXFA_EventParam* pEventParam = pScriptContext->GetEventParam(); |
| 265 if (!pEventParam) { | 265 if (!pEventParam) { |
| 266 return; | 266 return; |
| 267 } | 267 } |
| 268 pEventParam->Reset(); | 268 pEventParam->Reset(); |
| 269 } | 269 } |
| OLD | NEW |