summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/app/xfa_checksum.cpp2
-rw-r--r--xfa/fxfa/app/xfa_ffbarcode.cpp2
-rw-r--r--xfa/fxfa/app/xfa_ffdoc.cpp8
-rw-r--r--xfa/fxfa/app/xfa_fontmgr.cpp6
-rw-r--r--xfa/fxfa/app/xfa_textlayout.cpp10
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.cpp80
-rw-r--r--xfa/fxfa/fm2js/xfa_lexer.cpp6
-rw-r--r--xfa/fxfa/fm2js/xfa_simpleexpression.cpp2
-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
19 files changed, 97 insertions, 104 deletions
diff --git a/xfa/fxfa/app/xfa_checksum.cpp b/xfa/fxfa/app/xfa_checksum.cpp
index c76ec505e9..318541f05a 100644
--- a/xfa/fxfa/app/xfa_checksum.cpp
+++ b/xfa/fxfa/app/xfa_checksum.cpp
@@ -183,6 +183,6 @@ void CXFA_ChecksumContext::GetChecksum(CFX_ByteString& bsChecksum) {
}
void CXFA_ChecksumContext::Update(const CFX_ByteStringC& bsText) {
if (m_pByteContext) {
- CRYPT_SHA1Update(m_pByteContext, bsText.GetPtr(), bsText.GetLength());
+ CRYPT_SHA1Update(m_pByteContext, bsText.raw_str(), bsText.GetLength());
}
}
diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp
index b7178f0baa..e5ace150ab 100644
--- a/xfa/fxfa/app/xfa_ffbarcode.cpp
+++ b/xfa/fxfa/app/xfa_ffbarcode.cpp
@@ -98,7 +98,7 @@ XFA_LPCBARCODETYPEENUMINFO XFA_GetBarcodeTypeByName(
if (iLength == 0) {
return NULL;
}
- uint32_t uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength, TRUE);
+ uint32_t uHash = FX_HashCode_String_GetW(wsName.raw_str(), iLength, TRUE);
int32_t iStart = 0, iEnd = g_iXFABarcodeTypeCount - 1;
do {
int32_t iMid = (iStart + iEnd) / 2;
diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp
index ce27428b40..58cf1a269a 100644
--- a/xfa/fxfa/app/xfa_ffdoc.cpp
+++ b/xfa/fxfa/app/xfa_ffdoc.cpp
@@ -327,7 +327,7 @@ CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(const CFX_WideStringC& wsName,
return nullptr;
uint32_t dwHash =
- FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength(), FALSE);
+ FX_HashCode_String_GetW(wsName.raw_str(), wsName.GetLength(), FALSE);
FX_IMAGEDIB_AND_DPI* imageDIBDpi = nullptr;
if (m_mapNamedImages.Lookup((void*)(uintptr_t)dwHash, (void*&)imageDIBDpi)) {
iImageXDpi = imageDIBDpi->iImageXDpi;
@@ -348,7 +348,7 @@ CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(const CFX_WideStringC& wsName,
return nullptr;
CPDF_NameTree nametree(pXFAImages);
- CFX_ByteString bsName = PDF_EncodeText(wsName.GetPtr(), wsName.GetLength());
+ CFX_ByteString bsName = PDF_EncodeText(wsName.raw_str(), wsName.GetLength());
CPDF_Object* pObject = nametree.LookupValue(bsName);
if (!pObject) {
int32_t iCount = nametree.GetCount();
@@ -386,7 +386,7 @@ CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(const CFX_WideStringC& wsName,
CFDE_XMLElement* CXFA_FFDoc::GetPackageData(const CFX_WideStringC& wsPackage) {
uint32_t packetHash =
- FX_HashCode_String_GetW(wsPackage.GetPtr(), wsPackage.GetLength());
+ FX_HashCode_String_GetW(wsPackage.raw_str(), wsPackage.GetLength());
CXFA_Node* pNode = ToNode(m_pDocument->GetXFAObject(packetHash));
if (!pNode) {
return NULL;
@@ -401,7 +401,7 @@ FX_BOOL CXFA_FFDoc::SavePackage(const CFX_WideStringC& wsPackage,
CXFA_ChecksumContext* pCSContext) {
CXFA_DataExporter* pExport = new CXFA_DataExporter(m_pDocument);
uint32_t packetHash =
- FX_HashCode_String_GetW(wsPackage.GetPtr(), wsPackage.GetLength());
+ FX_HashCode_String_GetW(wsPackage.raw_str(), wsPackage.GetLength());
CXFA_Node* pNode = NULL;
if (packetHash == XFA_HASHCODE_Xfa) {
pNode = m_pDocument->GetRoot();
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp
index b9cfd6fb28..1b87f95353 100644
--- a/xfa/fxfa/app/xfa_fontmgr.cpp
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp
@@ -1699,7 +1699,7 @@ void XFA_LocalFontNameToEnglishName(const CFX_WideStringC& wsLocalName,
_FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \
_FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_
uint32_t dwLocalNameHash = FX_HashCode_String_GetW(
- wsLocalName.GetPtr(), wsLocalName.GetLength(), TRUE);
+ wsLocalName.raw_str(), wsLocalName.GetLength(), TRUE);
int32_t iStart = 0;
int32_t iEnd = sizeof(g_XFAFontsMap) / sizeof(XFA_FONTINFO) - 1;
int32_t iMid = 0;
@@ -1890,7 +1890,7 @@ IFX_Font* CXFA_PDFFontMgr::GetFont(const CFX_WideStringC& wsFontFamily,
CPDF_Font** pPDFFont,
FX_BOOL bStrictMatch) {
uint32_t dwHashCode =
- FX_HashCode_String_GetW(wsFontFamily.GetPtr(), wsFontFamily.GetLength());
+ FX_HashCode_String_GetW(wsFontFamily.raw_str(), wsFontFamily.GetLength());
CFX_ByteString strKey;
strKey.Format("%u%u", dwHashCode, dwFontStyles);
auto it = m_FontMap.find(strKey);
@@ -2016,7 +2016,7 @@ IFX_Font* CXFA_FontMgr::GetFont(CXFA_FFDoc* hDoc,
const CFX_WideStringC& wsFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage) {
- uint32_t dwHash = FX_HashCode_String_GetW(wsFontFamily.GetPtr(),
+ uint32_t dwHash = FX_HashCode_String_GetW(wsFontFamily.raw_str(),
wsFontFamily.GetLength(), FALSE);
CFX_ByteString bsKey;
bsKey.Format("%u%u%u", dwHash, dwFontStyles, wCodePage);
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index 07a353e287..4cbdfd4f8e 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -308,7 +308,7 @@ void CXFA_TextParser::ParseTagInfo(CFDE_XMLNode* pXMLNode,
tagProvider.m_bTagAviliable =
lookup.Lookup(dwHashCode, s_XFATagName, s_iCount) > -1;
CFX_WideString wsValue;
- pXMLElement->GetString(FX_WSTRC(L"style").GetPtr(), wsValue);
+ pXMLElement->GetString(FX_WSTRC(L"style").raw_str(), wsValue);
if (!wsValue.IsEmpty()) {
tagProvider.SetAttribute(FX_WSTRC(L"style"), wsValue);
}
@@ -527,7 +527,7 @@ FX_BOOL CXFA_TextParser::GetEmbbedObj(CXFA_TextProvider* pTextProvider,
if (pXMLNode->GetType() == FDE_XMLNODE_Element) {
CFDE_XMLElement* pElement = static_cast<CFDE_XMLElement*>(pXMLNode);
CFX_WideString wsAttr;
- pElement->GetString(FX_WSTRC(L"xfa:embed").GetPtr(), wsAttr);
+ pElement->GetString(FX_WSTRC(L"xfa:embed").raw_str(), wsAttr);
if (wsAttr.IsEmpty()) {
return FALSE;
}
@@ -535,7 +535,7 @@ FX_BOOL CXFA_TextParser::GetEmbbedObj(CXFA_TextProvider* pTextProvider,
wsAttr.Delete(0);
}
CFX_WideString ws;
- pElement->GetString(FX_WSTRC(L"xfa:embedType").GetPtr(), ws);
+ pElement->GetString(FX_WSTRC(L"xfa:embedType").raw_str(), ws);
if (ws.IsEmpty()) {
ws = L"som";
} else {
@@ -546,7 +546,7 @@ FX_BOOL CXFA_TextParser::GetEmbbedObj(CXFA_TextProvider* pTextProvider,
return FALSE;
}
ws.Empty();
- pElement->GetString(FX_WSTRC(L"xfa:embedMode").GetPtr(), ws);
+ pElement->GetString(FX_WSTRC(L"xfa:embedMode").raw_str(), ws);
if (ws.IsEmpty()) {
ws = L"formatted";
} else {
@@ -1425,7 +1425,7 @@ FX_BOOL CXFA_TextLayout::LoadRichText(CFDE_XMLNode* pXMLNode,
if (wsName == FX_WSTRC(L"a")) {
CFX_WideString wsLinkContent;
FXSYS_assert(pElement);
- pElement->GetString(FX_WSTRC(L"href").GetPtr(), wsLinkContent);
+ pElement->GetString(FX_WSTRC(L"href").raw_str(), wsLinkContent);
if (!wsLinkContent.IsEmpty()) {
pLinkData = FXTARGET_NewWith(m_pAllocator) CXFA_LinkUserData(
m_pAllocator,
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index 97eadbd3d5..c016e2033a 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -2039,7 +2039,7 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoDate(FXJSE_HOBJECT hThis,
pLocale = widgetData.GetLocal();
} else {
pLocale = pMgr->GetLocaleByName(
- CFX_WideString::FromUTF8(szLocale.GetCStr(), szLocale.GetLength()));
+ CFX_WideString::FromUTF8(szLocale.c_str(), szLocale.GetLength()));
}
if (!pLocale) {
return FALSE;
@@ -2048,13 +2048,11 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoDate(FXJSE_HOBJECT hThis,
if (szFormat.IsEmpty()) {
pLocale->GetDatePattern(FX_LOCALEDATETIMESUBCATEGORY_Default, wsFormat);
} else {
- wsFormat =
- CFX_WideString::FromUTF8(szFormat.GetCStr(), szFormat.GetLength());
+ wsFormat = CFX_WideString::FromUTF8(szFormat.c_str(), szFormat.GetLength());
}
CXFA_LocaleValue widgetValue(
- XFA_VT_DATE,
- CFX_WideString::FromUTF8(szDate.GetCStr(), szDate.GetLength()), wsFormat,
- pLocale, (CXFA_LocaleMgr*)pMgr);
+ XFA_VT_DATE, CFX_WideString::FromUTF8(szDate.c_str(), szDate.GetLength()),
+ wsFormat, pLocale, (CXFA_LocaleMgr*)pMgr);
CFX_Unitime dt = widgetValue.GetDate();
strIsoDate.Format("%4d-%02d-%02d", dt.GetYear(), dt.GetMonth(), dt.GetDay());
return TRUE;
@@ -2079,7 +2077,7 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoTime(FXJSE_HOBJECT hThis,
pLocale = widgetData.GetLocal();
} else {
pLocale = pMgr->GetLocaleByName(
- CFX_WideString::FromUTF8(szLocale.GetCStr(), szLocale.GetLength()));
+ CFX_WideString::FromUTF8(szLocale.c_str(), szLocale.GetLength()));
}
if (!pLocale) {
return FALSE;
@@ -2088,15 +2086,13 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoTime(FXJSE_HOBJECT hThis,
if (szFormat.IsEmpty()) {
pLocale->GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY_Default, wsFormat);
} else {
- wsFormat =
- CFX_WideString::FromUTF8(szFormat.GetCStr(), szFormat.GetLength());
+ wsFormat = CFX_WideString::FromUTF8(szFormat.c_str(), szFormat.GetLength());
}
wsFormat = FX_WSTRC(L"time{") + wsFormat;
wsFormat += FX_WSTRC(L"}");
CXFA_LocaleValue widgetValue(
- XFA_VT_TIME,
- CFX_WideString::FromUTF8(szTime.GetCStr(), szTime.GetLength()), wsFormat,
- pLocale, (CXFA_LocaleMgr*)pMgr);
+ XFA_VT_TIME, CFX_WideString::FromUTF8(szTime.c_str(), szTime.GetLength()),
+ wsFormat, pLocale, (CXFA_LocaleMgr*)pMgr);
CFX_Unitime utime = widgetValue.GetTime();
strIsoTime.Format("%02d:%02d:%02d.%03d", utime.GetHour(), utime.GetMinute(),
utime.GetSecond(), utime.GetMillisecond());
@@ -2122,7 +2118,7 @@ FX_BOOL CXFA_FM2JSContext::IsoDate2Local(FXJSE_HOBJECT hThis,
pLocale = widgetData.GetLocal();
} else {
pLocale = pMgr->GetLocaleByName(
- CFX_WideString::FromUTF8(szLocale.GetCStr(), szLocale.GetLength()));
+ CFX_WideString::FromUTF8(szLocale.c_str(), szLocale.GetLength()));
}
if (!pLocale) {
return FALSE;
@@ -2131,12 +2127,10 @@ FX_BOOL CXFA_FM2JSContext::IsoDate2Local(FXJSE_HOBJECT hThis,
if (szFormat.IsEmpty()) {
pLocale->GetDatePattern(FX_LOCALEDATETIMESUBCATEGORY_Default, wsFormat);
} else {
- wsFormat =
- CFX_WideString::FromUTF8(szFormat.GetCStr(), szFormat.GetLength());
+ wsFormat = CFX_WideString::FromUTF8(szFormat.c_str(), szFormat.GetLength());
}
CXFA_LocaleValue widgetValue(
- XFA_VT_DATE,
- CFX_WideString::FromUTF8(szDate.GetCStr(), szDate.GetLength()),
+ XFA_VT_DATE, CFX_WideString::FromUTF8(szDate.c_str(), szDate.GetLength()),
(CXFA_LocaleMgr*)pMgr);
CFX_WideString wsRet;
widgetValue.FormatPatterns(wsRet, wsFormat, pLocale,
@@ -2164,7 +2158,7 @@ FX_BOOL CXFA_FM2JSContext::IsoTime2Local(FXJSE_HOBJECT hThis,
pLocale = widgetData.GetLocal();
} else {
pLocale = pMgr->GetLocaleByName(
- CFX_WideString::FromUTF8(szLocale.GetCStr(), szLocale.GetLength()));
+ CFX_WideString::FromUTF8(szLocale.c_str(), szLocale.GetLength()));
}
if (!pLocale) {
return FALSE;
@@ -2173,14 +2167,12 @@ FX_BOOL CXFA_FM2JSContext::IsoTime2Local(FXJSE_HOBJECT hThis,
if (szFormat.IsEmpty()) {
pLocale->GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY_Default, wsFormat);
} else {
- wsFormat =
- CFX_WideString::FromUTF8(szFormat.GetCStr(), szFormat.GetLength());
+ wsFormat = CFX_WideString::FromUTF8(szFormat.c_str(), szFormat.GetLength());
}
wsFormat = FX_WSTRC(L"time{") + wsFormat;
wsFormat += FX_WSTRC(L"}");
CXFA_LocaleValue widgetValue(
- XFA_VT_TIME,
- CFX_WideString::FromUTF8(szTime.GetCStr(), szTime.GetLength()),
+ XFA_VT_TIME, CFX_WideString::FromUTF8(szTime.c_str(), szTime.GetLength()),
(CXFA_LocaleMgr*)pMgr);
CFX_WideString wsRet;
widgetValue.FormatPatterns(wsRet, wsFormat, pLocale,
@@ -2208,7 +2200,7 @@ FX_BOOL CXFA_FM2JSContext::GetGMTTime(FXJSE_HOBJECT hThis,
pLocale = widgetData.GetLocal();
} else {
pLocale = pMgr->GetLocaleByName(
- CFX_WideString::FromUTF8(szLocale.GetCStr(), szLocale.GetLength()));
+ CFX_WideString::FromUTF8(szLocale.c_str(), szLocale.GetLength()));
}
if (!pLocale) {
return FALSE;
@@ -2217,14 +2209,12 @@ FX_BOOL CXFA_FM2JSContext::GetGMTTime(FXJSE_HOBJECT hThis,
if (szFormat.IsEmpty()) {
pLocale->GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY_Default, wsFormat);
} else {
- wsFormat =
- CFX_WideString::FromUTF8(szFormat.GetCStr(), szFormat.GetLength());
+ wsFormat = CFX_WideString::FromUTF8(szFormat.c_str(), szFormat.GetLength());
}
wsFormat = FX_WSTRC(L"time{") + wsFormat;
wsFormat += FX_WSTRC(L"}");
CXFA_LocaleValue widgetValue(
- XFA_VT_TIME,
- CFX_WideString::FromUTF8(szTime.GetCStr(), szTime.GetLength()),
+ XFA_VT_TIME, CFX_WideString::FromUTF8(szTime.c_str(), szTime.GetLength()),
(CXFA_LocaleMgr*)pMgr);
CFX_WideString wsRet;
widgetValue.FormatPatterns(wsRet, wsFormat, pLocale,
@@ -2247,10 +2237,10 @@ int32_t CXFA_FM2JSContext::DateString2Num(const CFX_ByteStringC& szDateString) {
int32_t iZoneHour = 0;
int32_t iZoneMinute = 0;
if (iLength <= 10) {
- iRet = IsIsoDateFormat(szDateString.GetCStr(), iLength, iStyle, iYear,
- iMonth, iDay);
+ iRet = IsIsoDateFormat(szDateString.c_str(), iLength, iStyle, iYear, iMonth,
+ iDay);
} else {
- iRet = IsIsoDateTimeFormat(szDateString.GetCStr(), iLength, iYear, iMonth,
+ iRet = IsIsoDateTimeFormat(szDateString.c_str(), iLength, iYear, iMonth,
iDay, iHour, iMinute, iSecond, iMillionSecond,
iZoneHour, iZoneMinute);
}
@@ -2393,7 +2383,7 @@ void CXFA_FM2JSContext::GetLocalDateFormat(FXJSE_HOBJECT hThis,
pLocale = widgetData.GetLocal();
} else {
pLocale = pMgr->GetLocaleByName(
- CFX_WideString::FromUTF8(szLocalStr.GetCStr(), szLocalStr.GetLength()));
+ CFX_WideString::FromUTF8(szLocalStr.c_str(), szLocalStr.GetLength()));
}
if (!pLocale) {
return;
@@ -2448,7 +2438,7 @@ void CXFA_FM2JSContext::GetLocalTimeFormat(FXJSE_HOBJECT hThis,
pLocale = widgetData.GetLocal();
} else {
pLocale = pMgr->GetLocaleByName(
- CFX_WideString::FromUTF8(szLocalStr.GetCStr(), szLocalStr.GetLength()));
+ CFX_WideString::FromUTF8(szLocalStr.c_str(), szLocalStr.GetLength()));
}
if (!pLocale) {
return;
@@ -3751,7 +3741,7 @@ void CXFA_FM2JSContext::Decode(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::DecodeURL(const CFX_ByteStringC& szURLString,
CFX_ByteTextBuf& szResultString) {
CFX_WideString wsURLString =
- CFX_WideString::FromUTF8(szURLString.GetCStr(), szURLString.GetLength());
+ CFX_WideString::FromUTF8(szURLString.c_str(), szURLString.GetLength());
const FX_WCHAR* pData = wsURLString;
int32_t iLen = wsURLString.GetLength();
int32_t i = 0;
@@ -3806,8 +3796,8 @@ void CXFA_FM2JSContext::DecodeURL(const CFX_ByteStringC& szURLString,
}
void CXFA_FM2JSContext::DecodeHTML(const CFX_ByteStringC& szHTMLString,
CFX_ByteTextBuf& szResultString) {
- CFX_WideString wsHTMLString = CFX_WideString::FromUTF8(
- szHTMLString.GetCStr(), szHTMLString.GetLength());
+ CFX_WideString wsHTMLString =
+ CFX_WideString::FromUTF8(szHTMLString.c_str(), szHTMLString.GetLength());
FX_WCHAR strString[9];
int32_t iStrIndex = 0;
int32_t iLen = wsHTMLString.GetLength();
@@ -3882,7 +3872,7 @@ void CXFA_FM2JSContext::DecodeHTML(const CFX_ByteStringC& szHTMLString,
void CXFA_FM2JSContext::DecodeXML(const CFX_ByteStringC& szXMLString,
CFX_ByteTextBuf& szResultString) {
CFX_WideString wsXMLString =
- CFX_WideString::FromUTF8(szXMLString.GetCStr(), szXMLString.GetLength());
+ CFX_WideString::FromUTF8(szXMLString.c_str(), szXMLString.GetLength());
FX_WCHAR strString[9];
int32_t iStrIndex = 0;
int32_t iLen = wsXMLString.GetLength();
@@ -4027,7 +4017,7 @@ void CXFA_FM2JSContext::Encode(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::EncodeURL(const CFX_ByteStringC& szURLString,
CFX_ByteTextBuf& szResultBuf) {
CFX_WideString wsURLString =
- CFX_WideString::FromUTF8(szURLString.GetCStr(), szURLString.GetLength());
+ CFX_WideString::FromUTF8(szURLString.c_str(), szURLString.GetLength());
CFX_WideTextBuf wsResultBuf;
FX_WCHAR ch = 0;
int32_t iLength = wsURLString.GetLength();
@@ -4134,7 +4124,7 @@ void CXFA_FM2JSContext::EncodeURL(const CFX_ByteStringC& szURLString,
}
void CXFA_FM2JSContext::EncodeHTML(const CFX_ByteStringC& szHTMLString,
CFX_ByteTextBuf& szResultBuf) {
- CFX_ByteString str = szHTMLString.GetCStr();
+ CFX_ByteString str = szHTMLString.c_str();
CFX_WideString wsHTMLString = CFX_WideString::FromUTF8(str, str.GetLength());
const FX_WCHAR* strCode = L"0123456789abcdef";
FX_WCHAR strEncode[9];
@@ -4189,7 +4179,7 @@ void CXFA_FM2JSContext::EncodeHTML(const CFX_ByteStringC& szHTMLString,
void CXFA_FM2JSContext::EncodeXML(const CFX_ByteStringC& szXMLString,
CFX_ByteTextBuf& szResultBuf) {
CFX_WideString wsXMLString =
- CFX_WideString::FromUTF8(szXMLString.GetCStr(), szXMLString.GetLength());
+ CFX_WideString::FromUTF8(szXMLString.c_str(), szXMLString.GetLength());
CFX_WideTextBuf wsResultBuf;
enum {
QUOT,
@@ -4271,7 +4261,7 @@ void CXFA_FM2JSContext::EncodeXML(const CFX_ByteStringC& szXMLString,
FX_BOOL CXFA_FM2JSContext::HTMLSTR2Code(const CFX_WideStringC& pData,
uint32_t& iCode) {
int32_t iLength = pData.GetLength();
- uint32_t uHash = FX_HashCode_String_GetW(pData.GetPtr(), iLength);
+ uint32_t uHash = FX_HashCode_String_GetW(pData.raw_str(), iLength);
XFA_FMHtmlHashedReserveCode htmlhashedreservecode;
int32_t iStart = 0,
iEnd = (sizeof(reservesForDecode) / sizeof(reservesForDecode[0])) - 1;
@@ -4313,7 +4303,7 @@ FX_BOOL CXFA_FM2JSContext::HTMLCode2STR(uint32_t iCode,
static FX_BOOL XFA_PATTERN_STRING_Type(const CFX_ByteStringC& szPattern,
uint32_t& patternType) {
CFX_WideString wsPattern =
- CFX_WideString::FromUTF8(szPattern.GetCStr(), szPattern.GetLength());
+ CFX_WideString::FromUTF8(szPattern.c_str(), szPattern.GetLength());
if (FX_WSTRC(L"datetime") == wsPattern.Left(8)) {
patternType = XFA_VT_DATETIME;
return TRUE;
@@ -5290,7 +5280,7 @@ void CXFA_FM2JSContext::TrillionUS(const CFX_ByteStringC& szData,
CFX_ByteStringC pComm[] = {" Hundred ", " Thousand ", " Million ",
" Billion ", "Trillion"};
int32_t iComm = 0;
- const FX_CHAR* pData = szData.GetCStr();
+ const FX_CHAR* pData = szData.c_str();
int32_t iLength = szData.GetLength();
if (iLength > 12) {
iComm = 4;
@@ -5376,7 +5366,7 @@ void CXFA_FM2JSContext::TrillionUS(const CFX_ByteStringC& szData,
void CXFA_FM2JSContext::WordUS(const CFX_ByteStringC& szData,
int32_t iStyle,
CFX_ByteTextBuf& strBuf) {
- const FX_CHAR* pData = szData.GetCStr();
+ const FX_CHAR* pData = szData.c_str();
int32_t iLength = szData.GetLength();
switch (iStyle) {
case 0: {
@@ -6888,7 +6878,7 @@ FX_BOOL CXFA_FM2JSContext::GetObjectByName(
XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent;
int32_t iRet = pScriptContext->ResolveObjects(
pScriptContext->GetThisObject(),
- CFX_WideString::FromUTF8(szAccessorName.GetCStr(),
+ CFX_WideString::FromUTF8(szAccessorName.c_str(),
szAccessorName.GetLength()),
resoveNodeRS, dwFlags);
if (iRet >= 1 && resoveNodeRS.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) {
@@ -6905,7 +6895,7 @@ int32_t CXFA_FM2JSContext::ResolveObjects(FXJSE_HOBJECT hThis,
FX_BOOL bdotAccessor,
FX_BOOL bHasNoResolveName) {
CFX_WideString wsSomExpression =
- CFX_WideString::FromUTF8(bsSomExp.GetCStr(), bsSomExp.GetLength());
+ CFX_WideString::FromUTF8(bsSomExp.c_str(), bsSomExp.GetLength());
int32_t iRet = -1;
CXFA_FM2JSContext* pContext =
(CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
diff --git a/xfa/fxfa/fm2js/xfa_lexer.cpp b/xfa/fxfa/fm2js/xfa_lexer.cpp
index 20b1320f70..b4c16eb8e4 100644
--- a/xfa/fxfa/fm2js/xfa_lexer.cpp
+++ b/xfa/fxfa/fm2js/xfa_lexer.cpp
@@ -165,7 +165,9 @@ CXFA_FMToken::CXFA_FMToken(uint32_t uLineNum)
CXFA_FMLexer::CXFA_FMLexer(const CFX_WideStringC& wsFormCalc,
CXFA_FMErrorInfo* pErrorInfo)
- : m_ptr(wsFormCalc.GetPtr()), m_uCurrentLine(1), m_pErrorInfo(pErrorInfo) {}
+ : m_ptr(wsFormCalc.raw_str()),
+ m_uCurrentLine(1),
+ m_pErrorInfo(pErrorInfo) {}
CXFA_FMToken* CXFA_FMLexer::NextToken() {
m_pToken.reset(Scan());
@@ -517,7 +519,7 @@ void CXFA_FMLexer::Comment(const FX_WCHAR* p, const FX_WCHAR*& pEnd) {
XFA_FM_TOKEN CXFA_FMLexer::IsKeyword(const CFX_WideStringC& str) {
int32_t iLength = str.GetLength();
- uint32_t uHash = FX_HashCode_String_GetW(str.GetPtr(), iLength, TRUE);
+ uint32_t uHash = FX_HashCode_String_GetW(str.raw_str(), iLength, TRUE);
int32_t iStart = KEYWORD_START, iEnd = KEYWORD_END;
int32_t iMid = (iStart + iEnd) / 2;
XFA_FMKeyword keyword;
diff --git a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp
index 8ac80d7c08..d5936bc6c1 100644
--- a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp
+++ b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp
@@ -502,7 +502,7 @@ bool CXFA_FMCallExpression::IsBuildInFunc(CFX_WideTextBuf* funcName) {
uint32_t CXFA_FMCallExpression::IsMethodWithObjParam(
const CFX_WideStringC& methodName) {
int32_t iLength = methodName.GetLength();
- uint32_t uHash = FX_HashCode_String_GetW(methodName.GetPtr(), iLength);
+ uint32_t uHash = FX_HashCode_String_GetW(methodName.raw_str(), iLength);
XFA_FMSOMMethod somMethodWithObjPara;
uint32_t parameters = 0x00;
int32_t iStart = 0,
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);
}