summaryrefslogtreecommitdiff
path: root/xfa/fde/xml/cfde_xmlchardata.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-04 15:10:00 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-04 19:54:55 +0000
commit93bfc262074abf003ba4ab0ff1d9767d8dfa9a3d (patch)
treefd2c2c9d0a99923d397501f85e780498928a7e35 /xfa/fde/xml/cfde_xmlchardata.cpp
parentb2fb20e0f8e7ea368c541d35ccb61506041f7ddd (diff)
downloadpdfium-93bfc262074abf003ba4ab0ff1d9767d8dfa9a3d.tar.xz
Cleanup CFDE_XMLCharData and CFDE_XMLText
This Cl switchs CFDE_XMLCharData to subclass CFDE_XMLText and cleans up the code which was the same except for the accessor names. Change-Id: I85ebf4f3f19f0d15be4dd77a71b89ca8083f4b1e Reviewed-on: https://pdfium-review.googlesource.com/3672 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fde/xml/cfde_xmlchardata.cpp')
-rw-r--r--xfa/fde/xml/cfde_xmlchardata.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/xfa/fde/xml/cfde_xmlchardata.cpp b/xfa/fde/xml/cfde_xmlchardata.cpp
index 2339307938..bb2991937b 100644
--- a/xfa/fde/xml/cfde_xmlchardata.cpp
+++ b/xfa/fde/xml/cfde_xmlchardata.cpp
@@ -6,8 +6,10 @@
#include "xfa/fde/xml/cfde_xmlchardata.h"
+#include "third_party/base/ptr_util.h"
+
CFDE_XMLCharData::CFDE_XMLCharData(const CFX_WideString& wsCData)
- : CFDE_XMLNode(), m_wsCharData(wsCData) {}
+ : CFDE_XMLText(wsCData) {}
CFDE_XMLCharData::~CFDE_XMLCharData() {}
@@ -15,7 +17,6 @@ FDE_XMLNODETYPE CFDE_XMLCharData::GetType() const {
return FDE_XMLNODE_CharData;
}
-CFDE_XMLNode* CFDE_XMLCharData::Clone(bool bRecursive) {
- CFDE_XMLCharData* pClone = new CFDE_XMLCharData(m_wsCharData);
- return pClone;
+std::unique_ptr<CFDE_XMLNode> CFDE_XMLCharData::Clone() {
+ return pdfium::MakeUnique<CFDE_XMLCharData>(GetText());
}