Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Side by Side Diff: xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp

Issue 1635853002: XFA: Fix a bunch of pointless returns. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: nits Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "xfa/src/foxitlib.h" 9 #include "xfa/src/foxitlib.h"
10 #include "xfa/src/fxfa/src/common/xfa_utils.h" 10 #include "xfa/src/fxfa/src/common/xfa_utils.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 pChildItem, pSecondLayoutItem, 353 pChildItem, pSecondLayoutItem,
354 fSplitPos - fCurTopMargin - fCurBottomMargin - pChildItem->m_sPos.y); 354 fSplitPos - fCurTopMargin - fCurBottomMargin - pChildItem->m_sPos.y);
355 fAddMarginHeight = pSecondLayoutItem->m_sSize.y - fOldHeight; 355 fAddMarginHeight = pSecondLayoutItem->m_sSize.y - fOldHeight;
356 pLayoutItem->AddChild(pChildItem); 356 pLayoutItem->AddChild(pChildItem);
357 } 357 }
358 } 358 }
359 } 359 }
360 void CXFA_ItemLayoutProcessor::SplitLayoutItem(FX_FLOAT fSplitPos) { 360 void CXFA_ItemLayoutProcessor::SplitLayoutItem(FX_FLOAT fSplitPos) {
361 ASSERT(m_pLayoutItem); 361 ASSERT(m_pLayoutItem);
362 SplitLayoutItem(m_pLayoutItem, NULL, fSplitPos); 362 SplitLayoutItem(m_pLayoutItem, NULL, fSplitPos);
363 return;
364 } 363 }
365 364
366 IXFA_LayoutPage* CXFA_LayoutItem::GetPage() const { 365 IXFA_LayoutPage* CXFA_LayoutItem::GetPage() const {
367 for (CXFA_LayoutItem* pCurNode = const_cast<CXFA_LayoutItem*>(this); pCurNode; 366 for (CXFA_LayoutItem* pCurNode = const_cast<CXFA_LayoutItem*>(this); pCurNode;
368 pCurNode = pCurNode->m_pParent) { 367 pCurNode = pCurNode->m_pParent) {
369 if (pCurNode->m_pFormNode->GetClassID() == XFA_ELEMENT_PageArea) 368 if (pCurNode->m_pFormNode->GetClassID() == XFA_ELEMENT_PageArea)
370 return static_cast<CXFA_ContainerLayoutItem*>(pCurNode); 369 return static_cast<CXFA_ContainerLayoutItem*>(pCurNode);
371 } 370 }
372 return nullptr; 371 return nullptr;
373 } 372 }
(...skipping 2644 matching lines...) Expand 10 before | Expand all | Expand 10 after
3018 (int32_t)(uintptr_t)m_PendingNodesCount.GetValueAt(pTemplate); 3017 (int32_t)(uintptr_t)m_PendingNodesCount.GetValueAt(pTemplate);
3019 if (iCount >= iMax) { 3018 if (iCount >= iMax) {
3020 return FALSE; 3019 return FALSE;
3021 } 3020 }
3022 iCount++; 3021 iCount++;
3023 m_PendingNodesCount.SetAt(pTemplate, (void*)(uintptr_t)(iCount)); 3022 m_PendingNodesCount.SetAt(pTemplate, (void*)(uintptr_t)(iCount));
3024 return TRUE; 3023 return TRUE;
3025 } 3024 }
3026 return TRUE; 3025 return TRUE;
3027 } 3026 }
OLDNEW
« no previous file with comments | « xfa/src/fxfa/src/fm2js/xfa_simpleexpression.cpp ('k') | xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698