OLD | NEW |
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 "xfa/fxfa/parser/xfa_layout_pagemgr_new.h" | 7 #include "xfa/fxfa/parser/xfa_layout_pagemgr_new.h" |
8 | 8 |
9 #include "xfa/fxfa/app/xfa_ffnotify.h" | 9 #include "xfa/fxfa/app/xfa_ffnotify.h" |
10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" | 10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 } | 267 } |
268 return XFA_LAYOUT_FLOAT_MAX; | 268 return XFA_LAYOUT_FLOAT_MAX; |
269 } | 269 } |
270 static CXFA_Node* XFA_ResolveBreakTarget(CXFA_Node* pPageSetRoot, | 270 static CXFA_Node* XFA_ResolveBreakTarget(CXFA_Node* pPageSetRoot, |
271 FX_BOOL bNewExprStyle, | 271 FX_BOOL bNewExprStyle, |
272 CFX_WideStringC& wsTargetExpr) { | 272 CFX_WideStringC& wsTargetExpr) { |
273 CXFA_Document* pDocument = pPageSetRoot->GetDocument(); | 273 CXFA_Document* pDocument = pPageSetRoot->GetDocument(); |
274 if (wsTargetExpr.IsEmpty()) { | 274 if (wsTargetExpr.IsEmpty()) { |
275 return NULL; | 275 return NULL; |
276 } | 276 } |
277 CFX_WideString wsTargetAll = wsTargetExpr; | 277 CFX_WideString wsTargetAll(wsTargetExpr); |
278 wsTargetAll.TrimLeft(); | 278 wsTargetAll.TrimLeft(); |
279 wsTargetAll.TrimRight(); | 279 wsTargetAll.TrimRight(); |
280 int32_t iSpliteIndex = 0; | 280 int32_t iSpliteIndex = 0; |
281 FX_BOOL bTargetAllFind = TRUE; | 281 FX_BOOL bTargetAllFind = TRUE; |
282 while (iSpliteIndex != -1) { | 282 while (iSpliteIndex != -1) { |
283 CFX_WideString wsTargetExpr; | 283 CFX_WideString wsTargetExpr; |
284 int32_t iSpliteNextIndex = 0; | 284 int32_t iSpliteNextIndex = 0; |
285 if (!bTargetAllFind) { | 285 if (!bTargetAllFind) { |
286 iSpliteNextIndex = wsTargetAll.Find(' ', iSpliteIndex); | 286 iSpliteNextIndex = wsTargetAll.Find(' ', iSpliteIndex); |
287 wsTargetExpr = | 287 wsTargetExpr = |
(...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1917 } | 1917 } |
1918 pRootLayoutItem = m_pPageSetLayoutItemRoot; | 1918 pRootLayoutItem = m_pPageSetLayoutItemRoot; |
1919 CXFA_ContainerLayoutItem* pNextLayout = NULL; | 1919 CXFA_ContainerLayoutItem* pNextLayout = NULL; |
1920 for (; pRootLayoutItem; pRootLayoutItem = pNextLayout) { | 1920 for (; pRootLayoutItem; pRootLayoutItem = pNextLayout) { |
1921 pNextLayout = (CXFA_ContainerLayoutItem*)pRootLayoutItem->m_pNextSibling; | 1921 pNextLayout = (CXFA_ContainerLayoutItem*)pRootLayoutItem->m_pNextSibling; |
1922 SaveLayoutItem(pRootLayoutItem); | 1922 SaveLayoutItem(pRootLayoutItem); |
1923 delete pRootLayoutItem; | 1923 delete pRootLayoutItem; |
1924 } | 1924 } |
1925 m_pPageSetLayoutItemRoot = NULL; | 1925 m_pPageSetLayoutItemRoot = NULL; |
1926 } | 1926 } |
OLD | NEW |