summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/src/fxfa/src/app/xfa_fffield.cpp4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffnotify.cpp20
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffnotify.h14
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffpageview.cpp27
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffpageview.h11
-rw-r--r--xfa/src/fxfa/src/app/xfa_fftext.cpp4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidget.cpp4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidget.h4
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp2
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp2
-rw-r--r--xfa/src/fxfa/src/app/xfa_fwltheme.cpp2
-rw-r--r--xfa/src/fxfa/src/common/xfa_doclayout.h60
-rw-r--r--xfa/src/fxfa/src/common/xfa_document.h8
-rw-r--r--xfa/src/fxfa/src/parser/xfa_document_layout_imp.cpp28
-rw-r--r--xfa/src/fxfa/src/parser/xfa_document_layout_imp.h6
-rw-r--r--xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp12
-rw-r--r--xfa/src/fxfa/src/parser/xfa_layout_appadapter.h64
-rw-r--r--xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp295
-rw-r--r--xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h34
-rw-r--r--xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp246
-rw-r--r--xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.h26
-rw-r--r--xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp40
22 files changed, 441 insertions, 472 deletions
diff --git a/xfa/src/fxfa/src/app/xfa_fffield.cpp b/xfa/src/fxfa/src/app/xfa_fffield.cpp
index f574f9ba74..9051cfdb02 100644
--- a/xfa/src/fxfa/src/app/xfa_fffield.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fffield.cpp
@@ -166,7 +166,7 @@ void CXFA_FFField::CapPlacement() {
GetRectWithoutRotate(rtWidget);
CXFA_Margin mgWidget = m_pDataAcc->GetMargin();
if (mgWidget) {
- CXFA_LayoutItemImpl* pItem = this;
+ CXFA_LayoutItem* pItem = this;
FX_FLOAT fLeftInset = 0, fRightInset = 0, fTopInset = 0, fBottomInset = 0;
mgWidget.GetLeftInset(fLeftInset);
mgWidget.GetRightInset(fRightInset);
@@ -196,7 +196,7 @@ void CXFA_FFField::CapPlacement() {
m_rtCaption.Set(0, 0, 0, 0);
} else {
fCapReserve = caption.GetReserve();
- CXFA_LayoutItemImpl* pItem = this;
+ CXFA_LayoutItem* pItem = this;
if (pItem->GetPrev() == NULL && pItem->GetNext() == NULL) {
m_rtCaption.Set(rtWidget.left, rtWidget.top, rtWidget.width,
rtWidget.height);
diff --git a/xfa/src/fxfa/src/app/xfa_ffnotify.cpp b/xfa/src/fxfa/src/app/xfa_ffnotify.cpp
index d627f6bfc4..188332c2dd 100644
--- a/xfa/src/fxfa/src/app/xfa_ffnotify.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffnotify.cpp
@@ -146,7 +146,7 @@ void CXFA_FFNotify::OnWidgetDataEvent(CXFA_WidgetData* pSender,
} break;
}
}
-CXFA_LayoutItemImpl* CXFA_FFNotify::OnCreateLayoutItem(CXFA_Node* pNode) {
+CXFA_LayoutItem* CXFA_FFNotify::OnCreateLayoutItem(CXFA_Node* pNode) {
IXFA_DocLayout* pLayout = m_pDoc->GetXFADoc()->GetDocLayout();
CXFA_FFDocView* pDocView = m_pDoc->GetDocView(pLayout);
XFA_ELEMENT eType = pNode->GetClassID();
@@ -154,11 +154,11 @@ CXFA_LayoutItemImpl* CXFA_FFNotify::OnCreateLayoutItem(CXFA_Node* pNode) {
return new CXFA_FFPageView(pDocView, pNode);
}
if (eType == XFA_ELEMENT_ContentArea) {
- return new CXFA_ContainerLayoutItemImpl(pNode);
+ return new CXFA_ContainerLayoutItem(pNode);
}
CXFA_WidgetAcc* pAcc = static_cast<CXFA_WidgetAcc*>(pNode->GetWidgetData());
if (!pAcc) {
- return new CXFA_ContentLayoutItemImpl(pNode);
+ return new CXFA_ContentLayoutItem(pNode);
}
CXFA_FFPageView* pPageView = NULL;
CXFA_FFWidget* pWidget = NULL;
@@ -233,7 +233,7 @@ CXFA_LayoutItemImpl* CXFA_FFNotify::OnCreateLayoutItem(CXFA_Node* pNode) {
return pWidget;
}
void CXFA_FFNotify::OnLayoutEvent(IXFA_DocLayout* pLayout,
- CXFA_LayoutItemImpl* pSender,
+ CXFA_LayoutItem* pSender,
XFA_LAYOUTEVENT eEvent,
void* pParam,
void* pParam2) {
@@ -335,7 +335,7 @@ IXFA_WidgetHandler* CXFA_FFNotify::GetWidgetHandler() {
CXFA_FFDocView* pDocView = m_pDoc->GetDocView();
return pDocView ? pDocView->GetWidgetHandler() : NULL;
}
-IXFA_Widget* CXFA_FFNotify::GetHWidget(CXFA_LayoutItemImpl* pLayoutItem) {
+IXFA_Widget* CXFA_FFNotify::GetHWidget(CXFA_LayoutItem* pLayoutItem) {
return XFA_GetWidgetFromLayoutItem(pLayoutItem);
}
void CXFA_FFNotify::OpenDropDownList(IXFA_Widget* hWidget) {
@@ -570,7 +570,7 @@ void CXFA_FFNotify::OnChildRemoved(CXFA_Node* pSender,
}
void CXFA_FFNotify::OnLayoutItemAdd(CXFA_FFDocView* pDocView,
IXFA_DocLayout* pLayout,
- CXFA_LayoutItemImpl* pSender,
+ CXFA_LayoutItem* pSender,
void* pParam,
void* pParam2) {
CXFA_FFWidget* pWidget = static_cast<CXFA_FFWidget*>(pSender);
@@ -610,7 +610,7 @@ void CXFA_FFNotify::OnLayoutItemAdd(CXFA_FFDocView* pDocView,
}
void CXFA_FFNotify::OnLayoutItemRemoving(CXFA_FFDocView* pDocView,
IXFA_DocLayout* pLayout,
- CXFA_LayoutItemImpl* pSender,
+ CXFA_LayoutItem* pSender,
void* pParam,
void* pParam2) {
CXFA_FFWidget* pWidget = static_cast<CXFA_FFWidget*>(pSender);
@@ -624,13 +624,13 @@ void CXFA_FFNotify::OnLayoutItemRemoving(CXFA_FFDocView* pDocView,
}
void CXFA_FFNotify::OnLayoutItemRectChanged(CXFA_FFDocView* pDocView,
IXFA_DocLayout* pLayout,
- CXFA_LayoutItemImpl* pSender,
+ CXFA_LayoutItem* pSender,
void* pParam,
void* pParam2) {
}
void CXFA_FFNotify::OnLayoutItemStatustChanged(CXFA_FFDocView* pDocView,
IXFA_DocLayout* pLayout,
- CXFA_LayoutItemImpl* pSender,
+ CXFA_LayoutItem* pSender,
void* pParam,
void* pParam2) {
CXFA_FFWidget* pWidget = static_cast<CXFA_FFWidget*>(pSender);
@@ -639,7 +639,7 @@ void CXFA_FFNotify::OnLayoutItemStatustChanged(CXFA_FFDocView* pDocView,
}
FX_DWORD dwStatus = (FX_DWORD)(uintptr_t)pParam;
if (dwStatus == 0) {
- CXFA_LayoutItemImpl* pPreItem = pSender->GetPrev();
+ CXFA_LayoutItem* pPreItem = pSender->GetPrev();
if (pPreItem) {
CXFA_FFWidget* pPreWidget = static_cast<CXFA_FFWidget*>(pPreItem);
if (pPreWidget) {
diff --git a/xfa/src/fxfa/src/app/xfa_ffnotify.h b/xfa/src/fxfa/src/app/xfa_ffnotify.h
index bc6da933a5..6941b0d219 100644
--- a/xfa/src/fxfa/src/app/xfa_ffnotify.h
+++ b/xfa/src/fxfa/src/app/xfa_ffnotify.h
@@ -26,9 +26,9 @@ class CXFA_FFNotify : public IXFA_Notify {
void* pParam = NULL,
void* pAdditional = NULL,
void* pAdditional2 = NULL);
- virtual CXFA_LayoutItemImpl* OnCreateLayoutItem(CXFA_Node* pNode);
+ virtual CXFA_LayoutItem* OnCreateLayoutItem(CXFA_Node* pNode);
virtual void OnLayoutEvent(IXFA_DocLayout* pLayout,
- CXFA_LayoutItemImpl* pSender,
+ CXFA_LayoutItem* pSender,
XFA_LAYOUTEVENT eEvent,
void* pParam = NULL,
void* pParam2 = NULL);
@@ -50,7 +50,7 @@ class CXFA_FFNotify : public IXFA_Notify {
virtual IXFA_DocProvider* GetDocProvider();
virtual IXFA_AppProvider* GetAppProvider();
virtual IXFA_WidgetHandler* GetWidgetHandler();
- virtual IXFA_Widget* GetHWidget(CXFA_LayoutItemImpl* pLayoutItem);
+ virtual IXFA_Widget* GetHWidget(CXFA_LayoutItem* pLayoutItem);
virtual void OpenDropDownList(IXFA_Widget* hWidget);
virtual CFX_WideString GetCurrentDateTime();
virtual void ResetData(CXFA_WidgetData* pWidgetData = NULL);
@@ -72,22 +72,22 @@ class CXFA_FFNotify : public IXFA_Notify {
void OnChildRemoved(CXFA_Node* pSender, void* pParam, void* pParam2);
void OnLayoutItemAdd(CXFA_FFDocView* pDocView,
IXFA_DocLayout* pLayout,
- CXFA_LayoutItemImpl* pSender,
+ CXFA_LayoutItem* pSender,
void* pParam,
void* pParam2);
void OnLayoutItemRemoving(CXFA_FFDocView* pDocView,
IXFA_DocLayout* pLayout,
- CXFA_LayoutItemImpl* pSender,
+ CXFA_LayoutItem* pSender,
void* pParam,
void* pParam2);
void OnLayoutItemRectChanged(CXFA_FFDocView* pDocView,
IXFA_DocLayout* pLayout,
- CXFA_LayoutItemImpl* pSender,
+ CXFA_LayoutItem* pSender,
void* pParam,
void* pParam2);
void OnLayoutItemStatustChanged(CXFA_FFDocView* pDocView,
IXFA_DocLayout* pLayout,
- CXFA_LayoutItemImpl* pSender,
+ CXFA_LayoutItem* pSender,
void* pParam,
void* pParam2);
CXFA_FFDoc* m_pDoc;
diff --git a/xfa/src/fxfa/src/app/xfa_ffpageview.cpp b/xfa/src/fxfa/src/app/xfa_ffpageview.cpp
index 72ad13dd17..32d749bc01 100644
--- a/xfa/src/fxfa/src/app/xfa_ffpageview.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffpageview.cpp
@@ -18,9 +18,10 @@
#include "xfa_ffimageedit.h"
#include "xfa_fftextedit.h"
CXFA_FFPageView::CXFA_FFPageView(CXFA_FFDocView* pDocView, CXFA_Node* pPageArea)
- : CXFA_ContainerLayoutItemImpl(pPageArea),
+ : CXFA_ContainerLayoutItem(pPageArea),
m_pDocView(pDocView),
- m_bLoaded(FALSE) {}
+ m_bLoaded(FALSE) {
+}
CXFA_FFPageView::~CXFA_FFPageView() {}
IXFA_DocView* CXFA_FFPageView::GetDocView() {
return m_pDocView;
@@ -119,7 +120,7 @@ CXFA_FFPageWidgetIterator::CXFA_FFPageWidgetIterator(CXFA_FFPageView* pPageView,
FX_DWORD dwFilter) {
m_pPageView = pPageView;
m_dwFilter = dwFilter;
- m_sIterator.Init((CXFA_LayoutItemImpl*)pPageView->GetLayoutPage());
+ m_sIterator.Init((CXFA_LayoutItem*)pPageView->GetLayoutPage());
m_bIgnorerelevant = ((CXFA_FFDoc*)m_pPageView->GetDocView()->GetDoc())
->GetXFADoc()
->GetCurVersionMode() < XFA_VERSION_205;
@@ -130,7 +131,7 @@ void CXFA_FFPageWidgetIterator::Reset() {
}
IXFA_Widget* CXFA_FFPageWidgetIterator::MoveToFirst() {
m_sIterator.Reset();
- for (CXFA_LayoutItemImpl* pLayoutItem = m_sIterator.GetCurrent(); pLayoutItem;
+ for (CXFA_LayoutItem* pLayoutItem = m_sIterator.GetCurrent(); pLayoutItem;
pLayoutItem = m_sIterator.MoveToNext()) {
if (IXFA_Widget* hWidget = GetWidget(pLayoutItem)) {
return hWidget;
@@ -143,7 +144,7 @@ IXFA_Widget* CXFA_FFPageWidgetIterator::MoveToLast() {
return MoveToPrevious();
}
IXFA_Widget* CXFA_FFPageWidgetIterator::MoveToNext() {
- for (CXFA_LayoutItemImpl* pLayoutItem = m_sIterator.MoveToNext(); pLayoutItem;
+ for (CXFA_LayoutItem* pLayoutItem = m_sIterator.MoveToNext(); pLayoutItem;
pLayoutItem = m_sIterator.MoveToNext()) {
if (IXFA_Widget* hWidget = GetWidget(pLayoutItem)) {
return hWidget;
@@ -152,7 +153,7 @@ IXFA_Widget* CXFA_FFPageWidgetIterator::MoveToNext() {
return NULL;
}
IXFA_Widget* CXFA_FFPageWidgetIterator::MoveToPrevious() {
- for (CXFA_LayoutItemImpl* pLayoutItem = m_sIterator.MoveToPrev(); pLayoutItem;
+ for (CXFA_LayoutItem* pLayoutItem = m_sIterator.MoveToPrev(); pLayoutItem;
pLayoutItem = m_sIterator.MoveToPrev()) {
if (IXFA_Widget* hWidget = GetWidget(pLayoutItem)) {
return hWidget;
@@ -161,7 +162,7 @@ IXFA_Widget* CXFA_FFPageWidgetIterator::MoveToPrevious() {
return NULL;
}
IXFA_Widget* CXFA_FFPageWidgetIterator::GetCurrentWidget() {
- CXFA_LayoutItemImpl* pLayoutItem = m_sIterator.GetCurrent();
+ CXFA_LayoutItem* pLayoutItem = m_sIterator.GetCurrent();
return pLayoutItem ? XFA_GetWidgetFromLayoutItem(pLayoutItem) : NULL;
}
FX_BOOL CXFA_FFPageWidgetIterator::SetCurrentWidget(IXFA_Widget* hWidget) {
@@ -169,7 +170,7 @@ FX_BOOL CXFA_FFPageWidgetIterator::SetCurrentWidget(IXFA_Widget* hWidget) {
return pWidget && m_sIterator.SetCurrent(pWidget);
}
IXFA_Widget* CXFA_FFPageWidgetIterator::GetWidget(
- CXFA_LayoutItemImpl* pLayoutItem) {
+ CXFA_LayoutItem* pLayoutItem) {
if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) {
if (!XFA_PageWidgetFilter(pWidget, m_dwFilter, FALSE, m_bIgnorerelevant)) {
return NULL;
@@ -332,16 +333,16 @@ static int32_t XFA_TabOrderWidgetComparator(const void* phWidget1,
}
void CXFA_FFTabOrderPageWidgetIterator::OrderContainer(
CXFA_LayoutItemIterator* sIterator,
- CXFA_LayoutItemImpl* pContainerItem,
+ CXFA_LayoutItem* pContainerItem,
CXFA_TabParam* pContainer,
FX_BOOL& bCurrentItem,
FX_BOOL& bContentArea,
FX_BOOL bMarsterPage) {
CFX_PtrArray tabParams;
- CXFA_LayoutItemImpl* pSearchItem = sIterator->MoveToNext();
+ CXFA_LayoutItem* pSearchItem = sIterator->MoveToNext();
while (pSearchItem) {
FX_BOOL bIsContentLayoutItem =
- ((CXFA_LayoutItemImpl*)pSearchItem)->IsContentLayoutItem();
+ ((CXFA_LayoutItem*)pSearchItem)->IsContentLayoutItem();
if (!bIsContentLayoutItem) {
bContentArea = TRUE;
pSearchItem = sIterator->MoveToNext();
@@ -393,7 +394,7 @@ void CXFA_FFTabOrderPageWidgetIterator::OrderContainer(
void CXFA_FFTabOrderPageWidgetIterator::CreateSpaceOrderWidgetArray(
CXFA_WidgetArray& WidgetArray) {
CXFA_LayoutItemIterator sIterator;
- sIterator.Init((CXFA_LayoutItemImpl*)m_pPageView->GetLayoutPage());
+ sIterator.Init((CXFA_LayoutItem*)m_pPageView->GetLayoutPage());
CXFA_TabParam* pParam = new CXFA_TabParam;
FX_BOOL bCurrentItem = FALSE;
FX_BOOL bContentArea = FALSE;
@@ -412,7 +413,7 @@ void CXFA_FFTabOrderPageWidgetIterator::CreateSpaceOrderWidgetArray(
delete pParam;
}
CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetWidget(
- CXFA_LayoutItemImpl* pLayoutItem) {
+ CXFA_LayoutItem* pLayoutItem) {
if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) {
if (!pWidget->IsLoaded() &&
(pWidget->GetStatus() & XFA_WIDGETSTATUS_Visible)) {
diff --git a/xfa/src/fxfa/src/app/xfa_ffpageview.h b/xfa/src/fxfa/src/app/xfa_ffpageview.h
index 87aea13364..97f3daa4e3 100644
--- a/xfa/src/fxfa/src/app/xfa_ffpageview.h
+++ b/xfa/src/fxfa/src/app/xfa_ffpageview.h
@@ -8,8 +8,7 @@
#define _FXFA_FORMFILLER_PAGEVIEW_IMP_H
class CXFA_FFWidget;
class CXFA_FFDocView;
-class CXFA_FFPageView : public CXFA_ContainerLayoutItemImpl,
- public IXFA_PageView {
+class CXFA_FFPageView : public CXFA_ContainerLayoutItem, public IXFA_PageView {
public:
CXFA_FFPageView(CXFA_FFDocView* pDocView, CXFA_Node* pPageArea);
~CXFA_FFPageView();
@@ -35,7 +34,7 @@ class CXFA_FFPageView : public CXFA_ContainerLayoutItemImpl,
CXFA_FFDocView* m_pDocView;
FX_BOOL m_bLoaded;
};
-typedef CXFA_NodeIteratorTemplate<CXFA_LayoutItemImpl,
+typedef CXFA_NodeIteratorTemplate<CXFA_LayoutItem,
CXFA_TraverseStrategy_LayoutItem>
CXFA_LayoutItemIterator;
class CXFA_FFPageWidgetIterator : public IXFA_WidgetIterator {
@@ -53,7 +52,7 @@ class CXFA_FFPageWidgetIterator : public IXFA_WidgetIterator {
virtual FX_BOOL SetCurrentWidget(IXFA_Widget* hWidget);
protected:
- IXFA_Widget* GetWidget(CXFA_LayoutItemImpl* pLayoutItem);
+ IXFA_Widget* GetWidget(CXFA_LayoutItem* pLayoutItem);
CXFA_FFPageView* m_pPageView;
IXFA_Widget* m_hCurWidget;
FX_DWORD m_dwFilter;
@@ -96,9 +95,9 @@ class CXFA_FFTabOrderPageWidgetIterator : public IXFA_WidgetIterator {
CXFA_FFWidget* pRefWidget);
void CreateTabOrderWidgetArray();
void CreateSpaceOrderWidgetArray(CXFA_WidgetArray& WidgetArray);
- CXFA_FFWidget* GetWidget(CXFA_LayoutItemImpl* pLayoutItem);
+ CXFA_FFWidget* GetWidget(CXFA_LayoutItem* pLayoutItem);
void OrderContainer(CXFA_LayoutItemIterator* sIterator,
- CXFA_LayoutItemImpl* pContainerItem,
+ CXFA_LayoutItem* pContainerItem,
CXFA_TabParam* pContainer,
FX_BOOL& bCurrentItem,
FX_BOOL& bContentArea,
diff --git a/xfa/src/fxfa/src/app/xfa_fftext.cpp b/xfa/src/fxfa/src/app/xfa_fftext.cpp
index 06f988bb9a..e02b1f614f 100644
--- a/xfa/src/fxfa/src/app/xfa_fftext.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fftext.cpp
@@ -36,7 +36,7 @@ void CXFA_FFText::RenderWidget(CFX_Graphics* pGS,
CFX_RectF rtText;
GetRectWithoutRotate(rtText);
if (CXFA_Margin mgWidget = m_pDataAcc->GetMargin()) {
- CXFA_LayoutItemImpl* pItem = this;
+ CXFA_LayoutItem* pItem = this;
if (pItem->GetPrev() == NULL && pItem->GetNext() == NULL) {
XFA_RectWidthoutMargin(rtText, mgWidget);
} else {
@@ -74,7 +74,7 @@ FX_BOOL CXFA_FFText::LayoutWidget() {
return TRUE;
}
pTextLayout->m_Blocks.RemoveAll();
- CXFA_LayoutItemImpl* pItem = this;
+ CXFA_LayoutItem* pItem = this;
if (pItem->GetPrev() == NULL && pItem->GetNext() == NULL) {
return TRUE;
}
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
index ebf398a62d..1bb9c6ec44 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
@@ -14,7 +14,7 @@
#include "xfa_textlayout.h"
CXFA_FFWidget::CXFA_FFWidget(CXFA_FFPageView* pPageView,
CXFA_WidgetAcc* pDataAcc)
- : CXFA_ContentLayoutItemImpl(pDataAcc->GetNode()),
+ : CXFA_ContentLayoutItem(pDataAcc->GetNode()),
m_pPageView(pPageView),
m_pDataAcc(pDataAcc) {
m_rtWidget.Set(0, 0, 0, 0);
@@ -1102,7 +1102,7 @@ void XFA_RectWidthoutMargin(CFX_RectF& rt, const CXFA_Margin& mg, FX_BOOL bUI) {
mg.GetBottomInset(fBottomInset);
rt.Deflate(fLeftInset, fTopInset, fRightInset, fBottomInset);
}
-CXFA_FFWidget* XFA_GetWidgetFromLayoutItem(CXFA_LayoutItemImpl* pLayoutItem) {
+CXFA_FFWidget* XFA_GetWidgetFromLayoutItem(CXFA_LayoutItem* pLayoutItem) {
XFA_ELEMENT iType = pLayoutItem->GetFormNode()->GetClassID();
if (XFA_IsCreateWidget(iType)) {
return static_cast<CXFA_FFWidget*>(pLayoutItem);
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidget.h b/xfa/src/fxfa/src/app/xfa_ffwidget.h
index 4212adace3..87c15ae46f 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidget.h
+++ b/xfa/src/fxfa/src/app/xfa_ffwidget.h
@@ -38,7 +38,7 @@ class CXFA_CalcData {
};
class CXFA_FFWidget : public IXFA_Widget,
public CFX_PrivateData,
- public CXFA_ContentLayoutItemImpl {
+ public CXFA_ContentLayoutItem {
public:
CXFA_FFWidget(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc);
virtual ~CXFA_FFWidget();
@@ -174,7 +174,7 @@ void XFA_RectWidthoutMargin(CFX_RectF& rt,
FX_FLOAT XFA_GetEdgeThickness(const CXFA_StrokeArray& strokes,
FX_BOOL b3DStyle,
int32_t nIndex);
-CXFA_FFWidget* XFA_GetWidgetFromLayoutItem(CXFA_LayoutItemImpl* pLayoutItem);
+CXFA_FFWidget* XFA_GetWidgetFromLayoutItem(CXFA_LayoutItem* pLayoutItem);
FX_BOOL XFA_IsCreateWidget(XFA_ELEMENT iType);
#define XFA_DRAWBOX_ForceRound 1
#define XFA_DRAWBOX_Lowered3D 2
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp b/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp
index f68a94e550..34d87f44c1 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp
@@ -711,7 +711,7 @@ int32_t CXFA_WidgetAcc::ExecuteScript(CXFA_Script script,
return iRet;
}
CXFA_FFWidget* CXFA_WidgetAcc::GetNextWidget(CXFA_FFWidget* pWidget) {
- CXFA_LayoutItemImpl* pLayout = nullptr;
+ CXFA_LayoutItem* pLayout = nullptr;
if (pWidget) {
pLayout = pWidget->GetNext();
} else {
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp
index a0dce56acd..1c439788b7 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp
@@ -302,7 +302,7 @@ IXFA_Widget* CXFA_FFWidgetHandler::CreateWidget(IXFA_Widget* hParent,
pNewFormItem->GetTemplateNode()->SetFlag(XFA_NODEFLAG_Initialized);
pNewFormItem->SetFlag(XFA_NODEFLAG_Initialized);
m_pDocView->RunLayout();
- CXFA_LayoutItemImpl* pLayout =
+ CXFA_LayoutItem* pLayout =
m_pDocView->GetXFALayout()->GetLayoutItem(pNewFormItem);
return (IXFA_Widget*)pLayout;
}
diff --git a/xfa/src/fxfa/src/app/xfa_fwltheme.cpp b/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
index 50db10065b..3b12058f88 100644
--- a/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
@@ -204,7 +204,7 @@ void* CXFA_FWLTheme::GetCapacity(CFWL_ThemePart* pThemePart,
case FWL_WGTCAPACITY_UIMargin: {
CXFA_FFWidget* pWidget = XFA_ThemeGetOuterWidget(pThemePart->m_pWidget);
if (pWidget) {
- CXFA_LayoutItemImpl* pItem = pWidget;
+ CXFA_LayoutItem* pItem = pWidget;
CXFA_WidgetAcc* pWidgetAcc = pWidget->GetDataAcc();
pWidgetAcc->GetUIMargin(m_Rect);
if (CXFA_Para para = pWidgetAcc->GetPara()) {
diff --git a/xfa/src/fxfa/src/common/xfa_doclayout.h b/xfa/src/fxfa/src/common/xfa_doclayout.h
index f5473b2c72..fa8ac9bbe9 100644
--- a/xfa/src/fxfa/src/common/xfa_doclayout.h
+++ b/xfa/src/fxfa/src/common/xfa_doclayout.h
@@ -10,41 +10,40 @@
class IXFA_LayoutPage;
-class CXFA_LayoutItemImpl {
+class CXFA_LayoutItem {
public:
- CXFA_LayoutItemImpl(CXFA_Node* pNode, FX_BOOL bIsContentLayoutItem);
- virtual ~CXFA_LayoutItemImpl();
+ CXFA_LayoutItem(CXFA_Node* pNode, FX_BOOL bIsContentLayoutItem);
+ virtual ~CXFA_LayoutItem();
IXFA_LayoutPage* GetPage() const;
CXFA_Node* GetFormNode() const;
void GetRect(CFX_RectF& rtLayout, FX_BOOL bRelative = FALSE) const;
int32_t GetIndex() const;
int32_t GetCount() const;
- CXFA_LayoutItemImpl* GetParent() const;
- const CXFA_LayoutItemImpl* GetFirst() const;
- CXFA_LayoutItemImpl* GetFirst();
- const CXFA_LayoutItemImpl* GetLast() const;
- CXFA_LayoutItemImpl* GetLast();
- CXFA_LayoutItemImpl* GetPrev() const;
- CXFA_LayoutItemImpl* GetNext() const;
+ CXFA_LayoutItem* GetParent() const;
+ const CXFA_LayoutItem* GetFirst() const;
+ CXFA_LayoutItem* GetFirst();
+ const CXFA_LayoutItem* GetLast() const;
+ CXFA_LayoutItem* GetLast();
+ CXFA_LayoutItem* GetPrev() const;
+ CXFA_LayoutItem* GetNext() const;
FX_BOOL IsContentLayoutItem() { return m_bIsContentLayoutItem; }
- void AddChild(CXFA_LayoutItemImpl* pChildItem);
- void AddHeadChild(CXFA_LayoutItemImpl* pChildItem);
- void RemoveChild(CXFA_LayoutItemImpl* pChildItem);
- void InsertChild(CXFA_LayoutItemImpl* pBeforeItem,
- CXFA_LayoutItemImpl* pChildItem);
+ void AddChild(CXFA_LayoutItem* pChildItem);
+ void AddHeadChild(CXFA_LayoutItem* pChildItem);
+ void RemoveChild(CXFA_LayoutItem* pChildItem);
+ void InsertChild(CXFA_LayoutItem* pBeforeItem, CXFA_LayoutItem* pChildItem);
public:
CXFA_Node* m_pFormNode;
- CXFA_LayoutItemImpl* m_pParent;
- CXFA_LayoutItemImpl* m_pNextSibling;
- CXFA_LayoutItemImpl* m_pFirstChild;
+ CXFA_LayoutItem* m_pParent;
+ CXFA_LayoutItem* m_pNextSibling;
+ CXFA_LayoutItem* m_pFirstChild;
FX_BOOL m_bIsContentLayoutItem;
};
-class CXFA_ContainerLayoutItemImpl : public CXFA_LayoutItemImpl {
+class CXFA_ContainerLayoutItem : public CXFA_LayoutItem {
public:
- CXFA_ContainerLayoutItemImpl(CXFA_Node* pNode);
+ CXFA_ContainerLayoutItem(CXFA_Node* pNode);
public:
CXFA_Node* m_pOldSubform;
@@ -55,30 +54,27 @@ class CXFA_ContainerLayoutItemImpl : public CXFA_LayoutItemImpl {
#define XFA_WIDGETSTATUS_ButtonDown 0x10000000
#define XFA_WIDGETSTATUS_Highlight 0x08000000
#define XFA_WIDGETSTATUS_TextEditValueChanged 0x04000000
-class CXFA_ContentLayoutItemImpl : public CXFA_LayoutItemImpl {
+class CXFA_ContentLayoutItem : public CXFA_LayoutItem {
public:
- CXFA_ContentLayoutItemImpl(CXFA_Node* pNode);
- virtual ~CXFA_ContentLayoutItemImpl();
+ CXFA_ContentLayoutItem(CXFA_Node* pNode);
+ virtual ~CXFA_ContentLayoutItem();
public:
- CXFA_ContentLayoutItemImpl* m_pPrev;
- CXFA_ContentLayoutItemImpl* m_pNext;
+ CXFA_ContentLayoutItem* m_pPrev;
+ CXFA_ContentLayoutItem* m_pNext;
CFX_PointF m_sPos;
CFX_SizeF m_sSize;
FX_DWORD m_dwStatus;
};
class CXFA_TraverseStrategy_LayoutItem {
public:
- static inline CXFA_LayoutItemImpl* GetFirstChild(
- CXFA_LayoutItemImpl* pLayoutItem) {
+ static inline CXFA_LayoutItem* GetFirstChild(CXFA_LayoutItem* pLayoutItem) {
return pLayoutItem->m_pFirstChild;
}
- static inline CXFA_LayoutItemImpl* GetNextSibling(
- CXFA_LayoutItemImpl* pLayoutItem) {
+ static inline CXFA_LayoutItem* GetNextSibling(CXFA_LayoutItem* pLayoutItem) {
return pLayoutItem->m_pNextSibling;
}
- static inline CXFA_LayoutItemImpl* GetParent(
- CXFA_LayoutItemImpl* pLayoutItem) {
+ static inline CXFA_LayoutItem* GetParent(CXFA_LayoutItem* pLayoutItem) {
return pLayoutItem->m_pParent;
}
};
@@ -98,6 +94,6 @@ class IXFA_DocLayout {
virtual FX_BOOL IncrementLayout() = 0;
virtual int32_t CountPages() const = 0;
virtual IXFA_LayoutPage* GetPage(int32_t index) const = 0;
- virtual CXFA_LayoutItemImpl* GetLayoutItem(CXFA_Node* pFormItem) = 0;
+ virtual CXFA_LayoutItem* GetLayoutItem(CXFA_Node* pFormItem) = 0;
};
#endif
diff --git a/xfa/src/fxfa/src/common/xfa_document.h b/xfa/src/fxfa/src/common/xfa_document.h
index 773b206f91..0fde8b410d 100644
--- a/xfa/src/fxfa/src/common/xfa_document.h
+++ b/xfa/src/fxfa/src/common/xfa_document.h
@@ -8,7 +8,7 @@
#define _XFA_DOCUMENT_H
class CXFA_Document;
-class CXFA_LayoutItemImpl;
+class CXFA_LayoutItem;
class CXFA_LayoutProcessor;
class CXFA_Node;
class IXFA_DocLayout;
@@ -83,9 +83,9 @@ class IXFA_Notify {
void* pAdditional = NULL,
void* pAdditional2 = NULL) = 0;
- virtual CXFA_LayoutItemImpl* OnCreateLayoutItem(CXFA_Node* pNode) = 0;
+ virtual CXFA_LayoutItem* OnCreateLayoutItem(CXFA_Node* pNode) = 0;
virtual void OnLayoutEvent(IXFA_DocLayout* pLayout,
- CXFA_LayoutItemImpl* pSender,
+ CXFA_LayoutItem* pSender,
XFA_LAYOUTEVENT eEvent,
void* pParam = NULL,
void* pParam2 = NULL) = 0;
@@ -106,7 +106,7 @@ class IXFA_Notify {
virtual IXFA_DocProvider* GetDocProvider() = 0;
virtual IXFA_AppProvider* GetAppProvider() = 0;
virtual IXFA_WidgetHandler* GetWidgetHandler() = 0;
- virtual IXFA_Widget* GetHWidget(CXFA_LayoutItemImpl* pLayoutItem) = 0;
+ virtual IXFA_Widget* GetHWidget(CXFA_LayoutItem* pLayoutItem) = 0;
virtual void OpenDropDownList(IXFA_Widget* hWidget) = 0;
virtual CFX_WideString GetCurrentDateTime() = 0;
virtual void ResetData(CXFA_WidgetData* pWidgetData = NULL) = 0;
diff --git a/xfa/src/fxfa/src/parser/xfa_document_layout_imp.cpp b/xfa/src/fxfa/src/parser/xfa_document_layout_imp.cpp
index 94ff85c5bb..98727d46cf 100644
--- a/xfa/src/fxfa/src/parser/xfa_document_layout_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_document_layout_imp.cpp
@@ -96,7 +96,7 @@ int32_t CXFA_LayoutProcessor::DoLayout(IFX_Pause* pPause) {
if (eStatus != XFA_ItemLayoutProcessorResult_Done) {
m_nProgressCounter++;
}
- CXFA_ContentLayoutItemImpl* pLayoutItem =
+ CXFA_ContentLayoutItem* pLayoutItem =
m_pRootItemLayoutProcessor->ExtractLayoutItem();
if (pLayoutItem) {
pLayoutItem->m_sPos.Set(fPosX, fPosY);
@@ -141,8 +141,8 @@ int32_t CXFA_LayoutProcessor::CountPages() const {
IXFA_LayoutPage* CXFA_LayoutProcessor::GetPage(int32_t index) const {
return m_pLayoutPageMgr ? m_pLayoutPageMgr->GetPage(index) : NULL;
}
-CXFA_LayoutItemImpl* CXFA_LayoutProcessor::GetLayoutItem(CXFA_Node* pFormItem) {
- return static_cast<CXFA_LayoutItemImpl*>(
+CXFA_LayoutItem* CXFA_LayoutProcessor::GetLayoutItem(CXFA_Node* pFormItem) {
+ return static_cast<CXFA_LayoutItem*>(
pFormItem->GetUserData(XFA_LAYOUTITEMKEY));
}
void CXFA_LayoutProcessor::AddChangedContainer(CXFA_Node* pContainer) {
@@ -150,7 +150,7 @@ void CXFA_LayoutProcessor::AddChangedContainer(CXFA_Node* pContainer) {
m_rgChangedContainers.Add(pContainer);
}
}
-CXFA_ContainerLayoutItemImpl* CXFA_LayoutProcessor::GetRootLayoutItem() const {
+CXFA_ContainerLayoutItem* CXFA_LayoutProcessor::GetRootLayoutItem() const {
return m_pLayoutPageMgr ? m_pLayoutPageMgr->GetRootLayoutItem() : NULL;
}
void CXFA_LayoutProcessor::ClearLayoutData() {
@@ -167,23 +167,25 @@ void CXFA_LayoutProcessor::ClearLayoutData() {
FX_BOOL CXFA_LayoutProcessor::IsNeedLayout() {
return m_bNeeLayout || m_rgChangedContainers.GetSize() > 0;
}
-CXFA_LayoutItemImpl::CXFA_LayoutItemImpl(CXFA_Node* pNode,
- FX_BOOL bIsContentLayoutItem)
+CXFA_LayoutItem::CXFA_LayoutItem(CXFA_Node* pNode, FX_BOOL bIsContentLayoutItem)
: m_pFormNode(pNode),
m_pParent(NULL),
m_pNextSibling(NULL),
m_pFirstChild(NULL),
m_bIsContentLayoutItem(bIsContentLayoutItem) {
}
-CXFA_LayoutItemImpl::~CXFA_LayoutItemImpl() {}
-CXFA_ContainerLayoutItemImpl::CXFA_ContainerLayoutItemImpl(CXFA_Node* pNode)
- : CXFA_LayoutItemImpl(pNode, FALSE), m_pOldSubform(NULL) {}
-CXFA_ContentLayoutItemImpl::CXFA_ContentLayoutItemImpl(CXFA_Node* pNode)
- : CXFA_LayoutItemImpl(pNode, TRUE),
+CXFA_LayoutItem::~CXFA_LayoutItem() {
+}
+CXFA_ContainerLayoutItem::CXFA_ContainerLayoutItem(CXFA_Node* pNode)
+ : CXFA_LayoutItem(pNode, FALSE), m_pOldSubform(NULL) {
+}
+CXFA_ContentLayoutItem::CXFA_ContentLayoutItem(CXFA_Node* pNode)
+ : CXFA_LayoutItem(pNode, TRUE),
m_pPrev(NULL),
m_pNext(NULL),
- m_dwStatus(0) {}
-CXFA_ContentLayoutItemImpl::~CXFA_ContentLayoutItemImpl() {
+ m_dwStatus(0) {
+}
+CXFA_ContentLayoutItem::~CXFA_ContentLayoutItem() {
if (m_pFormNode->GetUserData(XFA_LAYOUTITEMKEY) == this) {
m_pFormNode->SetUserData(XFA_LAYOUTITEMKEY, NULL);
}
diff --git a/xfa/src/fxfa/src/parser/xfa_document_layout_imp.h b/xfa/src/fxfa/src/parser/xfa_document_layout_imp.h
index 8bd2ce2859..cf5af6e677 100644
--- a/xfa/src/fxfa/src/parser/xfa_document_layout_imp.h
+++ b/xfa/src/fxfa/src/parser/xfa_document_layout_imp.h
@@ -9,7 +9,7 @@
class CXFA_ItemLayoutProcessor;
class CXFA_LayoutPageMgr;
class CXFA_LayoutAppAdapter;
-class CXFA_ContainerLayoutItemImpl;
+class CXFA_ContainerLayoutItem;
class CXFA_LayoutProcessor : public IXFA_DocLayout {
public:
CXFA_LayoutProcessor(CXFA_Document* pDocument);
@@ -20,11 +20,11 @@ class CXFA_LayoutProcessor : public IXFA_DocLayout {
virtual FX_BOOL IncrementLayout();
virtual int32_t CountPages() const;
virtual IXFA_LayoutPage* GetPage(int32_t index) const;
- virtual CXFA_LayoutItemImpl* GetLayoutItem(CXFA_Node* pFormItem);
+ virtual CXFA_LayoutItem* GetLayoutItem(CXFA_Node* pFormItem);
void AddChangedContainer(CXFA_Node* pContainer);
void SetForceReLayout(FX_BOOL bForceRestart) { m_bNeeLayout = bForceRestart; }
- CXFA_ContainerLayoutItemImpl* GetRootLayoutItem() const;
+ CXFA_ContainerLayoutItem* GetRootLayoutItem() const;
CXFA_ItemLayoutProcessor* GetRootRootItemLayoutProcessor() {
return m_pRootItemLayoutProcessor;
}
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp b/xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp
index b9c154fca1..a3953aa88f 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_layout_appadapter.cpp
@@ -21,18 +21,18 @@
#include "xfa_layout_pagemgr_new.h"
#include "xfa_layout_appadapter.h"
IXFA_DocLayout* IXFA_LayoutPage::GetLayout() const {
- CXFA_ContainerLayoutItemImpl* pThis = (CXFA_ContainerLayoutItemImpl*)this;
+ CXFA_ContainerLayoutItem* pThis = (CXFA_ContainerLayoutItem*)this;
return pThis->m_pFormNode->GetDocument()->GetLayoutProcessor();
}
int32_t IXFA_LayoutPage::GetPageIndex() const {
- CXFA_ContainerLayoutItemImpl* pThis = (CXFA_ContainerLayoutItemImpl*)this;
+ CXFA_ContainerLayoutItem* pThis = (CXFA_ContainerLayoutItem*)this;
return pThis->m_pFormNode->GetDocument()
->GetLayoutProcessor()
->GetLayoutPageMgr()
->GetPageIndex((IXFA_LayoutPage*)this);
}
void IXFA_LayoutPage::GetPageSize(CFX_SizeF& size) {
- CXFA_ContainerLayoutItemImpl* pThis = (CXFA_ContainerLayoutItemImpl*)this;
+ CXFA_ContainerLayoutItem* pThis = (CXFA_ContainerLayoutItem*)this;
size.Set(0, 0);
CXFA_Node* pMedium =
pThis->m_pFormNode->GetFirstChildByClass(XFA_ELEMENT_Medium);
@@ -46,7 +46,7 @@ void IXFA_LayoutPage::GetPageSize(CFX_SizeF& size) {
}
}
CXFA_Node* IXFA_LayoutPage::GetMasterPage() const {
- CXFA_ContainerLayoutItemImpl* pThis = (CXFA_ContainerLayoutItemImpl*)this;
+ CXFA_ContainerLayoutItem* pThis = (CXFA_ContainerLayoutItem*)this;
return pThis->m_pFormNode;
}
FX_DWORD XFA_GetRelevant(CXFA_Node* pFormItem, FX_DWORD dwParentRelvant) {
@@ -69,8 +69,8 @@ FX_DWORD XFA_GetRelevant(CXFA_Node* pFormItem, FX_DWORD dwParentRelvant) {
}
return dwRelevant;
}
-void XFA_ReleaseLayoutItem(CXFA_LayoutItemImpl* pLayoutItem) {
- CXFA_LayoutItemImpl *pNext, *pNode = pLayoutItem->m_pFirstChild;
+void XFA_ReleaseLayoutItem(CXFA_LayoutItem* pLayoutItem) {
+ CXFA_LayoutItem* pNext, * pNode = pLayoutItem->m_pFirstChild;
while (pNode) {
pNext = pNode->m_pNextSibling;
pNode->m_pParent = NULL;
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_appadapter.h b/xfa/src/fxfa/src/parser/xfa_layout_appadapter.h
index f49ed51eba..66d61dbfde 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_appadapter.h
+++ b/xfa/src/fxfa/src/parser/xfa_layout_appadapter.h
@@ -8,66 +8,66 @@
#define _XFA_LAYOUT_APPADAPTER_H_
class CXFA_TraverseStrategy_PageAreaContainerLayoutItem {
public:
- static inline CXFA_ContainerLayoutItemImpl* GetFirstChild(
- CXFA_ContainerLayoutItemImpl* pLayoutItem) {
+ static inline CXFA_ContainerLayoutItem* GetFirstChild(
+ CXFA_ContainerLayoutItem* pLayoutItem) {
if (pLayoutItem->m_pFormNode->GetClassID() == XFA_ELEMENT_PageSet) {
- return (CXFA_ContainerLayoutItemImpl*)pLayoutItem->m_pFirstChild;
+ return (CXFA_ContainerLayoutItem*)pLayoutItem->m_pFirstChild;
}
return NULL;
}
- static inline CXFA_ContainerLayoutItemImpl* GetNextSibling(
- CXFA_ContainerLayoutItemImpl* pLayoutItem) {
- return (CXFA_ContainerLayoutItemImpl*)pLayoutItem->m_pNextSibling;
+ static inline CXFA_ContainerLayoutItem* GetNextSibling(
+ CXFA_ContainerLayoutItem* pLayoutItem) {
+ return (CXFA_ContainerLayoutItem*)pLayoutItem->m_pNextSibling;
}
- static inline CXFA_ContainerLayoutItemImpl* GetParent(
- CXFA_ContainerLayoutItemImpl* pLayoutItem) {
- return (CXFA_ContainerLayoutItemImpl*)pLayoutItem->m_pParent;
+ static inline CXFA_ContainerLayoutItem* GetParent(
+ CXFA_ContainerLayoutItem* pLayoutItem) {
+ return (CXFA_ContainerLayoutItem*)pLayoutItem->m_pParent;
}
};
class CXFA_TraverseStrategy_ContentAreaContainerLayoutItem {
public:
- static inline CXFA_ContainerLayoutItemImpl* GetFirstChild(
- CXFA_ContainerLayoutItemImpl* pLayoutItem) {
- for (CXFA_LayoutItemImpl* pChildItem = pLayoutItem->m_pFirstChild;
- pChildItem; pChildItem = pChildItem->m_pNextSibling) {
+ static inline CXFA_ContainerLayoutItem* GetFirstChild(
+ CXFA_ContainerLayoutItem* pLayoutItem) {
+ for (CXFA_LayoutItem* pChildItem = pLayoutItem->m_pFirstChild; pChildItem;
+ pChildItem = pChildItem->m_pNextSibling) {
if (pChildItem->IsContentLayoutItem()) {
continue;
}
- return (CXFA_ContainerLayoutItemImpl*)pChildItem;
+ return (CXFA_ContainerLayoutItem*)pChildItem;
}
return NULL;
}
- static inline CXFA_ContainerLayoutItemImpl* GetNextSibling(
- CXFA_ContainerLayoutItemImpl* pLayoutItem) {
- for (CXFA_LayoutItemImpl* pChildItem = pLayoutItem->m_pNextSibling;
- pChildItem; pChildItem = pChildItem->m_pNextSibling) {
+ static inline CXFA_ContainerLayoutItem* GetNextSibling(
+ CXFA_ContainerLayoutItem* pLayoutItem) {
+ for (CXFA_LayoutItem* pChildItem = pLayoutItem->m_pNextSibling; pChildItem;
+ pChildItem = pChildItem->m_pNextSibling) {
if (pChildItem->IsContentLayoutItem()) {
continue;
}
- return (CXFA_ContainerLayoutItemImpl*)pChildItem;
+ return (CXFA_ContainerLayoutItem*)pChildItem;
}
return NULL;
}
- static inline CXFA_ContainerLayoutItemImpl* GetParent(
- CXFA_ContainerLayoutItemImpl* pLayoutItem) {
- return (CXFA_ContainerLayoutItemImpl*)pLayoutItem->m_pParent;
+ static inline CXFA_ContainerLayoutItem* GetParent(
+ CXFA_ContainerLayoutItem* pLayoutItem) {
+ return (CXFA_ContainerLayoutItem*)pLayoutItem->m_pParent;
}
};
class CXFA_TraverseStrategy_ContentLayoutItem {
public:
- static inline CXFA_ContentLayoutItemImpl* GetFirstChild(
- CXFA_ContentLayoutItemImpl* pLayoutItem) {
- return (CXFA_ContentLayoutItemImpl*)pLayoutItem->m_pFirstChild;
+ static inline CXFA_ContentLayoutItem* GetFirstChild(
+ CXFA_ContentLayoutItem* pLayoutItem) {
+ return (CXFA_ContentLayoutItem*)pLayoutItem->m_pFirstChild;
}
- static inline CXFA_ContentLayoutItemImpl* GetNextSibling(
- CXFA_ContentLayoutItemImpl* pLayoutItem) {
- return (CXFA_ContentLayoutItemImpl*)pLayoutItem->m_pNextSibling;
+ static inline CXFA_ContentLayoutItem* GetNextSibling(
+ CXFA_ContentLayoutItem* pLayoutItem) {
+ return (CXFA_ContentLayoutItem*)pLayoutItem->m_pNextSibling;
}
- static inline CXFA_ContentLayoutItemImpl* GetParent(
- CXFA_ContentLayoutItemImpl* pLayoutItem) {
- return (CXFA_ContentLayoutItemImpl*)pLayoutItem->m_pParent;
+ static inline CXFA_ContentLayoutItem* GetParent(
+ CXFA_ContentLayoutItem* pLayoutItem) {
+ return (CXFA_ContentLayoutItem*)pLayoutItem->m_pParent;
}
};
FX_DWORD XFA_GetRelevant(CXFA_Node* pFormItem, FX_DWORD dwParentRelvant);
-void XFA_ReleaseLayoutItem(CXFA_LayoutItemImpl* pLayoutItem);
+void XFA_ReleaseLayoutItem(CXFA_LayoutItem* pLayoutItem);
#endif
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp
index 00cdc6ee65..4cb1192d20 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp
@@ -49,32 +49,32 @@ CXFA_ItemLayoutProcessor::CXFA_ItemLayoutProcessor(CXFA_Node* pNode,
m_pFormNode->GetClassID() == XFA_ELEMENT_Form));
#ifdef _XFA_LAYOUTITEM_ProcessCACHE_
m_pOldLayoutItem =
- (CXFA_ContentLayoutItemImpl*)m_pFormNode->GetUserData(XFA_LAYOUTITEMKEY);
+ (CXFA_ContentLayoutItem*)m_pFormNode->GetUserData(XFA_LAYOUTITEMKEY);
#endif
}
-CXFA_ContentLayoutItemImpl* CXFA_ItemLayoutProcessor::CreateContentLayoutItem(
+CXFA_ContentLayoutItem* CXFA_ItemLayoutProcessor::CreateContentLayoutItem(
CXFA_Node* pFormNode) {
if (!pFormNode) {
return NULL;
}
- CXFA_ContentLayoutItemImpl* pLayoutItem = NULL;
+ CXFA_ContentLayoutItem* pLayoutItem = NULL;
#ifdef _XFA_LAYOUTITEM_ProcessCACHE_
if (m_pOldLayoutItem) {
pLayoutItem = m_pOldLayoutItem;
m_pOldLayoutItem = m_pOldLayoutItem->m_pNext;
return pLayoutItem;
}
- pLayoutItem = (CXFA_ContentLayoutItemImpl*)pFormNode->GetDocument()
+ pLayoutItem = (CXFA_ContentLayoutItem*)pFormNode->GetDocument()
->GetParser()
->GetNotify()
->OnCreateLayoutItem(pFormNode);
#else
pLayoutItem =
- (CXFA_ContentLayoutItemImpl*)m_pPageMgrCreateItem->FindOrCreateLayoutItem(
+ (CXFA_ContentLayoutItem*)m_pPageMgrCreateItem->FindOrCreateLayoutItem(
pFormNode);
#endif
- CXFA_ContentLayoutItemImpl* pPrevLayoutItem =
- (CXFA_ContentLayoutItemImpl*)pFormNode->GetUserData(XFA_LAYOUTITEMKEY);
+ CXFA_ContentLayoutItem* pPrevLayoutItem =
+ (CXFA_ContentLayoutItem*)pFormNode->GetUserData(XFA_LAYOUTITEMKEY);
if (pPrevLayoutItem) {
while (pPrevLayoutItem->m_pNext) {
pPrevLayoutItem = pPrevLayoutItem->m_pNext;
@@ -87,7 +87,7 @@ CXFA_ContentLayoutItemImpl* CXFA_ItemLayoutProcessor::CreateContentLayoutItem(
return pLayoutItem;
}
FX_BOOL CXFA_ItemLayoutProcessor::FindLayoutItemSplitPos(
- CXFA_ContentLayoutItemImpl* pLayoutItem,
+ CXFA_ContentLayoutItem* pLayoutItem,
FX_FLOAT fCurVerticalOffset,
FX_FLOAT& fProposedSplitPos,
FX_BOOL& bAppChange,
@@ -128,11 +128,11 @@ FX_BOOL CXFA_ItemLayoutProcessor::FindLayoutItemSplitPos(
}
}
FX_FLOAT fRelSplitPos = fProposedSplitPos - fCurBottomMargin;
- for (CXFA_ContentLayoutItemImpl* pChildItem =
- (CXFA_ContentLayoutItemImpl*)pLayoutItem->m_pFirstChild;
+ for (CXFA_ContentLayoutItem* pChildItem =
+ (CXFA_ContentLayoutItem*)pLayoutItem->m_pFirstChild;
pChildItem;
pChildItem =
- (CXFA_ContentLayoutItemImpl*)pChildItem->m_pNextSibling) {
+ (CXFA_ContentLayoutItem*)pChildItem->m_pNextSibling) {
FX_FLOAT fChildOffset =
fCurVerticalOffset + fCurTopMargin + pChildItem->m_sPos.y;
FX_BOOL bAppChange = FALSE;
@@ -246,8 +246,8 @@ FX_FLOAT CXFA_ItemLayoutProcessor::FindSplitPos(FX_FLOAT fProposedSplitPos) {
return fProposedSplitPos;
}
void CXFA_ItemLayoutProcessor::SplitLayoutItem(
- CXFA_ContentLayoutItemImpl* pLayoutItem,
- CXFA_ContentLayoutItemImpl* pSecondParent,
+ CXFA_ContentLayoutItem* pLayoutItem,
+ CXFA_ContentLayoutItem* pSecondParent,
FX_FLOAT fSplitPos) {
FX_FLOAT fCurTopMargin = 0, fCurBottomMargin = 0;
XFA_ATTRIBUTEENUM eLayout = m_pFormNode->GetEnum(XFA_ATTRIBUTE_Layout);
@@ -263,7 +263,7 @@ void CXFA_ItemLayoutProcessor::SplitLayoutItem(
fCurBottomMargin =
pMarginNode->GetMeasure(XFA_ATTRIBUTE_BottomInset).ToUnit(XFA_UNIT_Pt);
}
- CXFA_ContentLayoutItemImpl* pSecondLayoutItem = NULL;
+ CXFA_ContentLayoutItem* pSecondLayoutItem = NULL;
if (m_pCurChildPreprocessor &&
m_pCurChildPreprocessor->m_pFormNode == pLayoutItem->m_pFormNode) {
pSecondLayoutItem = m_pCurChildPreprocessor->CreateContentLayoutItem(
@@ -283,11 +283,11 @@ void CXFA_ItemLayoutProcessor::SplitLayoutItem(
pSecondParent->AddChild(pSecondLayoutItem);
if (fCurTopMargin > 0 && pLayoutItem->m_pFirstChild) {
pSecondParent->m_sSize.y += fCurTopMargin;
- CXFA_ContentLayoutItemImpl* pParentItem =
- (CXFA_ContentLayoutItemImpl*)pSecondParent->m_pParent;
+ CXFA_ContentLayoutItem* pParentItem =
+ (CXFA_ContentLayoutItem*)pSecondParent->m_pParent;
while (pParentItem) {
pParentItem->m_sSize.y += fCurTopMargin;
- pParentItem = (CXFA_ContentLayoutItemImpl*)pParentItem->m_pParent;
+ pParentItem = (CXFA_ContentLayoutItem*)pParentItem->m_pParent;
}
}
} else {
@@ -295,15 +295,15 @@ void CXFA_ItemLayoutProcessor::SplitLayoutItem(
pSecondLayoutItem->m_pNextSibling = pLayoutItem->m_pNextSibling;
pLayoutItem->m_pNextSibling = pSecondLayoutItem;
}
- CXFA_ContentLayoutItemImpl* pChildren =
- (CXFA_ContentLayoutItemImpl*)pLayoutItem->m_pFirstChild;
+ CXFA_ContentLayoutItem* pChildren =
+ (CXFA_ContentLayoutItem*)pLayoutItem->m_pFirstChild;
pLayoutItem->m_pFirstChild = NULL;
FX_FLOAT lHeightForKeep = 0;
- CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*> keepLayoutItems;
+ CFX_ArrayTemplate<CXFA_ContentLayoutItem*> keepLayoutItems;
FX_FLOAT fAddMarginHeight = 0;
- for (CXFA_ContentLayoutItemImpl *pChildItem = pChildren, *pChildNext = NULL;
+ for (CXFA_ContentLayoutItem* pChildItem = pChildren, * pChildNext = NULL;
pChildItem; pChildItem = pChildNext) {
- pChildNext = (CXFA_ContentLayoutItemImpl*)pChildItem->m_pNextSibling;
+ pChildNext = (CXFA_ContentLayoutItem*)pChildItem->m_pNextSibling;
pChildItem->m_pNextSibling = NULL;
if (fSplitPos <= fCurTopMargin + pChildItem->m_sPos.y + fCurBottomMargin +
XFA_LAYOUT_FLOAT_PERCISION) {
@@ -316,7 +316,7 @@ void CXFA_ItemLayoutProcessor::SplitLayoutItem(
if (lHeightForKeep < XFA_LAYOUT_FLOAT_PERCISION) {
for (int32_t iIndex = 0; iIndex < keepLayoutItems.GetSize();
iIndex++) {
- CXFA_ContentLayoutItemImpl* pPreItem = keepLayoutItems[iIndex];
+ CXFA_ContentLayoutItem* pPreItem = keepLayoutItems[iIndex];
pLayoutItem->RemoveChild(pPreItem);
pPreItem->m_sPos.y -= fSplitPos;
if (pPreItem->m_sPos.y < 0) {
@@ -363,8 +363,8 @@ void CXFA_ItemLayoutProcessor::SplitLayoutItem(FX_FLOAT fSplitPos) {
return;
}
-IXFA_LayoutPage* CXFA_LayoutItemImpl::GetPage() const {
- for (const CXFA_LayoutItemImpl* pCurNode = this; pCurNode;
+IXFA_LayoutPage* CXFA_LayoutItem::GetPage() const {
+ for (const CXFA_LayoutItem* pCurNode = this; pCurNode;
pCurNode = pCurNode->m_pParent) {
if (pCurNode->m_pFormNode->GetClassID() == XFA_ELEMENT_PageArea)
return (IXFA_LayoutPage*)pCurNode;
@@ -372,22 +372,21 @@ IXFA_LayoutPage* CXFA_LayoutItemImpl::GetPage() const {
return nullptr;
}
-CXFA_Node* CXFA_LayoutItemImpl::GetFormNode() const {
+CXFA_Node* CXFA_LayoutItem::GetFormNode() const {
return m_pFormNode;
}
-void CXFA_LayoutItemImpl::GetRect(CFX_RectF& rtLayout,
- FX_BOOL bRelative) const {
+void CXFA_LayoutItem::GetRect(CFX_RectF& rtLayout, FX_BOOL bRelative) const {
ASSERT(m_bIsContentLayoutItem);
- const CXFA_ContentLayoutItemImpl* pThis =
- static_cast<const CXFA_ContentLayoutItemImpl*>(this);
+ const CXFA_ContentLayoutItem* pThis =
+ static_cast<const CXFA_ContentLayoutItem*>(this);
CFX_PointF sPos = pThis->m_sPos;
CFX_SizeF sSize = pThis->m_sSize;
if (!bRelative) {
- for (CXFA_LayoutItemImpl* pLayoutItem = pThis->m_pParent; pLayoutItem;
+ for (CXFA_LayoutItem* pLayoutItem = pThis->m_pParent; pLayoutItem;
pLayoutItem = pLayoutItem->m_pParent) {
if (pLayoutItem->IsContentLayoutItem()) {
- sPos += static_cast<CXFA_ContentLayoutItemImpl*>(pLayoutItem)->m_sPos;
+ sPos += static_cast<CXFA_ContentLayoutItem*>(pLayoutItem)->m_sPos;
if (CXFA_Node* pMarginNode =
pLayoutItem->m_pFormNode->GetFirstChildByClass(
XFA_ELEMENT_Margin)) {
@@ -413,65 +412,63 @@ void CXFA_LayoutItemImpl::GetRect(CFX_RectF& rtLayout,
rtLayout.Set(sPos.x, sPos.y, sSize.x, sSize.y);
}
-CXFA_LayoutItemImpl* CXFA_LayoutItemImpl::GetParent() const {
+CXFA_LayoutItem* CXFA_LayoutItem::GetParent() const {
return m_pParent;
}
-const CXFA_LayoutItemImpl* CXFA_LayoutItemImpl::GetFirst() const {
+const CXFA_LayoutItem* CXFA_LayoutItem::GetFirst() const {
ASSERT(m_bIsContentLayoutItem);
- const CXFA_ContentLayoutItemImpl* pCurNode =
- static_cast<const CXFA_ContentLayoutItemImpl*>(this);
+ const CXFA_ContentLayoutItem* pCurNode =
+ static_cast<const CXFA_ContentLayoutItem*>(this);
while (pCurNode->m_pPrev) {
pCurNode = pCurNode->m_pPrev;
}
return pCurNode;
}
-CXFA_LayoutItemImpl* CXFA_LayoutItemImpl::GetFirst() {
+CXFA_LayoutItem* CXFA_LayoutItem::GetFirst() {
ASSERT(m_bIsContentLayoutItem);
- CXFA_ContentLayoutItemImpl* pCurNode =
- static_cast<CXFA_ContentLayoutItemImpl*>(this);
+ CXFA_ContentLayoutItem* pCurNode = static_cast<CXFA_ContentLayoutItem*>(this);
while (pCurNode->m_pPrev) {
pCurNode = pCurNode->m_pPrev;
}
return pCurNode;
}
-CXFA_LayoutItemImpl* CXFA_LayoutItemImpl::GetLast() {
+CXFA_LayoutItem* CXFA_LayoutItem::GetLast() {
ASSERT(m_bIsContentLayoutItem);
- CXFA_ContentLayoutItemImpl* pCurNode =
- static_cast<CXFA_ContentLayoutItemImpl*>(this);
+ CXFA_ContentLayoutItem* pCurNode = static_cast<CXFA_ContentLayoutItem*>(this);
while (pCurNode->m_pNext) {
pCurNode = pCurNode->m_pNext;
}
return pCurNode;
}
-const CXFA_LayoutItemImpl* CXFA_LayoutItemImpl::GetLast() const {
+const CXFA_LayoutItem* CXFA_LayoutItem::GetLast() const {
ASSERT(m_bIsContentLayoutItem);
- const CXFA_ContentLayoutItemImpl* pCurNode =
- static_cast<const CXFA_ContentLayoutItemImpl*>(this);
+ const CXFA_ContentLayoutItem* pCurNode =
+ static_cast<const CXFA_ContentLayoutItem*>(this);
while (pCurNode->m_pNext) {
pCurNode = pCurNode->m_pNext;
}
return pCurNode;
}
-CXFA_LayoutItemImpl* CXFA_LayoutItemImpl::GetPrev() const {
+CXFA_LayoutItem* CXFA_LayoutItem::GetPrev() const {
ASSERT(m_bIsContentLayoutItem);
- return static_cast<const CXFA_ContentLayoutItemImpl*>(this)->m_pPrev;
+ return static_cast<const CXFA_ContentLayoutItem*>(this)->m_pPrev;
}
-CXFA_LayoutItemImpl* CXFA_LayoutItemImpl::GetNext() const {
+CXFA_LayoutItem* CXFA_LayoutItem::GetNext() const {
ASSERT(m_bIsContentLayoutItem);
- return static_cast<const CXFA_ContentLayoutItemImpl*>(this)->m_pNext;
+ return static_cast<const CXFA_ContentLayoutItem*>(this)->m_pNext;
}
-int32_t CXFA_LayoutItemImpl::GetIndex() const {
+int32_t CXFA_LayoutItem::GetIndex() const {
ASSERT(m_bIsContentLayoutItem);
int32_t iIndex = 0;
- const CXFA_ContentLayoutItemImpl* pCurNode =
- static_cast<const CXFA_ContentLayoutItemImpl*>(this);
+ const CXFA_ContentLayoutItem* pCurNode =
+ static_cast<const CXFA_ContentLayoutItem*>(this);
while (pCurNode->m_pPrev) {
pCurNode = pCurNode->m_pPrev;
++iIndex;
@@ -479,11 +476,11 @@ int32_t CXFA_LayoutItemImpl::GetIndex() const {
return iIndex;
}
-int32_t CXFA_LayoutItemImpl::GetCount() const {
+int32_t CXFA_LayoutItem::GetCount() const {
ASSERT(m_bIsContentLayoutItem);
int32_t iCount = GetIndex() + 1;
- const CXFA_ContentLayoutItemImpl* pCurNode =
- static_cast<const CXFA_ContentLayoutItemImpl*>(this);
+ const CXFA_ContentLayoutItem* pCurNode =
+ static_cast<const CXFA_ContentLayoutItem*>(this);
while (pCurNode->m_pNext) {
pCurNode = pCurNode->m_pNext;
iCount++;
@@ -491,7 +488,7 @@ int32_t CXFA_LayoutItemImpl::GetCount() const {
return iCount;
}
-void CXFA_LayoutItemImpl::AddChild(CXFA_LayoutItemImpl* pChildItem) {
+void CXFA_LayoutItem::AddChild(CXFA_LayoutItem* pChildItem) {
if (pChildItem->m_pParent) {
pChildItem->m_pParent->RemoveChild(pChildItem);
}
@@ -499,14 +496,14 @@ void CXFA_LayoutItemImpl::AddChild(CXFA_LayoutItemImpl* pChildItem) {
if (m_pFirstChild == NULL) {
m_pFirstChild = pChildItem;
} else {
- CXFA_LayoutItemImpl* pExistingChildItem = m_pFirstChild;
+ CXFA_LayoutItem* pExistingChildItem = m_pFirstChild;
while (pExistingChildItem->m_pNextSibling) {
pExistingChildItem = pExistingChildItem->m_pNextSibling;
}
pExistingChildItem->m_pNextSibling = pChildItem;
}
}
-void CXFA_LayoutItemImpl::AddHeadChild(CXFA_LayoutItemImpl* pChildItem) {
+void CXFA_LayoutItem::AddHeadChild(CXFA_LayoutItem* pChildItem) {
if (pChildItem->m_pParent) {
pChildItem->m_pParent->RemoveChild(pChildItem);
}
@@ -514,13 +511,13 @@ void CXFA_LayoutItemImpl::AddHeadChild(CXFA_LayoutItemImpl* pChildItem) {
if (m_pFirstChild == NULL) {
m_pFirstChild = pChildItem;
} else {
- CXFA_LayoutItemImpl* pExistingChildItem = m_pFirstChild;
+ CXFA_LayoutItem* pExistingChildItem = m_pFirstChild;
m_pFirstChild = pChildItem;
m_pFirstChild->m_pNextSibling = pExistingChildItem;
}
}
-void CXFA_LayoutItemImpl::InsertChild(CXFA_LayoutItemImpl* pBeforeItem,
- CXFA_LayoutItemImpl* pChildItem) {
+void CXFA_LayoutItem::InsertChild(CXFA_LayoutItem* pBeforeItem,
+ CXFA_LayoutItem* pChildItem) {
if (pBeforeItem->m_pParent != this) {
return;
}
@@ -528,18 +525,18 @@ void CXFA_LayoutItemImpl::InsertChild(CXFA_LayoutItemImpl* pBeforeItem,
pChildItem->m_pParent = NULL;
}
pChildItem->m_pParent = this;
- CXFA_LayoutItemImpl* pExistingChildItem = pBeforeItem->m_pNextSibling;
+ CXFA_LayoutItem* pExistingChildItem = pBeforeItem->m_pNextSibling;
pBeforeItem->m_pNextSibling = pChildItem;
pChildItem->m_pNextSibling = pExistingChildItem;
}
-void CXFA_LayoutItemImpl::RemoveChild(CXFA_LayoutItemImpl* pChildItem) {
+void CXFA_LayoutItem::RemoveChild(CXFA_LayoutItem* pChildItem) {
if (pChildItem->m_pParent != this) {
return;
}
if (m_pFirstChild == pChildItem) {
m_pFirstChild = pChildItem->m_pNextSibling;
} else {
- CXFA_LayoutItemImpl* pExistingChildItem = m_pFirstChild;
+ CXFA_LayoutItem* pExistingChildItem = m_pFirstChild;
while (pExistingChildItem &&
pExistingChildItem->m_pNextSibling != pChildItem) {
pExistingChildItem = pExistingChildItem->m_pNextSibling;
@@ -551,10 +548,10 @@ void CXFA_LayoutItemImpl::RemoveChild(CXFA_LayoutItemImpl* pChildItem) {
pChildItem->m_pNextSibling = NULL;
pChildItem->m_pParent = NULL;
}
-CXFA_ContentLayoutItemImpl* CXFA_ItemLayoutProcessor::ExtractLayoutItem() {
- CXFA_ContentLayoutItemImpl* pLayoutItem = m_pLayoutItem;
+CXFA_ContentLayoutItem* CXFA_ItemLayoutProcessor::ExtractLayoutItem() {
+ CXFA_ContentLayoutItem* pLayoutItem = m_pLayoutItem;
if (pLayoutItem) {
- m_pLayoutItem = (CXFA_ContentLayoutItemImpl*)pLayoutItem->m_pNextSibling;
+ m_pLayoutItem = (CXFA_ContentLayoutItem*)pLayoutItem->m_pNextSibling;
pLayoutItem->m_pNextSibling = NULL;
}
#ifdef _XFA_LAYOUTITEM_ProcessCACHE_
@@ -567,9 +564,9 @@ CXFA_ContentLayoutItemImpl* CXFA_ItemLayoutProcessor::ExtractLayoutItem() {
m_pOldLayoutItem->m_pFormNode->GetDocument()->GetParser()->GetNotify();
IXFA_DocLayout* pDocLayout =
m_pOldLayoutItem->m_pFormNode->GetDocument()->GetDocLayout();
- CXFA_ContentLayoutItemImpl* pOldLayoutItem = m_pOldLayoutItem;
+ CXFA_ContentLayoutItem* pOldLayoutItem = m_pOldLayoutItem;
while (pOldLayoutItem) {
- CXFA_ContentLayoutItemImpl* pNextOldLayoutItem = pOldLayoutItem->m_pNext;
+ CXFA_ContentLayoutItem* pNextOldLayoutItem = pOldLayoutItem->m_pNext;
pNotify->OnLayoutEvent(pDocLayout, pOldLayoutItem,
XFA_LAYOUTEVENT_ItemRemoving);
delete pOldLayoutItem;
@@ -634,9 +631,9 @@ static void XFA_DeleteLayoutGeneratedNode(CXFA_Node* pGenerateNode) {
pGenerateNode);
for (CXFA_Node* pNode = sIterator.GetCurrent(); pNode;
pNode = sIterator.MoveToNext()) {
- CXFA_ContentLayoutItemImpl* pCurLayoutItem =
- (CXFA_ContentLayoutItemImpl*)pNode->GetUserData(XFA_LAYOUTITEMKEY);
- CXFA_ContentLayoutItemImpl* pNextLayoutItem = NULL;
+ CXFA_ContentLayoutItem* pCurLayoutItem =
+ (CXFA_ContentLayoutItem*)pNode->GetUserData(XFA_LAYOUTITEMKEY);
+ CXFA_ContentLayoutItem* pNextLayoutItem = NULL;
while (pCurLayoutItem) {
pNextLayoutItem = pCurLayoutItem->m_pNext;
pNotify->OnLayoutEvent(pDocLayout, pCurLayoutItem,
@@ -1029,12 +1026,12 @@ FX_BOOL CXFA_ItemLayoutProcessor::IncrementRelayoutNode(
return FALSE;
}
void CXFA_ItemLayoutProcessor::DoLayoutPageArea(
- CXFA_ContainerLayoutItemImpl* pPageAreaLayoutItem) {
+ CXFA_ContainerLayoutItem* pPageAreaLayoutItem) {
CXFA_Node* pFormNode = pPageAreaLayoutItem->m_pFormNode;
CXFA_Node* pCurChildNode = XFA_LAYOUT_INVALIDNODE;
XFA_ItemLayoutProcessorStages nCurChildNodeStage =
XFA_ItemLayoutProcessorStages_None;
- CXFA_LayoutItemImpl* pBeforeItem = NULL;
+ CXFA_LayoutItem* pBeforeItem = NULL;
for (XFA_ItemLayoutProcessor_GotoNextContainerNode(
pCurChildNode, nCurChildNodeStage, pFormNode, FALSE);
pCurChildNode; XFA_ItemLayoutProcessor_GotoNextContainerNode(
@@ -1061,7 +1058,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutPageArea(
CalculatePositionedContainerPos(pCurChildNode, fWidth, fHeight, fAbsoluteX,
fAbsoluteY);
pProcessor->SetCurrentComponentPos(fAbsoluteX, fAbsoluteY);
- CXFA_LayoutItemImpl* pProcessItem = pProcessor->ExtractLayoutItem();
+ CXFA_LayoutItem* pProcessItem = pProcessor->ExtractLayoutItem();
if (pBeforeItem == NULL) {
pPageAreaLayoutItem->AddHeadChild(pProcessItem);
} else {
@@ -1071,7 +1068,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutPageArea(
delete pProcessor;
}
pBeforeItem = NULL;
- CXFA_LayoutItemImpl* pLayoutItem = pPageAreaLayoutItem->m_pFirstChild;
+ CXFA_LayoutItem* pLayoutItem = pPageAreaLayoutItem->m_pFirstChild;
while (pLayoutItem) {
if (!pLayoutItem->IsContentLayoutItem() ||
pLayoutItem->m_pFormNode->GetClassID() != XFA_ELEMENT_Draw) {
@@ -1079,7 +1076,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutPageArea(
continue;
}
if (pLayoutItem->m_pFormNode->GetClassID() == XFA_ELEMENT_Draw) {
- CXFA_LayoutItemImpl* pNextLayoutItem = pLayoutItem->m_pNextSibling;
+ CXFA_LayoutItem* pNextLayoutItem = pLayoutItem->m_pNextSibling;
pPageAreaLayoutItem->RemoveChild(pLayoutItem);
if (pBeforeItem == NULL) {
pPageAreaLayoutItem->AddHeadChild(pLayoutItem);
@@ -1205,7 +1202,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutPositionedContainer(
SetCurrentComponentSize(fContainerWidth, fContainerHeight);
}
static inline void XFA_ItemLayoutProcessor_UpdateWidgetSize(
- CXFA_ContentLayoutItemImpl* pLayoutItem,
+ CXFA_ContentLayoutItem* pLayoutItem,
FX_FLOAT& fWidth,
FX_FLOAT& fHeight) {
CXFA_Node* pNode = pLayoutItem->m_pFormNode;
@@ -1235,7 +1232,7 @@ static inline void XFA_ItemLayoutProcessor_UpdateWidgetSize(
}
}
static inline void XFA_ItemLayoutProcessor_RelocateTableRowCells(
- CXFA_ContentLayoutItemImpl* pLayoutRow,
+ CXFA_ContentLayoutItem* pLayoutRow,
const CFX_ArrayTemplate<FX_FLOAT>& rgSpecifiedColumnWidths,
XFA_ATTRIBUTEENUM eLayout) {
FX_FLOAT fContainerWidth = 0, fContainerHeight = 0;
@@ -1265,11 +1262,10 @@ static inline void XFA_ItemLayoutProcessor_RelocateTableRowCells(
FX_FLOAT fCurrentColX = 0;
int32_t nCurrentColIdx = 0;
FX_BOOL bMetWholeRowCell = FALSE;
- for (CXFA_ContentLayoutItemImpl* pLayoutChild =
- (CXFA_ContentLayoutItemImpl*)pLayoutRow->m_pFirstChild;
+ for (CXFA_ContentLayoutItem* pLayoutChild =
+ (CXFA_ContentLayoutItem*)pLayoutRow->m_pFirstChild;
pLayoutChild;
- pLayoutChild =
- (CXFA_ContentLayoutItemImpl*)pLayoutChild->m_pNextSibling) {
+ pLayoutChild = (CXFA_ContentLayoutItem*)pLayoutChild->m_pNextSibling) {
int32_t nOriginalColSpan =
pLayoutChild->m_pFormNode->GetInteger(XFA_ATTRIBUTE_ColSpan);
int32_t nColSpan = nOriginalColSpan;
@@ -1307,11 +1303,10 @@ static inline void XFA_ItemLayoutProcessor_RelocateTableRowCells(
}
}
if (bContainerHeightAutoSize) {
- for (CXFA_ContentLayoutItemImpl* pLayoutChild =
- (CXFA_ContentLayoutItemImpl*)pLayoutRow->m_pFirstChild;
+ for (CXFA_ContentLayoutItem* pLayoutChild =
+ (CXFA_ContentLayoutItem*)pLayoutRow->m_pFirstChild;
pLayoutChild;
- pLayoutChild =
- (CXFA_ContentLayoutItemImpl*)pLayoutChild->m_pNextSibling) {
+ pLayoutChild = (CXFA_ContentLayoutItem*)pLayoutChild->m_pNextSibling) {
XFA_ItemLayoutProcessor_UpdateWidgetSize(
pLayoutChild, pLayoutChild->m_sSize.x, fContentCalculatedHeight);
FX_FLOAT fOldChildHeight = pLayoutChild->m_sSize.y;
@@ -1333,11 +1328,11 @@ static inline void XFA_ItemLayoutProcessor_RelocateTableRowCells(
break;
}
if (fOffHeight > 0) {
- for (CXFA_ContentLayoutItemImpl* pInnerLayoutChild =
- (CXFA_ContentLayoutItemImpl*)pLayoutChild->m_pFirstChild;
+ for (CXFA_ContentLayoutItem* pInnerLayoutChild =
+ (CXFA_ContentLayoutItem*)pLayoutChild->m_pFirstChild;
pInnerLayoutChild;
- pInnerLayoutChild = (CXFA_ContentLayoutItemImpl*)
- pInnerLayoutChild->m_pNextSibling) {
+ pInnerLayoutChild =
+ (CXFA_ContentLayoutItem*)pInnerLayoutChild->m_pNextSibling) {
pInnerLayoutChild->m_sPos.y += fOffHeight;
}
}
@@ -1358,11 +1353,10 @@ static inline void XFA_ItemLayoutProcessor_RelocateTableRowCells(
}
if (pLayoutRow->m_pFormNode->GetEnum(XFA_ATTRIBUTE_Layout) ==
XFA_ATTRIBUTEENUM_Rl_row) {
- for (CXFA_ContentLayoutItemImpl* pLayoutChild =
- (CXFA_ContentLayoutItemImpl*)pLayoutRow->m_pFirstChild;
+ for (CXFA_ContentLayoutItem* pLayoutChild =
+ (CXFA_ContentLayoutItem*)pLayoutRow->m_pFirstChild;
pLayoutChild;
- pLayoutChild =
- (CXFA_ContentLayoutItemImpl*)pLayoutChild->m_pNextSibling) {
+ pLayoutChild = (CXFA_ContentLayoutItem*)pLayoutChild->m_pNextSibling) {
pLayoutChild->m_sPos.x = fContentCalculatedWidth -
pLayoutChild->m_sPos.x - pLayoutChild->m_sSize.x;
}
@@ -1453,14 +1447,13 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
}
int32_t iRowCount = 0, iColCount = 0;
{
- CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*> rgRowItems;
+ CFX_ArrayTemplate<CXFA_ContentLayoutItem*> rgRowItems;
CFX_ArrayTemplate<int32_t> rgRowItemsSpan;
CFX_ArrayTemplate<FX_FLOAT> rgRowItemsWidth;
- for (CXFA_ContentLayoutItemImpl* pLayoutChild =
- (CXFA_ContentLayoutItemImpl*)m_pLayoutItem->m_pFirstChild;
+ for (CXFA_ContentLayoutItem* pLayoutChild =
+ (CXFA_ContentLayoutItem*)m_pLayoutItem->m_pFirstChild;
pLayoutChild;
- pLayoutChild =
- (CXFA_ContentLayoutItemImpl*)pLayoutChild->m_pNextSibling) {
+ pLayoutChild = (CXFA_ContentLayoutItem*)pLayoutChild->m_pNextSibling) {
if (pLayoutChild->m_pFormNode->GetClassID() != XFA_ELEMENT_Subform) {
continue;
}
@@ -1473,8 +1466,8 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
eLayout != XFA_ATTRIBUTEENUM_Rl_row) {
continue;
}
- if (CXFA_ContentLayoutItemImpl* pRowLayoutCell =
- (CXFA_ContentLayoutItemImpl*)pLayoutChild->m_pFirstChild) {
+ if (CXFA_ContentLayoutItem* pRowLayoutCell =
+ (CXFA_ContentLayoutItem*)pLayoutChild->m_pFirstChild) {
rgRowItems.Add(pRowLayoutCell);
int32_t iColSpan =
pRowLayoutCell->m_pFormNode->GetInteger(XFA_ATTRIBUTE_ColSpan);
@@ -1492,8 +1485,8 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
while (rgRowItems[i] != NULL && (rgRowItemsSpan[i] <= 0 ||
!XFA_ItemLayoutProcessor_IsTakingSpace(
rgRowItems[i]->m_pFormNode))) {
- CXFA_ContentLayoutItemImpl* pNewCell =
- (CXFA_ContentLayoutItemImpl*)rgRowItems[i]->m_pNextSibling;
+ CXFA_ContentLayoutItem* pNewCell =
+ (CXFA_ContentLayoutItem*)rgRowItems[i]->m_pNextSibling;
if (rgRowItemsSpan[i] < 0 && XFA_ItemLayoutProcessor_IsTakingSpace(
rgRowItems[i]->m_pFormNode)) {
pNewCell = NULL;
@@ -1505,7 +1498,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
: 0;
rgRowItemsWidth[i] = pNewCell ? pNewCell->m_sSize.x : 0;
}
- CXFA_ContentLayoutItemImpl* pCell = rgRowItems[i];
+ CXFA_ContentLayoutItem* pCell = rgRowItems[i];
if (!pCell) {
continue;
}
@@ -1542,11 +1535,10 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) {
}
}
FX_FLOAT fCurrentRowY = 0;
- for (CXFA_ContentLayoutItemImpl* pLayoutChild =
- (CXFA_ContentLayoutItemImpl*)m_pLayoutItem->m_pFirstChild;
+ for (CXFA_ContentLayoutItem* pLayoutChild =
+ (CXFA_ContentLayoutItem*)m_pLayoutItem->m_pFirstChild;
pLayoutChild;
- pLayoutChild =
- (CXFA_ContentLayoutItemImpl*)pLayoutChild->m_pNextSibling) {
+ pLayoutChild = (CXFA_ContentLayoutItem*)pLayoutChild->m_pNextSibling) {
if (!XFA_ItemLayoutProcessor_IsTakingSpace(pLayoutChild->m_pFormNode)) {
continue;
}
@@ -1616,7 +1608,7 @@ static uint8_t XFA_ItemLayoutProcessor_HAlignEnumToInt(
}
static void XFA_ItemLayoutProcessor_UpdatePendedItemLayout(
CXFA_ItemLayoutProcessor* pProcessor,
- CXFA_ContentLayoutItemImpl* pLayoutItem) {
+ CXFA_ContentLayoutItem* pLayoutItem) {
XFA_ATTRIBUTEENUM eLayout =
pLayoutItem->m_pFormNode->GetEnum(XFA_ATTRIBUTE_Layout);
switch (eLayout) {
@@ -1630,7 +1622,7 @@ static void XFA_ItemLayoutProcessor_UpdatePendedItemLayout(
}
}
FX_BOOL CXFA_ItemLayoutProcessor::IsAddNewRowForTrailer(
- CXFA_ContentLayoutItemImpl* pTrailerItem) {
+ CXFA_ContentLayoutItem* pTrailerItem) {
if (!pTrailerItem) {
return FALSE;
}
@@ -1644,7 +1636,7 @@ FX_BOOL CXFA_ItemLayoutProcessor::IsAddNewRowForTrailer(
static void XFA_ItemLayoutProcessor_AddTrailerBeforeSplit(
CXFA_ItemLayoutProcessor* pProcessor,
FX_FLOAT fSplitPos,
- CXFA_ContentLayoutItemImpl* pTrailerLayoutItem,
+ CXFA_ContentLayoutItem* pTrailerLayoutItem,
FX_BOOL bUseInherited = FALSE) {
if (!pTrailerLayoutItem) {
return;
@@ -1714,7 +1706,7 @@ static void XFA_ItemLayoutProcessor_AddTrailerBeforeSplit(
};
static void XFA_ItemLayoutProcessor_AddLeaderAfterSplit(
CXFA_ItemLayoutProcessor* pProcessor,
- CXFA_ContentLayoutItemImpl* pLeaderLayoutItem) {
+ CXFA_ContentLayoutItem* pLeaderLayoutItem) {
XFA_ItemLayoutProcessor_UpdatePendedItemLayout(pProcessor, pLeaderLayoutItem);
CXFA_Node* pMarginNode =
pProcessor->m_pFormNode->GetFirstChildByClass(XFA_ELEMENT_Margin);
@@ -1730,11 +1722,10 @@ static void XFA_ItemLayoutProcessor_AddLeaderAfterSplit(
pMarginNode->GetMeasure(XFA_ATTRIBUTE_BottomInset).ToUnit(XFA_UNIT_Pt);
}
FX_FLOAT fHeight = pLeaderLayoutItem->m_sSize.y;
- for (CXFA_ContentLayoutItemImpl* pChildItem =
- (CXFA_ContentLayoutItemImpl*)
- pProcessor->m_pLayoutItem->m_pFirstChild;
+ for (CXFA_ContentLayoutItem* pChildItem =
+ (CXFA_ContentLayoutItem*)pProcessor->m_pLayoutItem->m_pFirstChild;
pChildItem;
- pChildItem = (CXFA_ContentLayoutItemImpl*)pChildItem->m_pNextSibling) {
+ pChildItem = (CXFA_ContentLayoutItem*)pChildItem->m_pNextSibling) {
pChildItem->m_sPos.y += fHeight;
}
pLeaderLayoutItem->m_sPos.y = 0;
@@ -1781,7 +1772,7 @@ static FX_FLOAT XFA_ItemLayoutProcessor_InsertPendingItems(
CXFA_Node* pPendingNode =
(CXFA_Node*)pProcessor->m_rgPendingNodes.GetAt(pos);
pProcessor->m_rgPendingNodes.RemoveAt(pos);
- CXFA_ContentLayoutItemImpl* pPendingLayoutItem = NULL;
+ CXFA_ContentLayoutItem* pPendingLayoutItem = NULL;
CXFA_ItemLayoutProcessor* pPendingProcessor =
new CXFA_ItemLayoutProcessor(pPendingNode, NULL);
#ifndef _XFA_LAYOUTITEM_ProcessCACHE_
@@ -1823,7 +1814,7 @@ FX_BOOL CXFA_ItemLayoutProcessor::ProcessKeepForSplite(
CXFA_ItemLayoutProcessor* pParentProcessor,
CXFA_ItemLayoutProcessor* pChildProcessor,
XFA_ItemLayoutProcessorResult eRetValue,
- CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*>& rgCurLineLayoutItem,
+ CFX_ArrayTemplate<CXFA_ContentLayoutItem*>& rgCurLineLayoutItem,
FX_FLOAT& fContentCurRowAvailWidth,
FX_FLOAT& fContentCurRowHeight,
FX_FLOAT& fContentCurRowY,
@@ -1839,12 +1830,12 @@ FX_BOOL CXFA_ItemLayoutProcessor::ProcessKeepForSplite(
if (XFA_ExistContainerKeep(pParentProcessor->m_pCurChildNode, TRUE)) {
FX_FLOAT fChildWidth, fChildHeight;
pChildProcessor->GetCurrentComponentSize(fChildWidth, fChildHeight);
- CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*> keepLayoutItems;
+ CFX_ArrayTemplate<CXFA_ContentLayoutItem*> keepLayoutItems;
if (pParentProcessor->JudgePutNextPage(pParentProcessor->m_pLayoutItem,
fChildHeight, keepLayoutItems)) {
m_arrayKeepItems.RemoveAll();
for (int32_t iIndex = 0; iIndex < keepLayoutItems.GetSize(); iIndex++) {
- CXFA_ContentLayoutItemImpl* pItem = keepLayoutItems.GetAt(iIndex);
+ CXFA_ContentLayoutItem* pItem = keepLayoutItems.GetAt(iIndex);
pParentProcessor->m_pLayoutItem->RemoveChild(pItem);
fContentCurRowY -= pItem->m_sSize.y;
m_arrayKeepItems.Add(pItem);
@@ -1867,18 +1858,18 @@ FX_BOOL CXFA_ItemLayoutProcessor::ProcessKeepForSplite(
return FALSE;
}
FX_BOOL CXFA_ItemLayoutProcessor::JudgePutNextPage(
- CXFA_ContentLayoutItemImpl* pParentLayoutItem,
+ CXFA_ContentLayoutItem* pParentLayoutItem,
FX_FLOAT fChildHeight,
- CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*>& pKeepItems) {
+ CFX_ArrayTemplate<CXFA_ContentLayoutItem*>& pKeepItems) {
if (pParentLayoutItem == NULL) {
return FALSE;
}
FX_FLOAT fItemsHeight = 0;
- for (CXFA_ContentLayoutItemImpl* pChildLayoutItem =
- (CXFA_ContentLayoutItemImpl*)pParentLayoutItem->m_pFirstChild;
+ for (CXFA_ContentLayoutItem* pChildLayoutItem =
+ (CXFA_ContentLayoutItem*)pParentLayoutItem->m_pFirstChild;
pChildLayoutItem;
pChildLayoutItem =
- (CXFA_ContentLayoutItemImpl*)pChildLayoutItem->m_pNextSibling) {
+ (CXFA_ContentLayoutItem*)pChildLayoutItem->m_pNextSibling) {
if (XFA_ExistContainerKeep(pChildLayoutItem->m_pFormNode, FALSE)) {
pKeepItems.Add(pChildLayoutItem);
fItemsHeight += pChildLayoutItem->m_sSize.y;
@@ -1914,7 +1905,7 @@ void CXFA_ItemLayoutProcessor::ProcessUnUseBinds(CXFA_Node* pFormNode) {
void CXFA_ItemLayoutProcessor::ProcessUnUseOverFlow(
CXFA_Node* pLeaderNode,
CXFA_Node* pTrailerNode,
- CXFA_ContentLayoutItemImpl* pTrailerItem,
+ CXFA_ContentLayoutItem* pTrailerItem,
CXFA_Node* pFormNode) {
ProcessUnUseBinds(pLeaderNode);
ProcessUnUseBinds(pTrailerNode);
@@ -1943,7 +1934,7 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
FX_FLOAT fContainerHeight,
XFA_ATTRIBUTEENUM eFlowStrategy,
uint8_t& uCurHAlignState,
- CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*>(&rgCurLineLayoutItems)[3],
+ CFX_ArrayTemplate<CXFA_ContentLayoutItem*>(&rgCurLineLayoutItems)[3],
FX_BOOL bUseBreakControl,
FX_FLOAT fAvailHeight,
FX_FLOAT fRealHeight,
@@ -2022,7 +2013,7 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
XFA_LAYOUT_FLOAT_PERCISION)) {
CXFA_Node *pOverflowLeaderNode = NULL, *pOverflowTrailerNode = NULL,
*pFormNode = NULL;
- CXFA_ContentLayoutItemImpl* pTrailerLayoutItem = NULL;
+ CXFA_ContentLayoutItem* pTrailerLayoutItem = NULL;
FX_BOOL bIsAddTrailerHeight = FALSE;
if (pThis->m_pPageMgr &&
pProcessor->m_pFormNode->GetIntact() == XFA_ATTRIBUTEENUM_None) {
@@ -2090,7 +2081,7 @@ static XFA_ItemLayoutProcessorResult XFA_ItemLayoutProcessor_InsertFlowedItem(
pOverflowTrailerNode,
pTrailerLayoutItem, pFormNode);
}
- CXFA_ContentLayoutItemImpl* pChildLayoutItem =
+ CXFA_ContentLayoutItem* pChildLayoutItem =
pProcessor->ExtractLayoutItem();
if (XFA_ExistContainerKeep(pProcessor->m_pFormNode, FALSE) &&
pProcessor->m_pFormNode->GetIntact() == XFA_ATTRIBUTEENUM_None) {
@@ -2351,24 +2342,23 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
}
fRealHeight = fRealHeight - fTopInset - fBottomInset;
FX_FLOAT fContentCurRowY = 0;
- CXFA_ContentLayoutItemImpl* pLayoutChild = NULL;
+ CXFA_ContentLayoutItem* pLayoutChild = NULL;
if (m_pLayoutItem != NULL) {
if (m_nCurChildNodeStage != XFA_ItemLayoutProcessorStages_Done &&
eFlowStrategy != XFA_ATTRIBUTEENUM_Tb) {
- pLayoutChild = (CXFA_ContentLayoutItemImpl*)m_pLayoutItem->m_pFirstChild;
- for (CXFA_ContentLayoutItemImpl* pLayoutNext = pLayoutChild; pLayoutNext;
- pLayoutNext =
- (CXFA_ContentLayoutItemImpl*)pLayoutNext->m_pNextSibling) {
+ pLayoutChild = (CXFA_ContentLayoutItem*)m_pLayoutItem->m_pFirstChild;
+ for (CXFA_ContentLayoutItem* pLayoutNext = pLayoutChild; pLayoutNext;
+ pLayoutNext = (CXFA_ContentLayoutItem*)pLayoutNext->m_pNextSibling) {
if (pLayoutNext->m_sPos.y != pLayoutChild->m_sPos.y) {
pLayoutChild = pLayoutNext;
}
}
}
- for (CXFA_ContentLayoutItemImpl* pLayoutTempChild =
- (CXFA_ContentLayoutItemImpl*)m_pLayoutItem->m_pFirstChild;
+ for (CXFA_ContentLayoutItem* pLayoutTempChild =
+ (CXFA_ContentLayoutItem*)m_pLayoutItem->m_pFirstChild;
pLayoutTempChild != pLayoutChild;
pLayoutTempChild =
- (CXFA_ContentLayoutItemImpl*)pLayoutTempChild->m_pNextSibling) {
+ (CXFA_ContentLayoutItem*)pLayoutTempChild->m_pNextSibling) {
if (XFA_ItemLayoutProcessor_IsTakingSpace(
pLayoutTempChild->m_pFormNode)) {
FX_FLOAT fChildContentWidth =
@@ -2408,13 +2398,12 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
FX_FLOAT fContentCurRowHeight = 0;
FX_FLOAT fContentCurRowAvailWidth = fContentWidthLimit;
m_fWidthLimite = fContentCurRowAvailWidth;
- CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*> rgCurLineLayoutItems[3];
+ CFX_ArrayTemplate<CXFA_ContentLayoutItem*> rgCurLineLayoutItems[3];
uint8_t uCurHAlignState =
(eFlowStrategy != XFA_ATTRIBUTEENUM_Rl_tb ? 0 : 2);
if (pLayoutChild) {
- for (CXFA_ContentLayoutItemImpl* pLayoutNext = pLayoutChild; pLayoutNext;
- pLayoutNext =
- (CXFA_ContentLayoutItemImpl*)pLayoutNext->m_pNextSibling) {
+ for (CXFA_ContentLayoutItem* pLayoutNext = pLayoutChild; pLayoutNext;
+ pLayoutNext = (CXFA_ContentLayoutItem*)pLayoutNext->m_pNextSibling) {
if (pLayoutNext->m_pNextSibling == NULL && m_pCurChildPreprocessor &&
m_pCurChildPreprocessor->m_pFormNode == pLayoutNext->m_pFormNode) {
pLayoutNext->m_pNext = m_pCurChildPreprocessor->m_pLayoutItem;
@@ -2438,28 +2427,28 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
fContentCurRowAvailWidth -= pLayoutNext->m_sSize.x;
}
}
- if ((CXFA_ContentLayoutItemImpl*)m_pLayoutItem->m_pFirstChild ==
+ if ((CXFA_ContentLayoutItem*)m_pLayoutItem->m_pFirstChild ==
pLayoutChild) {
m_pLayoutItem->m_pFirstChild = NULL;
} else {
- CXFA_ContentLayoutItemImpl* pLayoutNext =
- (CXFA_ContentLayoutItemImpl*)m_pLayoutItem->m_pFirstChild;
+ CXFA_ContentLayoutItem* pLayoutNext =
+ (CXFA_ContentLayoutItem*)m_pLayoutItem->m_pFirstChild;
for (; pLayoutNext;
pLayoutNext =
- (CXFA_ContentLayoutItemImpl*)pLayoutNext->m_pNextSibling) {
- if ((CXFA_ContentLayoutItemImpl*)pLayoutNext->m_pNextSibling ==
+ (CXFA_ContentLayoutItem*)pLayoutNext->m_pNextSibling) {
+ if ((CXFA_ContentLayoutItem*)pLayoutNext->m_pNextSibling ==
pLayoutChild) {
pLayoutNext->m_pNextSibling = NULL;
break;
}
}
}
- CXFA_ContentLayoutItemImpl* pLayoutNextTemp =
- (CXFA_ContentLayoutItemImpl*)pLayoutChild;
+ CXFA_ContentLayoutItem* pLayoutNextTemp =
+ (CXFA_ContentLayoutItem*)pLayoutChild;
while (pLayoutNextTemp) {
pLayoutNextTemp->m_pParent = NULL;
- CXFA_ContentLayoutItemImpl* pSaveLayoutNext =
- (CXFA_ContentLayoutItemImpl*)pLayoutNextTemp->m_pNextSibling;
+ CXFA_ContentLayoutItem* pSaveLayoutNext =
+ (CXFA_ContentLayoutItem*)pLayoutNextTemp->m_pNextSibling;
pLayoutNextTemp->m_pNextSibling = NULL;
pLayoutNextTemp = pSaveLayoutNext;
}
@@ -2477,7 +2466,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
case XFA_ItemLayoutProcessorStages_BreakBefore: {
for (int32_t iIndex = 0; iIndex < m_arrayKeepItems.GetSize();
iIndex++) {
- CXFA_ContentLayoutItemImpl* pItem = m_arrayKeepItems.GetAt(iIndex);
+ CXFA_ContentLayoutItem* pItem = m_arrayKeepItems.GetAt(iIndex);
m_pLayoutItem->RemoveChild(pItem);
fContentCalculatedHeight -= pItem->m_sSize.y;
}
@@ -2756,7 +2745,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer(
: XFA_ItemLayoutProcessorResult_PageFullBreak);
}
FX_BOOL CXFA_ItemLayoutProcessor::CalculateRowChildPosition(
- CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*>(&rgCurLineLayoutItems)[3],
+ CFX_ArrayTemplate<CXFA_ContentLayoutItem*>(&rgCurLineLayoutItems)[3],
XFA_ATTRIBUTEENUM eFlowStrategy,
FX_BOOL bContainerHeightAutoSize,
FX_BOOL bContainerWidthAutoSize,
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h
index 7d906f2e21..78753e67cd 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h
+++ b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h
@@ -12,8 +12,8 @@
#define XFA_LAYOUT_FLOAT_MAX FLT_MAX
class CXFA_ItemLayoutProcessor;
class CXFA_LayoutPageMgr;
-class CXFA_ContainerLayoutItemImpl;
-class CXFA_ContentLayoutItemImpl;
+class CXFA_ContainerLayoutItem;
+class CXFA_ContentLayoutItem;
enum XFA_ItemLayoutProcessorResult {
XFA_ItemLayoutProcessorResult_Done,
XFA_ItemLayoutProcessorResult_PageFullBreak,
@@ -66,7 +66,7 @@ class CXFA_ItemLayoutProcessor {
void SetCurrentComponentSize(FX_FLOAT fWidth, FX_FLOAT fHeight);
inline CXFA_Node* GetFormNode() { return m_pFormNode; }
inline FX_BOOL HasLayoutItem() { return m_pLayoutItem != NULL; }
- CXFA_ContentLayoutItemImpl* ExtractLayoutItem();
+ CXFA_ContentLayoutItem* ExtractLayoutItem();
static FX_BOOL IncrementRelayoutNode(CXFA_LayoutProcessor* pLayoutProcessor,
CXFA_Node* pNode,
@@ -76,25 +76,25 @@ class CXFA_ItemLayoutProcessor {
FX_FLOAT fHeight,
FX_FLOAT& fAbsoluteX,
FX_FLOAT& fAbsoluteY);
- static FX_BOOL FindLayoutItemSplitPos(CXFA_ContentLayoutItemImpl* pLayoutItem,
+ static FX_BOOL FindLayoutItemSplitPos(CXFA_ContentLayoutItem* pLayoutItem,
FX_FLOAT fCurVerticalOffset,
FX_FLOAT& fProposedSplitPos,
FX_BOOL& bAppChange,
FX_BOOL bCalculateMargin = TRUE);
FX_FLOAT FindSplitPos(FX_FLOAT fProposedSplitPos);
- void SplitLayoutItem(CXFA_ContentLayoutItemImpl* pLayoutItem,
- CXFA_ContentLayoutItemImpl* pSecondParent,
+ void SplitLayoutItem(CXFA_ContentLayoutItem* pLayoutItem,
+ CXFA_ContentLayoutItem* pSecondParent,
FX_FLOAT fSplitPos);
void SplitLayoutItem(FX_FLOAT fSplitPos);
FX_BOOL JudgePutNextPage(
- CXFA_ContentLayoutItemImpl* pParentLayoutItem,
+ CXFA_ContentLayoutItem* pParentLayoutItem,
FX_FLOAT fChildHeight,
- CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*>& pKeepItems);
+ CFX_ArrayTemplate<CXFA_ContentLayoutItem*>& pKeepItems);
FX_BOOL ProcessKeepForSplite(
CXFA_ItemLayoutProcessor* pParentProcessor,
CXFA_ItemLayoutProcessor* pChildProcessor,
XFA_ItemLayoutProcessorResult eRetValue,
- CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*>& rgCurLineLayoutItem,
+ CFX_ArrayTemplate<CXFA_ContentLayoutItem*>& rgCurLineLayoutItem,
FX_FLOAT& fContentCurRowAvailWidth,
FX_FLOAT& fContentCurRowHeight,
FX_FLOAT& fContentCurRowY,
@@ -102,9 +102,9 @@ class CXFA_ItemLayoutProcessor {
FX_BOOL& bForceEndPage,
XFA_ItemLayoutProcessorResult& result);
FX_FLOAT InsertKeepLayoutItems();
- void DoLayoutPageArea(CXFA_ContainerLayoutItemImpl* pPageAreaLayoutItem);
+ void DoLayoutPageArea(CXFA_ContainerLayoutItem* pPageAreaLayoutItem);
FX_BOOL CalculateRowChildPosition(
- CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*>(&rgCurLineLayoutItems)[3],
+ CFX_ArrayTemplate<CXFA_ContentLayoutItem*>(&rgCurLineLayoutItems)[3],
XFA_ATTRIBUTEENUM eFlowStrategy,
FX_BOOL bContainerHeightAutoSize,
FX_BOOL bContainerWidthAutoSize,
@@ -117,12 +117,12 @@ class CXFA_ItemLayoutProcessor {
void ProcessUnUseOverFlow(CXFA_Node* pLeaderNode,
CXFA_Node* pTrailerNode,
- CXFA_ContentLayoutItemImpl* pTrailerItem,
+ CXFA_ContentLayoutItem* pTrailerItem,
CXFA_Node* pFormNode);
void ProcessUnUseBinds(CXFA_Node* pFormNode);
- FX_BOOL IsAddNewRowForTrailer(CXFA_ContentLayoutItemImpl* pTrailerItem);
+ FX_BOOL IsAddNewRowForTrailer(CXFA_ContentLayoutItem* pTrailerItem);
FX_BOOL JudgeLeaderOrTrailerForOccur(CXFA_Node* pFormNode);
- CXFA_ContentLayoutItemImpl* CreateContentLayoutItem(CXFA_Node* pFormNode);
+ CXFA_ContentLayoutItem* CreateContentLayoutItem(CXFA_Node* pFormNode);
protected:
void DoLayoutPositionedContainer(CXFA_LayoutContext* pContext = NULL);
@@ -159,9 +159,9 @@ class CXFA_ItemLayoutProcessor {
CXFA_Node* m_pKeepHeadNode;
CXFA_Node* m_pKeepTailNode;
CXFA_Node* m_pFormNode;
- CXFA_ContentLayoutItemImpl* m_pLayoutItem;
+ CXFA_ContentLayoutItem* m_pLayoutItem;
#ifdef _XFA_LAYOUTITEM_ProcessCACHE_
- CXFA_ContentLayoutItemImpl* m_pOldLayoutItem;
+ CXFA_ContentLayoutItem* m_pOldLayoutItem;
#else
CXFA_LayoutPageMgr* m_pPageMgrCreateItem;
#endif
@@ -173,7 +173,7 @@ class CXFA_ItemLayoutProcessor {
CFX_PtrList m_rgPendingNodes;
FX_BOOL m_bBreakPending;
CFX_ArrayTemplate<FX_FLOAT> m_rgSpecifiedColumnWidths;
- CFX_ArrayTemplate<CXFA_ContentLayoutItemImpl*> m_arrayKeepItems;
+ CFX_ArrayTemplate<CXFA_ContentLayoutItem*> m_arrayKeepItems;
CFX_MapPtrToPtr m_PendingNodesCount;
FX_FLOAT m_fLastRowWidth;
FX_FLOAT m_fLastRowY;
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp
index 7b8281f23f..3d1959f46c 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp
@@ -35,8 +35,8 @@ CXFA_LayoutPageMgr::CXFA_LayoutPageMgr(CXFA_LayoutProcessor* pLayoutProcessor)
}
CXFA_LayoutPageMgr::~CXFA_LayoutPageMgr() {
ClearData();
- CXFA_LayoutItemImpl* pLayoutItem = GetRootLayoutItem();
- CXFA_LayoutItemImpl* pNextLayout = NULL;
+ CXFA_LayoutItem* pLayoutItem = GetRootLayoutItem();
+ CXFA_LayoutItem* pNextLayout = NULL;
for (; pLayoutItem; pLayoutItem = pNextLayout) {
pNextLayout = pLayoutItem->m_pNextSibling;
XFA_ReleaseLayoutItem(pLayoutItem);
@@ -57,7 +57,7 @@ FX_BOOL CXFA_LayoutPageMgr::InitLayoutPage(CXFA_Node* pFormNode) {
m_pPageSetLayoutItemRoot->m_pFormNode = m_pTemplatePageSetRoot;
} else {
m_pPageSetLayoutItemRoot =
- new CXFA_ContainerLayoutItemImpl(m_pTemplatePageSetRoot);
+ new CXFA_ContainerLayoutItem(m_pTemplatePageSetRoot);
}
m_pPageSetCurRoot = m_pPageSetLayoutItemRoot;
m_pTemplatePageSetRoot->SetUserData(XFA_LAYOUTITEMKEY,
@@ -180,9 +180,9 @@ FX_BOOL CXFA_LayoutPageMgr::AppendNewPage(FX_BOOL bFirstTemPage) {
return !bFirstTemPage || m_pCurrentContainerRecord != NULL;
}
static void XFA_LayoutItemMgr_ReorderLayoutItemToTail(
- CXFA_ContainerLayoutItemImpl* pLayoutItem) {
- CXFA_ContainerLayoutItemImpl* pParentLayoutItem =
- (CXFA_ContainerLayoutItemImpl*)pLayoutItem->m_pParent;
+ CXFA_ContainerLayoutItem* pLayoutItem) {
+ CXFA_ContainerLayoutItem* pParentLayoutItem =
+ (CXFA_ContainerLayoutItem*)pLayoutItem->m_pParent;
if (!pParentLayoutItem) {
return;
}
@@ -190,9 +190,9 @@ static void XFA_LayoutItemMgr_ReorderLayoutItemToTail(
pParentLayoutItem->AddChild(pLayoutItem);
}
static void XFA_LayoutItemMgr_RemoveLayoutItem(
- CXFA_ContainerLayoutItemImpl* pLayoutItem) {
- CXFA_ContainerLayoutItemImpl* pParentLayoutItem =
- (CXFA_ContainerLayoutItemImpl*)pLayoutItem->m_pParent;
+ CXFA_ContainerLayoutItem* pLayoutItem) {
+ CXFA_ContainerLayoutItem* pParentLayoutItem =
+ (CXFA_ContainerLayoutItem*)pLayoutItem->m_pParent;
if (!pParentLayoutItem) {
return;
}
@@ -236,7 +236,7 @@ void CXFA_LayoutPageMgr::ReorderPendingLayoutRecordToTail(
}
}
void CXFA_LayoutPageMgr::SubmitContentItem(
- CXFA_ContentLayoutItemImpl* pContentLayoutItem,
+ CXFA_ContentLayoutItem* pContentLayoutItem,
XFA_ItemLayoutProcessorResult eStatus) {
if (pContentLayoutItem) {
GetCurrentContainerRecord()->pCurContentArea->AddChild(pContentLayoutItem);
@@ -346,34 +346,32 @@ CXFA_ContainerRecord* CXFA_LayoutPageMgr::CreateContainerRecord(
if (pPageSet == m_pTemplatePageSetRoot) {
pNewRecord->pCurPageSet = m_pPageSetCurRoot;
} else {
- CXFA_ContainerLayoutItemImpl* pParentLayoutItem =
- (CXFA_ContainerLayoutItemImpl*)pPageSet->GetUserData(
- XFA_LAYOUTITEMKEY);
+ CXFA_ContainerLayoutItem* pParentLayoutItem =
+ (CXFA_ContainerLayoutItem*)pPageSet->GetUserData(XFA_LAYOUTITEMKEY);
if (pParentLayoutItem == NULL) {
pParentLayoutItem = m_pPageSetCurRoot;
}
pNewRecord->pCurPageSet = pParentLayoutItem;
}
} else {
- CXFA_ContainerLayoutItemImpl* pParentPageSetLayout = NULL;
+ CXFA_ContainerLayoutItem* pParentPageSetLayout = NULL;
if (pPageSet == GetCurrentContainerRecord()->pCurPageSet->m_pFormNode) {
pParentPageSetLayout =
- (CXFA_ContainerLayoutItemImpl*)GetCurrentContainerRecord()
- ->pCurPageSet->m_pParent;
+ (CXFA_ContainerLayoutItem*)
+ GetCurrentContainerRecord()->pCurPageSet->m_pParent;
} else {
pParentPageSetLayout =
- (CXFA_ContainerLayoutItemImpl*)pPageSet->GetNodeItem(
- XFA_NODEITEM_Parent)
+ (CXFA_ContainerLayoutItem*)pPageSet->GetNodeItem(
+ XFA_NODEITEM_Parent)
->GetUserData(XFA_LAYOUTITEMKEY);
}
- CXFA_ContainerLayoutItemImpl* pPageSetLayoutItem =
- new CXFA_ContainerLayoutItemImpl(pPageSet);
+ CXFA_ContainerLayoutItem* pPageSetLayoutItem =
+ new CXFA_ContainerLayoutItem(pPageSet);
pPageSet->SetUserData(XFA_LAYOUTITEMKEY, (void*)pPageSetLayoutItem);
if (pParentPageSetLayout == NULL) {
- CXFA_ContainerLayoutItemImpl* pPrePageSet = m_pPageSetLayoutItemRoot;
+ CXFA_ContainerLayoutItem* pPrePageSet = m_pPageSetLayoutItemRoot;
while (pPrePageSet->m_pNextSibling) {
- pPrePageSet =
- (CXFA_ContainerLayoutItemImpl*)pPrePageSet->m_pNextSibling;
+ pPrePageSet = (CXFA_ContainerLayoutItem*)pPrePageSet->m_pNextSibling;
}
pPrePageSet->m_pNextSibling = pPageSetLayoutItem;
m_pPageSetCurRoot = pPageSetLayoutItem;
@@ -388,8 +386,8 @@ CXFA_ContainerRecord* CXFA_LayoutPageMgr::CreateContainerRecord(
if (pPageSet == m_pTemplatePageSetRoot) {
pNewRecord->pCurPageSet = m_pPageSetLayoutItemRoot;
} else {
- CXFA_ContainerLayoutItemImpl* pPageSetLayoutItem =
- new CXFA_ContainerLayoutItemImpl(pPageSet);
+ CXFA_ContainerLayoutItem* pPageSetLayoutItem =
+ new CXFA_ContainerLayoutItem(pPageSet);
pPageSet->SetUserData(XFA_LAYOUTITEMKEY, (void*)pPageSetLayoutItem);
m_pPageSetLayoutItemRoot->AddChild(pPageSetLayoutItem);
pNewRecord->pCurPageSet = pPageSetLayoutItem;
@@ -403,18 +401,17 @@ CXFA_ContainerRecord* CXFA_LayoutPageMgr::CreateContainerRecord(
}
void CXFA_LayoutPageMgr::AddPageAreaLayoutItem(CXFA_ContainerRecord* pNewRecord,
CXFA_Node* pNewPageArea) {
- CXFA_ContainerLayoutItemImpl* pNewPageAreaLayoutItem = NULL;
+ CXFA_ContainerLayoutItem* pNewPageAreaLayoutItem = NULL;
if (m_PageArray.GetSize() > m_nAvailPages) {
- CXFA_ContainerLayoutItemImpl* pContainerItem = m_PageArray[m_nAvailPages];
+ CXFA_ContainerLayoutItem* pContainerItem = m_PageArray[m_nAvailPages];
pContainerItem->m_pFormNode = pNewPageArea;
m_nAvailPages++;
pNewPageAreaLayoutItem = pContainerItem;
} else {
IXFA_Notify* pNotify =
pNewPageArea->GetDocument()->GetParser()->GetNotify();
- CXFA_ContainerLayoutItemImpl* pContainerItem =
- (CXFA_ContainerLayoutItemImpl*)pNotify->OnCreateLayoutItem(
- pNewPageArea);
+ CXFA_ContainerLayoutItem* pContainerItem =
+ (CXFA_ContainerLayoutItem*)pNotify->OnCreateLayoutItem(pNewPageArea);
m_PageArray.Add(pContainerItem);
m_nAvailPages++;
pNotify->OnPageEvent((IXFA_LayoutPage*)pContainerItem,
@@ -433,53 +430,51 @@ void CXFA_LayoutPageMgr::AddContentAreaLayoutItem(
pNewRecord->pCurContentArea = NULL;
return;
}
- CXFA_ContainerLayoutItemImpl* pNewContentAreaLayoutItem =
- new CXFA_ContainerLayoutItemImpl(pContentArea);
+ CXFA_ContainerLayoutItem* pNewContentAreaLayoutItem =
+ new CXFA_ContainerLayoutItem(pContentArea);
ASSERT(pNewRecord->pCurPageArea);
pNewRecord->pCurPageArea->AddChild(pNewContentAreaLayoutItem);
pNewRecord->pCurContentArea = pNewContentAreaLayoutItem;
}
class CXFA_TraverseStrategy_PageSetContainerLayoutItem {
public:
- static inline CXFA_ContainerLayoutItemImpl* GetFirstChild(
- CXFA_ContainerLayoutItemImpl* pLayoutItem) {
+ static inline CXFA_ContainerLayoutItem* GetFirstChild(
+ CXFA_ContainerLayoutItem* pLayoutItem) {
if (pLayoutItem->m_pFormNode->GetClassID() == XFA_ELEMENT_PageSet) {
- CXFA_ContainerLayoutItemImpl* pChildItem =
- (CXFA_ContainerLayoutItemImpl*)pLayoutItem->m_pFirstChild;
+ CXFA_ContainerLayoutItem* pChildItem =
+ (CXFA_ContainerLayoutItem*)pLayoutItem->m_pFirstChild;
while (pChildItem &&
pChildItem->m_pFormNode->GetClassID() != XFA_ELEMENT_PageSet) {
- pChildItem = (CXFA_ContainerLayoutItemImpl*)pChildItem->m_pNextSibling;
+ pChildItem = (CXFA_ContainerLayoutItem*)pChildItem->m_pNextSibling;
}
return pChildItem;
}
return NULL;
}
- static inline CXFA_ContainerLayoutItemImpl* GetNextSibling(
- CXFA_ContainerLayoutItemImpl* pLayoutItem) {
- CXFA_ContainerLayoutItemImpl* pChildItem =
- (CXFA_ContainerLayoutItemImpl*)pLayoutItem->m_pNextSibling;
+ static inline CXFA_ContainerLayoutItem* GetNextSibling(
+ CXFA_ContainerLayoutItem* pLayoutItem) {
+ CXFA_ContainerLayoutItem* pChildItem =
+ (CXFA_ContainerLayoutItem*)pLayoutItem->m_pNextSibling;
while (pChildItem &&
pChildItem->m_pFormNode->GetClassID() != XFA_ELEMENT_PageSet) {
- pChildItem = (CXFA_ContainerLayoutItemImpl*)pChildItem->m_pNextSibling;
+ pChildItem = (CXFA_ContainerLayoutItem*)pChildItem->m_pNextSibling;
}
return pChildItem;
}
- static inline CXFA_ContainerLayoutItemImpl* GetParent(
- CXFA_ContainerLayoutItemImpl* pLayoutItem) {
- return (CXFA_ContainerLayoutItemImpl*)pLayoutItem->m_pParent;
+ static inline CXFA_ContainerLayoutItem* GetParent(
+ CXFA_ContainerLayoutItem* pLayoutItem) {
+ return (CXFA_ContainerLayoutItem*)pLayoutItem->m_pParent;
}
};
void CXFA_LayoutPageMgr::FinishPaginatedPageSets() {
- CXFA_ContainerLayoutItemImpl* pRootPageSetLayoutItem =
- m_pPageSetLayoutItemRoot;
+ CXFA_ContainerLayoutItem* pRootPageSetLayoutItem = m_pPageSetLayoutItemRoot;
for (; pRootPageSetLayoutItem;
- pRootPageSetLayoutItem = (CXFA_ContainerLayoutItemImpl*)
- pRootPageSetLayoutItem->m_pNextSibling) {
- CXFA_NodeIteratorTemplate<CXFA_ContainerLayoutItemImpl,
+ pRootPageSetLayoutItem =
+ (CXFA_ContainerLayoutItem*)pRootPageSetLayoutItem->m_pNextSibling) {
+ CXFA_NodeIteratorTemplate<CXFA_ContainerLayoutItem,
CXFA_TraverseStrategy_PageSetContainerLayoutItem>
sIterator(pRootPageSetLayoutItem);
- for (CXFA_ContainerLayoutItemImpl* pPageSetLayoutItem =
- sIterator.GetCurrent();
+ for (CXFA_ContainerLayoutItem* pPageSetLayoutItem = sIterator.GetCurrent();
pPageSetLayoutItem; pPageSetLayoutItem = sIterator.MoveToNext()) {
XFA_ATTRIBUTEENUM ePageRelation =
pPageSetLayoutItem->m_pFormNode->GetEnum(XFA_ATTRIBUTE_Relation);
@@ -488,9 +483,9 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() {
default: { ProcessLastPageSet(); } break;
case XFA_ATTRIBUTEENUM_SimplexPaginated:
case XFA_ATTRIBUTEENUM_DuplexPaginated: {
- CXFA_LayoutItemImpl* pLastPageAreaLayoutItem = NULL;
+ CXFA_LayoutItem* pLastPageAreaLayoutItem = NULL;
int32_t nPageAreaCount = 0;
- for (CXFA_LayoutItemImpl* pPageAreaLayoutItem =
+ for (CXFA_LayoutItem* pPageAreaLayoutItem =
pPageSetLayoutItem->m_pFirstChild;
pPageAreaLayoutItem;
pPageAreaLayoutItem = pPageAreaLayoutItem->m_pNextSibling) {
@@ -534,7 +529,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() {
}
FX_BOOL bUsable = TRUE;
CFX_ArrayTemplate<FX_FLOAT> rgUsedHeights;
- for (CXFA_LayoutItemImpl* pChildLayoutItem =
+ for (CXFA_LayoutItem* pChildLayoutItem =
pLastPageAreaLayoutItem->m_pFirstChild;
pChildLayoutItem;
pChildLayoutItem = pChildLayoutItem->m_pNextSibling) {
@@ -543,7 +538,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() {
continue;
}
FX_FLOAT fUsedHeight = 0;
- for (CXFA_LayoutItemImpl* pContentChildLayoutItem =
+ for (CXFA_LayoutItem* pContentChildLayoutItem =
pChildLayoutItem->m_pFirstChild;
pContentChildLayoutItem;
pContentChildLayoutItem =
@@ -552,8 +547,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() {
continue;
}
fUsedHeight +=
- ((CXFA_ContentLayoutItemImpl*)pContentChildLayoutItem)
- ->m_sSize.y;
+ ((CXFA_ContentLayoutItem*)pContentChildLayoutItem)->m_sSize.y;
}
rgUsedHeights.Add(fUsedHeight);
}
@@ -576,7 +570,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() {
}
}
if (bUsable) {
- CXFA_LayoutItemImpl* pChildLayoutItem =
+ CXFA_LayoutItem* pChildLayoutItem =
pLastPageAreaLayoutItem->m_pFirstChild;
CXFA_Node* pContentAreaNode =
pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
@@ -617,7 +611,7 @@ IXFA_LayoutPage* CXFA_LayoutPageMgr::GetPage(int32_t index) const {
return NULL;
}
int32_t CXFA_LayoutPageMgr::GetPageIndex(IXFA_LayoutPage* pPage) const {
- return m_PageArray.Find((CXFA_ContainerLayoutItemImpl*)pPage);
+ return m_PageArray.Find((CXFA_ContainerLayoutItem*)pPage);
}
FX_BOOL CXFA_LayoutPageMgr::RunBreak(XFA_ELEMENT eBreakType,
XFA_ATTRIBUTEENUM eTargetType,
@@ -1262,14 +1256,13 @@ CXFA_Node* CXFA_LayoutPageMgr::GetNextAvailPageArea(
return NULL;
}
static FX_BOOL XFA_LayoutPageMgr_CheckContentAreaNotUsed(
- CXFA_ContainerLayoutItemImpl* pPageAreaLayoutItem,
+ CXFA_ContainerLayoutItem* pPageAreaLayoutItem,
CXFA_Node* pContentArea,
- CXFA_ContainerLayoutItemImpl*& pContentAreaLayoutItem) {
- for (CXFA_ContainerLayoutItemImpl* pLayoutItem =
- (CXFA_ContainerLayoutItemImpl*)pPageAreaLayoutItem->m_pFirstChild;
+ CXFA_ContainerLayoutItem*& pContentAreaLayoutItem) {
+ for (CXFA_ContainerLayoutItem* pLayoutItem =
+ (CXFA_ContainerLayoutItem*)pPageAreaLayoutItem->m_pFirstChild;
pLayoutItem;
- pLayoutItem =
- (CXFA_ContainerLayoutItemImpl*)pLayoutItem->m_pNextSibling) {
+ pLayoutItem = (CXFA_ContainerLayoutItem*)pLayoutItem->m_pNextSibling) {
if (pLayoutItem->m_pFormNode == pContentArea) {
if (pLayoutItem->m_pFirstChild == NULL) {
pContentAreaLayoutItem = pLayoutItem;
@@ -1293,7 +1286,7 @@ FX_BOOL CXFA_LayoutPageMgr::GetNextContentArea(CXFA_Node* pContentArea) {
if (pContentArea->GetNodeItem(XFA_NODEITEM_Parent) != m_pCurPageArea) {
return FALSE;
}
- CXFA_ContainerLayoutItemImpl* pContentAreaLayout = NULL;
+ CXFA_ContainerLayoutItem* pContentAreaLayout = NULL;
if (!XFA_LayoutPageMgr_CheckContentAreaNotUsed(
GetCurrentContainerRecord()->pCurPageArea, pContentArea,
pContentAreaLayout)) {
@@ -1501,11 +1494,11 @@ void CXFA_LayoutPageMgr::ClearRecordList() {
m_bCreateOverFlowPage = FALSE;
m_pPageSetMap.RemoveAll();
}
-CXFA_LayoutItemImpl* CXFA_LayoutPageMgr::FindOrCreateLayoutItem(
+CXFA_LayoutItem* CXFA_LayoutPageMgr::FindOrCreateLayoutItem(
CXFA_Node* pFormNode) {
#if defined(_XFA_LAYOUTITEM_MAPCACHE_)
if (m_NodeToContent.GetCount() > 0) {
- CXFA_ContentLayoutItemImpl* pLayoutItem = NULL;
+ CXFA_ContentLayoutItem* pLayoutItem = NULL;
if (m_NodeToContent.Lookup(pFormNode, (void*&)pLayoutItem)) {
if (pLayoutItem->m_pNext) {
m_NodeToContent.SetAt(pFormNode, pLayoutItem->m_pNext);
@@ -1519,16 +1512,15 @@ CXFA_LayoutItemImpl* CXFA_LayoutPageMgr::FindOrCreateLayoutItem(
}
}
#endif
- return (CXFA_LayoutItemImpl*)pFormNode->GetDocument()
+ return (CXFA_LayoutItem*)pFormNode->GetDocument()
->GetParser()
->GetNotify()
->OnCreateLayoutItem(pFormNode);
}
#if defined(_XFA_LAYOUTITEM_MAPCACHE_)
-void CXFA_LayoutPageMgr::SaveLayoutItem(
- CXFA_LayoutItemImpl* pParentLayoutItem) {
- CXFA_LayoutItemImpl *pNextLayoutItem,
- *pCurLayoutItem = pParentLayoutItem->m_pFirstChild;
+void CXFA_LayoutPageMgr::SaveLayoutItem(CXFA_LayoutItem* pParentLayoutItem) {
+ CXFA_LayoutItem* pNextLayoutItem,
+ * pCurLayoutItem = pParentLayoutItem->m_pFirstChild;
while (pCurLayoutItem) {
pNextLayoutItem = pCurLayoutItem->m_pNextSibling;
if (pCurLayoutItem->m_pFirstChild) {
@@ -1553,11 +1545,11 @@ void CXFA_LayoutPageMgr::SaveLayoutItem(
}
}
#elif defined(_XFA_LAYOUTITEM_ProcessCACHE_)
-static void XFA_SyncRemoveLayoutItem(CXFA_LayoutItemImpl* pParentLayoutItem,
+static void XFA_SyncRemoveLayoutItem(CXFA_LayoutItem* pParentLayoutItem,
IXFA_Notify* pNotify,
IXFA_DocLayout* pDocLayout) {
- CXFA_LayoutItemImpl* pNextLayoutItem;
- CXFA_LayoutItemImpl* pCurLayoutItem = pParentLayoutItem->m_pFirstChild;
+ CXFA_LayoutItem* pNextLayoutItem;
+ CXFA_LayoutItem* pCurLayoutItem = pParentLayoutItem->m_pFirstChild;
while (pCurLayoutItem) {
pNextLayoutItem = pCurLayoutItem->m_pNextSibling;
if (pCurLayoutItem->m_pFirstChild) {
@@ -1569,10 +1561,9 @@ static void XFA_SyncRemoveLayoutItem(CXFA_LayoutItemImpl* pParentLayoutItem,
pCurLayoutItem = pNextLayoutItem;
}
}
-void CXFA_LayoutPageMgr::SaveLayoutItem(
- CXFA_LayoutItemImpl* pParentLayoutItem) {
- CXFA_LayoutItemImpl* pNextLayoutItem;
- CXFA_LayoutItemImpl* pCurLayoutItem = pParentLayoutItem->m_pFirstChild;
+void CXFA_LayoutPageMgr::SaveLayoutItem(CXFA_LayoutItem* pParentLayoutItem) {
+ CXFA_LayoutItem* pNextLayoutItem;
+ CXFA_LayoutItem* pCurLayoutItem = pParentLayoutItem->m_pFirstChild;
while (pCurLayoutItem) {
pNextLayoutItem = pCurLayoutItem->m_pNextSibling;
if (pCurLayoutItem->IsContentLayoutItem()) {
@@ -1641,7 +1632,7 @@ void CXFA_LayoutPageMgr::MergePageSetContents() {
CXFA_Document* pDocument = m_pTemplatePageSetRoot->GetDocument();
IXFA_Notify* pNotify = pDocument->GetParser()->GetNotify();
IXFA_DocLayout* pDocLayout = pDocument->GetDocLayout();
- CXFA_ContainerLayoutItemImpl* pRootLayout = this->GetRootLayoutItem();
+ CXFA_ContainerLayoutItem* pRootLayout = this->GetRootLayoutItem();
{
for (int32_t iIndex = 0; iIndex < pDocument->m_pPendingPageSet.GetSize();
iIndex++) {
@@ -1663,15 +1654,13 @@ void CXFA_LayoutPageMgr::MergePageSetContents() {
int32_t iIndex = 0;
CXFA_Node* pPendingPageSet = NULL;
for (; pRootLayout;
- pRootLayout =
- (CXFA_ContainerLayoutItemImpl*)pRootLayout->m_pNextSibling) {
+ pRootLayout = (CXFA_ContainerLayoutItem*)pRootLayout->m_pNextSibling) {
pPendingPageSet = NULL;
CXFA_NodeIteratorTemplate<
- CXFA_ContainerLayoutItemImpl,
+ CXFA_ContainerLayoutItem,
CXFA_TraverseStrategy_ContentAreaContainerLayoutItem>
iterator(pRootLayout);
- CXFA_ContainerLayoutItemImpl* pRootPageSetContainerItem =
- iterator.GetCurrent();
+ CXFA_ContainerLayoutItem* pRootPageSetContainerItem = iterator.GetCurrent();
ASSERT(pRootPageSetContainerItem->m_pFormNode->GetClassID() ==
XFA_ELEMENT_PageSet);
if (iIndex < pDocument->m_pPendingPageSet.GetSize()) {
@@ -1694,7 +1683,7 @@ void CXFA_LayoutPageMgr::MergePageSetContents() {
}
pRootPageSetContainerItem->m_pFormNode = pPendingPageSet;
pPendingPageSet->SetFlag(XFA_NODEFLAG_UnusedNode, FALSE);
- for (CXFA_ContainerLayoutItemImpl* pContainerItem = iterator.MoveToNext();
+ for (CXFA_ContainerLayoutItem* pContainerItem = iterator.MoveToNext();
pContainerItem; pContainerItem = iterator.MoveToNext()) {
CXFA_Node* pNode = pContainerItem->m_pFormNode;
if (pNode->GetPacketID() != XFA_XDPPACKET_Template) {
@@ -1707,18 +1696,17 @@ void CXFA_LayoutPageMgr::MergePageSetContents() {
pDocument, pParentNode, pContainerItem->m_pFormNode, TRUE);
} break;
case XFA_ELEMENT_PageArea: {
- CXFA_ContainerLayoutItemImpl* pFormLayout = pContainerItem;
+ CXFA_ContainerLayoutItem* pFormLayout = pContainerItem;
CXFA_Node* pParentNode = pContainerItem->m_pParent->m_pFormNode;
FX_BOOL bIsExistForm = TRUE;
for (int32_t iLevel = 0; iLevel < 3; iLevel++) {
- pFormLayout =
- (CXFA_ContainerLayoutItemImpl*)pFormLayout->m_pFirstChild;
+ pFormLayout = (CXFA_ContainerLayoutItem*)pFormLayout->m_pFirstChild;
if (iLevel == 2) {
while (pFormLayout &&
!XFA_ItemLayoutProcessor_IsTakingSpace(
pFormLayout->m_pFormNode)) {
pFormLayout =
- (CXFA_ContainerLayoutItemImpl*)pFormLayout->m_pNextSibling;
+ (CXFA_ContainerLayoutItem*)pFormLayout->m_pNextSibling;
}
}
if (pFormLayout == NULL) {
@@ -1737,9 +1725,8 @@ void CXFA_LayoutPageMgr::MergePageSetContents() {
for (CXFA_Node* pNode = sIterator.GetCurrent(); pNode;
pNode = sIterator.MoveToNext()) {
if (pNode->GetClassID() != XFA_ELEMENT_ContentArea) {
- CXFA_LayoutItemImpl* pLayoutItem =
- static_cast<CXFA_LayoutItemImpl*>(
- pNode->GetUserData(XFA_LAYOUTITEMKEY));
+ CXFA_LayoutItem* pLayoutItem = static_cast<CXFA_LayoutItem*>(
+ pNode->GetUserData(XFA_LAYOUTITEMKEY));
if (pLayoutItem) {
pNotify->OnLayoutEvent(pDocLayout, pLayoutItem,
XFA_LAYOUTEVENT_ItemRemoving);
@@ -1798,9 +1785,8 @@ void CXFA_LayoutPageMgr::MergePageSetContents() {
CXFA_ContainerIterator iteChild(pNode);
CXFA_Node* pChildNode = iteChild.MoveToNext();
for (; pChildNode; pChildNode = iteChild.MoveToNext()) {
- CXFA_LayoutItemImpl* pLayoutItem =
- static_cast<CXFA_LayoutItemImpl*>(
- pChildNode->GetUserData(XFA_LAYOUTITEMKEY));
+ CXFA_LayoutItem* pLayoutItem = static_cast<CXFA_LayoutItem*>(
+ pChildNode->GetUserData(XFA_LAYOUTITEMKEY));
if (pLayoutItem) {
pNotify->OnLayoutEvent(pDocLayout, pLayoutItem,
XFA_LAYOUTEVENT_ItemRemoving);
@@ -1808,9 +1794,8 @@ void CXFA_LayoutPageMgr::MergePageSetContents() {
}
}
} else if (eCurId != XFA_ELEMENT_ContentArea) {
- CXFA_LayoutItemImpl* pLayoutItem =
- static_cast<CXFA_LayoutItemImpl*>(
- pNode->GetUserData(XFA_LAYOUTITEMKEY));
+ CXFA_LayoutItem* pLayoutItem = static_cast<CXFA_LayoutItem*>(
+ pNode->GetUserData(XFA_LAYOUTITEMKEY));
if (pLayoutItem) {
pNotify->OnLayoutEvent(pDocLayout, pLayoutItem,
XFA_LAYOUTEVENT_ItemRemoving);
@@ -1834,15 +1819,15 @@ void CXFA_LayoutPageMgr::MergePageSetContents() {
}
}
void CXFA_LayoutPageMgr::LayoutPageSetContents() {
- CXFA_ContainerLayoutItemImpl* pRootLayoutItem = this->GetRootLayoutItem();
+ CXFA_ContainerLayoutItem* pRootLayoutItem = this->GetRootLayoutItem();
for (; pRootLayoutItem;
pRootLayoutItem =
- (CXFA_ContainerLayoutItemImpl*)pRootLayoutItem->m_pNextSibling) {
+ (CXFA_ContainerLayoutItem*)pRootLayoutItem->m_pNextSibling) {
CXFA_NodeIteratorTemplate<
- CXFA_ContainerLayoutItemImpl,
+ CXFA_ContainerLayoutItem,
CXFA_TraverseStrategy_ContentAreaContainerLayoutItem>
iterator(pRootLayoutItem);
- for (CXFA_ContainerLayoutItemImpl* pContainerItem = iterator.GetCurrent();
+ for (CXFA_ContainerLayoutItem* pContainerItem = iterator.GetCurrent();
pContainerItem; pContainerItem = iterator.MoveToNext()) {
CXFA_Node* pNode = pContainerItem->m_pFormNode;
switch (pNode->GetClassID()) {
@@ -1858,7 +1843,7 @@ void CXFA_LayoutPageMgr::LayoutPageSetContents() {
}
void XFA_SyncContainer(IXFA_Notify* pNotify,
IXFA_DocLayout* pDocLayout,
- CXFA_LayoutItemImpl* pContainerItem,
+ CXFA_LayoutItem* pContainerItem,
FX_DWORD dwRelevant,
FX_BOOL bVisible,
int32_t nPageIndex) {
@@ -1880,7 +1865,7 @@ void XFA_SyncContainer(IXFA_Notify* pNotify,
pNotify->OnLayoutEvent(pDocLayout, pContainerItem, XFA_LAYOUTEVENT_ItemAdded,
(void*)(uintptr_t)nPageIndex,
(void*)(uintptr_t)dwStatus);
- CXFA_LayoutItemImpl* pChild = pContainerItem->m_pFirstChild;
+ CXFA_LayoutItem* pChild = pContainerItem->m_pFirstChild;
while (pChild) {
if (!pChild->IsContentLayoutItem()) {
pChild = pChild->m_pNextSibling;
@@ -1897,33 +1882,32 @@ void CXFA_LayoutPageMgr::SyncLayoutData() {
IXFA_Notify* pNotify =
m_pTemplatePageSetRoot->GetDocument()->GetParser()->GetNotify();
int32_t nPageIdx = -1;
- CXFA_ContainerLayoutItemImpl* pRootLayoutItem = this->GetRootLayoutItem();
+ CXFA_ContainerLayoutItem* pRootLayoutItem = this->GetRootLayoutItem();
for (; pRootLayoutItem;
pRootLayoutItem =
- (CXFA_ContainerLayoutItemImpl*)pRootLayoutItem->m_pNextSibling) {
+ (CXFA_ContainerLayoutItem*)pRootLayoutItem->m_pNextSibling) {
CXFA_NodeIteratorTemplate<
- CXFA_ContainerLayoutItemImpl,
+ CXFA_ContainerLayoutItem,
CXFA_TraverseStrategy_ContentAreaContainerLayoutItem>
iteratorParent(pRootLayoutItem);
- for (CXFA_ContainerLayoutItemImpl* pContainerItem =
- iteratorParent.GetCurrent();
+ for (CXFA_ContainerLayoutItem* pContainerItem = iteratorParent.GetCurrent();
pContainerItem; pContainerItem = iteratorParent.MoveToNext()) {
switch (pContainerItem->m_pFormNode->GetClassID()) {
case XFA_ELEMENT_PageArea: {
nPageIdx++;
FX_DWORD dwRelevant =
XFA_LAYOUTSTATUS_Viewable | XFA_LAYOUTSTATUS_Printable;
- CXFA_NodeIteratorTemplate<CXFA_LayoutItemImpl,
+ CXFA_NodeIteratorTemplate<CXFA_LayoutItem,
CXFA_TraverseStrategy_LayoutItem>
iterator(pContainerItem);
- for (CXFA_LayoutItemImpl* pChildLayoutItem = iterator.GetCurrent();
+ for (CXFA_LayoutItem* pChildLayoutItem = iterator.GetCurrent();
pChildLayoutItem;) {
if (!pChildLayoutItem->IsContentLayoutItem()) {
pChildLayoutItem = iterator.MoveToNext();
continue;
}
- CXFA_ContentLayoutItemImpl* pContentItem =
- (CXFA_ContentLayoutItemImpl*)pChildLayoutItem;
+ CXFA_ContentLayoutItem* pContentItem =
+ (CXFA_ContentLayoutItem*)pChildLayoutItem;
FX_BOOL bVisible =
(pContentItem->m_pFormNode->GetEnum(XFA_ATTRIBUTE_Presence) ==
XFA_ATTRIBUTEENUM_Visible);
@@ -1941,15 +1925,15 @@ void CXFA_LayoutPageMgr::SyncLayoutData() {
}
int32_t nPage = m_PageArray.GetSize();
for (int32_t i = nPage - 1; i >= m_nAvailPages; i--) {
- CXFA_ContainerLayoutItemImpl* pPage = m_PageArray[i];
+ CXFA_ContainerLayoutItem* pPage = m_PageArray[i];
m_PageArray.RemoveAt(i);
pNotify->OnPageEvent((IXFA_LayoutPage*)pPage, XFA_PAGEEVENT_PageRemoved);
delete pPage;
}
ClearRecordList();
}
-void XFA_ReleaseLayoutItem_NoPageArea(CXFA_LayoutItemImpl* pLayoutItem) {
- CXFA_LayoutItemImpl *pNext, *pNode = pLayoutItem->m_pFirstChild;
+void XFA_ReleaseLayoutItem_NoPageArea(CXFA_LayoutItem* pLayoutItem) {
+ CXFA_LayoutItem* pNext, * pNode = pLayoutItem->m_pFirstChild;
while (pNode) {
pNext = pNode->m_pNextSibling;
pNode->m_pParent = NULL;
@@ -1968,7 +1952,7 @@ void CXFA_LayoutPageMgr::PrepareLayout() {
if (!m_pPageSetLayoutItemRoot) {
return;
}
- CXFA_ContainerLayoutItemImpl* pRootLayoutItem = m_pPageSetLayoutItemRoot;
+ CXFA_ContainerLayoutItem* pRootLayoutItem = m_pPageSetLayoutItemRoot;
if (pRootLayoutItem &&
pRootLayoutItem->m_pFormNode->GetPacketID() == XFA_XDPPACKET_Form) {
CXFA_Node* pPageSetFormNode = pRootLayoutItem->m_pFormNode;
@@ -1992,10 +1976,9 @@ void CXFA_LayoutPageMgr::PrepareLayout() {
}
#if defined(_XFA_LAYOUTITEM_MAPCACHE_) || defined(_XFA_LAYOUTITEM_ProcessCACHE_)
pRootLayoutItem = m_pPageSetLayoutItemRoot;
- CXFA_ContainerLayoutItemImpl* pNextLayout = NULL;
+ CXFA_ContainerLayoutItem* pNextLayout = NULL;
for (; pRootLayoutItem; pRootLayoutItem = pNextLayout) {
- pNextLayout =
- (CXFA_ContainerLayoutItemImpl*)pRootLayoutItem->m_pNextSibling;
+ pNextLayout = (CXFA_ContainerLayoutItem*)pRootLayoutItem->m_pNextSibling;
SaveLayoutItem(pRootLayoutItem);
delete pRootLayoutItem;
}
@@ -2006,20 +1989,20 @@ void CXFA_LayoutPageMgr::PrepareLayout() {
pRootLayoutItem = m_pPageSetLayoutItemRoot;
for (; pRootLayoutItem;
pRootLayoutItem =
- (CXFA_ContainerLayoutItemImpl*)pRootLayoutItem->m_pNextSibling) {
- CXFA_NodeIteratorTemplate<CXFA_ContainerLayoutItemImpl,
+ (CXFA_ContainerLayoutItem*)pRootLayoutItem->m_pNextSibling) {
+ CXFA_NodeIteratorTemplate<CXFA_ContainerLayoutItem,
CXFA_TraverseStrategy_PageAreaContainerLayoutItem>
iterator(pRootLayoutItem);
- for (CXFA_ContainerLayoutItemImpl* pContainerItem = iterator.GetCurrent();
+ for (CXFA_ContainerLayoutItem* pContainerItem = iterator.GetCurrent();
pContainerItem; pContainerItem = iterator.MoveToNext()) {
if (pContainerItem->m_pFormNode->GetClassID() != XFA_ELEMENT_PageArea) {
continue;
}
- CXFA_NodeIteratorTemplate<CXFA_LayoutItemImpl,
+ CXFA_NodeIteratorTemplate<CXFA_LayoutItem,
CXFA_TraverseStrategy_LayoutItem>
iterator(pContainerItem);
- for (CXFA_LayoutItemImpl* pLayoutItem = iterator.GetCurrent();
- pLayoutItem; pLayoutItem = iterator.MoveToNext()) {
+ for (CXFA_LayoutItem* pLayoutItem = iterator.GetCurrent(); pLayoutItem;
+ pLayoutItem = iterator.MoveToNext()) {
if (!pLayoutItem->IsContentLayoutItem()) {
continue;
}
@@ -2031,10 +2014,9 @@ void CXFA_LayoutPageMgr::PrepareLayout() {
}
}
pRootLayoutItem = m_pPageSetLayoutItemRoot;
- CXFA_ContainerLayoutItemImpl* pNextLayout = NULL;
+ CXFA_ContainerLayoutItem* pNextLayout = NULL;
for (; pRootLayoutItem; pRootLayoutItem = pNextLayout) {
- pNextLayout =
- (CXFA_ContainerLayoutItemImpl*)pRootLayoutItem->m_pNextSibling;
+ pNextLayout = (CXFA_ContainerLayoutItem*)pRootLayoutItem->m_pNextSibling;
XFA_ReleaseLayoutItem_NoPageArea(pRootLayoutItem);
}
m_pPageSetLayoutItemRoot = NULL;
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.h b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.h
index 89e2da4755..cf6262f22b 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.h
+++ b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.h
@@ -8,15 +8,15 @@
#define _XFA_LAYOUT_PAGEMGR_H_
class CXFA_ContainerRecord {
public:
- CXFA_ContainerRecord(CXFA_ContainerLayoutItemImpl* pPageSet = NULL,
- CXFA_ContainerLayoutItemImpl* pPageArea = NULL,
- CXFA_ContainerLayoutItemImpl* pContentArea = NULL)
+ CXFA_ContainerRecord(CXFA_ContainerLayoutItem* pPageSet = NULL,
+ CXFA_ContainerLayoutItem* pPageArea = NULL,
+ CXFA_ContainerLayoutItem* pContentArea = NULL)
: pCurPageSet(pPageSet),
pCurPageArea(pPageArea),
pCurContentArea(pContentArea) {}
- CXFA_ContainerLayoutItemImpl* pCurPageSet;
- CXFA_ContainerLayoutItemImpl* pCurPageArea;
- CXFA_ContainerLayoutItemImpl* pCurContentArea;
+ CXFA_ContainerLayoutItem* pCurPageSet;
+ CXFA_ContainerLayoutItem* pCurPageArea;
+ CXFA_ContainerLayoutItem* pCurContentArea;
};
class CXFA_LayoutPageMgr {
public:
@@ -26,14 +26,14 @@ class CXFA_LayoutPageMgr {
FX_BOOL PrepareFirstPage(CXFA_Node* pRootSubform);
FX_FLOAT GetAvailHeight();
FX_BOOL GetNextAvailContentHeight(FX_FLOAT fChildHeight);
- void SubmitContentItem(CXFA_ContentLayoutItemImpl* pContentLayoutItem,
+ void SubmitContentItem(CXFA_ContentLayoutItem* pContentLayoutItem,
XFA_ItemLayoutProcessorResult eStatus);
void FinishPaginatedPageSets();
void SyncLayoutData();
int32_t GetPageCount() const;
IXFA_LayoutPage* GetPage(int32_t index) const;
int32_t GetPageIndex(IXFA_LayoutPage* pPage) const;
- inline CXFA_ContainerLayoutItemImpl* GetRootLayoutItem() const {
+ inline CXFA_ContainerLayoutItem* GetRootLayoutItem() const {
return m_pPageSetLayoutItemRoot;
}
FX_BOOL ProcessBreakBeforeOrAfter(CXFA_Node* pBreakNode,
@@ -51,7 +51,7 @@ class CXFA_LayoutPageMgr {
FX_BOOL ProcessBookendLeaderOrTrailer(CXFA_Node* pBookendNode,
FX_BOOL bLeader,
CXFA_Node*& pBookendAppendNode);
- CXFA_LayoutItemImpl* FindOrCreateLayoutItem(CXFA_Node* pFormNode);
+ CXFA_LayoutItem* FindOrCreateLayoutItem(CXFA_Node* pFormNode);
protected:
FX_BOOL AppendNewPage(FX_BOOL bFirstTemPage = FALSE);
@@ -130,12 +130,12 @@ class CXFA_LayoutPageMgr {
void LayoutPageSetContents();
void PrepareLayout();
#if defined(_XFA_LAYOUTITEM_MAPCACHE_) || defined(_XFA_LAYOUTITEM_ProcessCACHE_)
- void SaveLayoutItem(CXFA_LayoutItemImpl* pParentLayoutItem);
+ void SaveLayoutItem(CXFA_LayoutItem* pParentLayoutItem);
#endif
CXFA_LayoutProcessor* m_pLayoutProcessor;
CXFA_Node* m_pTemplatePageSetRoot;
- CXFA_ContainerLayoutItemImpl* m_pPageSetLayoutItemRoot;
- CXFA_ContainerLayoutItemImpl* m_pPageSetCurRoot;
+ CXFA_ContainerLayoutItem* m_pPageSetLayoutItemRoot;
+ CXFA_ContainerLayoutItem* m_pPageSetCurRoot;
FX_POSITION m_pCurrentContainerRecord;
CFX_PtrList m_rgProposedContainerRecord;
CXFA_Node* m_pCurPageArea;
@@ -144,7 +144,7 @@ class CXFA_LayoutPageMgr {
XFA_ATTRIBUTEENUM m_ePageSetMode;
FX_BOOL m_bCreateOverFlowPage;
CFX_MapPtrTemplate<CXFA_Node*, int32_t> m_pPageSetMap;
- CFX_ArrayTemplate<CXFA_ContainerLayoutItemImpl*> m_PageArray;
+ CFX_ArrayTemplate<CXFA_ContainerLayoutItem*> m_PageArray;
#ifdef _XFA_LAYOUTITEM_MAPCACHE_
CFX_MapPtrToPtr m_NodeToContent;
#endif
diff --git a/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp b/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp
index e5290e2816..da4ad54017 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp
@@ -86,7 +86,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_HWXY(
}
CFX_RectF rtRect;
CXFA_Measurement measure;
- CXFA_LayoutItemImpl* pLayoutItem = pDocLayout->GetLayoutItem(pNode);
+ CXFA_LayoutItem* pLayoutItem = pDocLayout->GetLayoutItem(pNode);
if (!pLayoutItem) {
return;
}
@@ -188,7 +188,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageSpan(
return;
}
FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- CXFA_LayoutItemImpl* pLayoutItem = pDocLayout->GetLayoutItem(pNode);
+ CXFA_LayoutItem* pLayoutItem = pDocLayout->GetLayoutItem(pNode);
if (!pLayoutItem) {
FXJSE_Value_SetInteger(hValue, -1);
return;
@@ -210,8 +210,8 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray(
const CFX_WideString& wsType,
FX_BOOL bOnPageArea,
CXFA_NodeArray& retArray) {
- CXFA_ContainerLayoutItemImpl* pLayoutPage =
- (CXFA_ContainerLayoutItemImpl*)pDocLayout->GetPage(iPageNo);
+ CXFA_ContainerLayoutItem* pLayoutPage =
+ (CXFA_ContainerLayoutItem*)pDocLayout->GetPage(iPageNo);
if (!pLayoutPage) {
return;
}
@@ -222,7 +222,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray(
return;
}
if (wsType == FX_WSTRC(L"contentArea")) {
- for (CXFA_LayoutItemImpl* pItem = pLayoutPage->m_pFirstChild; pItem;
+ for (CXFA_LayoutItem* pItem = pLayoutPage->m_pFirstChild; pItem;
pItem = pItem->m_pNextSibling) {
if (pItem->m_pFormNode->GetClassID() == XFA_ELEMENT_ContentArea) {
retArray.Add(pItem->m_pFormNode);
@@ -236,15 +236,15 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray(
if (CXFA_Node* pMasterPage = pLayoutPage->m_pFormNode) {
retArray.Add(pMasterPage);
}
- for (CXFA_LayoutItemImpl* pItem = pLayoutPage->m_pFirstChild; pItem;
+ for (CXFA_LayoutItem* pItem = pLayoutPage->m_pFirstChild; pItem;
pItem = pItem->m_pNextSibling) {
if (pItem->m_pFormNode->GetClassID() == XFA_ELEMENT_ContentArea) {
retArray.Add(pItem->m_pFormNode);
if (!bOnPageArea) {
- CXFA_NodeIteratorTemplate<CXFA_ContentLayoutItemImpl,
+ CXFA_NodeIteratorTemplate<CXFA_ContentLayoutItem,
CXFA_TraverseStrategy_ContentLayoutItem>
- iterator((CXFA_ContentLayoutItemImpl*)pItem->m_pFirstChild);
- for (CXFA_ContentLayoutItemImpl* pItemChild = iterator.GetCurrent();
+ iterator((CXFA_ContentLayoutItem*)pItem->m_pFirstChild);
+ for (CXFA_ContentLayoutItem* pItemChild = iterator.GetCurrent();
pItemChild; pItemChild = iterator.MoveToNext()) {
if (!pItemChild->IsContentLayoutItem()) {
continue;
@@ -265,10 +265,10 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray(
}
} else {
if (bOnPageArea) {
- CXFA_NodeIteratorTemplate<CXFA_ContentLayoutItemImpl,
+ CXFA_NodeIteratorTemplate<CXFA_ContentLayoutItem,
CXFA_TraverseStrategy_ContentLayoutItem>
- iterator((CXFA_ContentLayoutItemImpl*)pItem);
- for (CXFA_ContentLayoutItemImpl* pItemChild = iterator.GetCurrent();
+ iterator((CXFA_ContentLayoutItem*)pItem);
+ for (CXFA_ContentLayoutItem* pItemChild = iterator.GetCurrent();
pItemChild; pItemChild = iterator.MoveToNext()) {
if (!pItemChild->IsContentLayoutItem()) {
continue;
@@ -302,14 +302,14 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray(
eType = XFA_ELEMENT_Area;
}
if (eType != XFA_ELEMENT_UNKNOWN) {
- for (CXFA_LayoutItemImpl* pItem = pLayoutPage->m_pFirstChild; pItem;
+ for (CXFA_LayoutItem* pItem = pLayoutPage->m_pFirstChild; pItem;
pItem = pItem->m_pNextSibling) {
if (pItem->m_pFormNode->GetClassID() == XFA_ELEMENT_ContentArea) {
if (!bOnPageArea) {
- CXFA_NodeIteratorTemplate<CXFA_ContentLayoutItemImpl,
+ CXFA_NodeIteratorTemplate<CXFA_ContentLayoutItem,
CXFA_TraverseStrategy_ContentLayoutItem>
- iterator((CXFA_ContentLayoutItemImpl*)pItem->m_pFirstChild);
- for (CXFA_ContentLayoutItemImpl* pItemChild = iterator.GetCurrent();
+ iterator((CXFA_ContentLayoutItem*)pItem->m_pFirstChild);
+ for (CXFA_ContentLayoutItem* pItemChild = iterator.GetCurrent();
pItemChild; pItemChild = iterator.MoveToNext()) {
if (!pItemChild->IsContentLayoutItem()) {
continue;
@@ -326,10 +326,10 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray(
}
} else {
if (bOnPageArea) {
- CXFA_NodeIteratorTemplate<CXFA_ContentLayoutItemImpl,
+ CXFA_NodeIteratorTemplate<CXFA_ContentLayoutItem,
CXFA_TraverseStrategy_ContentLayoutItem>
- iterator((CXFA_ContentLayoutItemImpl*)pItem);
- for (CXFA_ContentLayoutItemImpl* pItemChild = iterator.GetCurrent();
+ iterator((CXFA_ContentLayoutItem*)pItem);
+ for (CXFA_ContentLayoutItem* pItemChild = iterator.GetCurrent();
pItemChild; pItemChild = iterator.MoveToNext()) {
if (!pItemChild->IsContentLayoutItem()) {
continue;
@@ -541,7 +541,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageImp(
if (!pDocLayout) {
return;
}
- CXFA_LayoutItemImpl* pLayoutItem = pDocLayout->GetLayoutItem(pNode);
+ CXFA_LayoutItem* pLayoutItem = pDocLayout->GetLayoutItem(pNode);
if (!pLayoutItem) {
FXJSE_Value_SetInteger(hValue, -1);
return;