diff options
Diffstat (limited to 'xfa/fde')
-rw-r--r-- | xfa/fde/xml/cfde_xmldoc.cpp | 22 | ||||
-rw-r--r-- | xfa/fde/xml/cfde_xmlnode.cpp | 22 |
2 files changed, 22 insertions, 22 deletions
diff --git a/xfa/fde/xml/cfde_xmldoc.cpp b/xfa/fde/xml/cfde_xmldoc.cpp index 7032700578..209ce9c68f 100644 --- a/xfa/fde/xml/cfde_xmldoc.cpp +++ b/xfa/fde/xml/cfde_xmldoc.cpp @@ -65,10 +65,10 @@ void CFDE_XMLDoc::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; @@ -83,17 +83,17 @@ void CFDE_XMLDoc::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; } @@ -101,7 +101,7 @@ void CFDE_XMLDoc::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; @@ -116,11 +116,11 @@ void CFDE_XMLDoc::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) { SaveXMLNode(pXMLStream, static_cast<CFDE_XMLNode*>(pChild)); @@ -132,7 +132,7 @@ void CFDE_XMLDoc::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: { @@ -142,14 +142,14 @@ void CFDE_XMLDoc::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: 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: |