diff options
author | tsepez <tsepez@chromium.org> | 2016-04-06 06:27:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-06 06:27:29 -0700 |
commit | 660956f58af305d72c64bb87c05f694469846df2 (patch) | |
tree | 5a73d1df3512213bcecb28114f9d51cec86fca0d /xfa/fxfa/app | |
parent | 54750b570d32898c8ebd4fa59105bfd3b96043af (diff) | |
download | pdfium-660956f58af305d72c64bb87c05f694469846df2.tar.xz |
Rename CFX_WideStringC::raw_str() to c_str()
No functional change intended.
This difference in naming is standing in the way of consolidating
some of the string code between Wide and Byte strings. The Wide
code wants to call raw_str() in exactly the same spots that the
Byte code calls c_str(). This makes sense, because in both places we
get a character type back, and not a uint*_t type. If WideStringC
had a raw_str() method, it would have to return uint32_t or similar.
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1863593004
Diffstat (limited to 'xfa/fxfa/app')
-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 |
4 files changed, 13 insertions, 13 deletions
diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp index 28dfa86066..5f38fafa9f 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.raw_str(), iLength, TRUE); + uint32_t uHash = FX_HashCode_String_GetW(wsName.c_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 58cf1a269a..acbddb4cf0 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.raw_str(), wsName.GetLength(), FALSE); + FX_HashCode_String_GetW(wsName.c_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.raw_str(), wsName.GetLength()); + CFX_ByteString bsName = PDF_EncodeText(wsName.c_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.raw_str(), wsPackage.GetLength()); + FX_HashCode_String_GetW(wsPackage.c_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.raw_str(), wsPackage.GetLength()); + FX_HashCode_String_GetW(wsPackage.c_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 8ffb7ce578..facce24177 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.raw_str(), wsLocalName.GetLength(), TRUE); + wsLocalName.c_str(), wsLocalName.GetLength(), TRUE); int32_t iStart = 0; int32_t iEnd = sizeof(g_XFAFontsMap) / sizeof(XFA_FONTINFO) - 1; int32_t iMid = 0; @@ -1891,7 +1891,7 @@ IFX_Font* CXFA_PDFFontMgr::GetFont(const CFX_WideStringC& wsFontFamily, CPDF_Font** pPDFFont, FX_BOOL bStrictMatch) { uint32_t dwHashCode = - FX_HashCode_String_GetW(wsFontFamily.raw_str(), wsFontFamily.GetLength()); + FX_HashCode_String_GetW(wsFontFamily.c_str(), wsFontFamily.GetLength()); CFX_ByteString strKey; strKey.Format("%u%u", dwHashCode, dwFontStyles); auto it = m_FontMap.find(strKey); @@ -2017,7 +2017,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.raw_str(), + uint32_t dwHash = FX_HashCode_String_GetW(wsFontFamily.c_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 cd323633c0..f92dbeffdf 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").raw_str(), wsValue); + pXMLElement->GetString(FX_WSTRC(L"style").c_str(), wsValue); if (!wsValue.IsEmpty()) { tagProvider.SetAttribute(FX_WSTRC(L"style"), wsValue); } @@ -524,7 +524,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").raw_str(), wsAttr); + pElement->GetString(FX_WSTRC(L"xfa:embed").c_str(), wsAttr); if (wsAttr.IsEmpty()) { return FALSE; } @@ -532,7 +532,7 @@ FX_BOOL CXFA_TextParser::GetEmbbedObj(CXFA_TextProvider* pTextProvider, wsAttr.Delete(0); } CFX_WideString ws; - pElement->GetString(FX_WSTRC(L"xfa:embedType").raw_str(), ws); + pElement->GetString(FX_WSTRC(L"xfa:embedType").c_str(), ws); if (ws.IsEmpty()) { ws = L"som"; } else { @@ -543,7 +543,7 @@ FX_BOOL CXFA_TextParser::GetEmbbedObj(CXFA_TextProvider* pTextProvider, return FALSE; } ws.Empty(); - pElement->GetString(FX_WSTRC(L"xfa:embedMode").raw_str(), ws); + pElement->GetString(FX_WSTRC(L"xfa:embedMode").c_str(), ws); if (ws.IsEmpty()) { ws = L"formatted"; } else { @@ -1422,7 +1422,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").raw_str(), wsLinkContent); + pElement->GetString(FX_WSTRC(L"href").c_str(), wsLinkContent); if (!wsLinkContent.IsEmpty()) { pLinkData = FXTARGET_NewWith(m_pAllocator) CXFA_LinkUserData( m_pAllocator, |