diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-02-13 21:50:44 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-02-13 21:50:44 +0000 |
commit | 6515cf256ca6dc30b43b34eaf88908aaf4784fd3 (patch) | |
tree | 0f3ea937ce2809ed46bb9d6da49c334bed6147e1 /core/fxcrt/xml/cfx_xmlnode.h | |
parent | fa3765cce4da4c3923e525f0462afd794360d221 (diff) | |
download | pdfium-6515cf256ca6dc30b43b34eaf88908aaf4784fd3.tar.xz |
Split CFX_XMLNode::SaveXMLNode apart
This CL removes the switch from SaveXMLNode and moves the required code
into override methods in the child classes. The method is renamed from
SaveXMLNode to just Save.
Change-Id: I2011b80525e99635c573b4e0cf977e94f6b7cea6
Reviewed-on: https://pdfium-review.googlesource.com/26590
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/xml/cfx_xmlnode.h')
-rw-r--r-- | core/fxcrt/xml/cfx_xmlnode.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/fxcrt/xml/cfx_xmlnode.h b/core/fxcrt/xml/cfx_xmlnode.h index 55c79dcfe0..e2154c4f71 100644 --- a/core/fxcrt/xml/cfx_xmlnode.h +++ b/core/fxcrt/xml/cfx_xmlnode.h @@ -32,6 +32,7 @@ class CFX_XMLNode { virtual FX_XMLNODETYPE GetType() const; virtual std::unique_ptr<CFX_XMLNode> Clone(); + virtual void Save(const RetainPtr<CFX_SeekableStreamProxy>& pXMLStream); CFX_XMLNode* GetRoot(); CFX_XMLNode* GetParent() const { return parent_; } @@ -43,7 +44,9 @@ class CFX_XMLNode { void RemoveChildNode(CFX_XMLNode* pNode); void DeleteChildren(); - void SaveXMLNode(const RetainPtr<CFX_SeekableStreamProxy>& pXMLStream); + protected: + WideString AttributeToString(WideString name, WideString value); + WideString EncodeEntities(WideString value); private: CFX_XMLNode* parent_ = nullptr; |