From 5f983bb6aeae696ec5577a66771ef19cc3140b49 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 5 Apr 2017 16:33:44 -0400 Subject: Update XML syntax parser to return strings This Cl updates the CFDE_XMLSyntaxParser to return strings instead of taking out parameters. Change-Id: I51124d8d961c00a72987c1a21025d0626b965fab Reviewed-on: https://pdfium-review.googlesource.com/3754 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fde/xml/cfde_xmlsyntaxparser.h | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'xfa/fde/xml/cfde_xmlsyntaxparser.h') diff --git a/xfa/fde/xml/cfde_xmlsyntaxparser.h b/xfa/fde/xml/cfde_xmlsyntaxparser.h index 4f707dc5de..9140a8345f 100644 --- a/xfa/fde/xml/cfde_xmlsyntaxparser.h +++ b/xfa/fde/xml/cfde_xmlsyntaxparser.h @@ -38,9 +38,7 @@ class CFDE_XMLSyntaxParser { CFDE_XMLSyntaxParser(); ~CFDE_XMLSyntaxParser(); - void Init(const CFX_RetainPtr& pStream, - int32_t iXMLPlaneSize, - int32_t iTextDataSize = 256); + void Init(const CFX_RetainPtr& pStream, int32_t iXMLPlaneSize); FDE_XmlSyntaxResult DoSyntaxParse(); @@ -52,28 +50,28 @@ class CFDE_XMLSyntaxParser { int32_t GetCurrentNodeNumber() const { return m_iCurrentNodeNum; } int32_t GetLastNodeNumber() const { return m_iLastNodeNum; } - void GetTargetName(CFX_WideString& wsTarget) const { - wsTarget = m_BlockBuffer.GetTextData(0, m_iTextDataLength); + CFX_WideString GetTargetName() const { + return m_BlockBuffer.GetTextData(0, m_iTextDataLength); } - void GetTagName(CFX_WideString& wsTag) const { - wsTag = m_BlockBuffer.GetTextData(0, m_iTextDataLength); + CFX_WideString GetTagName() const { + return m_BlockBuffer.GetTextData(0, m_iTextDataLength); } - void GetAttributeName(CFX_WideString& wsAttriName) const { - wsAttriName = m_BlockBuffer.GetTextData(0, m_iTextDataLength); + CFX_WideString GetAttributeName() const { + return m_BlockBuffer.GetTextData(0, m_iTextDataLength); } - void GetAttributeValue(CFX_WideString& wsAttriValue) const { - wsAttriValue = m_BlockBuffer.GetTextData(0, m_iTextDataLength); + CFX_WideString GetAttributeValue() const { + return m_BlockBuffer.GetTextData(0, m_iTextDataLength); } - void GetTextData(CFX_WideString& wsText) const { - wsText = m_BlockBuffer.GetTextData(0, m_iTextDataLength); + CFX_WideString GetTextData() const { + return m_BlockBuffer.GetTextData(0, m_iTextDataLength); } - void GetTargetData(CFX_WideString& wsData) const { - wsData = m_BlockBuffer.GetTextData(0, m_iTextDataLength); + CFX_WideString GetTargetData() const { + return m_BlockBuffer.GetTextData(0, m_iTextDataLength); } protected: -- cgit v1.2.3