summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/cxfa_dataexporter.cpp25
-rw-r--r--xfa/fxfa/parser/cxfa_dataexporter.h4
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp5
-rw-r--r--xfa/fxfa/parser/cxfa_simple_parser.cpp8
-rw-r--r--xfa/fxfa/parser/cxfa_simple_parser.h4
-rw-r--r--xfa/fxfa/parser/xfa_utils.h4
6 files changed, 27 insertions, 23 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()) {
diff --git a/xfa/fxfa/parser/cxfa_dataexporter.h b/xfa/fxfa/parser/cxfa_dataexporter.h
index c7e5c7b70b..cd949be964 100644
--- a/xfa/fxfa/parser/cxfa_dataexporter.h
+++ b/xfa/fxfa/parser/cxfa_dataexporter.h
@@ -13,7 +13,7 @@
class CXFA_Document;
class CXFA_Node;
class IFX_SeekableStream;
-class CFGAS_Stream;
+class CFX_SeekableStreamProxy;
class CXFA_DataExporter {
public:
@@ -26,7 +26,7 @@ class CXFA_DataExporter {
const char* pChecksum);
private:
- bool Export(const CFX_RetainPtr<CFGAS_Stream>& pStream,
+ bool Export(const CFX_RetainPtr<CFX_SeekableStreamProxy>& pStream,
CXFA_Node* pNode,
uint32_t dwFlag,
const char* pChecksum);
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index 26dc6bd831..83c05d1269 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -13,6 +13,7 @@
#include <vector>
#include "core/fxcrt/cfx_decimal.h"
+#include "core/fxcrt/fx_codepage.h"
#include "core/fxcrt/fx_ext.h"
#include "fxjs/cfxjse_value.h"
#include "third_party/base/ptr_util.h"
@@ -20,7 +21,6 @@
#include "xfa/fde/xml/cfde_xmlelement.h"
#include "xfa/fde/xml/cfde_xmlnode.h"
#include "xfa/fde/xml/cfde_xmltext.h"
-#include "xfa/fgas/crt/fgas_codepage.h"
#include "xfa/fxfa/app/xfa_ffnotify.h"
#include "xfa/fxfa/cxfa_eventparam.h"
#include "xfa/fxfa/cxfa_ffwidget.h"
@@ -1408,7 +1408,8 @@ void CXFA_Node::Script_NodeClass_SaveXML(CFXJSE_Arguments* pArguments) {
}
CFX_RetainPtr<IFX_MemoryStream> pMemoryStream =
IFX_MemoryStream::Create(true);
- auto pStream = pdfium::MakeRetain<CFGAS_Stream>(pMemoryStream, true);
+ auto pStream =
+ pdfium::MakeRetain<CFX_SeekableStreamProxy>(pMemoryStream, true);
pStream->SetCodePage(FX_CODEPAGE_UTF8);
pStream->WriteString(bsXMLHeader.AsStringC());
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.cpp b/xfa/fxfa/parser/cxfa_simple_parser.cpp
index 92196ec957..642b7641bd 100644
--- a/xfa/fxfa/parser/cxfa_simple_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_simple_parser.cpp
@@ -10,6 +10,8 @@
#include <vector>
#include "core/fxcrt/cfx_checksumcontext.h"
+#include "core/fxcrt/cfx_seekablestreamproxy.h"
+#include "core/fxcrt/fx_codepage.h"
#include "core/fxcrt/fx_ext.h"
#include "third_party/base/ptr_util.h"
#include "xfa/fde/xml/cfde_xmlchardata.h"
@@ -19,8 +21,6 @@
#include "xfa/fde/xml/cfde_xmlnode.h"
#include "xfa/fde/xml/cfde_xmlparser.h"
#include "xfa/fde/xml/cfde_xmltext.h"
-#include "xfa/fgas/crt/cfgas_stream.h"
-#include "xfa/fgas/crt/fgas_codepage.h"
#include "xfa/fxfa/fxfa.h"
#include "xfa/fxfa/parser/cxfa_document.h"
#include "xfa/fxfa/parser/cxfa_node.h"
@@ -277,7 +277,7 @@ int32_t CXFA_SimpleParser::StartParse(
XFA_XDPPACKET ePacketID) {
CloseParser();
m_pFileRead = pStream;
- m_pStream = pdfium::MakeRetain<CFGAS_Stream>(pStream, false);
+ m_pStream = pdfium::MakeRetain<CFX_SeekableStreamProxy>(pStream, false);
uint16_t wCodePage = m_pStream->GetCodePage();
if (wCodePage != FX_CODEPAGE_UTF16LE && wCodePage != FX_CODEPAGE_UTF16BE &&
wCodePage != FX_CODEPAGE_UTF8) {
@@ -319,7 +319,7 @@ CFDE_XMLNode* CXFA_SimpleParser::ParseXMLData(const CFX_ByteString& wsXML,
CloseParser();
m_pXMLDoc = pdfium::MakeUnique<CFDE_XMLDoc>();
- auto pStream = pdfium::MakeRetain<CFGAS_Stream>(
+ auto pStream = pdfium::MakeRetain<CFX_SeekableStreamProxy>(
const_cast<uint8_t*>(wsXML.raw_str()), wsXML.GetLength());
auto pParser =
pdfium::MakeUnique<CFDE_XMLParser>(m_pXMLDoc->GetRoot(), pStream);
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.h b/xfa/fxfa/parser/cxfa_simple_parser.h
index 32b5518fab..88a7679e74 100644
--- a/xfa/fxfa/parser/cxfa_simple_parser.h
+++ b/xfa/fxfa/parser/cxfa_simple_parser.h
@@ -19,7 +19,7 @@ class CFDE_XMLNode;
class CFDE_XMLParser;
class IFX_SeekableStream;
class IFX_Pause;
-class CFGAS_Stream;
+class CFX_SeekableStreamProxy;
class CXFA_SimpleParser {
public:
@@ -78,7 +78,7 @@ class CXFA_SimpleParser {
CFDE_XMLParser* m_pXMLParser;
std::unique_ptr<CFDE_XMLDoc> m_pXMLDoc;
- CFX_RetainPtr<CFGAS_Stream> m_pStream;
+ CFX_RetainPtr<CFX_SeekableStreamProxy> m_pStream;
CFX_RetainPtr<IFX_SeekableStream> m_pFileRead;
CXFA_Document* m_pFactory;
CXFA_Node* m_pRootNode;
diff --git a/xfa/fxfa/parser/xfa_utils.h b/xfa/fxfa/parser/xfa_utils.h
index ae51c8fdc6..80f6d096ed 100644
--- a/xfa/fxfa/parser/xfa_utils.h
+++ b/xfa/fxfa/parser/xfa_utils.h
@@ -7,7 +7,7 @@
#ifndef XFA_FXFA_PARSER_XFA_UTILS_H_
#define XFA_FXFA_PARSER_XFA_UTILS_H_
-#include "xfa/fgas/crt/cfgas_stream.h"
+#include "core/fxcrt/cfx_seekablestreamproxy.h"
#include "xfa/fxfa/fxfa_basic.h"
class CFDE_XMLElement;
@@ -155,7 +155,7 @@ bool XFA_FieldIsMultiListBox(CXFA_Node* pFieldNode);
void XFA_DataExporter_DealWithDataGroupNode(CXFA_Node* pDataNode);
void XFA_DataExporter_RegenerateFormFile(
CXFA_Node* pNode,
- const CFX_RetainPtr<CFGAS_Stream>& pStream,
+ const CFX_RetainPtr<CFX_SeekableStreamProxy>& pStream,
const char* pChecksum = nullptr,
bool bSaveXML = false);