diff options
Diffstat (limited to 'xfa/fde/xml/cfde_xmlnode.cpp')
-rw-r--r-- | xfa/fde/xml/cfde_xmlnode.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/xfa/fde/xml/cfde_xmlnode.cpp b/xfa/fde/xml/cfde_xmlnode.cpp index 82db939a23..e4d7880cac 100644 --- a/xfa/fde/xml/cfde_xmlnode.cpp +++ b/xfa/fde/xml/cfde_xmlnode.cpp @@ -346,10 +346,10 @@ void CFDE_XMLNode::SaveXMLNode(const CFX_RetainPtr<IFGAS_Stream>& pXMLStream) { ws += L"UTF-8"; } ws += L"\"?>"; - pXMLStream->WriteString(ws.c_str(), ws.GetLength()); + pXMLStream->WriteString(ws.AsStringC()); } else { ws.Format(L"<?%s", pInstruction->GetName().c_str()); - pXMLStream->WriteString(ws.c_str(), ws.GetLength()); + pXMLStream->WriteString(ws.AsStringC()); for (auto it : pInstruction->GetAttributes()) { CFX_WideString wsValue = it.second; @@ -364,17 +364,17 @@ void CFDE_XMLNode::SaveXMLNode(const CFX_RetainPtr<IFGAS_Stream>& pXMLStream) { ws += L"=\""; ws += wsValue; ws += L"\""; - pXMLStream->WriteString(ws.c_str(), ws.GetLength()); + pXMLStream->WriteString(ws.AsStringC()); } for (auto target : pInstruction->GetTargetData()) { ws = L" \""; ws += target; ws += L"\""; - pXMLStream->WriteString(ws.c_str(), ws.GetLength()); + pXMLStream->WriteString(ws.AsStringC()); } ws = L"?>"; - pXMLStream->WriteString(ws.c_str(), ws.GetLength()); + pXMLStream->WriteString(ws.AsStringC()); } break; } @@ -382,7 +382,7 @@ void CFDE_XMLNode::SaveXMLNode(const CFX_RetainPtr<IFGAS_Stream>& pXMLStream) { CFX_WideString ws; ws = L"<"; ws += static_cast<CFDE_XMLElement*>(pNode)->GetName(); - pXMLStream->WriteString(ws.c_str(), ws.GetLength()); + pXMLStream->WriteString(ws.AsStringC()); for (auto it : static_cast<CFDE_XMLElement*>(pNode)->GetAttributes()) { CFX_WideString wsValue = it.second; @@ -397,11 +397,11 @@ void CFDE_XMLNode::SaveXMLNode(const CFX_RetainPtr<IFGAS_Stream>& pXMLStream) { ws += L"=\""; ws += wsValue; ws += L"\""; - pXMLStream->WriteString(ws.c_str(), ws.GetLength()); + pXMLStream->WriteString(ws.AsStringC()); } if (pNode->m_pChild) { ws = L"\n>"; - pXMLStream->WriteString(ws.c_str(), ws.GetLength()); + pXMLStream->WriteString(ws.AsStringC()); CFDE_XMLNode* pChild = pNode->m_pChild; while (pChild) { pChild->SaveXMLNode(pXMLStream); @@ -413,7 +413,7 @@ void CFDE_XMLNode::SaveXMLNode(const CFX_RetainPtr<IFGAS_Stream>& pXMLStream) { } else { ws = L"\n/>"; } - pXMLStream->WriteString(ws.c_str(), ws.GetLength()); + pXMLStream->WriteString(ws.AsStringC()); break; } case FDE_XMLNODE_Text: { @@ -423,14 +423,14 @@ void CFDE_XMLNode::SaveXMLNode(const CFX_RetainPtr<IFGAS_Stream>& pXMLStream) { ws.Replace(L">", L">"); ws.Replace(L"\'", L"'"); ws.Replace(L"\"", L"""); - pXMLStream->WriteString(ws.c_str(), ws.GetLength()); + pXMLStream->WriteString(ws.AsStringC()); break; } case FDE_XMLNODE_CharData: { CFX_WideString ws = L"<![CDATA["; ws += static_cast<CFDE_XMLCharData*>(pNode)->GetText(); ws += L"]]>"; - pXMLStream->WriteString(ws.c_str(), ws.GetLength()); + pXMLStream->WriteString(ws.AsStringC()); break; } case FDE_XMLNODE_Unknown: |