diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-10 16:28:57 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-10 16:28:57 +0000 |
commit | 640d8ffad8536c789103892c7a4e69e5d30172c8 (patch) | |
tree | ebd3f4013383a2319c95d29a10097f4bdb28ea30 /xfa/fxfa/parser/cxfa_node.h | |
parent | 594b3eeeaa61a2c0a6d84df3e17ea587f3b15c23 (diff) | |
download | pdfium-640d8ffad8536c789103892c7a4e69e5d30172c8.tar.xz |
Make methods which create nodes more obvious
This CL converts the various methods Get methods which take a boolean
value to explicit Get* and GetOrCreate* methods to make the usage
clearer.
Change-Id: I2af68448b1b69b95713e739bf7fe14a4336d2b65
Reviewed-on: https://pdfium-review.googlesource.com/22590
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_node.h')
-rw-r--r-- | xfa/fxfa/parser/cxfa_node.h | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.h b/xfa/fxfa/parser/cxfa_node.h index 1f11a2372f..374e8e55bf 100644 --- a/xfa/fxfa/parser/cxfa_node.h +++ b/xfa/fxfa/parser/cxfa_node.h @@ -110,7 +110,7 @@ class CXFA_Node : public CXFA_Object { void ClearFlag(uint32_t dwFlag); CXFA_Node* GetParent() { return m_pParent; } - CXFA_Node* GetChildNode() { return m_pChild; } + CXFA_Node* GetChildNode() const { return m_pChild; } CXFA_Node* CreateInstance(bool bDataMerge); int32_t GetCount(); @@ -235,25 +235,28 @@ class CXFA_Node : public CXFA_Object { bool IsOpenAccess(); - CXFA_Border* GetBorder(bool bModified); - CXFA_Caption* GetCaption(); + CXFA_Border* GetBorder() const; + CXFA_Border* GetOrCreateBorder(); + CXFA_Caption* GetCaption() const; - CXFA_Font* GetFont(bool bModified); - float GetFontSize(); - FX_ARGB GetTextColor(); - float GetLineHeight(); + CXFA_Font* GetFont() const; + CXFA_Font* GetOrCreateFont(); + float GetFontSize() const; + FX_ARGB GetTextColor() const; + float GetLineHeight() const; - CXFA_Margin* GetMargin(); - CXFA_Para* GetPara(); - CXFA_Calculate* GetCalculate(); - CXFA_Validate* GetValidate(bool bModified); + CXFA_Margin* GetMargin() const; + CXFA_Para* GetPara() const; + CXFA_Calculate* GetCalculate() const; + CXFA_Validate* GetValidate() const; + CXFA_Validate* GetOrCreateValidate(); CXFA_Value* GetDefaultValue(); - CXFA_Value* GetFormValue(); + CXFA_Value* GetFormValue() const; WideString GetRawValue(); int32_t GetRotate(); - CXFA_Bind* GetBind(); + CXFA_Bind* GetBind() const; Optional<float> TryWidth(); Optional<float> TryHeight(); |