From 1c4735aed9442a8e442214a23a3df94bd8fc99b5 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 16 Nov 2017 22:08:07 +0000 Subject: Convert ByteString::{Format|FormatV} to static methods This CL moves the Format and FormatV methods of ByteString to be static. Bug: pdfium:934 Change-Id: I9c30455a789aff9f619b9d5bf89c0712644f2d9a Reviewed-on: https://pdfium-review.googlesource.com/18650 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'fpdfsdk/fpdfxfa') diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp index 374fe566fc..bc6c7dbe13 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp @@ -434,9 +434,8 @@ void CPDFXFA_DocEnvironment::ExportData(CXFA_FFDoc* hDoc, return; RetainPtr fileWrite = MakeSeekableStream(pFileHandler); - ByteString content; if (fileType == FXFA_SAVEAS_XML) { - content = "\r\n"; + ByteString content = "\r\n"; fileWrite->WriteBlock(content.c_str(), fileWrite->GetSize(), content.GetLength()); CXFA_FFDoc* ffdoc = m_pContext->GetXFADocView()->GetDoc(); @@ -492,7 +491,7 @@ void CPDFXFA_DocEnvironment::ExportData(CXFA_FFDoc* hDoc, ByteString bPath = wPath.UTF8Encode(); const char* szFormat = "\n"; - content.Format(szFormat, bPath.c_str()); + ByteString content = ByteString::Format(szFormat, bPath.c_str()); fileWrite->WriteBlock(content.c_str(), fileWrite->GetSize(), content.GetLength()); } -- cgit v1.2.3