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 "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 7 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
387 pKidList->RemoveAt(i); | 387 pKidList->RemoveAt(i); |
388 } | 388 } |
389 pPages->SetAtInteger( | 389 pPages->SetAtInteger( |
390 "Count", pPages->GetIntegerBy("Count") + (bInsert ? 1 : -1)); | 390 "Count", pPages->GetIntegerBy("Count") + (bInsert ? 1 : -1)); |
391 return 1; | 391 return 1; |
392 } | 392 } |
393 nPagesToGo--; | 393 nPagesToGo--; |
394 } else { | 394 } else { |
395 int nPages = pKid->GetIntegerBy("Count"); | 395 int nPages = pKid->GetIntegerBy("Count"); |
396 if (nPagesToGo < nPages) { | 396 if (nPagesToGo < nPages) { |
397 if (pdfium::ContainsValue(*pVisited, pKid)) | 397 if (pdfium::ContainsKey(*pVisited, pKid)) |
398 return -1; | 398 return -1; |
399 pdfium::ScopedSetInsertion<CPDF_Dictionary*>(pVisited, pKid); | 399 |
400 pdfium::ScopedSetInsertion<CPDF_Dictionary*> insertion(pVisited, pKid); | |
Lei Zhang
2016/05/23 16:23:20
Umm, not sure what happened here.
Tom Sepez
2016/05/23 16:33:04
Argh. Well, at least it existed until the ; at eo
| |
400 if (InsertDeletePDFPage(pDoc, pKid, nPagesToGo, pPage, bInsert, | 401 if (InsertDeletePDFPage(pDoc, pKid, nPagesToGo, pPage, bInsert, |
401 pVisited) < 0) { | 402 pVisited) < 0) { |
402 return -1; | 403 return -1; |
403 } | 404 } |
404 pPages->SetAtInteger( | 405 pPages->SetAtInteger( |
405 "Count", pPages->GetIntegerBy("Count") + (bInsert ? 1 : -1)); | 406 "Count", pPages->GetIntegerBy("Count") + (bInsert ? 1 : -1)); |
406 return 1; | 407 return 1; |
407 } | 408 } |
408 nPagesToGo -= nPages; | 409 nPagesToGo -= nPages; |
409 } | 410 } |
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1439 } | 1440 } |
1440 } | 1441 } |
1441 pFontDesc->SetAtInteger("StemV", fStemV); | 1442 pFontDesc->SetAtInteger("StemV", fStemV); |
1442 AddIndirectObject(pFontDesc); | 1443 AddIndirectObject(pFontDesc); |
1443 pFontDict->SetAtReference("FontDescriptor", this, pFontDesc); | 1444 pFontDict->SetAtReference("FontDescriptor", this, pFontDesc); |
1444 CFRelease(traits); | 1445 CFRelease(traits); |
1445 CFRelease(languages); | 1446 CFRelease(languages); |
1446 return LoadFont(pBaseDict); | 1447 return LoadFont(pBaseDict); |
1447 } | 1448 } |
1448 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ | 1449 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ |
OLD | NEW |