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

Side by Side Diff: core/fpdfdoc/doc_basic.cpp

Issue 1879683002: Remove CPDF_Object::GetConstString and overrides (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Move bLuminosity down. 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 | « core/fpdfdoc/doc_annot.cpp ('k') | no next file » | 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 "core/fpdfapi/fpdf_parser/include/cpdf_array.h" 7 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
8 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" 8 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
9 #include "core/fpdfdoc/doc_utils.h" 9 #include "core/fpdfdoc/doc_utils.h"
10 #include "core/fpdfdoc/include/fpdf_doc.h" 10 #include "core/fpdfdoc/include/fpdf_doc.h"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 return result; 309 return result;
310 #else 310 #else
311 return filepath; 311 return filepath;
312 #endif 312 #endif
313 } 313 }
314 314
315 bool CPDF_FileSpec::GetFileName(CFX_WideString* csFileName) const { 315 bool CPDF_FileSpec::GetFileName(CFX_WideString* csFileName) const {
316 if (CPDF_Dictionary* pDict = m_pObj->AsDictionary()) { 316 if (CPDF_Dictionary* pDict = m_pObj->AsDictionary()) {
317 *csFileName = pDict->GetUnicodeTextBy("UF"); 317 *csFileName = pDict->GetUnicodeTextBy("UF");
318 if (csFileName->IsEmpty()) { 318 if (csFileName->IsEmpty()) {
319 *csFileName = CFX_WideString::FromLocal(pDict->GetConstStringBy("F")); 319 *csFileName =
320 CFX_WideString::FromLocal(pDict->GetStringBy("F").AsStringC());
320 } 321 }
321 if (pDict->GetStringBy("FS") == "URL") 322 if (pDict->GetStringBy("FS") == "URL")
322 return true; 323 return true;
323 if (csFileName->IsEmpty()) { 324 if (csFileName->IsEmpty()) {
324 if (pDict->KeyExist("DOS")) { 325 if (pDict->KeyExist("DOS")) {
325 *csFileName = 326 *csFileName =
326 CFX_WideString::FromLocal(pDict->GetStringBy("DOS").AsStringC()); 327 CFX_WideString::FromLocal(pDict->GetStringBy("DOS").AsStringC());
327 } else if (pDict->KeyExist("Mac")) { 328 } else if (pDict->KeyExist("Mac")) {
328 *csFileName = 329 *csFileName =
329 CFX_WideString::FromLocal(pDict->GetStringBy("Mac").AsStringC()); 330 CFX_WideString::FromLocal(pDict->GetStringBy("Mac").AsStringC());
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 bsLbl = bsOrig; 513 bsLbl = bsOrig;
513 int nPage = FXSYS_atoi(bsLbl); 514 int nPage = FXSYS_atoi(bsLbl);
514 if (nPage > 0 && nPage <= nPages) { 515 if (nPage > 0 && nPage <= nPages) {
515 return nPage; 516 return nPage;
516 } 517 }
517 return -1; 518 return -1;
518 } 519 }
519 int32_t CPDF_PageLabel::GetPageByLabel(const CFX_WideStringC& wsLabel) const { 520 int32_t CPDF_PageLabel::GetPageByLabel(const CFX_WideStringC& wsLabel) const {
520 return GetPageByLabel(PDF_EncodeText(wsLabel.c_str()).AsStringC()); 521 return GetPageByLabel(PDF_EncodeText(wsLabel.c_str()).AsStringC());
521 } 522 }
OLDNEW
« no previous file with comments | « core/fpdfdoc/doc_annot.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698