Merge to XFA: Remove typdefs for pointer types in fx_system.h.
[pdfium.git] / xfa / src / fxfa / src / parser / xfa_script_imp.cpp
index be10dff..4dc48f7 100644 (file)
@@ -138,7 +138,7 @@ void CXFA_ScriptContext::GlobalPropertySetter(FXJSE_HOBJECT hObject, FX_BSTR szP
     CXFA_Document* pDoc = lpOrginalNode->GetDocument();\r
     CXFA_ScriptContext* lpScriptContext = (CXFA_ScriptContext*)pDoc->GetScriptContext();\r
     CXFA_Object* lpCurNode = lpScriptContext->GetVariablesThis(lpOrginalNode);\r
-    CFX_WideString wsPropName = CFX_WideString::FromUTF8((FX_LPCSTR)szPropName.GetPtr(), szPropName.GetLength());\r
+    CFX_WideString wsPropName = CFX_WideString::FromUTF8((const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());\r
     FX_DWORD dwFlag = XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Attributes;\r
     CXFA_Node* pRefNode = (CXFA_Node*)lpScriptContext->GetThisObject();\r
     if(lpOrginalNode->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) {\r
@@ -184,7 +184,7 @@ void CXFA_ScriptContext::GlobalPropertyGetter(FXJSE_HOBJECT hObject, FX_BSTR szP
     CXFA_Document* pDoc = pOrginalObject->GetDocument();\r
     CXFA_ScriptContext* lpScriptContext = (CXFA_ScriptContext*)pDoc->GetScriptContext();\r
     CXFA_Object* lpCurNode = lpScriptContext->GetVariablesThis(pOrginalObject);\r
-    CFX_WideString wsPropName = CFX_WideString::FromUTF8((FX_LPCSTR)szPropName.GetPtr(), szPropName.GetLength());\r
+    CFX_WideString wsPropName = CFX_WideString::FromUTF8((const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());\r
     if (lpScriptContext->GetType() == XFA_SCRIPTLANGTYPE_Formcalc) {\r
         if(szPropName == FX_BSTRC(FOXIT_XFA_FM2JS_FORMCALC_RUNTIME)) {\r
             XFA_FM2JS_GlobalPropertyGetter(lpScriptContext->m_hFM2JSContext, hValue);\r
@@ -231,7 +231,7 @@ void CXFA_ScriptContext::NormalPropertyGetter(FXJSE_HOBJECT hObject, FX_BSTR szP
         FXJSE_Value_SetUndefined(hValue);\r
         return;\r
     }\r
-    CFX_WideString wsPropName = CFX_WideString::FromUTF8((FX_LPCSTR)szPropName.GetPtr(), szPropName.GetLength());\r
+    CFX_WideString wsPropName = CFX_WideString::FromUTF8((const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());\r
     CXFA_ScriptContext* lpScriptContext = (CXFA_ScriptContext*)pOrginalObject->GetDocument()->GetScriptContext();\r
     CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOrginalObject);\r
     if(wsPropName == FX_WSTRC(L"xfa")) {\r
@@ -267,7 +267,7 @@ void CXFA_ScriptContext::NormalPropertySetter(FXJSE_HOBJECT hObject, FX_BSTR szP
     }\r
     CXFA_ScriptContext* lpScriptContext = (CXFA_ScriptContext*)pOrginalObject->GetDocument()->GetScriptContext();\r
     CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOrginalObject);\r
-    CFX_WideString wsPropName = CFX_WideString::FromUTF8((FX_LPCSTR)szPropName.GetPtr(), szPropName.GetLength());\r
+    CFX_WideString wsPropName = CFX_WideString::FromUTF8((const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());\r
     XFA_LPCSCRIPTATTRIBUTEINFO lpAttributeInfo = XFA_GetScriptAttributeByName(pObject->GetClassID(), wsPropName);\r
     if(lpAttributeInfo) {\r
         (pObject->*(lpAttributeInfo->lpfnCallback))(hValue, TRUE, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute);\r
@@ -308,7 +308,7 @@ int32_t CXFA_ScriptContext::NormalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR
     CXFA_ScriptContext* lpScriptContext = (CXFA_ScriptContext*)pObject->GetDocument()->GetScriptContext();\r
     pObject = lpScriptContext->GetVariablesThis(pObject);\r
     XFA_ELEMENT objElement = pObject->GetClassID();\r
-    CFX_WideString wsPropName = CFX_WideString::FromUTF8((FX_LPCSTR)szPropName.GetPtr(), szPropName.GetLength());\r
+    CFX_WideString wsPropName = CFX_WideString::FromUTF8((const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());\r
     if(XFA_GetMethodByName(objElement, wsPropName)) {\r
         return FXJSE_ClassPropType_Method;\r
     }\r
@@ -326,7 +326,7 @@ int32_t     CXFA_ScriptContext::GlobalPropTypeGetter(FXJSE_HOBJECT hObject, FX_BSTR
     CXFA_ScriptContext* lpScriptContext = (CXFA_ScriptContext*)pObject->GetDocument()->GetScriptContext();\r
     pObject = lpScriptContext->GetVariablesThis(pObject);\r
     XFA_ELEMENT objElement = pObject->GetClassID();\r
-    CFX_WideString wsPropName = CFX_WideString::FromUTF8((FX_LPCSTR)szPropName.GetPtr(), szPropName.GetLength());\r
+    CFX_WideString wsPropName = CFX_WideString::FromUTF8((const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());\r
     if(XFA_GetMethodByName(objElement, wsPropName)) {\r
         return FXJSE_ClassPropType_Method;\r
     }\r
@@ -340,7 +340,7 @@ void CXFA_ScriptContext::NormalMethodCall(FXJSE_HOBJECT hThis, FX_BSTR szFuncNam
     }\r
     CXFA_ScriptContext* lpScriptContext = (CXFA_ScriptContext*)pObject->GetDocument()->GetScriptContext();\r
     pObject = lpScriptContext->GetVariablesThis(pObject);\r
-    CFX_WideString wsFunName = CFX_WideString::FromUTF8((FX_LPCSTR)szFuncName.GetPtr(), szFuncName.GetLength());\r
+    CFX_WideString wsFunName = CFX_WideString::FromUTF8((const FX_CHAR*)szFuncName.GetPtr(), szFuncName.GetLength());\r
     XFA_LPCMETHODINFO lpMethodInfo = XFA_GetMethodByName(pObject->GetClassID(), wsFunName);\r
     if(NULL == lpMethodInfo) {\r
         return;\r
@@ -446,7 +446,7 @@ FX_BOOL CXFA_ScriptContext::QueryVariableHValue(CXFA_Node* pScriptNode, FX_BSTR
         return FALSE;\r
     }\r
     FX_BOOL bRes = FALSE;\r
-    FX_LPVOID lpVariables = m_mapVariableToHValue.GetValueAt(pScriptNode);\r
+    void* lpVariables = m_mapVariableToHValue.GetValueAt(pScriptNode);\r
     if(lpVariables) {\r
         FXJSE_HCONTEXT hVariableContext = (FXJSE_HCONTEXT)lpVariables;\r
         FXJSE_HVALUE hObject = FXJSE_Context_GetGlobalObject(hVariableContext);\r
@@ -677,7 +677,7 @@ FXJSE_HVALUE CXFA_ScriptContext::GetJSValueFromMap(CXFA_Object* pObject)
     if(pObject->IsNode()) {\r
         RunVariablesScript((CXFA_Node*)pObject);\r
     }\r
-    FX_LPVOID pValue = m_mapXFAToHValue.GetValueAt(pObject);\r
+    void* pValue = m_mapXFAToHValue.GetValueAt(pObject);\r
     if(pValue == NULL) {\r
         FXJSE_HVALUE jsHvalue = FXJSE_Value_Create(m_hJsRuntime);\r
         FXJSE_Value_SetObject(jsHvalue, pObject, m_hJsClass);\r