| 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/fxcrt/include/fx_ext.h" | 7 #include "core/fxcrt/include/fx_ext.h" |
| 8 #include "xfa/fgas/crt/fgas_codepage.h" | 8 #include "xfa/fgas/crt/fgas_codepage.h" |
| 9 #include "xfa/fgas/crt/fgas_language.h" | 9 #include "xfa/fgas/crt/fgas_language.h" |
| 10 | 10 |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 } | 332 } |
| 333 if (iLength == 0) { | 333 if (iLength == 0) { |
| 334 return 0xFFFF; | 334 return 0xFFFF; |
| 335 } | 335 } |
| 336 CFX_ByteString csStr; | 336 CFX_ByteString csStr; |
| 337 FX_CHAR* pBuf = csStr.GetBuffer(iLength + 1); | 337 FX_CHAR* pBuf = csStr.GetBuffer(iLength + 1); |
| 338 for (int32_t i = 0; i < iLength; ++i) { | 338 for (int32_t i = 0; i < iLength; ++i) { |
| 339 *pBuf++ = (FX_CHAR)*pStr++; | 339 *pBuf++ = (FX_CHAR)*pStr++; |
| 340 } | 340 } |
| 341 csStr.ReleaseBuffer(iLength); | 341 csStr.ReleaseBuffer(iLength); |
| 342 return FX_GetCodePageFromStringA(csStr, iLength); | 342 return FX_GetCodePageFromStringA(csStr.c_str(), iLength); |
| 343 } | 343 } |
| OLD | NEW |