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

Side by Side Diff: xfa/fxfa/parser/xfa_layout_appadapter.h

Issue 2071683002: Make code compile with clang_use_chrome_plugin (part V) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: clean up Created 4 years, 6 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
« no previous file with comments | « xfa/fxfa/parser/xfa_document.h ('k') | xfa/fxfa/parser/xfa_layout_itemlayout.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef XFA_FXFA_PARSER_XFA_LAYOUT_APPADAPTER_H_ 7 #ifndef XFA_FXFA_PARSER_XFA_LAYOUT_APPADAPTER_H_
8 #define XFA_FXFA_PARSER_XFA_LAYOUT_APPADAPTER_H_ 8 #define XFA_FXFA_PARSER_XFA_LAYOUT_APPADAPTER_H_
9 9
10 #include "xfa/fxfa/parser/xfa_doclayout.h" 10 #include "xfa/fxfa/parser/xfa_doclayout.h"
11 11
12 class CXFA_TraverseStrategy_PageAreaContainerLayoutItem { 12 class CXFA_TraverseStrategy_PageAreaContainerLayoutItem {
13 public: 13 public:
14 static inline CXFA_ContainerLayoutItem* GetFirstChild( 14 static inline CXFA_ContainerLayoutItem* GetFirstChild(
15 CXFA_ContainerLayoutItem* pLayoutItem) { 15 CXFA_ContainerLayoutItem* pLayoutItem) {
16 if (pLayoutItem->m_pFormNode->GetClassID() == XFA_ELEMENT_PageSet) { 16 if (pLayoutItem->m_pFormNode->GetClassID() == XFA_ELEMENT_PageSet) {
17 return static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem->m_pFirstChild); 17 return static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem->m_pFirstChild);
18 } 18 }
19 return NULL; 19 return NULL;
20 } 20 }
21 static inline CXFA_ContainerLayoutItem* GetNextSibling( 21 static inline CXFA_ContainerLayoutItem* GetNextSibling(
22 CXFA_ContainerLayoutItem* pLayoutItem) { 22 CXFA_ContainerLayoutItem* pLayoutItem) {
23 return (CXFA_ContainerLayoutItem*)pLayoutItem->m_pNextSibling; 23 return (CXFA_ContainerLayoutItem*)pLayoutItem->m_pNextSibling;
24 } 24 }
25 static inline CXFA_ContainerLayoutItem* GetParent( 25 static inline CXFA_ContainerLayoutItem* GetParent(
26 CXFA_ContainerLayoutItem* pLayoutItem) { 26 CXFA_ContainerLayoutItem* pLayoutItem) {
27 return static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem->m_pParent); 27 return static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem->m_pParent);
28 } 28 }
29 }; 29 };
30
30 class CXFA_TraverseStrategy_ContentAreaContainerLayoutItem { 31 class CXFA_TraverseStrategy_ContentAreaContainerLayoutItem {
31 public: 32 public:
32 static inline CXFA_ContainerLayoutItem* GetFirstChild( 33 static inline CXFA_ContainerLayoutItem* GetFirstChild(
33 CXFA_ContainerLayoutItem* pLayoutItem) { 34 CXFA_ContainerLayoutItem* pLayoutItem) {
34 for (CXFA_LayoutItem* pChildItem = pLayoutItem->m_pFirstChild; pChildItem; 35 for (CXFA_LayoutItem* pChildItem = pLayoutItem->m_pFirstChild; pChildItem;
35 pChildItem = pChildItem->m_pNextSibling) { 36 pChildItem = pChildItem->m_pNextSibling) {
36 if (CXFA_ContainerLayoutItem* pContainer = 37 if (CXFA_ContainerLayoutItem* pContainer =
37 pChildItem->AsContainerLayoutItem()) { 38 pChildItem->AsContainerLayoutItem()) {
38 return pContainer; 39 return pContainer;
39 } 40 }
40 } 41 }
41 return nullptr; 42 return nullptr;
42 } 43 }
43 static inline CXFA_ContainerLayoutItem* GetNextSibling( 44 static inline CXFA_ContainerLayoutItem* GetNextSibling(
44 CXFA_ContainerLayoutItem* pLayoutItem) { 45 CXFA_ContainerLayoutItem* pLayoutItem) {
45 for (CXFA_LayoutItem* pChildItem = pLayoutItem->m_pNextSibling; pChildItem; 46 for (CXFA_LayoutItem* pChildItem = pLayoutItem->m_pNextSibling; pChildItem;
46 pChildItem = pChildItem->m_pNextSibling) { 47 pChildItem = pChildItem->m_pNextSibling) {
47 if (CXFA_ContainerLayoutItem* pContainer = 48 if (CXFA_ContainerLayoutItem* pContainer =
48 pChildItem->AsContainerLayoutItem()) { 49 pChildItem->AsContainerLayoutItem()) {
49 return pContainer; 50 return pContainer;
50 } 51 }
51 } 52 }
52 return nullptr; 53 return nullptr;
53 } 54 }
54 static inline CXFA_ContainerLayoutItem* GetParent( 55 static inline CXFA_ContainerLayoutItem* GetParent(
55 CXFA_ContainerLayoutItem* pLayoutItem) { 56 CXFA_ContainerLayoutItem* pLayoutItem) {
56 return static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem->m_pParent); 57 return static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem->m_pParent);
57 } 58 }
58 }; 59 };
60
59 class CXFA_TraverseStrategy_ContentLayoutItem { 61 class CXFA_TraverseStrategy_ContentLayoutItem {
60 public: 62 public:
61 static inline CXFA_ContentLayoutItem* GetFirstChild( 63 static inline CXFA_ContentLayoutItem* GetFirstChild(
62 CXFA_ContentLayoutItem* pLayoutItem) { 64 CXFA_ContentLayoutItem* pLayoutItem) {
63 return static_cast<CXFA_ContentLayoutItem*>(pLayoutItem->m_pFirstChild); 65 return static_cast<CXFA_ContentLayoutItem*>(pLayoutItem->m_pFirstChild);
64 } 66 }
65 static inline CXFA_ContentLayoutItem* GetNextSibling( 67 static inline CXFA_ContentLayoutItem* GetNextSibling(
66 CXFA_ContentLayoutItem* pLayoutItem) { 68 CXFA_ContentLayoutItem* pLayoutItem) {
67 return static_cast<CXFA_ContentLayoutItem*>(pLayoutItem->m_pNextSibling); 69 return static_cast<CXFA_ContentLayoutItem*>(pLayoutItem->m_pNextSibling);
68 } 70 }
69 static inline CXFA_ContentLayoutItem* GetParent( 71 static inline CXFA_ContentLayoutItem* GetParent(
70 CXFA_ContentLayoutItem* pLayoutItem) { 72 CXFA_ContentLayoutItem* pLayoutItem) {
71 return static_cast<CXFA_ContentLayoutItem*>(pLayoutItem->m_pParent); 73 return static_cast<CXFA_ContentLayoutItem*>(pLayoutItem->m_pParent);
72 } 74 }
73 }; 75 };
74 76
75 void XFA_ReleaseLayoutItem(CXFA_LayoutItem* pLayoutItem); 77 void XFA_ReleaseLayoutItem(CXFA_LayoutItem* pLayoutItem);
76 78
77 #endif // XFA_FXFA_PARSER_XFA_LAYOUT_APPADAPTER_H_ 79 #endif // XFA_FXFA_PARSER_XFA_LAYOUT_APPADAPTER_H_
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_document.h ('k') | xfa/fxfa/parser/xfa_layout_itemlayout.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698