From 179bebb9a14dfd3ba91e9e068d4d436657a7c780 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Tue, 5 Apr 2016 11:02:18 -0700 Subject: 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 --- xfa/fde/css/fde_csscache.cpp | 9 +-- xfa/fde/css/fde_cssstyleselector.cpp | 6 +- xfa/fee/fde_txtedtengine.cpp | 12 ++-- xfa/fgas/crt/fgas_stream.cpp | 2 +- xfa/fgas/localization/fgas_locale.cpp | 8 +-- xfa/fwl/theme/cfwl_widgettp.cpp | 2 +- xfa/fxfa/app/xfa_checksum.cpp | 2 +- xfa/fxfa/app/xfa_ffbarcode.cpp | 2 +- xfa/fxfa/app/xfa_ffdoc.cpp | 8 +-- xfa/fxfa/app/xfa_fontmgr.cpp | 6 +- xfa/fxfa/app/xfa_textlayout.cpp | 10 ++-- xfa/fxfa/fm2js/xfa_fm2jscontext.cpp | 80 +++++++++++-------------- xfa/fxfa/fm2js/xfa_lexer.cpp | 6 +- xfa/fxfa/fm2js/xfa_simpleexpression.cpp | 2 +- xfa/fxfa/parser/xfa_basic_imp.cpp | 15 ++--- xfa/fxfa/parser/xfa_document_datamerger_imp.cpp | 4 +- xfa/fxfa/parser/xfa_document_imp.cpp | 6 +- xfa/fxfa/parser/xfa_document_serialize.cpp | 4 +- xfa/fxfa/parser/xfa_layout_itemlayout.cpp | 2 +- xfa/fxfa/parser/xfa_object_imp.cpp | 26 ++++---- xfa/fxfa/parser/xfa_objectacc_imp.cpp | 4 +- xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp | 2 +- xfa/fxfa/parser/xfa_script_imp.cpp | 18 +++--- xfa/fxfa/parser/xfa_script_resolveprocessor.cpp | 2 +- xfa/fxfa/parser/xfa_utils_imp.cpp | 2 +- xfa/fxjse/dynprop.cpp | 2 +- xfa/fxjse/value.cpp | 14 ++--- xfa/fxjse/value.h | 2 +- 28 files changed, 127 insertions(+), 131 deletions(-) (limited to 'xfa') diff --git a/xfa/fde/css/fde_csscache.cpp b/xfa/fde/css/fde_csscache.cpp index 49934aee6d..d8fc1a1b19 100644 --- a/xfa/fde/css/fde_csscache.cpp +++ b/xfa/fde/css/fde_csscache.cpp @@ -108,21 +108,22 @@ FDE_CSSTagCache::FDE_CSSTagCache(FDE_CSSTagCache* parent, FXSYS_assert(pTag != NULL); CFX_WideStringC wsValue, wsName = pTag->GetTagName(); dwTagHash = - FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength(), TRUE); + FX_HashCode_String_GetW(wsName.raw_str(), wsName.GetLength(), TRUE); FX_POSITION pos = pTag->GetFirstAttribute(); while (pos != NULL) { pTag->GetNextAttribute(pos, wsName, wsValue); uint32_t dwNameHash = - FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength(), TRUE); + FX_HashCode_String_GetW(wsName.raw_str(), wsName.GetLength(), TRUE); static const uint32_t s_dwIDHash = FX_HashCode_String_GetW(L"id", 2, TRUE); static const uint32_t s_dwClassHash = FX_HashCode_String_GetW(L"class", 5, TRUE); if (dwNameHash == s_dwClassHash) { uint32_t dwHash = - FX_HashCode_String_GetW(wsValue.GetPtr(), wsValue.GetLength()); + FX_HashCode_String_GetW(wsValue.raw_str(), wsValue.GetLength()); dwClassHashs.Add(dwHash); } else if (dwNameHash == s_dwIDHash) { - dwIDHash = FX_HashCode_String_GetW(wsValue.GetPtr(), wsValue.GetLength()); + dwIDHash = + FX_HashCode_String_GetW(wsValue.raw_str(), wsValue.GetLength()); } } } diff --git a/xfa/fde/css/fde_cssstyleselector.cpp b/xfa/fde/css/fde_cssstyleselector.cpp index 39d0df04c7..1a27a7e5c9 100644 --- a/xfa/fde/css/fde_cssstyleselector.cpp +++ b/xfa/fde/css/fde_cssstyleselector.cpp @@ -437,7 +437,7 @@ void CFDE_CSSStyleSelector::ComputeStyle( do { pTag->GetNextAttribute(pos, wsAttri, wsValue); dwAttriHash = - FX_HashCode_String_GetW(wsAttri.GetPtr(), wsAttri.GetLength(), TRUE); + FX_HashCode_String_GetW(wsAttri.raw_str(), wsAttri.GetLength(), TRUE); static const uint32_t s_dwStyleHash = FX_HashCode_String_GetW(L"style", 5, TRUE); static const uint32_t s_dwAlignHash = @@ -446,7 +446,7 @@ void CFDE_CSSStyleSelector::ComputeStyle( if (pDecl == NULL) { pDecl = FXTARGET_NewWith(m_pInlineStyleStore) CFDE_CSSDeclaration; } - AppendInlineStyle(pDecl, wsValue.GetPtr(), wsValue.GetLength()); + AppendInlineStyle(pDecl, wsValue.raw_str(), wsValue.GetLength()); } else if (dwAttriHash == s_dwAlignHash) { if (pDecl == NULL) { pDecl = FXTARGET_NewWith(m_pInlineStyleStore) CFDE_CSSDeclaration; @@ -455,7 +455,7 @@ void CFDE_CSSStyleSelector::ComputeStyle( args.pStringCache = NULL; args.pStaticStore = m_pInlineStyleStore; args.pProperty = FDE_GetCSSPropertyByEnum(FDE_CSSPROPERTY_TextAlign); - pDecl->AddProperty(&args, wsValue.GetPtr(), wsValue.GetLength()); + pDecl->AddProperty(&args, wsValue.raw_str(), wsValue.GetLength()); } } while (pos != NULL); if (pDecl != NULL) { diff --git a/xfa/fee/fde_txtedtengine.cpp b/xfa/fee/fde_txtedtengine.cpp index 19b5b24311..5cdb55cfaf 100644 --- a/xfa/fee/fde_txtedtengine.cpp +++ b/xfa/fee/fde_txtedtengine.cpp @@ -1624,7 +1624,7 @@ void CFDE_TxtEdtEngine::DeleteSelect() { } IFDE_TxtEdtDoRecord* IFDE_TxtEdtDoRecord::Create( const CFX_ByteStringC& bsDoRecord) { - const FX_CHAR* lpBuf = bsDoRecord.GetCStr(); + const FX_CHAR* lpBuf = bsDoRecord.c_str(); int32_t nType = *((int32_t*)lpBuf); switch (nType) { case FDE_TXTEDT_DORECORD_INS: @@ -1690,8 +1690,9 @@ void CFDE_TxtEdtDoRecord_Insert::Serialize(CFX_ByteString& bsDoRecord) const { } void CFDE_TxtEdtDoRecord_Insert::Deserialize( const CFX_ByteStringC& bsDoRecord) { - CFX_ArchiveLoader ArchiveLoader((const uint8_t*)bsDoRecord.GetCStr(), - bsDoRecord.GetLength()); + CFX_ArchiveLoader ArchiveLoader( + reinterpret_cast(bsDoRecord.c_str()), + bsDoRecord.GetLength()); int32_t nType = 0; ArchiveLoader >> nType; FXSYS_assert(nType == FDE_TXTEDT_DORECORD_INS); @@ -1766,8 +1767,9 @@ void CFDE_TxtEdtDoRecord_DeleteRange::Serialize( } void CFDE_TxtEdtDoRecord_DeleteRange::Deserialize( const CFX_ByteStringC& bsDoRecord) { - CFX_ArchiveLoader ArchiveLoader((const uint8_t*)bsDoRecord.GetCStr(), - bsDoRecord.GetLength()); + CFX_ArchiveLoader ArchiveLoader( + reinterpret_cast(bsDoRecord.c_str()), + bsDoRecord.GetLength()); int32_t nType = 0; ArchiveLoader >> nType; FXSYS_assert(nType == FDE_TXTEDT_DORECORD_DEL); diff --git a/xfa/fgas/crt/fgas_stream.cpp b/xfa/fgas/crt/fgas_stream.cpp index 94468e23da..02fa2109d1 100644 --- a/xfa/fgas/crt/fgas_stream.cpp +++ b/xfa/fgas/crt/fgas_stream.cpp @@ -1112,7 +1112,7 @@ int32_t CFX_TextStream::WriteString(const FX_WCHAR* pStr, int32_t iLength) { encoder.Input(*pStr++); } CFX_ByteStringC bsResult = encoder.GetResult(); - m_pStreamImp->WriteData((const uint8_t*)bsResult.GetCStr(), + m_pStreamImp->WriteData((const uint8_t*)bsResult.c_str(), bsResult.GetLength()); } return iLength; diff --git a/xfa/fgas/localization/fgas_locale.cpp b/xfa/fgas/localization/fgas_locale.cpp index 8cf80ce4f1..d6243effee 100644 --- a/xfa/fgas/localization/fgas_locale.cpp +++ b/xfa/fgas/localization/fgas_locale.cpp @@ -68,8 +68,8 @@ static FX_STRSIZE FX_Local_Find(const CFX_WideStringC& wsSymbols, return -1; } const FX_WCHAR* lpsz = - (const FX_WCHAR*)FXSYS_wcschr(wsSymbols.GetPtr() + nStart, ch); - return (lpsz == NULL) ? -1 : (FX_STRSIZE)(lpsz - wsSymbols.GetPtr()); + (const FX_WCHAR*)FXSYS_wcschr(wsSymbols.raw_str() + nStart, ch); + return (lpsz == NULL) ? -1 : (FX_STRSIZE)(lpsz - wsSymbols.raw_str()); } static const FX_WCHAR* const gs_LocalNumberSymbols[] = { L"decimal", L"grouping", L"percent", L"minus", @@ -3855,7 +3855,7 @@ FX_BOOL FX_TimeFromCanonical(const CFX_WideStringC& wsTime, uint8_t second = 0; uint16_t millisecond = 0; int cc_start = 0, cc = cc_start; - const FX_WCHAR* str = (const FX_WCHAR*)wsTime.GetPtr(); + const FX_WCHAR* str = (const FX_WCHAR*)wsTime.raw_str(); int len = wsTime.GetLength(); while (cc < len && cc < 2) { if (!FX_IsDigit(str[cc])) { @@ -4699,7 +4699,7 @@ CFX_Decimal::CFX_Decimal(FX_FLOAT val, uint8_t scale) { m_uFlags = FXMATH_DECIMAL_MAKEFLAGS(val < 0 && IsNotZero(), scale); } CFX_Decimal::CFX_Decimal(const CFX_WideStringC& strObj) { - const FX_WCHAR* str = strObj.GetPtr(); + const FX_WCHAR* str = strObj.raw_str(); const FX_WCHAR* strBound = str + strObj.GetLength(); FX_BOOL pointmet = 0; FX_BOOL negmet = 0; diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp index 7aaaf40454..eec5337052 100644 --- a/xfa/fwl/theme/cfwl_widgettp.cpp +++ b/xfa/fwl/theme/cfwl_widgettp.cpp @@ -736,7 +736,7 @@ FX_BOOL CFWL_FontData::LoadFont(const CFX_WideStringC& wsFontFamily, m_pFontMgr = IFX_FontMgr::Create(m_pFontSource); #endif } - m_pFont = IFX_Font::LoadFont(wsFontFamily.GetPtr(), dwFontStyles, dwCodePage, + m_pFont = IFX_Font::LoadFont(wsFontFamily.raw_str(), dwFontStyles, dwCodePage, m_pFontMgr); return m_pFont != NULL; } 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(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"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(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); } diff --git a/xfa/fxjse/dynprop.cpp b/xfa/fxjse/dynprop.cpp index fc408ac000..498c6608cf 100644 --- a/xfa/fxjse/dynprop.cpp +++ b/xfa/fxjse/dynprop.cpp @@ -61,7 +61,7 @@ static void FXJSE_DynPropGetterAdapter(const FXJSE_CLASS* lpClass, 0, const_cast(lpClass)); hCallBackInfo->SetInternalField( 1, v8::String::NewFromUtf8( - pIsolate, reinterpret_cast(szPropName.GetPtr()), + pIsolate, reinterpret_cast(szPropName.raw_str()), v8::String::kNormalString, szPropName.GetLength())); lpValue->ForceSetValue(v8::Function::New( lpValue->GetIsolate(), FXJSE_DynPropGetterAdapter_MethodCallback, diff --git a/xfa/fxjse/value.cpp b/xfa/fxjse/value.cpp index f9214813c2..cd3220a17a 100644 --- a/xfa/fxjse/value.cpp +++ b/xfa/fxjse/value.cpp @@ -249,7 +249,7 @@ void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name, CFXJSE_ScopeUtil_IsolateHandleRootContext scope(pIsolate); v8::Local hMessage = v8::String::NewFromUtf8( - pIsolate, utf8Message.GetCStr(), v8::String::kNormalString, + pIsolate, utf8Message.c_str(), v8::String::kNormalString, utf8Message.GetLength()); v8::Local hError; @@ -266,7 +266,7 @@ void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name, if (utf8Name != "Error" && !utf8Name.IsEmpty()) { hError.As()->Set( v8::String::NewFromUtf8(pIsolate, "name"), - v8::String::NewFromUtf8(pIsolate, utf8Name.GetCStr(), + v8::String::NewFromUtf8(pIsolate, utf8Name.c_str(), v8::String::kNormalString, utf8Name.GetLength())); } @@ -378,7 +378,7 @@ FX_BOOL CFXJSE_Value::SetObjectProperty(const CFX_ByteStringC& szPropName, v8::Local hPropValue = v8::Local::New(m_pIsolate, lpPropValue->DirectGetValue()); return (FX_BOOL)hObject.As()->Set( - v8::String::NewFromUtf8(m_pIsolate, szPropName.GetCStr(), + v8::String::NewFromUtf8(m_pIsolate, szPropName.c_str(), v8::String::kNormalString, szPropName.GetLength()), hPropValue); @@ -394,7 +394,7 @@ FX_BOOL CFXJSE_Value::GetObjectProperty(const CFX_ByteStringC& szPropName, v8::Local hPropValue = hObject.As()->Get(v8::String::NewFromUtf8( - m_pIsolate, szPropName.GetCStr(), v8::String::kNormalString, + m_pIsolate, szPropName.c_str(), v8::String::kNormalString, szPropName.GetLength())); lpPropValue->ForceSetValue(hPropValue); return TRUE; @@ -434,7 +434,7 @@ FX_BOOL CFXJSE_Value::DeleteObjectProperty(const CFX_ByteStringC& szPropName) { return FALSE; hObject.As()->Delete(v8::String::NewFromUtf8( - m_pIsolate, szPropName.GetCStr(), v8::String::kNormalString, + m_pIsolate, szPropName.c_str(), v8::String::kNormalString, szPropName.GetLength())); return TRUE; } @@ -448,7 +448,7 @@ FX_BOOL CFXJSE_Value::HasObjectOwnProperty(const CFX_ByteStringC& szPropName, return FALSE; v8::Local hKey = v8::String::NewFromUtf8( - m_pIsolate, szPropName.GetCStr(), v8::String::kNormalString, + m_pIsolate, szPropName.c_str(), v8::String::kNormalString, szPropName.GetLength()); return hObject.As()->HasRealNamedProperty(hKey) || (bUseTypeGetter && @@ -470,7 +470,7 @@ FX_BOOL CFXJSE_Value::SetObjectOwnProperty(const CFX_ByteStringC& szPropName, return hObject.As() ->DefineOwnProperty( m_pIsolate->GetCurrentContext(), - v8::String::NewFromUtf8(m_pIsolate, szPropName.GetCStr(), + v8::String::NewFromUtf8(m_pIsolate, szPropName.c_str(), v8::String::kNormalString, szPropName.GetLength()), hValue) diff --git a/xfa/fxjse/value.h b/xfa/fxjse/value.h index e728b8d857..2939ac34f7 100644 --- a/xfa/fxjse/value.h +++ b/xfa/fxjse/value.h @@ -180,7 +180,7 @@ class CFXJSE_Value { V8_INLINE void SetString(const CFX_ByteStringC& szString) { CFXJSE_ScopeUtil_IsolateHandle scope(m_pIsolate); v8::Local hValue = v8::String::NewFromUtf8( - m_pIsolate, reinterpret_cast(szString.GetPtr()), + m_pIsolate, reinterpret_cast(szString.raw_str()), v8::String::kNormalString, szString.GetLength()); m_hValue.Reset(m_pIsolate, hValue); } -- cgit v1.2.3