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

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

Issue 801913002: Simplify PDFium by removing code that's not used in the open source repo. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 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 "../include/fpdfppo.h" 7 #include "../include/fpdfppo.h"
8 #include "../include/fsdk_define.h" 8 #include "../include/fsdk_define.h"
9 9
10 class CPDF_PageOrganizer 10 class CPDF_PageOrganizer
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 if(!pNewRoot) return FALSE; 42 if(!pNewRoot) return FALSE;
43 43
44 //Set the document information////////////////////////////////////////// // 44 //Set the document information////////////////////////////////////////// //
45 45
46 CPDF_Dictionary* DInfoDict = pDestPDFDoc->GetInfo(); 46 CPDF_Dictionary* DInfoDict = pDestPDFDoc->GetInfo();
47 47
48 if(!DInfoDict) 48 if(!DInfoDict)
49 return FALSE; 49 return FALSE;
50 50
51 CFX_ByteString producerstr; 51 CFX_ByteString producerstr;
52 » 52 » producerstr.Format("PDFium");
53 #ifdef FOXIT_CHROME_BUILD
54 » producerstr.Format("Google");
55 #else
56 » producerstr.Format("Foxit PDF SDK %s - Foxit Corporation", "2.0");
57 #endif
58 DInfoDict->SetAt("Producer", new CPDF_String(producerstr)); 53 DInfoDict->SetAt("Producer", new CPDF_String(producerstr));
59 54
60 //Set type////////////////////////////////////////////////////////////// // 55 //Set type////////////////////////////////////////////////////////////// //
61 CFX_ByteString cbRootType = pNewRoot->GetString("Type",""); 56 CFX_ByteString cbRootType = pNewRoot->GetString("Type","");
62 if( cbRootType.Equal("") ) 57 if( cbRootType.Equal("") )
63 { 58 {
64 pNewRoot->SetAt("Type", new CPDF_Name("Catalog")); 59 pNewRoot->SetAt("Type", new CPDF_Name("Catalog"));
65 } 60 }
66 61
67 CPDF_Dictionary* pNewPages = (CPDF_Dictionary*)(pNewRoot->GetElement("Pa ges")? pNewRoot->GetElement("Pages")->GetDirect() : NULL); 62 CPDF_Dictionary* pNewPages = (CPDF_Dictionary*)(pNewRoot->GetElement("Pa ges")? pNewRoot->GetElement("Pages")->GetDirect() : NULL);
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 if(!pSrcDict) 458 if(!pSrcDict)
464 return FALSE; 459 return FALSE;
465 CPDF_Document* pDstDoc = (CPDF_Document*)dest_doc; 460 CPDF_Document* pDstDoc = (CPDF_Document*)dest_doc;
466 CPDF_Dictionary* pDstDict = pDstDoc->GetRoot(); 461 CPDF_Dictionary* pDstDict = pDstDoc->GetRoot();
467 if(!pDstDict) 462 if(!pDstDict)
468 return FALSE; 463 return FALSE;
469 pDstDict->SetAt(FX_BSTRC("ViewerPreferences"), pSrcDict->Clone(TRUE)); 464 pDstDict->SetAt(FX_BSTRC("ViewerPreferences"), pSrcDict->Clone(TRUE));
470 return TRUE; 465 return TRUE;
471 } 466 }
472 467
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698