| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "xfa/fde/xml/fde_xml_imp.h" | 7 #include "xfa/fde/xml/fde_xml_imp.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 buffer << ((CFDE_XMLText*)pChild)->m_wsText; | 812 buffer << ((CFDE_XMLText*)pChild)->m_wsText; |
| 813 break; | 813 break; |
| 814 case FDE_XMLNODE_CharData: | 814 case FDE_XMLNODE_CharData: |
| 815 buffer << ((CFDE_XMLCharData*)pChild)->m_wsCharData; | 815 buffer << ((CFDE_XMLCharData*)pChild)->m_wsCharData; |
| 816 break; | 816 break; |
| 817 default: | 817 default: |
| 818 break; | 818 break; |
| 819 } | 819 } |
| 820 pChild = pChild->m_pNext; | 820 pChild = pChild->m_pNext; |
| 821 } | 821 } |
| 822 wsText = buffer.GetWideString(); | 822 wsText = buffer.AsStringC(); |
| 823 } | 823 } |
| 824 void CFDE_XMLElement::SetTextData(const CFX_WideString& wsText) { | 824 void CFDE_XMLElement::SetTextData(const CFX_WideString& wsText) { |
| 825 if (wsText.GetLength() < 1) { | 825 if (wsText.GetLength() < 1) { |
| 826 return; | 826 return; |
| 827 } | 827 } |
| 828 InsertChildNode(new CFDE_XMLText(wsText)); | 828 InsertChildNode(new CFDE_XMLText(wsText)); |
| 829 } | 829 } |
| 830 CFDE_XMLText::CFDE_XMLText(const CFX_WideString& wsText) | 830 CFDE_XMLText::CFDE_XMLText(const CFX_WideString& wsText) |
| 831 : CFDE_XMLNode(), m_wsText(wsText) {} | 831 : CFDE_XMLNode(), m_wsText(wsText) {} |
| 832 CFDE_XMLNode* CFDE_XMLText::Clone(FX_BOOL bRecursive) { | 832 CFDE_XMLNode* CFDE_XMLText::Clone(FX_BOOL bRecursive) { |
| (...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2074 m_BlockBuffer.DeleteTextChars(m_iDataLength - m_iEntityStart, FALSE); | 2074 m_BlockBuffer.DeleteTextChars(m_iDataLength - m_iEntityStart, FALSE); |
| 2075 m_pCurrentBlock = m_BlockBuffer.GetAvailableBlock(m_iIndexInBlock); | 2075 m_pCurrentBlock = m_BlockBuffer.GetAvailableBlock(m_iIndexInBlock); |
| 2076 m_iEntityStart = -1; | 2076 m_iEntityStart = -1; |
| 2077 } else { | 2077 } else { |
| 2078 if (m_iEntityStart < 0 && ch == L'&') { | 2078 if (m_iEntityStart < 0 && ch == L'&') { |
| 2079 m_iEntityStart = m_iDataLength - 1; | 2079 m_iEntityStart = m_iDataLength - 1; |
| 2080 } | 2080 } |
| 2081 } | 2081 } |
| 2082 m_pStart++; | 2082 m_pStart++; |
| 2083 } | 2083 } |
| OLD | NEW |