diff options
Diffstat (limited to 'xfa/fde/xml/cfde_xmldoc.cpp')
-rw-r--r-- | xfa/fde/xml/cfde_xmldoc.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/xfa/fde/xml/cfde_xmldoc.cpp b/xfa/fde/xml/cfde_xmldoc.cpp index bc526ae4b3..5d427fb06e 100644 --- a/xfa/fde/xml/cfde_xmldoc.cpp +++ b/xfa/fde/xml/cfde_xmldoc.cpp @@ -98,7 +98,8 @@ void CFDE_XMLDoc::SaveXMLNode(const CFX_RetainPtr<IFGAS_Stream>& pXMLStream, ws = L"?>"; pXMLStream->WriteString(ws.c_str(), ws.GetLength()); } - } break; + break; + } case FDE_XMLNODE_Element: { CFX_WideString ws; ws = L"<"; @@ -137,24 +138,26 @@ void CFDE_XMLDoc::SaveXMLNode(const CFX_RetainPtr<IFGAS_Stream>& pXMLStream, ws = L"\n/>"; } pXMLStream->WriteString(ws.c_str(), ws.GetLength()); - } break; + break; + } case FDE_XMLNODE_Text: { - CFX_WideString ws = ((CFDE_XMLText*)pNode)->m_wsText; + CFX_WideString ws = static_cast<CFDE_XMLText*>(pNode)->GetText(); ws.Replace(L"&", L"&"); ws.Replace(L"<", L"<"); ws.Replace(L">", L">"); ws.Replace(L"\'", L"'"); ws.Replace(L"\"", L"""); pXMLStream->WriteString(ws.c_str(), ws.GetLength()); - } break; + break; + } case FDE_XMLNODE_CharData: { CFX_WideString ws = L"<![CDATA["; - ws += ((CFDE_XMLCharData*)pNode)->m_wsCharData; + ws += static_cast<CFDE_XMLCharData*>(pNode)->GetText(); ws += L"]]>"; pXMLStream->WriteString(ws.c_str(), ws.GetLength()); - } break; - case FDE_XMLNODE_Unknown: break; + } + case FDE_XMLNODE_Unknown: default: break; } |