summaryrefslogtreecommitdiff
path: root/xfa/src/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/src/fxfa')
-rw-r--r--xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp24
1 files changed, 12 insertions, 12 deletions
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 832e1ba5d1..4030326964 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp
@@ -251,19 +251,19 @@ void CXFA_LayoutPageMgr::SubmitContentItem(
}
}
FX_FLOAT CXFA_LayoutPageMgr::GetAvailHeight() {
+ CXFA_ContainerLayoutItem* pLayoutItem =
+ GetCurrentContainerRecord()->pCurContentArea;
+ if (!pLayoutItem || !pLayoutItem->m_pFormNode)
+ return 0.0f;
FX_FLOAT fAvailHeight =
- GetCurrentContainerRecord()
- ->pCurContentArea->m_pFormNode->GetMeasure(XFA_ATTRIBUTE_H)
- .ToUnit(XFA_UNIT_Pt);
- if (fAvailHeight < XFA_LAYOUT_FLOAT_PERCISION) {
- if (m_pCurrentContainerRecord ==
- m_rgProposedContainerRecord.GetHeadPosition()) {
- fAvailHeight = 0;
- } else {
- fAvailHeight = XFA_LAYOUT_FLOAT_MAX;
- }
- }
- return fAvailHeight;
+ pLayoutItem->m_pFormNode->GetMeasure(XFA_ATTRIBUTE_H).ToUnit(XFA_UNIT_Pt);
+ if (fAvailHeight >= XFA_LAYOUT_FLOAT_PERCISION)
+ return fAvailHeight;
+ if (m_pCurrentContainerRecord ==
+ m_rgProposedContainerRecord.GetHeadPosition()) {
+ return 0.0f;
+ }
+ return XFA_LAYOUT_FLOAT_MAX;
}
static CXFA_Node* XFA_ResolveBreakTarget(CXFA_Node* pPageSetRoot,
FX_BOOL bNewExprStyle,