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

Side by Side Diff: fpdfsdk/src/fpdfppo.cpp

Issue 1477583002: Inflict PDF_ENABLE_XFA ifdefs on XFA fpdfsdk/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years 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 "public/fpdf_ppo.h" 7 #include "public/fpdf_ppo.h"
8 8
9 #ifdef PDF_ENABLE_XFA
9 #include "../include/fpdfxfa/fpdfxfa_doc.h" 10 #include "../include/fpdfxfa/fpdfxfa_doc.h"
11 #endif
10 #include "fpdfsdk/include/fsdk_define.h" 12 #include "fpdfsdk/include/fsdk_define.h"
11 #include "third_party/base/nonstd_unique_ptr.h" 13 #include "third_party/base/nonstd_unique_ptr.h"
12 14
13 class CPDF_PageOrganizer { 15 class CPDF_PageOrganizer {
14 public: 16 public:
15 using ObjectNumberMap = std::map<FX_DWORD, FX_DWORD>; 17 using ObjectNumberMap = std::map<FX_DWORD, FX_DWORD>;
16 CPDF_PageOrganizer(); 18 CPDF_PageOrganizer();
17 ~CPDF_PageOrganizer(); 19 ~CPDF_PageOrganizer();
18 20
19 FX_BOOL PDFDocInit(CPDF_Document* pDestPDFDoc, CPDF_Document* pSrcPDFDoc); 21 FX_BOOL PDFDocInit(CPDF_Document* pDestPDFDoc, CPDF_Document* pSrcPDFDoc);
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 return 4; 296 return 4;
295 } 297 }
296 if (!FXSYS_stricmp(strType, "Page")) { 298 if (!FXSYS_stricmp(strType, "Page")) {
297 pDictClone->Release(); 299 pDictClone->Release();
298 return 0; 300 return 0;
299 } 301 }
300 } 302 }
301 } 303 }
302 dwNewObjNum = pDoc->AddIndirectObject(pClone); 304 dwNewObjNum = pDoc->AddIndirectObject(pClone);
303 (*pObjNumberMap)[dwObjnum] = dwNewObjNum; 305 (*pObjNumberMap)[dwObjnum] = dwNewObjNum;
306 #ifndef PDF_ENABLE_XFA
307
Lei Zhang 2015/11/25 00:12:02 If this is the only difference, then the #include
Tom Sepez 2015/11/25 21:45:29 Sadly, it is needed since it breaks IWYU elsewhere
Lei Zhang 2015/11/25 21:51:34 Ouch. Add a TODO?
Tom Sepez 2015/11/25 23:08:22 Actually, I'm lying. It works today. The last ti
308 #endif
304 if (!UpdateReference(pClone, pDoc, pObjNumberMap)) { 309 if (!UpdateReference(pClone, pDoc, pObjNumberMap)) {
305 pClone->Release(); 310 pClone->Release();
306 return 0; 311 return 0;
307 } 312 }
308 return dwNewObjNum; 313 return dwNewObjNum;
309 } 314 }
310 315
311 FPDF_BOOL ParserPageRangeString(CFX_ByteString rangstring, 316 FPDF_BOOL ParserPageRangeString(CFX_ByteString rangstring,
312 CFX_WordArray* pageArray, 317 CFX_WordArray* pageArray,
313 int nCount) { 318 int nCount) {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 if (!pSrcDict) 406 if (!pSrcDict)
402 return FALSE; 407 return FALSE;
403 408
404 CPDF_Dictionary* pDstDict = pDstDoc->GetRoot(); 409 CPDF_Dictionary* pDstDict = pDstDoc->GetRoot();
405 if (!pDstDict) 410 if (!pDstDict)
406 return FALSE; 411 return FALSE;
407 412
408 pDstDict->SetAt(FX_BSTRC("ViewerPreferences"), pSrcDict->Clone(TRUE)); 413 pDstDict->SetAt(FX_BSTRC("ViewerPreferences"), pSrcDict->Clone(TRUE));
409 return TRUE; 414 return TRUE;
410 } 415 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698