summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_dataexporter.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-19 08:58:54 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-19 13:16:57 +0000
commit3b71d26f092ebc86ca9177fbbe89d83caa67ae1b (patch)
treea81ab092972ab8a2ce474d8d53984bfe9b6887a8 /xfa/fxfa/parser/cxfa_dataexporter.cpp
parent5af27b63bf94e7f60212f6759c8342ce02da5ad2 (diff)
downloadpdfium-3b71d26f092ebc86ca9177fbbe89d83caa67ae1b.tar.xz
Move CFGAS_Stream to CFX_SeekableStreamProxy
This CL moves the FGAS stream code into core/fxcrt and renames to CFX_SeekableStreamProxy. Change-Id: I6641fe0cca45a128ef3ec281b0b40f8d60296387 Reviewed-on: https://pdfium-review.googlesource.com/4311 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_dataexporter.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_dataexporter.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/xfa/fxfa/parser/cxfa_dataexporter.cpp b/xfa/fxfa/parser/cxfa_dataexporter.cpp
index 442195b1dd..c1eda8d9e6 100644
--- a/xfa/fxfa/parser/cxfa_dataexporter.cpp
+++ b/xfa/fxfa/parser/cxfa_dataexporter.cpp
@@ -9,11 +9,11 @@
#include <vector>
#include "core/fxcrt/fx_basic.h"
+#include "core/fxcrt/fx_codepage.h"
#include "third_party/base/stl_util.h"
#include "xfa/fde/xml/cfde_xmldoc.h"
#include "xfa/fde/xml/cfde_xmlelement.h"
#include "xfa/fde/xml/cfde_xmlnode.h"
-#include "xfa/fgas/crt/fgas_codepage.h"
#include "xfa/fxfa/parser/cxfa_document.h"
#include "xfa/fxfa/parser/cxfa_node.h"
#include "xfa/fxfa/parser/cxfa_widgetdata.h"
@@ -226,7 +226,8 @@ void RegenerateFormFile_Changed(CXFA_Node* pNode,
CFX_RetainPtr<IFX_MemoryStream> pMemStream =
IFX_MemoryStream::Create(true);
- auto pTempStream = pdfium::MakeRetain<CFGAS_Stream>(pMemStream, true);
+ auto pTempStream =
+ pdfium::MakeRetain<CFX_SeekableStreamProxy>(pMemStream, true);
pTempStream->SetCodePage(FX_CODEPAGE_UTF8);
pRichTextXML->SaveXMLNode(pTempStream);
@@ -341,9 +342,10 @@ void RegenerateFormFile_Changed(CXFA_Node* pNode,
}
}
-void RegenerateFormFile_Container(CXFA_Node* pNode,
- const CFX_RetainPtr<CFGAS_Stream>& pStream,
- bool bSaveXML) {
+void RegenerateFormFile_Container(
+ CXFA_Node* pNode,
+ const CFX_RetainPtr<CFX_SeekableStreamProxy>& pStream,
+ bool bSaveXML) {
XFA_Element eType = pNode->GetElementType();
if (eType == XFA_Element::Field || eType == XFA_Element::Draw ||
!pNode->IsContainerNode()) {
@@ -399,7 +401,7 @@ void RegenerateFormFile_Container(CXFA_Node* pNode,
void XFA_DataExporter_RegenerateFormFile(
CXFA_Node* pNode,
- const CFX_RetainPtr<CFGAS_Stream>& pStream,
+ const CFX_RetainPtr<CFX_SeekableStreamProxy>& pStream,
const char* pChecksum,
bool bSaveXML) {
if (pNode->IsModelNode()) {
@@ -485,15 +487,16 @@ bool CXFA_DataExporter::Export(const CFX_RetainPtr<IFX_SeekableStream>& pWrite,
if (!pWrite)
return false;
- auto pStream = pdfium::MakeRetain<CFGAS_Stream>(pWrite, true);
+ auto pStream = pdfium::MakeRetain<CFX_SeekableStreamProxy>(pWrite, true);
pStream->SetCodePage(FX_CODEPAGE_UTF8);
return Export(pStream, pNode, dwFlag, pChecksum);
}
-bool CXFA_DataExporter::Export(const CFX_RetainPtr<CFGAS_Stream>& pStream,
- CXFA_Node* pNode,
- uint32_t dwFlag,
- const char* pChecksum) {
+bool CXFA_DataExporter::Export(
+ const CFX_RetainPtr<CFX_SeekableStreamProxy>& pStream,
+ CXFA_Node* pNode,
+ uint32_t dwFlag,
+ const char* pChecksum) {
CFDE_XMLDoc* pXMLDoc = m_pDocument->GetXMLDoc();
if (pNode->IsModelNode()) {
switch (pNode->GetPacketID()) {