diff options
author | dsinclair <dsinclair@chromium.org> | 2016-04-05 11:02:18 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-05 11:02:18 -0700 |
commit | 179bebb9a14dfd3ba91e9e068d4d436657a7c780 (patch) | |
tree | 895a59bfcf85a4730badfb2a6df71cf8679a2249 /xfa/fxfa/app | |
parent | 4cd49e1c6076bd9ef2d18480d893038822668262 (diff) | |
download | pdfium-179bebb9a14dfd3ba91e9e068d4d436657a7c780.tar.xz |
Rename GetCStr and GetPtr to match CFX_ByteString.
This CL updates CFX_ByteStringC to use the more common c_str
and raw_str instead of GetCStr and GetPtr.
Review URL: https://codereview.chromium.org/1857713003
Diffstat (limited to 'xfa/fxfa/app')
-rw-r--r-- | xfa/fxfa/app/xfa_checksum.cpp | 2 | ||||
-rw-r--r-- | xfa/fxfa/app/xfa_ffbarcode.cpp | 2 | ||||
-rw-r--r-- | xfa/fxfa/app/xfa_ffdoc.cpp | 8 | ||||
-rw-r--r-- | xfa/fxfa/app/xfa_fontmgr.cpp | 6 | ||||
-rw-r--r-- | xfa/fxfa/app/xfa_textlayout.cpp | 10 |
5 files changed, 14 insertions, 14 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, |