summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-05 11:02:18 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-05 11:02:18 -0700
commit179bebb9a14dfd3ba91e9e068d4d436657a7c780 (patch)
tree895a59bfcf85a4730badfb2a6df71cf8679a2249 /xfa/fxfa/parser
parent4cd49e1c6076bd9ef2d18480d893038822668262 (diff)
downloadpdfium-179bebb9a14dfd3ba91e9e068d4d436657a7c780.tar.xz
Rename GetCStr and GetPtr to match CFX_ByteString.
This CL updates CFX_ByteStringC to use the more common c_str and raw_str instead of GetCStr and GetPtr. Review URL: https://codereview.chromium.org/1857713003
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/xfa_basic_imp.cpp15
-rw-r--r--xfa/fxfa/parser/xfa_document_datamerger_imp.cpp4
-rw-r--r--xfa/fxfa/parser/xfa_document_imp.cpp6
-rw-r--r--xfa/fxfa/parser/xfa_document_serialize.cpp4
-rw-r--r--xfa/fxfa/parser/xfa_layout_itemlayout.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_object_imp.cpp26
-rw-r--r--xfa/fxfa/parser/xfa_objectacc_imp.cpp4
-rw-r--r--xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_script_imp.cpp18
-rw-r--r--xfa/fxfa/parser/xfa_script_resolveprocessor.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_utils_imp.cpp2
11 files changed, 43 insertions, 42 deletions
diff --git a/xfa/fxfa/parser/xfa_basic_imp.cpp b/xfa/fxfa/parser/xfa_basic_imp.cpp
index a126cd6d1f..13c879a31e 100644
--- a/xfa/fxfa/parser/xfa_basic_imp.cpp
+++ b/xfa/fxfa/parser/xfa_basic_imp.cpp
@@ -26,7 +26,7 @@ const XFA_PACKETINFO* XFA_GetPacketByName(const CFX_WideStringC& wsName) {
if (iLength == 0) {
return NULL;
}
- uint32_t uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength);
+ uint32_t uHash = FX_HashCode_String_GetW(wsName.raw_str(), iLength);
int32_t iStart = 0, iEnd = g_iXFAPacketCount - 1;
do {
int32_t iMid = (iStart + iEnd) / 2;
@@ -68,7 +68,7 @@ const XFA_ATTRIBUTEENUMINFO* XFA_GetAttributeEnumByName(
if (iLength == 0) {
return NULL;
}
- uint32_t uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength);
+ uint32_t uHash = FX_HashCode_String_GetW(wsName.raw_str(), iLength);
int32_t iStart = 0, iEnd = g_iXFAEnumCount - 1;
do {
int32_t iMid = (iStart + iEnd) / 2;
@@ -94,7 +94,7 @@ const XFA_ATTRIBUTEINFO* XFA_GetAttributeByName(const CFX_WideStringC& wsName) {
if (iLength == 0) {
return NULL;
}
- uint32_t uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength);
+ uint32_t uHash = FX_HashCode_String_GetW(wsName.raw_str(), iLength);
int32_t iStart = 0, iEnd = g_iXFAAttributeCount - 1;
do {
int32_t iMid = (iStart + iEnd) / 2;
@@ -195,7 +195,7 @@ const XFA_ELEMENTINFO* XFA_GetElementByName(const CFX_WideStringC& wsName) {
if (iLength == 0) {
return NULL;
}
- uint32_t uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength);
+ uint32_t uHash = FX_HashCode_String_GetW(wsName.raw_str(), iLength);
int32_t iStart = 0, iEnd = g_iXFAElementCount - 1;
do {
int32_t iMid = (iStart + iEnd) / 2;
@@ -380,7 +380,7 @@ const XFA_METHODINFO* XFA_GetMethodByName(XFA_ELEMENT eElement,
iElementIndex = scriptIndex->wParentIndex;
continue;
}
- uint32_t uHash = FX_HashCode_String_GetW(wsMethodName.GetPtr(), iLength);
+ uint32_t uHash = FX_HashCode_String_GetW(wsMethodName.raw_str(), iLength);
int32_t iStart = scriptIndex->wMethodStart, iEnd = iStart + icount - 1;
do {
int32_t iMid = (iStart + iEnd) / 2;
@@ -412,7 +412,8 @@ const XFA_SCRIPTATTRIBUTEINFO* XFA_GetScriptAttributeByName(
iElementIndex = scriptIndex->wParentIndex;
continue;
}
- uint32_t uHash = FX_HashCode_String_GetW(wsAttributeName.GetPtr(), iLength);
+ uint32_t uHash =
+ FX_HashCode_String_GetW(wsAttributeName.raw_str(), iLength);
int32_t iStart = scriptIndex->wAttributeStart, iEnd = iStart + icount - 1;
do {
int32_t iMid = (iStart + iEnd) / 2;
@@ -437,7 +438,7 @@ void CXFA_Measurement::Set(const CFX_WideStringC& wsMeasure) {
}
int32_t iUsedLen = 0;
int32_t iOffset = (wsMeasure.GetAt(0) == L'=') ? 1 : 0;
- FX_FLOAT fValue = FX_wcstof(wsMeasure.GetPtr() + iOffset,
+ FX_FLOAT fValue = FX_wcstof(wsMeasure.raw_str() + iOffset,
wsMeasure.GetLength() - iOffset, &iUsedLen);
XFA_UNIT eUnit = GetUnit(wsMeasure.Mid(iOffset + iUsedLen));
Set(fValue, eUnit);
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index 5d371619e4..a5f021aacd 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -398,7 +398,7 @@ static CXFA_Node* XFA_DataMerge_FindGlobalDataNode(CXFA_Document* pDocument,
CXFA_Node* pDataScope,
XFA_ELEMENT eMatchNodeType) {
uint32_t dwNameHash =
- wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.GetPtr(),
+ wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.raw_str(),
wsName.GetLength());
if (dwNameHash != 0) {
CXFA_Node* pBounded = XFA_DataMerge_GetGlobalBinding(pDocument, dwNameHash);
@@ -418,7 +418,7 @@ static CXFA_Node* XFA_DataMerge_FindOnceDataNode(CXFA_Document* pDocument,
CXFA_Node* pDataScope,
XFA_ELEMENT eMatchNodeType) {
uint32_t dwNameHash =
- wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.GetPtr(),
+ wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.raw_str(),
wsName.GetLength());
if (dwNameHash != 0) {
for (CXFA_Node *pCurDataScope = pDataScope, *pLastDataScope = NULL;
diff --git a/xfa/fxfa/parser/xfa_document_imp.cpp b/xfa/fxfa/parser/xfa_document_imp.cpp
index d56e57c99d..bb2001e803 100644
--- a/xfa/fxfa/parser/xfa_document_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_imp.cpp
@@ -96,7 +96,7 @@ CXFA_FFNotify* CXFA_Document::GetNotify() const {
}
CXFA_Object* CXFA_Document::GetXFAObject(const CFX_WideStringC& wsNodeName) {
return GetXFAObject(
- FX_HashCode_String_GetW(wsNodeName.GetPtr(), wsNodeName.GetLength()));
+ FX_HashCode_String_GetW(wsNodeName.raw_str(), wsNodeName.GetLength()));
}
CXFA_Object* CXFA_Document::GetXFAObject(uint32_t dwNodeNameHash) {
switch (dwNodeNameHash) {
@@ -367,7 +367,7 @@ void CXFA_Document::DoProtoMerge() {
pNode = sIterator.MoveToNext()) {
CFX_WideStringC wsIDVal;
if (pNode->TryCData(XFA_ATTRIBUTE_Id, wsIDVal) && !wsIDVal.IsEmpty()) {
- mIDMap[FX_HashCode_String_GetW(wsIDVal.GetPtr(), wsIDVal.GetLength())] =
+ mIDMap[FX_HashCode_String_GetW(wsIDVal.raw_str(), wsIDVal.GetLength())] =
pNode;
}
CFX_WideStringC wsUseVal;
@@ -429,7 +429,7 @@ void CXFA_Document::DoProtoMerge() {
}
} else if (!wsID.IsEmpty()) {
if (!mIDMap.Lookup(
- FX_HashCode_String_GetW(wsID.GetPtr(), wsID.GetLength()),
+ FX_HashCode_String_GetW(wsID.raw_str(), wsID.GetLength()),
pProtoNode)) {
continue;
}
diff --git a/xfa/fxfa/parser/xfa_document_serialize.cpp b/xfa/fxfa/parser/xfa_document_serialize.cpp
index 448acbdd1d..2ae82e3c35 100644
--- a/xfa/fxfa/parser/xfa_document_serialize.cpp
+++ b/xfa/fxfa/parser/xfa_document_serialize.cpp
@@ -389,7 +389,7 @@ static void XFA_DataExporter_RegenerateFormFile_Container(
CFX_WideStringC wsElement;
pNode->GetClassName(wsElement);
pStream->WriteString(L"<", 1);
- pStream->WriteString(wsElement.GetPtr(), wsElement.GetLength());
+ pStream->WriteString(wsElement.raw_str(), wsElement.GetLength());
CFX_WideString wsOutput;
XFA_SaveAttribute(pNode, XFA_ATTRIBUTE_Name, FX_WSTRC(L"name"), TRUE,
wsOutput);
@@ -418,7 +418,7 @@ static void XFA_DataExporter_RegenerateFormFile_Container(
pChildNode = pChildNode->GetNodeItem(XFA_NODEITEM_NextSibling);
}
pStream->WriteString(L"</", 2);
- pStream->WriteString(wsElement.GetPtr(), wsElement.GetLength());
+ pStream->WriteString(wsElement.raw_str(), wsElement.GetLength());
pStream->WriteString(L"\n>", 2);
} else {
pStream->WriteString(L"\n/>", 3);
diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
index 0f22a27bd7..eb67b0f99d 100644
--- a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
+++ b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
@@ -1380,7 +1380,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
CFX_WideStringC wsColumnWidths;
if (pLayoutNode->TryCData(XFA_ATTRIBUTE_ColumnWidths, wsColumnWidths)) {
CFX_WideStringArray widths;
- if (FX_SeparateStringW(wsColumnWidths.GetPtr(), wsColumnWidths.GetLength(),
+ if (FX_SeparateStringW(wsColumnWidths.raw_str(), wsColumnWidths.GetLength(),
L' ', widths) > 0) {
int32_t iCols = widths.GetSize();
CFX_WideString wsWidth;
diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp
index d245e33e29..4c3ecd2976 100644
--- a/xfa/fxfa/parser/xfa_object_imp.cpp
+++ b/xfa/fxfa/parser/xfa_object_imp.cpp
@@ -56,7 +56,7 @@ void CXFA_Object::Script_ObjectClass_ClassName(FXJSE_HVALUE hValue,
CFX_WideStringC className;
GetClassName(className);
FXJSE_Value_SetUTF8String(
- hValue, FX_UTF8Encode(className.GetPtr(), className.GetLength())
+ hValue, FX_UTF8Encode(className.raw_str(), className.GetLength())
.AsByteStringC());
} else {
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
@@ -1101,7 +1101,7 @@ void CXFA_Node::Script_NodeClass_SaveXML(CFXJSE_Arguments* pArguments) {
return;
}
pStream->SetCodePage(FX_CODEPAGE_UTF8);
- pStream->WriteData(bsXMLHeader.GetPtr(), bsXMLHeader.GetLength());
+ pStream->WriteData(bsXMLHeader.raw_str(), bsXMLHeader.GetLength());
XFA_DataExporter_RegenerateFormFile(this, pStream, NULL, TRUE);
FXJSE_Value_SetUTF8String(
pArguments->GetReturnValue(),
@@ -1127,7 +1127,7 @@ void CXFA_Node::Script_NodeClass_SaveXML(CFXJSE_Arguments* pArguments) {
FX_STREAMACCESS_Text | FX_STREAMACCESS_Write | FX_STREAMACCESS_Append);
if (pStream) {
pStream->SetCodePage(FX_CODEPAGE_UTF8);
- pStream->WriteData(bsXMLHeader.GetPtr(), bsXMLHeader.GetLength());
+ pStream->WriteData(bsXMLHeader.raw_str(), bsXMLHeader.GetLength());
pElement->SaveXMLNode(pStream);
FXJSE_Value_SetUTF8String(pArguments->GetReturnValue(),
CFX_ByteStringC(pMemoryStream->GetBuffer(),
@@ -1793,7 +1793,7 @@ static const XFA_ExecEventParaInfo gs_eventParaInfos[] = {
const XFA_ExecEventParaInfo* GetEventParaInfoByName(
const CFX_WideStringC& wsEventName) {
int32_t iLength = wsEventName.GetLength();
- uint32_t uHash = FX_HashCode_String_GetW(wsEventName.GetPtr(), iLength);
+ uint32_t uHash = FX_HashCode_String_GetW(wsEventName.raw_str(), iLength);
const XFA_ExecEventParaInfo* eventParaInfo = NULL;
int32_t iStart = 0,
iEnd = (sizeof(gs_eventParaInfos) / sizeof(gs_eventParaInfos[0])) - 1;
@@ -3754,7 +3754,7 @@ enum XFA_KEYTYPE {
XFA_KEYTYPE_Element,
};
void* XFA_GetMapKey_Custom(const CFX_WideStringC& wsKey) {
- uint32_t dwKey = FX_HashCode_String_GetW(wsKey.GetPtr(), wsKey.GetLength());
+ uint32_t dwKey = FX_HashCode_String_GetW(wsKey.raw_str(), wsKey.GetLength());
return (void*)(uintptr_t)((dwKey << 1) | XFA_KEYTYPE_Custom);
}
void* XFA_GetMapKey_Element(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute) {
@@ -3793,7 +3793,7 @@ FX_BOOL CXFA_Node::SetAttribute(XFA_ATTRIBUTE eAttr,
case XFA_ATTRIBUTETYPE_Integer:
return SetInteger(
pAttr->eName,
- FXSYS_round(FX_wcstof(wsValue.GetPtr(), wsValue.GetLength())),
+ FXSYS_round(FX_wcstof(wsValue.raw_str(), wsValue.GetLength())),
bNotify);
case XFA_ATTRIBUTETYPE_Measure:
return SetMeasure(pAttr->eName, CXFA_Measurement(wsValue), bNotify);
@@ -4735,7 +4735,7 @@ FX_BOOL CXFA_Node::RemoveChild(CXFA_Node* pNode, FX_BOOL bNotify) {
static_cast<CFDE_XMLElement*>(pNode->m_pXMLNode);
CFX_WideStringC wsAttributeName =
pNode->GetCData(XFA_ATTRIBUTE_QualifiedName);
- pXMLElement->RemoveAttribute(wsAttributeName.GetPtr());
+ pXMLElement->RemoveAttribute(wsAttributeName.raw_str());
}
CFX_WideString wsName;
pNode->GetAttribute(XFA_ATTRIBUTE_Name, wsName, FALSE);
@@ -4755,7 +4755,7 @@ FX_BOOL CXFA_Node::RemoveChild(CXFA_Node* pNode, FX_BOOL bNotify) {
}
CXFA_Node* CXFA_Node::GetFirstChildByName(const CFX_WideStringC& wsName) const {
return GetFirstChildByName(
- wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.GetPtr(),
+ wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.raw_str(),
wsName.GetLength()));
}
CXFA_Node* CXFA_Node::GetFirstChildByName(uint32_t dwNameHash) const {
@@ -4789,7 +4789,7 @@ CXFA_Node* CXFA_Node::GetNextSameNameSibling(
const CFX_WideStringC& wsNodeName) const {
return GetNextSameNameSibling(
wsNodeName.IsEmpty() ? 0
- : FX_HashCode_String_GetW(wsNodeName.GetPtr(),
+ : FX_HashCode_String_GetW(wsNodeName.raw_str(),
wsNodeName.GetLength()));
}
CXFA_Node* CXFA_Node::GetNextSameClassSibling(XFA_ELEMENT eElement) const {
@@ -4982,13 +4982,13 @@ void CXFA_Node::UpdateNameHash() {
if (!pNotsure || pNotsure->eType == XFA_ATTRIBUTETYPE_Cdata) {
CFX_WideStringC wsName = GetCData(XFA_ATTRIBUTE_Name);
m_dwNameHash =
- wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.GetPtr(),
+ wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.raw_str(),
wsName.GetLength());
} else if (pNotsure->eType == XFA_ATTRIBUTETYPE_Enum) {
CFX_WideStringC wsName =
XFA_GetAttributeEnumByID(GetEnum(XFA_ATTRIBUTE_Name))->pName;
m_dwNameHash =
- wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.GetPtr(),
+ wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.raw_str(),
wsName.GetLength());
}
}
@@ -5034,7 +5034,7 @@ FX_BOOL CXFA_Node::GetMapModuleValue(void* pKey, void*& pValue) {
return FALSE;
}
void CXFA_Node::SetMapModuleString(void* pKey, const CFX_WideStringC& wsValue) {
- SetMapModuleBuffer(pKey, (void*)wsValue.GetPtr(),
+ SetMapModuleBuffer(pKey, (void*)wsValue.raw_str(),
wsValue.GetLength() * sizeof(FX_WCHAR));
}
FX_BOOL CXFA_Node::GetMapModuleString(void* pKey, CFX_WideStringC& wsValue) {
@@ -5263,7 +5263,7 @@ CXFA_NodeList::CXFA_NodeList(CXFA_Document* pDocument)
CXFA_Node* CXFA_NodeList::NamedItem(const CFX_WideStringC& wsName) {
int32_t iCount = GetLength();
uint32_t dwHashCode =
- FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength());
+ FX_HashCode_String_GetW(wsName.raw_str(), wsName.GetLength());
for (int32_t i = 0; i < iCount; i++) {
CXFA_Node* ret = Item(i);
if (dwHashCode == ret->GetNameHash()) {
diff --git a/xfa/fxfa/parser/xfa_objectacc_imp.cpp b/xfa/fxfa/parser/xfa_objectacc_imp.cpp
index 8c438c5634..94657c6e50 100644
--- a/xfa/fxfa/parser/xfa_objectacc_imp.cpp
+++ b/xfa/fxfa/parser/xfa_objectacc_imp.cpp
@@ -24,7 +24,7 @@ static FX_ARGB XFA_WStringToColor(const CFX_WideStringC& wsValue) {
return 0xff000000;
}
int cc = 0;
- const FX_WCHAR* str = wsValue.GetPtr();
+ const FX_WCHAR* str = wsValue.raw_str();
int len = wsValue.GetLength();
while (XFA_IsSpace(str[cc]) && cc < len) {
cc++;
@@ -1238,7 +1238,7 @@ CXFA_Node* CXFA_WidgetData::SetSelectedMember(const CFX_WideStringC& wsName,
FX_BOOL bNotify) {
CXFA_Node* pSelectedMember = NULL;
uint32_t nameHash =
- FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength());
+ FX_HashCode_String_GetW(wsName.raw_str(), wsName.GetLength());
for (CXFA_Node* pNode = ToNode(m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild));
pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
if (pNode->GetNameHash() == nameHash) {
diff --git a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
index 74c6300e02..b7e3bb380c 100644
--- a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
@@ -414,7 +414,7 @@ static int32_t XFA_FilterName(const CFX_WideStringC& wsExpression,
}
FX_WCHAR* pBuf = wsFilter.GetBuffer(iLength - nStart);
int32_t nCount = 0;
- const FX_WCHAR* pSrc = wsExpression.GetPtr();
+ const FX_WCHAR* pSrc = wsExpression.raw_str();
FX_WCHAR wCur;
while (nStart < iLength) {
wCur = pSrc[nStart++];
diff --git a/xfa/fxfa/parser/xfa_script_imp.cpp b/xfa/fxfa/parser/xfa_script_imp.cpp
index ce3931149b..b85e9b783f 100644
--- a/xfa/fxfa/parser/xfa_script_imp.cpp
+++ b/xfa/fxfa/parser/xfa_script_imp.cpp
@@ -96,7 +96,7 @@ FX_BOOL CXFA_ScriptContext::RunScript(XFA_SCRIPTLANGTYPE eScriptType,
btScript =
FX_UTF8Encode(wsJavaScript.GetBuffer(), wsJavaScript.GetLength());
} else {
- btScript = FX_UTF8Encode(wsScript.GetPtr(), wsScript.GetLength());
+ btScript = FX_UTF8Encode(wsScript.raw_str(), wsScript.GetLength());
}
CXFA_Object* pOriginalObject = m_pThisObject;
m_pThisObject = pThisObject;
@@ -116,7 +116,7 @@ void CXFA_ScriptContext::GlobalPropertySetter(FXJSE_HOBJECT hObject,
(CXFA_ScriptContext*)pDoc->GetScriptContext();
CXFA_Object* lpCurNode = lpScriptContext->GetVariablesThis(lpOrginalNode);
CFX_WideString wsPropName = CFX_WideString::FromUTF8(
- (const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());
+ (const FX_CHAR*)szPropName.raw_str(), szPropName.GetLength());
uint32_t dwFlag = XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings |
XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties |
XFA_RESOLVENODE_Attributes;
@@ -175,7 +175,7 @@ void CXFA_ScriptContext::GlobalPropertyGetter(FXJSE_HOBJECT hObject,
(CXFA_ScriptContext*)pDoc->GetScriptContext();
CXFA_Object* lpCurNode = lpScriptContext->GetVariablesThis(pOrginalObject);
CFX_WideString wsPropName = CFX_WideString::FromUTF8(
- (const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());
+ (const FX_CHAR*)szPropName.raw_str(), szPropName.GetLength());
if (lpScriptContext->GetType() == XFA_SCRIPTLANGTYPE_Formcalc) {
if (szPropName == FOXIT_XFA_FM2JS_FORMCALC_RUNTIME) {
XFA_FM2JS_GlobalPropertyGetter(lpScriptContext->m_hFM2JSContext, hValue);
@@ -231,7 +231,7 @@ void CXFA_ScriptContext::NormalPropertyGetter(FXJSE_HOBJECT hObject,
return;
}
CFX_WideString wsPropName = CFX_WideString::FromUTF8(
- (const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());
+ (const FX_CHAR*)szPropName.raw_str(), szPropName.GetLength());
CXFA_ScriptContext* lpScriptContext =
(CXFA_ScriptContext*)pOrginalObject->GetDocument()->GetScriptContext();
CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOrginalObject);
@@ -280,7 +280,7 @@ void CXFA_ScriptContext::NormalPropertySetter(FXJSE_HOBJECT hObject,
(CXFA_ScriptContext*)pOrginalObject->GetDocument()->GetScriptContext();
CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOrginalObject);
CFX_WideString wsPropName = CFX_WideString::FromUTF8(
- (const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());
+ (const FX_CHAR*)szPropName.raw_str(), szPropName.GetLength());
const XFA_SCRIPTATTRIBUTEINFO* lpAttributeInfo =
XFA_GetScriptAttributeByName(pObject->GetClassID(), wsPropName);
if (lpAttributeInfo) {
@@ -332,7 +332,7 @@ int32_t CXFA_ScriptContext::NormalPropTypeGetter(
pObject = lpScriptContext->GetVariablesThis(pObject);
XFA_ELEMENT objElement = pObject->GetClassID();
CFX_WideString wsPropName = CFX_WideString::FromUTF8(
- (const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());
+ (const FX_CHAR*)szPropName.raw_str(), szPropName.GetLength());
if (XFA_GetMethodByName(objElement, wsPropName)) {
return FXJSE_ClassPropType_Method;
}
@@ -354,7 +354,7 @@ int32_t CXFA_ScriptContext::GlobalPropTypeGetter(
pObject = lpScriptContext->GetVariablesThis(pObject);
XFA_ELEMENT objElement = pObject->GetClassID();
CFX_WideString wsPropName = CFX_WideString::FromUTF8(
- (const FX_CHAR*)szPropName.GetPtr(), szPropName.GetLength());
+ (const FX_CHAR*)szPropName.raw_str(), szPropName.GetLength());
if (XFA_GetMethodByName(objElement, wsPropName)) {
return FXJSE_ClassPropType_Method;
}
@@ -371,7 +371,7 @@ void CXFA_ScriptContext::NormalMethodCall(FXJSE_HOBJECT hThis,
(CXFA_ScriptContext*)pObject->GetDocument()->GetScriptContext();
pObject = lpScriptContext->GetVariablesThis(pObject);
CFX_WideString wsFunName = CFX_WideString::FromUTF8(
- (const FX_CHAR*)szFuncName.GetPtr(), szFuncName.GetLength());
+ (const FX_CHAR*)szFuncName.raw_str(), szFuncName.GetLength());
const XFA_METHODINFO* lpMethodInfo =
XFA_GetMethodByName(pObject->GetClassID(), wsFunName);
if (NULL == lpMethodInfo) {
@@ -464,7 +464,7 @@ FX_BOOL CXFA_ScriptContext::RunVariablesScript(CXFA_Node* pScriptNode) {
return FALSE;
}
CFX_ByteString btScript =
- FX_UTF8Encode(wsScript.GetPtr(), wsScript.GetLength());
+ FX_UTF8Encode(wsScript.raw_str(), wsScript.GetLength());
FXJSE_HVALUE hRetValue = FXJSE_Value_Create(m_hJsRuntime);
CXFA_Node* pThisObject = pParent->GetNodeItem(XFA_NODEITEM_Parent);
FXJSE_HCONTEXT hVariablesContext =
diff --git a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
index 6311314d82..a71270a332 100644
--- a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
+++ b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
@@ -536,7 +536,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_GetFilter(
int32_t nConditionCount = 0;
CFX_Int32Array stack;
int32_t nType = -1;
- const FX_WCHAR* pSrc = wsExpression.GetPtr();
+ const FX_WCHAR* pSrc = wsExpression.raw_str();
FX_WCHAR wPrev = 0, wCur;
FX_BOOL bIsCondition = FALSE;
while (nStart < iLength) {
diff --git a/xfa/fxfa/parser/xfa_utils_imp.cpp b/xfa/fxfa/parser/xfa_utils_imp.cpp
index 6630d060d4..3d2e8bed4e 100644
--- a/xfa/fxfa/parser/xfa_utils_imp.cpp
+++ b/xfa/fxfa/parser/xfa_utils_imp.cpp
@@ -393,7 +393,7 @@ FX_DOUBLE XFA_WideStringToDouble(const CFX_WideString& wsStringVal) {
FX_DOUBLE XFA_ByteStringToDouble(const CFX_ByteStringC& szStringVal) {
CFX_WideString wsValue =
- CFX_WideString::FromUTF8(szStringVal.GetCStr(), szStringVal.GetLength());
+ CFX_WideString::FromUTF8(szStringVal.c_str(), szStringVal.GetLength());
return XFA_WideStringToDouble(wsValue);
}