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

Side by Side Diff: core/fxge/win32/fx_win32_device.cpp

Issue 1853233002: Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix CPDF_Name::GetConstString() 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/fxge/ge/fx_ge_ps.cpp ('k') | fpdfsdk/formfiller/cba_fontmap.cpp » ('j') | 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/include/fxge/fx_ge.h" 7 #include "core/include/fxge/fx_ge.h"
8 8
9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ 9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
10 #include <crtdbg.h> 10 #include <crtdbg.h>
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 } 453 }
454 // Select the fallback font information class if GDI is disabled. 454 // Select the fallback font information class if GDI is disabled.
455 CFX_Win32FallbackFontInfo* pInfoFallback = new CFX_Win32FallbackFontInfo; 455 CFX_Win32FallbackFontInfo* pInfoFallback = new CFX_Win32FallbackFontInfo;
456 // Construct the font path manually, SHGetKnownFolderPath won't work under 456 // Construct the font path manually, SHGetKnownFolderPath won't work under
457 // a restrictive sandbox. 457 // a restrictive sandbox.
458 CHAR windows_path[MAX_PATH] = {}; 458 CHAR windows_path[MAX_PATH] = {};
459 DWORD path_len = ::GetWindowsDirectoryA(windows_path, MAX_PATH); 459 DWORD path_len = ::GetWindowsDirectoryA(windows_path, MAX_PATH);
460 if (path_len > 0 && path_len < MAX_PATH) { 460 if (path_len > 0 && path_len < MAX_PATH) {
461 CFX_ByteString fonts_path(windows_path); 461 CFX_ByteString fonts_path(windows_path);
462 fonts_path += "\\Fonts"; 462 fonts_path += "\\Fonts";
463 pInfoFallback->AddPath(fonts_path); 463 pInfoFallback->AddPath(fonts_path.AsByteStringC());
464 } 464 }
465 return pInfoFallback; 465 return pInfoFallback;
466 } 466 }
467 void CFX_GEModule::InitPlatform() { 467 void CFX_GEModule::InitPlatform() {
468 CWin32Platform* pPlatformData = new CWin32Platform; 468 CWin32Platform* pPlatformData = new CWin32Platform;
469 OSVERSIONINFO ver; 469 OSVERSIONINFO ver;
470 ver.dwOSVersionInfoSize = sizeof(ver); 470 ver.dwOSVersionInfoSize = sizeof(ver);
471 GetVersionEx(&ver); 471 GetVersionEx(&ver);
472 pPlatformData->m_bHalfTone = ver.dwMajorVersion >= 5; 472 pPlatformData->m_bHalfTone = ver.dwMajorVersion >= 5;
473 if (IsGDIEnabled()) { 473 if (IsGDIEnabled()) {
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 SelectObject(m_hDC, m_hOldBitmap); 1363 SelectObject(m_hDC, m_hOldBitmap);
1364 DeleteDC(m_hDC); 1364 DeleteDC(m_hDC);
1365 } 1365 }
1366 if (m_hBitmap) { 1366 if (m_hBitmap) {
1367 DeleteObject(m_hBitmap); 1367 DeleteObject(m_hBitmap);
1368 } 1368 }
1369 delete GetBitmap(); 1369 delete GetBitmap();
1370 } 1370 }
1371 1371
1372 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ 1372 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_
OLDNEW
« no previous file with comments | « core/fxge/ge/fx_ge_ps.cpp ('k') | fpdfsdk/formfiller/cba_fontmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698