summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/app')
-rw-r--r--xfa/fxfa/app/xfa_ffdoc.cpp33
-rw-r--r--xfa/fxfa/app/xfa_ffdoc.h2
-rw-r--r--xfa/fxfa/app/xfa_ffdochandler.cpp2
-rw-r--r--xfa/fxfa/app/xfa_ffdochandler.h61
-rw-r--r--xfa/fxfa/app/xfa_ffwidgetacc.cpp16
-rw-r--r--xfa/fxfa/app/xfa_textlayout.cpp79
-rw-r--r--xfa/fxfa/app/xfa_textlayout.h24
7 files changed, 111 insertions, 106 deletions
diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp
index 0dcf730f2e..01d40ee8cc 100644
--- a/xfa/fxfa/app/xfa_ffdoc.cpp
+++ b/xfa/fxfa/app/xfa_ffdoc.cpp
@@ -10,6 +10,7 @@
#include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
#include "core/fxcrt/include/fx_ext.h"
#include "core/include/fpdfdoc/fpdf_doc.h"
+#include "xfa/fde/xml/fde_xml_imp.h"
#include "xfa/fgas/crt/fgas_algorithm.h"
#include "xfa/fwl/core/ifwl_notedriver.h"
#include "xfa/fxfa/app/xfa_ffapp.h"
@@ -42,16 +43,16 @@ int32_t CXFA_FFDoc::StartLoad() {
m_pDocument = pDocParser->GetDocument();
return iStatus;
}
-FX_BOOL XFA_GetPDFContentsFromPDFXML(IFDE_XMLNode* pPDFElement,
+FX_BOOL XFA_GetPDFContentsFromPDFXML(CFDE_XMLNode* pPDFElement,
uint8_t*& pByteBuffer,
int32_t& iBufferSize) {
- IFDE_XMLElement* pDocumentElement = NULL;
- for (IFDE_XMLNode* pXMLNode =
- pPDFElement->GetNodeItem(IFDE_XMLNode::FirstChild);
- pXMLNode; pXMLNode = pXMLNode->GetNodeItem(IFDE_XMLNode::NextSibling)) {
+ CFDE_XMLElement* pDocumentElement = NULL;
+ for (CFDE_XMLNode* pXMLNode =
+ pPDFElement->GetNodeItem(CFDE_XMLNode::FirstChild);
+ pXMLNode; pXMLNode = pXMLNode->GetNodeItem(CFDE_XMLNode::NextSibling)) {
if (pXMLNode->GetType() == FDE_XMLNODE_Element) {
CFX_WideString wsTagName;
- IFDE_XMLElement* pXMLElement = (IFDE_XMLElement*)pXMLNode;
+ CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLNode);
pXMLElement->GetTagName(wsTagName);
if (wsTagName.Equal(FX_WSTRC(L"document"))) {
pDocumentElement = pXMLElement;
@@ -62,13 +63,13 @@ FX_BOOL XFA_GetPDFContentsFromPDFXML(IFDE_XMLNode* pPDFElement,
if (!pDocumentElement) {
return FALSE;
}
- IFDE_XMLElement* pChunkElement = NULL;
- for (IFDE_XMLNode* pXMLNode =
- pDocumentElement->GetNodeItem(IFDE_XMLNode::FirstChild);
- pXMLNode; pXMLNode = pXMLNode->GetNodeItem(IFDE_XMLNode::NextSibling)) {
+ CFDE_XMLElement* pChunkElement = NULL;
+ for (CFDE_XMLNode* pXMLNode =
+ pDocumentElement->GetNodeItem(CFDE_XMLNode::FirstChild);
+ pXMLNode; pXMLNode = pXMLNode->GetNodeItem(CFDE_XMLNode::NextSibling)) {
if (pXMLNode->GetType() == FDE_XMLNODE_Element) {
CFX_WideString wsTagName;
- IFDE_XMLElement* pXMLElement = (IFDE_XMLElement*)pXMLNode;
+ CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLNode);
pXMLElement->GetTagName(wsTagName);
if (wsTagName.Equal(FX_WSTRC(L"chunk"))) {
pChunkElement = pXMLElement;
@@ -111,7 +112,7 @@ int32_t CXFA_FFDoc::DoLoad(IFX_Pause* pPause) {
if (!pPDFNode) {
return XFA_PARSESTATUS_SyntaxErr;
}
- IFDE_XMLNode* pPDFXML = pPDFNode->GetXMLMappingNode();
+ CFDE_XMLNode* pPDFXML = pPDFNode->GetXMLMappingNode();
if (pPDFXML->GetType() != FDE_XMLNODE_Element) {
return XFA_PARSESTATUS_SyntaxErr;
}
@@ -122,7 +123,7 @@ int32_t CXFA_FFDoc::DoLoad(IFX_Pause* pPause) {
pXFAReader = FX_CreateMemoryStream(pByteBuffer, iBufferSize, TRUE);
} else {
CFX_WideString wsHref;
- ((IFDE_XMLElement*)pPDFXML)->GetString(L"href", wsHref);
+ static_cast<CFDE_XMLElement*>(pPDFXML)->GetString(L"href", wsHref);
if (!wsHref.IsEmpty()) {
pXFAReader = GetDocProvider()->OpenLinkedFile(this, wsHref);
}
@@ -378,16 +379,16 @@ CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(const CFX_WideStringC& wsName,
return (CFX_DIBitmap*)imageDIBDpi->pDibSource;
}
-IFDE_XMLElement* CXFA_FFDoc::GetPackageData(const CFX_WideStringC& wsPackage) {
+CFDE_XMLElement* CXFA_FFDoc::GetPackageData(const CFX_WideStringC& wsPackage) {
uint32_t packetHash =
FX_HashCode_String_GetW(wsPackage.GetPtr(), wsPackage.GetLength());
CXFA_Node* pNode = ToNode(m_pDocument->GetXFAObject(packetHash));
if (!pNode) {
return NULL;
}
- IFDE_XMLNode* pXMLNode = pNode->GetXMLMappingNode();
+ CFDE_XMLNode* pXMLNode = pNode->GetXMLMappingNode();
return (pXMLNode && pXMLNode->GetType() == FDE_XMLNODE_Element)
- ? (IFDE_XMLElement*)pXMLNode
+ ? static_cast<CFDE_XMLElement*>(pXMLNode)
: NULL;
}
FX_BOOL CXFA_FFDoc::SavePackage(const CFX_WideStringC& wsPackage,
diff --git a/xfa/fxfa/app/xfa_ffdoc.h b/xfa/fxfa/app/xfa_ffdoc.h
index 8b61bd228f..31d5d0fc41 100644
--- a/xfa/fxfa/app/xfa_ffdoc.h
+++ b/xfa/fxfa/app/xfa_ffdoc.h
@@ -42,7 +42,7 @@ class CXFA_FFDoc : public IXFA_Doc {
CFX_DIBitmap* GetPDFNamedImage(const CFX_WideStringC& wsName,
int32_t& iImageXDpi,
int32_t& iImageYDpi);
- IFDE_XMLElement* GetPackageData(const CFX_WideStringC& wsPackage);
+ CFDE_XMLElement* GetPackageData(const CFX_WideStringC& wsPackage);
FX_BOOL SavePackage(const CFX_WideStringC& wsPackage,
IFX_FileWrite* pFile,
IXFA_ChecksumContext* pCSContext = NULL);
diff --git a/xfa/fxfa/app/xfa_ffdochandler.cpp b/xfa/fxfa/app/xfa_ffdochandler.cpp
index 2019bb24df..036fc67ebd 100644
--- a/xfa/fxfa/app/xfa_ffdochandler.cpp
+++ b/xfa/fxfa/app/xfa_ffdochandler.cpp
@@ -40,7 +40,7 @@ int32_t CXFA_FFDocHandler::CountPackages(IXFA_Doc* hDoc) {
void CXFA_FFDocHandler::GetPackageName(IXFA_Doc* hDoc,
int32_t iPackage,
CFX_WideStringC& wsPackage) {}
-IFDE_XMLElement* CXFA_FFDocHandler::GetPackageData(
+CFDE_XMLElement* CXFA_FFDocHandler::GetPackageData(
IXFA_Doc* hDoc,
const CFX_WideStringC& wsPackage) {
return static_cast<CXFA_FFDoc*>(hDoc)->GetPackageData(wsPackage);
diff --git a/xfa/fxfa/app/xfa_ffdochandler.h b/xfa/fxfa/app/xfa_ffdochandler.h
index ff2491509a..695f6a819d 100644
--- a/xfa/fxfa/app/xfa_ffdochandler.h
+++ b/xfa/fxfa/app/xfa_ffdochandler.h
@@ -13,36 +13,37 @@ class CXFA_FFDocHandler : public IXFA_DocHandler {
public:
CXFA_FFDocHandler();
~CXFA_FFDocHandler();
- virtual void ReleaseDoc(IXFA_Doc* hDoc);
- virtual IXFA_DocProvider* GetDocProvider(IXFA_Doc* hDoc);
- virtual uint32_t GetDocType(IXFA_Doc* hDoc);
- virtual int32_t StartLoad(IXFA_Doc* hDoc);
- virtual int32_t DoLoad(IXFA_Doc* hDoc, IFX_Pause* pPause = NULL);
- virtual void StopLoad(IXFA_Doc* hDoc);
-
- virtual IXFA_DocView* CreateDocView(IXFA_Doc* hDoc, uint32_t dwView = 0);
- virtual int32_t CountPackages(IXFA_Doc* hDoc);
- virtual void GetPackageName(IXFA_Doc* hDoc,
- int32_t iPackage,
- CFX_WideStringC& wsPackage);
- virtual IFDE_XMLElement* GetPackageData(IXFA_Doc* hDoc,
- const CFX_WideStringC& wsPackage);
- virtual FX_BOOL SavePackage(IXFA_Doc* hDoc,
- const CFX_WideStringC& wsPackage,
- IFX_FileWrite* pFile,
- IXFA_ChecksumContext* pCSContext = NULL);
- virtual FX_BOOL CloseDoc(IXFA_Doc* hDoc);
- virtual FX_BOOL ImportData(IXFA_Doc* hDoc,
- IFX_FileRead* pStream,
- FX_BOOL bXDP = TRUE);
- virtual void SetJSERuntime(IXFA_Doc* hDoc, FXJSE_HRUNTIME hRuntime);
- virtual FXJSE_HVALUE GetXFAScriptObject(IXFA_Doc* hDoc);
- virtual XFA_ATTRIBUTEENUM GetRestoreState(IXFA_Doc* hDoc);
- virtual FX_BOOL RunDocScript(IXFA_Doc* hDoc,
- XFA_SCRIPTTYPE eScriptType,
- const CFX_WideStringC& wsScript,
- FXJSE_HVALUE hRetValue,
- FXJSE_HVALUE hThisObject);
+
+ void ReleaseDoc(IXFA_Doc* hDoc) override;
+ IXFA_DocProvider* GetDocProvider(IXFA_Doc* hDoc) override;
+ uint32_t GetDocType(IXFA_Doc* hDoc) override;
+ int32_t StartLoad(IXFA_Doc* hDoc) override;
+ int32_t DoLoad(IXFA_Doc* hDoc, IFX_Pause* pPause = NULL) override;
+ void StopLoad(IXFA_Doc* hDoc) override;
+
+ IXFA_DocView* CreateDocView(IXFA_Doc* hDoc, uint32_t dwView = 0) override;
+ int32_t CountPackages(IXFA_Doc* hDoc) override;
+ void GetPackageName(IXFA_Doc* hDoc,
+ int32_t iPackage,
+ CFX_WideStringC& wsPackage) override;
+ CFDE_XMLElement* GetPackageData(IXFA_Doc* hDoc,
+ const CFX_WideStringC& wsPackage);
+ FX_BOOL SavePackage(IXFA_Doc* hDoc,
+ const CFX_WideStringC& wsPackage,
+ IFX_FileWrite* pFile,
+ IXFA_ChecksumContext* pCSContext = NULL) override;
+ FX_BOOL CloseDoc(IXFA_Doc* hDoc) override;
+ FX_BOOL ImportData(IXFA_Doc* hDoc,
+ IFX_FileRead* pStream,
+ FX_BOOL bXDP = TRUE) override;
+ void SetJSERuntime(IXFA_Doc* hDoc, FXJSE_HRUNTIME hRuntime) override;
+ FXJSE_HVALUE GetXFAScriptObject(IXFA_Doc* hDoc) override;
+ XFA_ATTRIBUTEENUM GetRestoreState(IXFA_Doc* hDoc) override;
+ FX_BOOL RunDocScript(IXFA_Doc* hDoc,
+ XFA_SCRIPTTYPE eScriptType,
+ const CFX_WideStringC& wsScript,
+ FXJSE_HVALUE hRetValue,
+ FXJSE_HVALUE hThisObject) override;
protected:
};
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index e4e574b969..c50786a3dc 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -9,6 +9,7 @@
#include <algorithm>
#include "xfa/fde/tto/fde_textout.h"
+#include "xfa/fde/xml/fde_xml_imp.h"
#include "xfa/fxfa/app/xfa_ffapp.h"
#include "xfa/fxfa/app/xfa_ffcheckbutton.h"
#include "xfa/fxfa/app/xfa_ffchoicelist.h"
@@ -288,9 +289,10 @@ void CXFA_WidgetAcc::SetImageEdit(const CFX_WideStringC& wsContentType,
if (pHrefNode) {
pHrefNode->SetCData(XFA_ATTRIBUTE_Value, wsHref);
} else {
- IFDE_XMLNode* pXMLNode = pBind->GetXMLMappingNode();
+ CFDE_XMLNode* pXMLNode = pBind->GetXMLMappingNode();
FXSYS_assert(pXMLNode && pXMLNode->GetType() == FDE_XMLNODE_Element);
- ((IFDE_XMLElement*)pXMLNode)->SetString(FX_WSTRC(L"href"), wsHref);
+ static_cast<CFDE_XMLElement*>(pXMLNode)
+ ->SetString(FX_WSTRC(L"href"), wsHref);
}
}
@@ -1602,14 +1604,14 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) {
return pChildNode;
} else if (m_eType == XFA_TEXTPROVIDERTYPE_Datasets) {
CXFA_Node* pBind = m_pWidgetAcc->GetDatasets();
- IFDE_XMLNode* pXMLNode = pBind->GetXMLMappingNode();
+ CFDE_XMLNode* pXMLNode = pBind->GetXMLMappingNode();
FXSYS_assert(pXMLNode);
- for (IFDE_XMLNode* pXMLChild =
- pXMLNode->GetNodeItem(IFDE_XMLNode::FirstChild);
+ for (CFDE_XMLNode* pXMLChild =
+ pXMLNode->GetNodeItem(CFDE_XMLNode::FirstChild);
pXMLChild;
- pXMLChild = pXMLChild->GetNodeItem(IFDE_XMLNode::NextSibling)) {
+ pXMLChild = pXMLChild->GetNodeItem(CFDE_XMLNode::NextSibling)) {
if (pXMLChild->GetType() == FDE_XMLNODE_Element) {
- IFDE_XMLElement* pElement = (IFDE_XMLElement*)pXMLChild;
+ CFDE_XMLElement* pElement = static_cast<CFDE_XMLElement*>(pXMLChild);
if (XFA_RecognizeRichText(pElement)) {
bRichText = TRUE;
}
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index ddd9809f91..ced7acbb32 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -10,6 +10,7 @@
#include "core/fxcrt/include/fx_ext.h"
#include "xfa/fde/fde_pen.h"
+#include "xfa/fde/xml/fde_xml_imp.h"
#include "xfa/fgas/crt/fgas_algorithm.h"
#include "xfa/fgas/crt/fgas_codepage.h"
#include "xfa/fxfa/app/xfa_ffapp.h"
@@ -64,7 +65,7 @@ CXFA_TextParser::~CXFA_TextParser() {
m_pAllocator->Release();
FX_POSITION ps = m_mapXMLNodeToParseContext.GetStartPosition();
while (ps) {
- IFDE_XMLNode* pXMLNode;
+ CFDE_XMLNode* pXMLNode;
CXFA_TextParseContext* pParseContext;
m_mapXMLNodeToParseContext.GetNextAssoc(ps, pXMLNode, pParseContext);
if (pParseContext)
@@ -75,7 +76,7 @@ CXFA_TextParser::~CXFA_TextParser() {
void CXFA_TextParser::Reset() {
FX_POSITION ps = m_mapXMLNodeToParseContext.GetStartPosition();
while (ps) {
- IFDE_XMLNode* pXMLNode;
+ CFDE_XMLNode* pXMLNode;
CXFA_TextParseContext* pParseContext;
m_mapXMLNodeToParseContext.GetNextAssoc(ps, pXMLNode, pParseContext);
if (pParseContext)
@@ -210,7 +211,7 @@ IFDE_CSSComputedStyle* CXFA_TextParser::CreateStyle(
return pNewStyle;
}
IFDE_CSSComputedStyle* CXFA_TextParser::ComputeStyle(
- IFDE_XMLNode* pXMLNode,
+ CFDE_XMLNode* pXMLNode,
IFDE_CSSComputedStyle* pParentStyle) {
CXFA_TextParseContext* pContext = static_cast<CXFA_TextParseContext*>(
m_mapXMLNodeToParseContext.GetValueAt(pXMLNode));
@@ -230,7 +231,7 @@ IFDE_CSSComputedStyle* CXFA_TextParser::ComputeStyle(
pCSSAccel->OnLeaveTag(&tagProvider);
return pStyle;
}
-void CXFA_TextParser::DoParse(IFDE_XMLNode* pXMLContainer,
+void CXFA_TextParser::DoParse(CFDE_XMLNode* pXMLContainer,
IXFA_TextProvider* pTextProvider) {
if (pXMLContainer == NULL || pTextProvider == NULL || m_pAllocator) {
return;
@@ -242,7 +243,7 @@ void CXFA_TextParser::DoParse(IFDE_XMLNode* pXMLContainer,
ParseRichText(pXMLContainer, pRootStyle);
pRootStyle->Release();
}
-void CXFA_TextParser::ParseRichText(IFDE_XMLNode* pXMLNode,
+void CXFA_TextParser::ParseRichText(CFDE_XMLNode* pXMLNode,
IFDE_CSSComputedStyle* pParentStyle) {
if (pXMLNode == NULL) {
return;
@@ -278,16 +279,16 @@ void CXFA_TextParser::ParseRichText(IFDE_XMLNode* pXMLNode,
pTextContext->SetDisplay(eDisplay);
m_mapXMLNodeToParseContext.SetAt(pXMLNode, pTextContext);
}
- for (IFDE_XMLNode* pXMLChild =
- pXMLNode->GetNodeItem(IFDE_XMLNode::FirstChild);
+ for (CFDE_XMLNode* pXMLChild =
+ pXMLNode->GetNodeItem(CFDE_XMLNode::FirstChild);
pXMLChild;
- pXMLChild = pXMLChild->GetNodeItem(IFDE_XMLNode::NextSibling)) {
+ pXMLChild = pXMLChild->GetNodeItem(CFDE_XMLNode::NextSibling)) {
ParseRichText(pXMLChild, pNewStyle);
}
if (pNewStyle)
pNewStyle->Release();
}
-void CXFA_TextParser::ParseTagInfo(IFDE_XMLNode* pXMLNode,
+void CXFA_TextParser::ParseTagInfo(CFDE_XMLNode* pXMLNode,
CXFA_CSSTagProvider& tagProvider) {
static const uint32_t s_XFATagName[] = {
0x61, 0x62, 0x69, 0x70, 0x0001f714,
@@ -296,7 +297,7 @@ void CXFA_TextParser::ParseTagInfo(IFDE_XMLNode* pXMLNode,
};
CFX_WideString wsName;
if (pXMLNode->GetType() == FDE_XMLNODE_Element) {
- IFDE_XMLElement* pXMLElement = (IFDE_XMLElement*)pXMLNode;
+ CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLNode);
pXMLElement->GetLocalTagName(wsName);
tagProvider.SetTagNameObj(wsName);
uint32_t dwHashCode =
@@ -391,7 +392,7 @@ FX_FLOAT CXFA_TextParser::GetFontSize(IXFA_TextProvider* pTextProvider,
}
int32_t CXFA_TextParser::GetHorScale(IXFA_TextProvider* pTextProvider,
IFDE_CSSComputedStyle* pStyle,
- IFDE_XMLNode* pXMLNode) const {
+ CFDE_XMLNode* pXMLNode) const {
if (pStyle) {
CFX_WideString wsValue;
if (pStyle->GetCustomStyle(FX_WSTRC(L"xfa-font-horizontal-scale"),
@@ -406,7 +407,7 @@ int32_t CXFA_TextParser::GetHorScale(IXFA_TextProvider* pTextProvider,
FX_WSTRC(L"xfa-font-horizontal-scale"), wsValue)) {
return wsValue.GetInteger();
}
- pXMLNode = pXMLNode->GetNodeItem(IFDE_XMLNode::Parent);
+ pXMLNode = pXMLNode->GetNodeItem(CFDE_XMLNode::Parent);
}
}
if (CXFA_Font font = pTextProvider->GetFontNode()) {
@@ -515,7 +516,7 @@ FX_FLOAT CXFA_TextParser::GetLineHeight(IXFA_TextProvider* pTextProvider,
return fLineHeight;
}
FX_BOOL CXFA_TextParser::GetEmbbedObj(IXFA_TextProvider* pTextProvider,
- IFDE_XMLNode* pXMLNode,
+ CFDE_XMLNode* pXMLNode,
CFX_WideString& wsValue) {
wsValue.Empty();
if (pXMLNode == NULL) {
@@ -523,7 +524,7 @@ FX_BOOL CXFA_TextParser::GetEmbbedObj(IXFA_TextProvider* pTextProvider,
}
FX_BOOL bRet = FALSE;
if (pXMLNode->GetType() == FDE_XMLNODE_Element) {
- IFDE_XMLElement* pElement = (IFDE_XMLElement*)pXMLNode;
+ CFDE_XMLElement* pElement = static_cast<CFDE_XMLElement*>(pXMLNode);
CFX_WideString wsAttr;
pElement->GetString(FX_WSTRC(L"xfa:embed").GetPtr(), wsAttr);
if (wsAttr.IsEmpty()) {
@@ -559,7 +560,7 @@ FX_BOOL CXFA_TextParser::GetEmbbedObj(IXFA_TextProvider* pTextProvider,
return bRet;
}
CXFA_TextParseContext* CXFA_TextParser::GetParseContextFromMap(
- IFDE_XMLNode* pXMLNode) {
+ CFDE_XMLNode* pXMLNode) {
return (CXFA_TextParseContext*)m_mapXMLNodeToParseContext.GetValueAt(
pXMLNode);
}
@@ -712,19 +713,19 @@ void CXFA_TextLayout::GetTextDataNode() {
}
m_pTextDataNode = pNode;
}
-IFDE_XMLNode* CXFA_TextLayout::GetXMLContainerNode() {
- IFDE_XMLNode* pXMLContainer = NULL;
+CFDE_XMLNode* CXFA_TextLayout::GetXMLContainerNode() {
+ CFDE_XMLNode* pXMLContainer = NULL;
if (m_bRichText) {
- IFDE_XMLNode* pXMLRoot = m_pTextDataNode->GetXMLMappingNode();
+ CFDE_XMLNode* pXMLRoot = m_pTextDataNode->GetXMLMappingNode();
if (!pXMLRoot) {
return pXMLContainer;
}
- for (IFDE_XMLNode* pXMLChild =
- pXMLRoot->GetNodeItem(IFDE_XMLNode::FirstChild);
+ for (CFDE_XMLNode* pXMLChild =
+ pXMLRoot->GetNodeItem(CFDE_XMLNode::FirstChild);
pXMLChild;
- pXMLChild = pXMLChild->GetNodeItem(IFDE_XMLNode::NextSibling)) {
+ pXMLChild = pXMLChild->GetNodeItem(CFDE_XMLNode::NextSibling)) {
if (pXMLChild->GetType() == FDE_XMLNODE_Element) {
- IFDE_XMLElement* pXMLElement = (IFDE_XMLElement*)pXMLChild;
+ CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLChild);
CFX_WideString wsTag;
pXMLElement->GetLocalTagName(wsTag);
if (wsTag.Equal(FX_WSTRC(L"body")) || wsTag.Equal(FX_WSTRC(L"html"))) {
@@ -803,7 +804,7 @@ void CXFA_TextLayout::InitBreak(FX_FLOAT fLineWidth) {
void CXFA_TextLayout::InitBreak(IFDE_CSSComputedStyle* pStyle,
FDE_CSSDISPLAY eDisplay,
FX_FLOAT fLineWidth,
- IFDE_XMLNode* pXMLNode,
+ CFDE_XMLNode* pXMLNode,
IFDE_CSSComputedStyle* pParentStyle) {
if (pStyle == NULL) {
InitBreak(fLineWidth);
@@ -1113,17 +1114,17 @@ FX_BOOL CXFA_TextLayout::Layout(int32_t iBlock) {
}
m_pBreak->Reset();
if (m_bRichText) {
- IFDE_XMLNode* pContainerNode = GetXMLContainerNode();
+ CFDE_XMLNode* pContainerNode = GetXMLContainerNode();
if (!pContainerNode) {
return TRUE;
}
- IFDE_XMLNode* pXMLNode = m_pLoader->m_pXMLNode;
+ CFDE_XMLNode* pXMLNode = m_pLoader->m_pXMLNode;
if (pXMLNode == NULL) {
return TRUE;
}
- IFDE_XMLNode* pSaveXMLNode = m_pLoader->m_pXMLNode;
+ CFDE_XMLNode* pSaveXMLNode = m_pLoader->m_pXMLNode;
for (; pXMLNode;
- pXMLNode = pXMLNode->GetNodeItem(IFDE_XMLNode::NextSibling)) {
+ pXMLNode = pXMLNode->GetNodeItem(CFDE_XMLNode::NextSibling)) {
FX_BOOL bFlag = LoadRichText(pXMLNode, szText, fLinePos,
m_pLoader->m_pParentStyle, TRUE);
if (!bFlag) {
@@ -1131,7 +1132,7 @@ FX_BOOL CXFA_TextLayout::Layout(int32_t iBlock) {
}
}
while (pXMLNode == NULL) {
- pXMLNode = pSaveXMLNode->GetNodeItem(IFDE_XMLNode::Parent);
+ pXMLNode = pSaveXMLNode->GetNodeItem(CFDE_XMLNode::Parent);
if (pXMLNode == pContainerNode) {
break;
}
@@ -1142,12 +1143,12 @@ FX_BOOL CXFA_TextLayout::Layout(int32_t iBlock) {
break;
}
pSaveXMLNode = pXMLNode;
- pXMLNode = pXMLNode->GetNodeItem(IFDE_XMLNode::NextSibling);
+ pXMLNode = pXMLNode->GetNodeItem(CFDE_XMLNode::NextSibling);
if (!pXMLNode) {
continue;
}
for (; pXMLNode;
- pXMLNode = pXMLNode->GetNodeItem(IFDE_XMLNode::NextSibling)) {
+ pXMLNode = pXMLNode->GetNodeItem(CFDE_XMLNode::NextSibling)) {
FX_BOOL bFlag = LoadRichText(pXMLNode, szText, fLinePos,
m_pLoader->m_pParentStyle, TRUE);
if (!bFlag) {
@@ -1313,7 +1314,7 @@ FX_BOOL CXFA_TextLayout::Loader(const CFX_SizeF& szText,
return TRUE;
}
if (m_bRichText) {
- IFDE_XMLNode* pXMLContainer = GetXMLContainerNode();
+ CFDE_XMLNode* pXMLContainer = GetXMLContainerNode();
if (pXMLContainer) {
if (!m_textParser.IsParsed()) {
m_textParser.DoParse(pXMLContainer, m_pTextProvider);
@@ -1359,7 +1360,7 @@ void CXFA_TextLayout::LoadText(CXFA_Node* pNode,
EndBreak(FX_RTFBREAK_ParagraphBreak, fLinePos, bSavePieces);
}
}
-FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode* pXMLNode,
+FX_BOOL CXFA_TextLayout::LoadRichText(CFDE_XMLNode* pXMLNode,
const CFX_SizeF& szText,
FX_FLOAT& fLinePos,
IFDE_CSSComputedStyle* pParentStyle,
@@ -1381,7 +1382,7 @@ FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode* pXMLNode,
if (bEndBreak) {
FX_BOOL bCurOl = FALSE;
FX_BOOL bCurLi = FALSE;
- IFDE_XMLElement* pElement = NULL;
+ CFDE_XMLElement* pElement = NULL;
if (pContext) {
if (m_bBlockContinue ||
(m_pLoader && pXMLNode == m_pLoader->m_pXMLNode)) {
@@ -1390,7 +1391,7 @@ FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode* pXMLNode,
if (pXMLNode->GetType() == FDE_XMLNODE_Text) {
bContentNode = TRUE;
} else if (pXMLNode->GetType() == FDE_XMLNODE_Element) {
- pElement = (IFDE_XMLElement*)pXMLNode;
+ pElement = static_cast<CFDE_XMLElement*>(pXMLNode);
pElement->GetLocalTagName(wsName);
}
if (wsName == FX_WSTRC(L"ol")) {
@@ -1437,7 +1438,7 @@ FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode* pXMLNode,
m_textParser.IsSpaceRun(bContentNode ? pParentStyle : pStyle);
CFX_WideString wsText;
if (bContentNode && iTabCount == 0) {
- ((IFDE_XMLText*)pXMLNode)->GetText(wsText);
+ static_cast<CFDE_XMLText*>(pXMLNode)->GetText(wsText);
} else if (wsName == FX_WSTRC(L"br")) {
wsText = L'\n';
} else if (wsName == FX_WSTRC(L"li")) {
@@ -1506,10 +1507,10 @@ FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode* pXMLNode,
}
}
FX_BOOL ret = TRUE;
- for (IFDE_XMLNode* pChildNode =
- pXMLNode->GetNodeItem(IFDE_XMLNode::FirstChild);
+ for (CFDE_XMLNode* pChildNode =
+ pXMLNode->GetNodeItem(CFDE_XMLNode::FirstChild);
pChildNode;
- pChildNode = pChildNode->GetNodeItem(IFDE_XMLNode::NextSibling)) {
+ pChildNode = pChildNode->GetNodeItem(CFDE_XMLNode::NextSibling)) {
if (bCurOl) {
iLiCount++;
}
@@ -1557,7 +1558,7 @@ FX_BOOL CXFA_TextLayout::LoadRichText(IFDE_XMLNode* pXMLNode,
}
if (m_pLoader && m_pLoader->m_iTotalLines > -1) {
m_pLoader->m_pXMLNode =
- pXMLNode->GetNodeItem(IFDE_XMLNode::NextSibling);
+ pXMLNode->GetNodeItem(CFDE_XMLNode::NextSibling);
m_pLoader->m_pParentStyle = pParentStyle;
}
return FALSE;
diff --git a/xfa/fxfa/app/xfa_textlayout.h b/xfa/fxfa/app/xfa_textlayout.h
index f6c3262536..1d2db21652 100644
--- a/xfa/fxfa/app/xfa_textlayout.h
+++ b/xfa/fxfa/app/xfa_textlayout.h
@@ -88,9 +88,9 @@ class CXFA_TextParser {
CXFA_TextParser() : m_pAllocator(NULL), m_pSelector(NULL), m_pUASheet(NULL) {}
virtual ~CXFA_TextParser();
void Reset();
- void DoParse(IFDE_XMLNode* pXMLContainer, IXFA_TextProvider* pTextProvider);
+ void DoParse(CFDE_XMLNode* pXMLContainer, IXFA_TextProvider* pTextProvider);
IFDE_CSSComputedStyle* CreateRootStyle(IXFA_TextProvider* pTextProvider);
- IFDE_CSSComputedStyle* ComputeStyle(IFDE_XMLNode* pXMLNode,
+ IFDE_CSSComputedStyle* ComputeStyle(CFDE_XMLNode* pXMLNode,
IFDE_CSSComputedStyle* pParentStyle);
FX_BOOL IsParsed() const { return m_pAllocator != NULL; }
@@ -106,7 +106,7 @@ class CXFA_TextParser {
IFDE_CSSComputedStyle* pStyle) const;
int32_t GetHorScale(IXFA_TextProvider* pTextProvider,
IFDE_CSSComputedStyle* pStyle,
- IFDE_XMLNode* pXMLNode) const;
+ CFDE_XMLNode* pXMLNode) const;
int32_t GetVerScale(IXFA_TextProvider* pTextProvider,
IFDE_CSSComputedStyle* pStyle) const;
void GetUnderline(IXFA_TextProvider* pTextProvider,
@@ -125,21 +125,21 @@ class CXFA_TextParser {
FX_BOOL bFirst,
FX_FLOAT fVerScale) const;
FX_BOOL GetEmbbedObj(IXFA_TextProvider* pTextProvider,
- IFDE_XMLNode* pXMLNode,
+ CFDE_XMLNode* pXMLNode,
CFX_WideString& wsValue);
- CXFA_TextParseContext* GetParseContextFromMap(IFDE_XMLNode* pXMLNode);
+ CXFA_TextParseContext* GetParseContextFromMap(CFDE_XMLNode* pXMLNode);
private:
void InitCSSData(IXFA_TextProvider* pTextProvider);
- void ParseRichText(IFDE_XMLNode* pXMLNode,
+ void ParseRichText(CFDE_XMLNode* pXMLNode,
IFDE_CSSComputedStyle* pParentStyle);
- void ParseTagInfo(IFDE_XMLNode* pXMLNode, CXFA_CSSTagProvider& tagProvider);
+ void ParseTagInfo(CFDE_XMLNode* pXMLNode, CXFA_CSSTagProvider& tagProvider);
IFDE_CSSStyleSheet* LoadDefaultSheetStyle();
IFDE_CSSComputedStyle* CreateStyle(IFDE_CSSComputedStyle* pParentStyle);
IFX_MEMAllocator* m_pAllocator;
IFDE_CSSStyleSelector* m_pSelector;
IFDE_CSSStyleSheet* m_pUASheet;
- CFX_MapPtrTemplate<IFDE_XMLNode*, CXFA_TextParseContext*>
+ CFX_MapPtrTemplate<CFDE_XMLNode*, CXFA_TextParseContext*>
m_mapXMLNodeToParseContext;
};
@@ -165,7 +165,7 @@ class CXFA_LoaderContext {
int32_t m_iChar;
int32_t m_iLines;
int32_t m_iTotalLines;
- IFDE_XMLNode* m_pXMLNode;
+ CFDE_XMLNode* m_pXMLNode;
CXFA_Node* m_pNode;
IFDE_CSSComputedStyle* m_pParentStyle;
CFX_ArrayTemplate<FX_FLOAT> m_lineHeights;
@@ -352,13 +352,13 @@ class CXFA_TextLayout {
private:
void GetTextDataNode();
- IFDE_XMLNode* GetXMLContainerNode();
+ CFDE_XMLNode* GetXMLContainerNode();
IFX_RTFBreak* CreateBreak(FX_BOOL bDefault);
void InitBreak(FX_FLOAT fLineWidth);
void InitBreak(IFDE_CSSComputedStyle* pStyle,
FDE_CSSDISPLAY eDisplay,
FX_FLOAT fLineWidth,
- IFDE_XMLNode* pXMLNode,
+ CFDE_XMLNode* pXMLNode,
IFDE_CSSComputedStyle* pParentStyle = NULL);
FX_BOOL Loader(const CFX_SizeF& szText,
FX_FLOAT& fLinePos,
@@ -367,7 +367,7 @@ class CXFA_TextLayout {
const CFX_SizeF& szText,
FX_FLOAT& fLinePos,
FX_BOOL bSavePieces);
- FX_BOOL LoadRichText(IFDE_XMLNode* pXMLNode,
+ FX_BOOL LoadRichText(CFDE_XMLNode* pXMLNode,
const CFX_SizeF& szText,
FX_FLOAT& fLinePos,
IFDE_CSSComputedStyle* pParentStyle,