Chromium Code Reviews| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h" | 9 #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h" |
| 10 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" | 10 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 336 if (!pResDict) { | 336 if (!pResDict) { |
| 337 return csTmp; | 337 return csTmp; |
| 338 } | 338 } |
| 339 CPDF_Dictionary* pDict = pResDict->GetDictBy(csType); | 339 CPDF_Dictionary* pDict = pResDict->GetDictBy(csType); |
| 340 if (!pDict) { | 340 if (!pDict) { |
| 341 return csTmp; | 341 return csTmp; |
| 342 } | 342 } |
| 343 int num = 0; | 343 int num = 0; |
| 344 CFX_ByteString bsNum; | 344 CFX_ByteString bsNum; |
| 345 while (TRUE) { | 345 while (TRUE) { |
| 346 if (!pDict->KeyExist(csTmp + bsNum)) { | 346 if (!pDict->KeyExist((csTmp + bsNum).AsByteStringC())) { |
|
Lei Zhang
2016/04/04 22:11:29
Save the resulting CFX_ByteString so you don't nee
Tom Sepez
2016/04/04 22:54:38
Done.
| |
| 347 return csTmp + bsNum; | 347 return csTmp + bsNum; |
| 348 } | 348 } |
| 349 if (m < iCount) { | 349 if (m < iCount) { |
| 350 csTmp += csStr[m++]; | 350 csTmp += csStr[m++]; |
| 351 } else { | 351 } else { |
| 352 bsNum.Format("%d", num++); | 352 bsNum.Format("%d", num++); |
| 353 } | 353 } |
| 354 m++; | 354 m++; |
| 355 } | 355 } |
| 356 return csTmp; | 356 return csTmp; |
| (...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1200 FDF_ImportField(pField, L"", bNotify); | 1200 FDF_ImportField(pField, L"", bNotify); |
| 1201 } | 1201 } |
| 1202 if (bNotify && m_pFormNotify) { | 1202 if (bNotify && m_pFormNotify) { |
| 1203 m_pFormNotify->AfterFormImportData(this); | 1203 m_pFormNotify->AfterFormImportData(this); |
| 1204 } | 1204 } |
| 1205 return TRUE; | 1205 return TRUE; |
| 1206 } | 1206 } |
| 1207 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { | 1207 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { |
| 1208 m_pFormNotify = (CPDF_FormNotify*)pNotify; | 1208 m_pFormNotify = (CPDF_FormNotify*)pNotify; |
| 1209 } | 1209 } |
| OLD | NEW |