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

Side by Side Diff: xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp

Issue 1862123003: Rename both As{Byte,Wide}StringC() helpers to AsStringC(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, fix new usage. Created 4 years, 8 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_layout_itemlayout.cpp ('k') | xfa/fxfa/parser/xfa_locale.cpp » ('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 #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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } else { 290 } else {
291 wsTargetExpr = wsTargetAll; 291 wsTargetExpr = wsTargetAll;
292 } 292 }
293 if (wsTargetExpr.IsEmpty()) { 293 if (wsTargetExpr.IsEmpty()) {
294 return NULL; 294 return NULL;
295 } 295 }
296 bTargetAllFind = FALSE; 296 bTargetAllFind = FALSE;
297 if (wsTargetExpr.GetAt(0) == '#') { 297 if (wsTargetExpr.GetAt(0) == '#') {
298 CXFA_Node* pNode = pDocument->GetNodeByID( 298 CXFA_Node* pNode = pDocument->GetNodeByID(
299 ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Template)), 299 ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Template)),
300 wsTargetExpr.Mid(1).AsWideStringC()); 300 wsTargetExpr.Mid(1).AsStringC());
301 if (pNode) { 301 if (pNode) {
302 return pNode; 302 return pNode;
303 } 303 }
304 } else if (bNewExprStyle) { 304 } else if (bNewExprStyle) {
305 CFX_WideString wsProcessedTarget = wsTargetExpr; 305 CFX_WideString wsProcessedTarget = wsTargetExpr;
306 if (wsTargetExpr.Left(4) == FX_WSTRC(L"som(") && 306 if (wsTargetExpr.Left(4) == FX_WSTRC(L"som(") &&
307 wsTargetExpr.Right(1) == FX_WSTRC(L")")) { 307 wsTargetExpr.Right(1) == FX_WSTRC(L")")) {
308 wsProcessedTarget = wsTargetExpr.Mid(4, wsTargetExpr.GetLength() - 5); 308 wsProcessedTarget = wsTargetExpr.Mid(4, wsTargetExpr.GetLength() - 5);
309 } 309 }
310 XFA_RESOLVENODE_RS rs; 310 XFA_RESOLVENODE_RS rs;
311 int32_t iCount = pDocument->GetScriptContext()->ResolveObjects( 311 int32_t iCount = pDocument->GetScriptContext()->ResolveObjects(
312 pPageSetRoot, wsProcessedTarget.AsWideStringC(), rs, 312 pPageSetRoot, wsProcessedTarget.AsStringC(), rs,
313 XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | 313 XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties |
314 XFA_RESOLVENODE_Attributes | XFA_RESOLVENODE_Siblings | 314 XFA_RESOLVENODE_Attributes | XFA_RESOLVENODE_Siblings |
315 XFA_RESOLVENODE_Parent); 315 XFA_RESOLVENODE_Parent);
316 if (iCount > 0 && rs.nodes[0]->IsNode()) { 316 if (iCount > 0 && rs.nodes[0]->IsNode()) {
317 return rs.nodes[0]->AsNode(); 317 return rs.nodes[0]->AsNode();
318 } 318 }
319 } 319 }
320 iSpliteIndex = iSpliteNextIndex; 320 iSpliteIndex = iSpliteNextIndex;
321 } 321 }
322 return NULL; 322 return NULL;
(...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 } 1925 }
1926 pRootLayoutItem = m_pPageSetLayoutItemRoot; 1926 pRootLayoutItem = m_pPageSetLayoutItemRoot;
1927 CXFA_ContainerLayoutItem* pNextLayout = NULL; 1927 CXFA_ContainerLayoutItem* pNextLayout = NULL;
1928 for (; pRootLayoutItem; pRootLayoutItem = pNextLayout) { 1928 for (; pRootLayoutItem; pRootLayoutItem = pNextLayout) {
1929 pNextLayout = (CXFA_ContainerLayoutItem*)pRootLayoutItem->m_pNextSibling; 1929 pNextLayout = (CXFA_ContainerLayoutItem*)pRootLayoutItem->m_pNextSibling;
1930 SaveLayoutItem(pRootLayoutItem); 1930 SaveLayoutItem(pRootLayoutItem);
1931 delete pRootLayoutItem; 1931 delete pRootLayoutItem;
1932 } 1932 }
1933 m_pPageSetLayoutItemRoot = NULL; 1933 m_pPageSetLayoutItemRoot = NULL;
1934 } 1934 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_layout_itemlayout.cpp ('k') | xfa/fxfa/parser/xfa_locale.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698