diff options
author | tsepez <tsepez@chromium.org> | 2016-04-06 10:51:14 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-06 10:51:14 -0700 |
commit | 6fe7d2174a47107578da912299c93b4dfb9f2add (patch) | |
tree | 4f2d343c477c9a4ec18d25801800eb08d8938dad /xfa/fxfa/parser/xfa_document_serialize.cpp | |
parent | 89bdd0876e6b92c959839908204eb82337a27ba2 (diff) | |
download | pdfium-6fe7d2174a47107578da912299c93b4dfb9f2add.tar.xz |
Make CFX_WideString::FromUTF8() take a CFX_ByteStringC argument.
Methods that take string arguments and do not persist them should
take *StringC types as argument rather than discrete ptr/len args.
Avoids a number of implicit casts from CFX_ByteString to char*.
BUG=
Review URL: https://codereview.chromium.org/1861183002
Diffstat (limited to 'xfa/fxfa/parser/xfa_document_serialize.cpp')
-rw-r--r-- | xfa/fxfa/parser/xfa_document_serialize.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xfa/fxfa/parser/xfa_document_serialize.cpp b/xfa/fxfa/parser/xfa_document_serialize.cpp index 516a947ffb..91b8ff129c 100644 --- a/xfa/fxfa/parser/xfa_document_serialize.cpp +++ b/xfa/fxfa/parser/xfa_document_serialize.cpp @@ -260,7 +260,7 @@ static void XFA_DataExporter_RegenerateFormFile_Changed( pTempStream->SetCodePage(FX_CODEPAGE_UTF8); pRichTextXML->SaveXMLNode(pTempStream); wsChildren += CFX_WideString::FromUTF8( - (const FX_CHAR*)pMemStream->GetBuffer(), pMemStream->GetSize()); + CFX_ByteStringC(pMemStream->GetBuffer(), pMemStream->GetSize())); pTempStream->Release(); pMemStream->Release(); } else if (pRawValueNode->GetClassID() == XFA_ELEMENT_Sharpxml && @@ -434,8 +434,7 @@ void XFA_DataExporter_RegenerateFormFile(CXFA_Node* pNode, pStream->WriteString(s_pwsTagName, FXSYS_wcslen(s_pwsTagName)); if (pChecksum) { static const FX_WCHAR* s_pwChecksum = L" checksum=\""; - CFX_WideString wsChecksum = - CFX_WideString::FromUTF8(pChecksum, FXSYS_strlen(pChecksum)); + CFX_WideString wsChecksum = CFX_WideString::FromUTF8(pChecksum); pStream->WriteString(s_pwChecksum, FXSYS_wcslen(s_pwChecksum)); pStream->WriteString((const FX_WCHAR*)wsChecksum, wsChecksum.GetLength()); pStream->WriteString(L"\"", 1); |