diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-16 13:42:49 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-16 13:42:49 +0000 |
commit | b066704a22ba4f242567f508c12bf2545cbed9e1 (patch) | |
tree | b0ef12e2873bf7018d4b17a41b626428fb789923 /fxjs/cjx_node.h | |
parent | 4011677aed8b258fcf87cf52b0d541ef04c832ff (diff) | |
download | pdfium-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 'fxjs/cjx_node.h')
-rw-r--r-- | fxjs/cjx_node.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fxjs/cjx_node.h b/fxjs/cjx_node.h index fa2b28e5e2..2e9360d451 100644 --- a/fxjs/cjx_node.h +++ b/fxjs/cjx_node.h @@ -61,6 +61,7 @@ class CJX_Node : public CJX_Object { XFA_Element eType, bool bCreateProperty); + pdfium::Optional<WideString> TryContent(bool bScriptModify, bool bProto); bool SetContent(const WideString& wsContent, const WideString& wsXMLValue, bool bNotify, @@ -72,15 +73,13 @@ class CJX_Node : public CJX_Object { bool SetInteger(XFA_Attribute eAttr, int32_t iValue, bool bNotify); int32_t GetInteger(XFA_Attribute eAttr); - bool TryCData(XFA_Attribute eAttr, WideString& wsValue, bool bUseDefault); + pdfium::Optional<WideString> TryCData(XFA_Attribute eAttr, bool bUseDefault); bool SetCData(XFA_Attribute eAttr, const WideString& wsValue, bool bNotify, bool bScriptModify); WideString GetCData(XFA_Attribute eAttr); - bool TryContent(WideString& wsContent, bool bScriptModify, bool bProto); - bool TryEnum(XFA_Attribute eAttr, XFA_ATTRIBUTEENUM& eValue, bool bUseDefault); |