Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Unified Diff: xfa/fxfa/app/xfa_textlayout.cpp

Issue 1882043004: Remove implicit cast from CFX_WideString to (const wchar_t*) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: win error #2 Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/app/xfa_textlayout.h ('k') | xfa/fxfa/fm2js/xfa_fm2jscontext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_textlayout.cpp
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index 1ee0dbe6f379f93cc639540e60211e324a9d1422..ce1ce7021e17cc3ce39427b8fd6c3e33c70c1b47 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -303,7 +303,7 @@ void CXFA_TextParser::ParseTagInfo(CFDE_XMLNode* pXMLNode,
pXMLElement->GetLocalTagName(wsName);
tagProvider.SetTagNameObj(wsName);
uint32_t dwHashCode =
- FX_HashCode_String_GetW(wsName, wsName.GetLength(), TRUE);
+ FX_HashCode_String_GetW(wsName.c_str(), wsName.GetLength(), TRUE);
static const int32_t s_iCount = sizeof(s_XFATagName) / sizeof(uint32_t);
CFX_DSPATemplate<uint32_t> lookup;
tagProvider.m_bTagAviliable =
@@ -584,7 +584,7 @@ FX_BOOL CXFA_TextParser::GetTabstops(
return FALSE;
}
int32_t iLength = wsValue.GetLength();
- const FX_WCHAR* pTabStops = wsValue;
+ const FX_WCHAR* pTabStops = wsValue.c_str();
int32_t iCur = 0;
int32_t iLast = 0;
CFX_WideString wsAlign;
@@ -640,8 +640,8 @@ FX_BOOL CXFA_TextParser::GetTabstops(
break;
case XFA_TABSTOPSSTATUS_Location:
if (ch == ' ') {
- uint32_t dwHashCode =
- FX_HashCode_String_GetW(wsAlign, wsAlign.GetLength(), TRUE);
+ uint32_t dwHashCode = FX_HashCode_String_GetW(
+ wsAlign.c_str(), wsAlign.GetLength(), TRUE);
CXFA_Measurement ms(CFX_WideStringC(pTabStops + iLast, iCur - iLast));
FX_FLOAT fPos = ms.ToUnit(XFA_UNIT_Pt);
pTabstopContext->Append(dwHashCode, fPos);
@@ -656,7 +656,7 @@ FX_BOOL CXFA_TextParser::GetTabstops(
}
if (!wsAlign.IsEmpty()) {
uint32_t dwHashCode =
- FX_HashCode_String_GetW(wsAlign, wsAlign.GetLength(), TRUE);
+ FX_HashCode_String_GetW(wsAlign.c_str(), wsAlign.GetLength(), TRUE);
CXFA_Measurement ms(CFX_WideStringC(pTabStops + iLast, iCur - iLast));
FX_FLOAT fPos = ms.ToUnit(XFA_UNIT_Pt);
pTabstopContext->Append(dwHashCode, fPos);
« no previous file with comments | « xfa/fxfa/app/xfa_textlayout.h ('k') | xfa/fxfa/fm2js/xfa_fm2jscontext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698