summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xfa/fxfa/cxfa_ffdocview.cpp4
-rw-r--r--xfa/fxfa/cxfa_ffpageview.cpp27
-rw-r--r--xfa/fxfa/cxfa_ffpageview.h6
-rw-r--r--xfa/fxfa/parser/cxfa_layoutprocessor.h2
4 files changed, 20 insertions, 19 deletions
diff --git a/xfa/fxfa/cxfa_ffdocview.cpp b/xfa/fxfa/cxfa_ffdocview.cpp
index 400be36e76..46b5710242 100644
--- a/xfa/fxfa/cxfa_ffdocview.cpp
+++ b/xfa/fxfa/cxfa_ffdocview.cpp
@@ -71,7 +71,7 @@ int32_t CXFA_FFDocView::StartLayout() {
m_pDoc->GetXFADoc()->DoDataMerge();
m_pXFADocLayout = GetXFALayout();
- int32_t iStatus = m_pXFADocLayout->StartLayout();
+ int32_t iStatus = m_pXFADocLayout->StartLayout(false);
if (iStatus < 0)
return iStatus;
@@ -446,7 +446,7 @@ bool CXFA_FFDocView::RunLayout() {
LockUpdate();
m_bInLayoutStatus = true;
if (!m_pXFADocLayout->IncrementLayout() &&
- m_pXFADocLayout->StartLayout() < 100) {
+ m_pXFADocLayout->StartLayout(false) < 100) {
m_pXFADocLayout->DoLayout();
UnlockUpdate();
m_bInLayoutStatus = false;
diff --git a/xfa/fxfa/cxfa_ffpageview.cpp b/xfa/fxfa/cxfa_ffpageview.cpp
index cb9743972e..351f576e5c 100644
--- a/xfa/fxfa/cxfa_ffpageview.cpp
+++ b/xfa/fxfa/cxfa_ffpageview.cpp
@@ -381,39 +381,39 @@ void CXFA_FFTabOrderPageWidgetIterator::OrderContainer(
CXFA_LayoutItemIterator* sIterator,
CXFA_LayoutItem* pContainerItem,
CXFA_TabParam* pContainer,
- bool& bCurrentItem,
- bool& bContentArea,
- bool bMarsterPage) {
+ bool* bCurrentItem,
+ bool* bContentArea,
+ bool bMasterPage) {
std::vector<std::unique_ptr<CXFA_TabParam>> tabParams;
CXFA_LayoutItem* pSearchItem = sIterator->MoveToNext();
while (pSearchItem) {
if (!pSearchItem->IsContentLayoutItem()) {
- bContentArea = true;
+ *bContentArea = true;
pSearchItem = sIterator->MoveToNext();
continue;
}
- if (bMarsterPage && bContentArea) {
+ if (bMasterPage && *bContentArea) {
break;
}
- if (bMarsterPage || bContentArea) {
+ if (bMasterPage || *bContentArea) {
CXFA_FFWidget* hWidget = GetWidget(pSearchItem);
if (!hWidget) {
pSearchItem = sIterator->MoveToNext();
continue;
}
if (pContainerItem && (pSearchItem->GetParent() != pContainerItem)) {
- bCurrentItem = true;
+ *bCurrentItem = true;
break;
}
tabParams.push_back(pdfium::MakeUnique<CXFA_TabParam>(hWidget));
if (IsLayoutElement(pSearchItem->GetFormNode()->GetElementType(), true)) {
OrderContainer(sIterator, pSearchItem, tabParams.back().get(),
- bCurrentItem, bContentArea, bMarsterPage);
+ bCurrentItem, bContentArea, bMasterPage);
}
}
- if (bCurrentItem) {
+ if (*bCurrentItem) {
pSearchItem = sIterator->GetCurrent();
- bCurrentItem = false;
+ *bCurrentItem = false;
} else {
pSearchItem = sIterator->MoveToNext();
}
@@ -437,7 +437,8 @@ void CXFA_FFTabOrderPageWidgetIterator::CreateSpaceOrderWidgetArray(
auto pParam = pdfium::MakeUnique<CXFA_TabParam>(nullptr);
bool bCurrentItem = false;
bool bContentArea = false;
- OrderContainer(&sIterator, nullptr, pParam.get(), bCurrentItem, bContentArea);
+ OrderContainer(&sIterator, nullptr, pParam.get(), &bCurrentItem,
+ &bContentArea, false);
WidgetArray->insert(WidgetArray->end(), pParam->GetChildren().begin(),
pParam->GetChildren().end());
@@ -445,8 +446,8 @@ void CXFA_FFTabOrderPageWidgetIterator::CreateSpaceOrderWidgetArray(
bCurrentItem = false;
bContentArea = false;
pParam->ClearChildren();
- OrderContainer(&sIterator, nullptr, pParam.get(), bCurrentItem, bContentArea,
- true);
+ OrderContainer(&sIterator, nullptr, pParam.get(), &bCurrentItem,
+ &bContentArea, true);
WidgetArray->insert(WidgetArray->end(), pParam->GetChildren().begin(),
pParam->GetChildren().end());
}
diff --git a/xfa/fxfa/cxfa_ffpageview.h b/xfa/fxfa/cxfa_ffpageview.h
index daf2b1933e..31ce63f8d9 100644
--- a/xfa/fxfa/cxfa_ffpageview.h
+++ b/xfa/fxfa/cxfa_ffpageview.h
@@ -95,9 +95,9 @@ class CXFA_FFTabOrderPageWidgetIterator : public IXFA_WidgetIterator {
void OrderContainer(CXFA_LayoutItemIterator* sIterator,
CXFA_LayoutItem* pContainerItem,
CXFA_TabParam* pContainer,
- bool& bCurrentItem,
- bool& bContentArea,
- bool bMarsterPage = false);
+ bool* bCurrentItem,
+ bool* bContentArea,
+ bool bMasterPage);
std::vector<UnownedPtr<CXFA_FFWidget>> m_TabOrderWidgetArray;
UnownedPtr<CXFA_FFPageView> m_pPageView;
diff --git a/xfa/fxfa/parser/cxfa_layoutprocessor.h b/xfa/fxfa/parser/cxfa_layoutprocessor.h
index e8391bebb9..bba4357e55 100644
--- a/xfa/fxfa/parser/cxfa_layoutprocessor.h
+++ b/xfa/fxfa/parser/cxfa_layoutprocessor.h
@@ -26,7 +26,7 @@ class CXFA_LayoutProcessor {
~CXFA_LayoutProcessor();
CXFA_Document* GetDocument() const;
- int32_t StartLayout(bool bForceRestart = false);
+ int32_t StartLayout(bool bForceRestart);
int32_t DoLayout();
bool IncrementLayout();
int32_t CountPages() const;