diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-02-13 21:50:44 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-02-13 21:50:44 +0000 |
commit | 6515cf256ca6dc30b43b34eaf88908aaf4784fd3 (patch) | |
tree | 0f3ea937ce2809ed46bb9d6da49c334bed6147e1 /xfa | |
parent | fa3765cce4da4c3923e525f0462afd794360d221 (diff) | |
download | pdfium-6515cf256ca6dc30b43b34eaf88908aaf4784fd3.tar.xz |
Split CFX_XMLNode::SaveXMLNode apart
This CL removes the switch from SaveXMLNode and moves the required code
into override methods in the child classes. The method is renamed from
SaveXMLNode to just Save.
Change-Id: I2011b80525e99635c573b4e0cf977e94f6b7cea6
Reviewed-on: https://pdfium-review.googlesource.com/26590
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r-- | xfa/fxfa/parser/cxfa_dataexporter.cpp | 6 | ||||
-rw-r--r-- | xfa/fxfa/parser/xfa_utils.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/xfa/fxfa/parser/cxfa_dataexporter.cpp b/xfa/fxfa/parser/cxfa_dataexporter.cpp index b254ce6cad..4f10d0ddfe 100644 --- a/xfa/fxfa/parser/cxfa_dataexporter.cpp +++ b/xfa/fxfa/parser/cxfa_dataexporter.cpp @@ -65,7 +65,7 @@ bool CXFA_DataExporter::Export( CXFA_Node* pDataNode = pNode->GetFirstChild(); ASSERT(pDataNode); XFA_DataExporter_DealWithDataGroupNode(pDataNode); - pElement->SaveXMLNode(pStream); + pElement->Save(pStream); break; } case XFA_PacketType::Form: { @@ -79,7 +79,7 @@ bool CXFA_DataExporter::Export( if (!pElement || pElement->GetType() != FX_XMLNODE_Element) return false; - pElement->SaveXMLNode(pStream); + pElement->Save(pStream); break; } } @@ -102,7 +102,7 @@ bool CXFA_DataExporter::Export( XFA_DataExporter_DealWithDataGroupNode(pExportNode); pElement->SetString(L"xmlns:xfa", L"http://www.xfa.org/schema/xfa-data/1.0/"); - pElement->SaveXMLNode(pStream); + pElement->Save(pStream); pElement->RemoveAttribute(L"xmlns:xfa"); return true; diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp index 66b4e9d561..65be9625ba 100644 --- a/xfa/fxfa/parser/xfa_utils.cpp +++ b/xfa/fxfa/parser/xfa_utils.cpp @@ -220,7 +220,7 @@ void RegenerateFormFile_Changed(CXFA_Node* pNode, pdfium::MakeRetain<CFX_SeekableStreamProxy>(pMemStream, true); pTempStream->SetCodePage(FX_CODEPAGE_UTF8); - pRichTextXML->SaveXMLNode(pTempStream); + pRichTextXML->Save(pTempStream); wsChildren += WideString::FromUTF8( ByteStringView(pMemStream->GetBuffer(), pMemStream->GetSize())); } else if (pRawValueNode->GetElementType() == XFA_Element::Sharpxml && |