summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_widgetacc.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-16 13:42:49 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-16 13:42:49 +0000
commitb066704a22ba4f242567f508c12bf2545cbed9e1 (patch)
treeb0ef12e2873bf7018d4b17a41b626428fb789923 /xfa/fxfa/cxfa_widgetacc.cpp
parent4011677aed8b258fcf87cf52b0d541ef04c832ff (diff)
downloadpdfium-b066704a22ba4f242567f508c12bf2545cbed9e1.tar.xz
Convert TryCData and TryContent to optionals
This CL changes the TryCData and TryContent to return pdfium::Optional<WideString> 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 <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_widgetacc.cpp')
-rw-r--r--xfa/fxfa/cxfa_widgetacc.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp
index 0aa91fbefb..a7d28cb5aa 100644
--- a/xfa/fxfa/cxfa_widgetacc.cpp
+++ b/xfa/fxfa/cxfa_widgetacc.cpp
@@ -511,10 +511,9 @@ WideString CXFA_WidgetAcc::GetValidateCaptionName(bool bVersionFlag) {
}
}
}
- if (wsCaptionName.IsEmpty())
- m_pNode->JSNode()->TryCData(XFA_Attribute::Name, wsCaptionName, true);
-
- return wsCaptionName;
+ if (!wsCaptionName.IsEmpty())
+ return wsCaptionName;
+ return m_pNode->JSNode()->GetCData(XFA_Attribute::Name);
}
WideString CXFA_WidgetAcc::GetValidateMessage(bool bError, bool bVersionFlag) {