summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_document_layout_imp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/xfa_document_layout_imp.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_document_layout_imp.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/xfa/fxfa/parser/xfa_document_layout_imp.cpp b/xfa/fxfa/parser/xfa_document_layout_imp.cpp
index 9b9a879d4d..44d053b8c2 100644
--- a/xfa/fxfa/parser/xfa_document_layout_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_layout_imp.cpp
@@ -42,14 +42,13 @@ CXFA_LayoutProcessor::~CXFA_LayoutProcessor() {
CXFA_Document* CXFA_LayoutProcessor::GetDocument() const {
return m_pDocument;
}
+
int32_t CXFA_LayoutProcessor::StartLayout(FX_BOOL bForceRestart) {
- if (!bForceRestart && !IsNeedLayout()) {
+ if (!bForceRestart && !IsNeedLayout())
return 100;
- }
- if (m_pRootItemLayoutProcessor) {
- delete m_pRootItemLayoutProcessor;
- m_pRootItemLayoutProcessor = NULL;
- }
+
+ delete m_pRootItemLayoutProcessor;
+ m_pRootItemLayoutProcessor = nullptr;
m_nProgressCounter = 0;
CXFA_Node* pFormPacketNode =
ToNode(m_pDocument->GetXFAObject(XFA_HASHCODE_Form));
@@ -147,17 +146,15 @@ void CXFA_LayoutProcessor::AddChangedContainer(CXFA_Node* pContainer) {
CXFA_ContainerLayoutItem* CXFA_LayoutProcessor::GetRootLayoutItem() const {
return m_pLayoutPageMgr ? m_pLayoutPageMgr->GetRootLayoutItem() : NULL;
}
+
void CXFA_LayoutProcessor::ClearLayoutData() {
- if (m_pLayoutPageMgr) {
- delete m_pLayoutPageMgr;
- m_pLayoutPageMgr = NULL;
- }
- if (m_pRootItemLayoutProcessor) {
- delete m_pRootItemLayoutProcessor;
- m_pRootItemLayoutProcessor = NULL;
- }
+ delete m_pLayoutPageMgr;
+ m_pLayoutPageMgr = nullptr;
+ delete m_pRootItemLayoutProcessor;
+ m_pRootItemLayoutProcessor = nullptr;
m_nProgressCounter = 0;
}
+
FX_BOOL CXFA_LayoutProcessor::IsNeedLayout() {
return m_bNeeLayout || m_rgChangedContainers.GetSize() > 0;
}