From bd9748d504555f100d34025d76a9e0119986bc3f Mon Sep 17 00:00:00 2001 From: tsepez Date: Wed, 13 Apr 2016 21:40:19 -0700 Subject: Remove implicit cast from CFX_WideString to (const wchar_t*) BUG= Review URL: https://codereview.chromium.org/1882043004 --- xfa/fxfa/app/xfa_textlayout.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'xfa/fxfa/app/xfa_textlayout.cpp') diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp index 1ee0dbe6f3..ce1ce7021e 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 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); -- cgit v1.2.3