summaryrefslogtreecommitdiff
path: root/xfa/fde
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-12-02 10:53:30 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-02 10:53:30 -0800
commit0527ec571a8842b84f5161dc67f8da439e65eb12 (patch)
treed645df1008a5dcd6ea3224080cfc6f7779706c68 /xfa/fde
parent8b6a0a540563c6308fa03df34c90257e0bb65598 (diff)
downloadpdfium-0527ec571a8842b84f5161dc67f8da439e65eb12.tar.xz
Rename IFX_Stream to IFGAS_Stream.
It's a separate hierarchy unrelated to the IFX_*Stream classes. Also rename CFX_Stream to CFGAS_Stream, and so forth. Review-Url: https://codereview.chromium.org/2535723010
Diffstat (limited to 'xfa/fde')
-rw-r--r--xfa/fde/cfde_txtedtengine.cpp2
-rw-r--r--xfa/fde/cfde_txtedtengine.h2
-rw-r--r--xfa/fde/css/fde_css.h2
-rw-r--r--xfa/fde/css/fde_cssstylesheet.cpp4
-rw-r--r--xfa/fde/css/fde_cssstylesheet.h2
-rw-r--r--xfa/fde/css/fde_csssyntax.cpp4
-rw-r--r--xfa/fde/css/fde_csssyntax.h6
-rw-r--r--xfa/fde/xml/fde_xml_imp.cpp8
-rw-r--r--xfa/fde/xml/fde_xml_imp.h12
-rw-r--r--xfa/fde/xml/fde_xml_imp_unittest.cpp30
10 files changed, 36 insertions, 36 deletions
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp
index 63a0748cd1..1250043fc7 100644
--- a/xfa/fde/cfde_txtedtengine.cpp
+++ b/xfa/fde/cfde_txtedtengine.cpp
@@ -107,7 +107,7 @@ IFDE_TxtEdtPage* CFDE_TxtEdtEngine::GetPage(int32_t nIndex) {
return m_PagePtrArray[nIndex];
}
-void CFDE_TxtEdtEngine::SetTextByStream(IFX_Stream* pStream) {
+void CFDE_TxtEdtEngine::SetTextByStream(IFGAS_Stream* pStream) {
ResetEngine();
int32_t nIndex = 0;
if (pStream && pStream->GetLength()) {
diff --git a/xfa/fde/cfde_txtedtengine.h b/xfa/fde/cfde_txtedtengine.h
index 6b4c34a958..bd02c9b9e7 100644
--- a/xfa/fde/cfde_txtedtengine.h
+++ b/xfa/fde/cfde_txtedtengine.h
@@ -28,7 +28,7 @@ class CFDE_TxtEdtEngine {
int32_t CountPages() const;
IFDE_TxtEdtPage* GetPage(int32_t nIndex);
- void SetTextByStream(IFX_Stream* pStream);
+ void SetTextByStream(IFGAS_Stream* pStream);
void SetText(const CFX_WideString& wsText);
int32_t GetTextLength() const;
CFX_WideString GetText(int32_t nStart, int32_t nCount = -1) const;
diff --git a/xfa/fde/css/fde_css.h b/xfa/fde/css/fde_css.h
index b9a0d2be5d..3c216290d2 100644
--- a/xfa/fde/css/fde_css.h
+++ b/xfa/fde/css/fde_css.h
@@ -751,7 +751,7 @@ class IFDE_CSSStyleSheet : public IFX_Retainable {
static IFDE_CSSStyleSheet* LoadHTMLStandardStyleSheet();
static IFDE_CSSStyleSheet* LoadFromStream(
const CFX_WideString& szUrl,
- IFX_Stream* pStream,
+ IFGAS_Stream* pStream,
uint16_t wCodePage,
uint32_t dwMediaList = FDE_CSSMEDIATYPE_ALL);
static IFDE_CSSStyleSheet* LoadFromBuffer(
diff --git a/xfa/fde/css/fde_cssstylesheet.cpp b/xfa/fde/css/fde_cssstylesheet.cpp
index e376aca399..9c91e43cce 100644
--- a/xfa/fde/css/fde_cssstylesheet.cpp
+++ b/xfa/fde/css/fde_cssstylesheet.cpp
@@ -49,7 +49,7 @@ IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadHTMLStandardStyleSheet() {
IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromStream(
const CFX_WideString& szUrl,
- IFX_Stream* pStream,
+ IFGAS_Stream* pStream,
uint16_t wCodePage,
uint32_t dwMediaList) {
CFDE_CSSStyleSheet* pStyleSheet = new CFDE_CSSStyleSheet(dwMediaList);
@@ -144,7 +144,7 @@ IFDE_CSSRule* CFDE_CSSStyleSheet::GetRule(int32_t index) {
}
bool CFDE_CSSStyleSheet::LoadFromStream(const CFX_WideString& szUrl,
- IFX_Stream* pStream,
+ IFGAS_Stream* pStream,
uint16_t wCodePage) {
std::unique_ptr<CFDE_CSSSyntaxParser> pSyntax(new CFDE_CSSSyntaxParser);
if (pStream->GetCodePage() != wCodePage)
diff --git a/xfa/fde/css/fde_cssstylesheet.h b/xfa/fde/css/fde_cssstylesheet.h
index 7d3ec98844..2460959a97 100644
--- a/xfa/fde/css/fde_cssstylesheet.h
+++ b/xfa/fde/css/fde_cssstylesheet.h
@@ -111,7 +111,7 @@ class CFDE_CSSStyleSheet : public IFDE_CSSStyleSheet, public CFX_Target {
IFDE_CSSRule* GetRule(int32_t index) override;
bool LoadFromStream(const CFX_WideString& szUrl,
- IFX_Stream* pStream,
+ IFGAS_Stream* pStream,
uint16_t wCodePage);
bool LoadFromBuffer(const CFX_WideString& szUrl,
const FX_WCHAR* pBuffer,
diff --git a/xfa/fde/css/fde_csssyntax.cpp b/xfa/fde/css/fde_csssyntax.cpp
index 27094e1376..bdad0155d5 100644
--- a/xfa/fde/css/fde_csssyntax.cpp
+++ b/xfa/fde/css/fde_csssyntax.cpp
@@ -35,7 +35,7 @@ CFDE_CSSSyntaxParser::~CFDE_CSSSyntaxParser() {
m_TextPlane.Reset();
}
-bool CFDE_CSSSyntaxParser::Init(IFX_Stream* pStream,
+bool CFDE_CSSSyntaxParser::Init(IFGAS_Stream* pStream,
int32_t iCSSPlaneSize,
int32_t iTextDataSize,
bool bOnlyDeclaration) {
@@ -433,7 +433,7 @@ bool CFDE_CSSTextBuf::EstimateSize(int32_t iAllocSize) {
m_bExtBuf = false;
return ExpandBuf(iAllocSize);
}
-int32_t CFDE_CSSTextBuf::LoadFromStream(IFX_Stream* pTxtStream,
+int32_t CFDE_CSSTextBuf::LoadFromStream(IFGAS_Stream* pTxtStream,
int32_t iStreamOffset,
int32_t iMaxChars,
bool& bEOS) {
diff --git a/xfa/fde/css/fde_csssyntax.h b/xfa/fde/css/fde_csssyntax.h
index c2c80c5e67..03662037d9 100644
--- a/xfa/fde/css/fde_csssyntax.h
+++ b/xfa/fde/css/fde_csssyntax.h
@@ -18,7 +18,7 @@ class CFDE_CSSTextBuf : public CFX_Target {
bool AttachBuffer(const FX_WCHAR* pBuffer, int32_t iBufLen);
bool EstimateSize(int32_t iAllocSize);
- int32_t LoadFromStream(IFX_Stream* pTxtStream,
+ int32_t LoadFromStream(IFGAS_Stream* pTxtStream,
int32_t iStreamOffset,
int32_t iMaxChars,
bool& bEOS);
@@ -80,7 +80,7 @@ class CFDE_CSSSyntaxParser : public CFX_Target {
CFDE_CSSSyntaxParser();
~CFDE_CSSSyntaxParser() override;
- bool Init(IFX_Stream* pStream,
+ bool Init(IFGAS_Stream* pStream,
int32_t iCSSPlaneSize,
int32_t iTextDataSize = 32,
bool bOnlyDeclaration = false);
@@ -106,7 +106,7 @@ class CFDE_CSSSyntaxParser : public CFX_Target {
bool IsImportEnabled() const;
void DisableImport() { m_dwCheck = 0; }
- IFX_Stream* m_pStream;
+ IFGAS_Stream* m_pStream;
int32_t m_iStreamPos;
int32_t m_iPlaneSize;
CFDE_CSSTextBuf m_TextData;
diff --git a/xfa/fde/xml/fde_xml_imp.cpp b/xfa/fde/xml/fde_xml_imp.cpp
index cf145fdb65..1fbb1cdda7 100644
--- a/xfa/fde/xml/fde_xml_imp.cpp
+++ b/xfa/fde/xml/fde_xml_imp.cpp
@@ -394,7 +394,7 @@ CFDE_XMLNode* CFDE_XMLNode::Clone(bool bRecursive) {
return nullptr;
}
-void CFDE_XMLNode::SaveXMLNode(IFX_Stream* pXMLStream) {
+void CFDE_XMLNode::SaveXMLNode(IFGAS_Stream* pXMLStream) {
CFDE_XMLNode* pNode = (CFDE_XMLNode*)this;
switch (pNode->GetType()) {
case FDE_XMLNODE_Instruction: {
@@ -986,7 +986,7 @@ void CFDE_XMLDoc::CloseXML() {
ReleaseParser();
}
-void CFDE_XMLDoc::SaveXMLNode(IFX_Stream* pXMLStream, CFDE_XMLNode* pINode) {
+void CFDE_XMLDoc::SaveXMLNode(IFGAS_Stream* pXMLStream, CFDE_XMLNode* pINode) {
CFDE_XMLNode* pNode = (CFDE_XMLNode*)pINode;
switch (pNode->GetType()) {
case FDE_XMLNODE_Instruction: {
@@ -1096,7 +1096,7 @@ void CFDE_XMLDoc::SaveXMLNode(IFX_Stream* pXMLStream, CFDE_XMLNode* pINode) {
}
}
-void CFDE_XMLDoc::SaveXML(IFX_Stream* pXMLStream, bool bSaveBOM) {
+void CFDE_XMLDoc::SaveXML(IFGAS_Stream* pXMLStream, bool bSaveBOM) {
if (!pXMLStream || pXMLStream == m_pStream) {
m_pStream->Seek(FX_STREAMSEEK_Begin, 0);
pXMLStream = m_pStream;
@@ -1288,7 +1288,7 @@ CFDE_XMLSyntaxParser::CFDE_XMLSyntaxParser()
m_CurNode.eNodeType = FDE_XMLNODE_Unknown;
}
-void CFDE_XMLSyntaxParser::Init(IFX_Stream* pStream,
+void CFDE_XMLSyntaxParser::Init(IFGAS_Stream* pStream,
int32_t iXMLPlaneSize,
int32_t iTextDataSize) {
ASSERT(!m_pStream && !m_pBuffer);
diff --git a/xfa/fde/xml/fde_xml_imp.h b/xfa/fde/xml/fde_xml_imp.h
index 1119ef2ff5..924f958b86 100644
--- a/xfa/fde/xml/fde_xml_imp.h
+++ b/xfa/fde/xml/fde_xml_imp.h
@@ -63,7 +63,7 @@ class CFDE_XMLNode : public CFX_Target {
bool InsertNodeItem(CFDE_XMLNode::NodeItem eItem, CFDE_XMLNode* pNode);
CFDE_XMLNode* RemoveNodeItem(CFDE_XMLNode::NodeItem eItem);
- void SaveXMLNode(IFX_Stream* pXMLStream);
+ void SaveXMLNode(IFGAS_Stream* pXMLStream);
CFDE_XMLNode* m_pParent;
CFDE_XMLNode* m_pChild;
@@ -197,14 +197,14 @@ class CFDE_XMLDoc : public CFX_Target {
int32_t DoLoad(IFX_Pause* pPause = nullptr);
void CloseXML();
CFDE_XMLNode* GetRoot() const { return m_pRoot; }
- void SaveXML(IFX_Stream* pXMLStream = nullptr, bool bSaveBOM = true);
- void SaveXMLNode(IFX_Stream* pXMLStream, CFDE_XMLNode* pNode);
+ void SaveXML(IFGAS_Stream* pXMLStream = nullptr, bool bSaveBOM = true);
+ void SaveXMLNode(IFGAS_Stream* pXMLStream, CFDE_XMLNode* pNode);
protected:
void Reset(bool bInitRoot);
void ReleaseParser();
- IFX_Stream* m_pStream;
+ IFGAS_Stream* m_pStream;
int32_t m_iStatus;
CFDE_XMLNode* m_pRoot;
CFDE_XMLSyntaxParser* m_pSyntaxParser;
@@ -261,7 +261,7 @@ class CFDE_XMLSyntaxParser : public CFX_Target {
~CFDE_XMLSyntaxParser() override;
void Release() { delete this; }
- void Init(IFX_Stream* pStream,
+ void Init(IFGAS_Stream* pStream,
int32_t iXMLPlaneSize,
int32_t iTextDataSize = 256);
@@ -320,7 +320,7 @@ class CFDE_XMLSyntaxParser : public CFX_Target {
void ParseTextChar(FX_WCHAR ch);
- IFX_Stream* m_pStream;
+ IFGAS_Stream* m_pStream;
int32_t m_iXMLPlaneSize;
int32_t m_iCurrentPos;
int32_t m_iCurrentNodeNum;
diff --git a/xfa/fde/xml/fde_xml_imp_unittest.cpp b/xfa/fde/xml/fde_xml_imp_unittest.cpp
index e5bcb0acb2..553afffd86 100644
--- a/xfa/fde/xml/fde_xml_imp_unittest.cpp
+++ b/xfa/fde/xml/fde_xml_imp_unittest.cpp
@@ -26,7 +26,7 @@ TEST(CFDE_XMLSyntaxParser, CData) {
// We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
- std::unique_ptr<IFX_Stream> stream(IFX_Stream::CreateStream(
+ std::unique_ptr<IFGAS_Stream> stream(IFGAS_Stream::CreateStream(
reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0));
CFDE_XMLSyntaxParser parser;
parser.Init(stream.get(), 256);
@@ -84,7 +84,7 @@ TEST(CFDE_XMLSyntaxParser, CDataWithInnerScript) {
// We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
- std::unique_ptr<IFX_Stream> stream(IFX_Stream::CreateStream(
+ std::unique_ptr<IFGAS_Stream> stream(IFGAS_Stream::CreateStream(
reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0));
CFDE_XMLSyntaxParser parser;
parser.Init(stream.get(), 256);
@@ -131,7 +131,7 @@ TEST(CFDE_XMLSyntaxParser, ArrowBangArrow) {
// We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
- std::unique_ptr<IFX_Stream> stream(IFX_Stream::CreateStream(
+ std::unique_ptr<IFGAS_Stream> stream(IFGAS_Stream::CreateStream(
reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0));
CFDE_XMLSyntaxParser parser;
parser.Init(stream.get(), 256);
@@ -174,7 +174,7 @@ TEST(CFDE_XMLSyntaxParser, ArrowBangBracketArrow) {
// We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
- std::unique_ptr<IFX_Stream> stream(IFX_Stream::CreateStream(
+ std::unique_ptr<IFGAS_Stream> stream(IFGAS_Stream::CreateStream(
reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0));
CFDE_XMLSyntaxParser parser;
parser.Init(stream.get(), 256);
@@ -211,7 +211,7 @@ TEST(CFDE_XMLSyntaxParser, IncompleteCData) {
// We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
- std::unique_ptr<IFX_Stream> stream(IFX_Stream::CreateStream(
+ std::unique_ptr<IFGAS_Stream> stream(IFGAS_Stream::CreateStream(
reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0));
CFDE_XMLSyntaxParser parser;
parser.Init(stream.get(), 256);
@@ -248,7 +248,7 @@ TEST(CFDE_XMLSyntaxParser, UnClosedCData) {
// We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
- std::unique_ptr<IFX_Stream> stream(IFX_Stream::CreateStream(
+ std::unique_ptr<IFGAS_Stream> stream(IFGAS_Stream::CreateStream(
reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0));
CFDE_XMLSyntaxParser parser;
parser.Init(stream.get(), 256);
@@ -285,7 +285,7 @@ TEST(CFDE_XMLSyntaxParser, EmptyCData) {
// We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
- std::unique_ptr<IFX_Stream> stream(IFX_Stream::CreateStream(
+ std::unique_ptr<IFGAS_Stream> stream(IFGAS_Stream::CreateStream(
reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0));
CFDE_XMLSyntaxParser parser;
parser.Init(stream.get(), 256);
@@ -332,7 +332,7 @@ TEST(CFDE_XMLSyntaxParser, Comment) {
// We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
- std::unique_ptr<IFX_Stream> stream(IFX_Stream::CreateStream(
+ std::unique_ptr<IFGAS_Stream> stream(IFGAS_Stream::CreateStream(
reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0));
CFDE_XMLSyntaxParser parser;
parser.Init(stream.get(), 256);
@@ -375,7 +375,7 @@ TEST(CFDE_XMLSyntaxParser, IncorrectCommentStart) {
// We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
- std::unique_ptr<IFX_Stream> stream(IFX_Stream::CreateStream(
+ std::unique_ptr<IFGAS_Stream> stream(IFGAS_Stream::CreateStream(
reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0));
CFDE_XMLSyntaxParser parser;
parser.Init(stream.get(), 256);
@@ -418,7 +418,7 @@ TEST(CFDE_XMLSyntaxParser, CommentEmpty) {
// We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
- std::unique_ptr<IFX_Stream> stream(IFX_Stream::CreateStream(
+ std::unique_ptr<IFGAS_Stream> stream(IFGAS_Stream::CreateStream(
reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0));
CFDE_XMLSyntaxParser parser;
parser.Init(stream.get(), 256);
@@ -461,7 +461,7 @@ TEST(CFDE_XMLSyntaxParser, CommentThreeDash) {
// We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
- std::unique_ptr<IFX_Stream> stream(IFX_Stream::CreateStream(
+ std::unique_ptr<IFGAS_Stream> stream(IFGAS_Stream::CreateStream(
reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0));
CFDE_XMLSyntaxParser parser;
parser.Init(stream.get(), 256);
@@ -496,7 +496,7 @@ TEST(CFDE_XMLSyntaxParser, CommentTwoDash) {
// We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
- std::unique_ptr<IFX_Stream> stream(IFX_Stream::CreateStream(
+ std::unique_ptr<IFGAS_Stream> stream(IFGAS_Stream::CreateStream(
reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0));
CFDE_XMLSyntaxParser parser;
parser.Init(stream.get(), 256);
@@ -535,7 +535,7 @@ TEST(CFDE_XMLSyntaxParser, Entities) {
// We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
- std::unique_ptr<IFX_Stream> stream(IFX_Stream::CreateStream(
+ std::unique_ptr<IFGAS_Stream> stream(IFGAS_Stream::CreateStream(
reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0));
CFDE_XMLSyntaxParser parser;
parser.Init(stream.get(), 256);
@@ -575,7 +575,7 @@ TEST(CFDE_XMLSyntaxParser, EntityOverflowHex) {
// We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
- std::unique_ptr<IFX_Stream> stream(IFX_Stream::CreateStream(
+ std::unique_ptr<IFGAS_Stream> stream(IFGAS_Stream::CreateStream(
reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0));
CFDE_XMLSyntaxParser parser;
parser.Init(stream.get(), 256);
@@ -615,7 +615,7 @@ TEST(CFDE_XMLSyntaxParser, EntityOverflowDecimal) {
// We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
- std::unique_ptr<IFX_Stream> stream(IFX_Stream::CreateStream(
+ std::unique_ptr<IFGAS_Stream> stream(IFGAS_Stream::CreateStream(
reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0));
CFDE_XMLSyntaxParser parser;
parser.Init(stream.get(), 256);