From b066704a22ba4f242567f508c12bf2545cbed9e1 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 16 Nov 2017 13:42:49 +0000 Subject: Convert TryCData and TryContent to optionals This CL changes the TryCData and TryContent to return pdfium::Optional values instead of returning a bool and taking an out WideString. Change-Id: I9c9d877803f9f1977191e12d6a907c29784c10b2 Reviewed-on: https://pdfium-review.googlesource.com/18510 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fxfa/cxfa_ffdoc.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'xfa/fxfa/cxfa_ffdoc.cpp') diff --git a/xfa/fxfa/cxfa_ffdoc.cpp b/xfa/fxfa/cxfa_ffdoc.cpp index d53f1b2ad7..02f852f0d8 100644 --- a/xfa/fxfa/cxfa_ffdoc.cpp +++ b/xfa/fxfa/cxfa_ffdoc.cpp @@ -263,11 +263,9 @@ void CXFA_FFDoc::StopLoad() { if (!pDynamicRender) return; - WideString wsType; - if (pDynamicRender->JSNode()->TryContent(wsType, false, true) && - wsType == L"required") { + WideString wsType = pDynamicRender->JSNode()->GetContent(false); + if (wsType == L"required") m_FormType = FormType::kXFAFull; - } } CXFA_FFDocView* CXFA_FFDoc::CreateDocView() { -- cgit v1.2.3