| 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 <limits.h> | 7 #include <limits.h> |
| 8 | 8 |
| 9 #include "core/include/fpdfapi/fpdf_module.h" | 9 #include "core/include/fpdfapi/fpdf_module.h" |
| 10 #include "core/include/fpdfapi/fpdf_page.h" | 10 #include "core/include/fpdfapi/fpdf_page.h" |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 pFontDict->SetAtReference("FontDescriptor", this, pFontDesc); | 422 pFontDict->SetAtReference("FontDescriptor", this, pFontDesc); |
| 423 hFont = SelectObject(hDC, hFont); | 423 hFont = SelectObject(hDC, hFont); |
| 424 DeleteObject(hFont); | 424 DeleteObject(hFont); |
| 425 DeleteDC(hDC); | 425 DeleteDC(hDC); |
| 426 return LoadFont(pBaseDict); | 426 return LoadFont(pBaseDict); |
| 427 } | 427 } |
| 428 #endif | 428 #endif |
| 429 | 429 |
| 430 #if (_FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_) | 430 #if (_FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_) |
| 431 uint32_t FX_GetLangHashCode(const FX_CHAR* pStr) { | 431 uint32_t FX_GetLangHashCode(const FX_CHAR* pStr) { |
| 432 FXSYS_assert(pStr != NULL); | 432 FXSYS_assert(pStr); |
| 433 int32_t iLength = FXSYS_strlen(pStr); | 433 int32_t iLength = FXSYS_strlen(pStr); |
| 434 const FX_CHAR* pStrEnd = pStr + iLength; | 434 const FX_CHAR* pStrEnd = pStr + iLength; |
| 435 uint32_t uHashCode = 0; | 435 uint32_t uHashCode = 0; |
| 436 while (pStr < pStrEnd) { | 436 while (pStr < pStrEnd) { |
| 437 uHashCode = 31 * uHashCode + tolower(*pStr++); | 437 uHashCode = 31 * uHashCode + tolower(*pStr++); |
| 438 } | 438 } |
| 439 return uHashCode; | 439 return uHashCode; |
| 440 } | 440 } |
| 441 struct FX_LANG2CS { | 441 struct FX_LANG2CS { |
| 442 FX_DWORD uLang; | 442 FX_DWORD uLang; |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1141 void FPDFAPI_FlatPageAttr(CPDF_Dictionary* pPageDict, | 1141 void FPDFAPI_FlatPageAttr(CPDF_Dictionary* pPageDict, |
| 1142 const CFX_ByteStringC& name) { | 1142 const CFX_ByteStringC& name) { |
| 1143 if (pPageDict->KeyExist(name)) { | 1143 if (pPageDict->KeyExist(name)) { |
| 1144 return; | 1144 return; |
| 1145 } | 1145 } |
| 1146 CPDF_Object* pObj = FPDFAPI_GetPageAttr(pPageDict, name); | 1146 CPDF_Object* pObj = FPDFAPI_GetPageAttr(pPageDict, name); |
| 1147 if (pObj) { | 1147 if (pObj) { |
| 1148 pPageDict->SetAt(name, pObj->Clone()); | 1148 pPageDict->SetAt(name, pObj->Clone()); |
| 1149 } | 1149 } |
| 1150 } | 1150 } |
| OLD | NEW |