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

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

Issue 1862123003: Rename both As{Byte,Wide}StringC() helpers to AsStringC(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, fix new usage. 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_text.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/fxge/include/fx_ge.h" 7 #include "core/fxge/include/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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 } 447 }
448 // Select the fallback font information class if GDI is disabled. 448 // Select the fallback font information class if GDI is disabled.
449 CFX_Win32FallbackFontInfo* pInfoFallback = new CFX_Win32FallbackFontInfo; 449 CFX_Win32FallbackFontInfo* pInfoFallback = new CFX_Win32FallbackFontInfo;
450 // Construct the font path manually, SHGetKnownFolderPath won't work under 450 // Construct the font path manually, SHGetKnownFolderPath won't work under
451 // a restrictive sandbox. 451 // a restrictive sandbox.
452 CHAR windows_path[MAX_PATH] = {}; 452 CHAR windows_path[MAX_PATH] = {};
453 DWORD path_len = ::GetWindowsDirectoryA(windows_path, MAX_PATH); 453 DWORD path_len = ::GetWindowsDirectoryA(windows_path, MAX_PATH);
454 if (path_len > 0 && path_len < MAX_PATH) { 454 if (path_len > 0 && path_len < MAX_PATH) {
455 CFX_ByteString fonts_path(windows_path); 455 CFX_ByteString fonts_path(windows_path);
456 fonts_path += "\\Fonts"; 456 fonts_path += "\\Fonts";
457 pInfoFallback->AddPath(fonts_path.AsByteStringC()); 457 pInfoFallback->AddPath(fonts_path.AsStringC());
458 } 458 }
459 return pInfoFallback; 459 return pInfoFallback;
460 } 460 }
461 void CFX_GEModule::InitPlatform() { 461 void CFX_GEModule::InitPlatform() {
462 CWin32Platform* pPlatformData = new CWin32Platform; 462 CWin32Platform* pPlatformData = new CWin32Platform;
463 OSVERSIONINFO ver; 463 OSVERSIONINFO ver;
464 ver.dwOSVersionInfoSize = sizeof(ver); 464 ver.dwOSVersionInfoSize = sizeof(ver);
465 GetVersionEx(&ver); 465 GetVersionEx(&ver);
466 pPlatformData->m_bHalfTone = ver.dwMajorVersion >= 5; 466 pPlatformData->m_bHalfTone = ver.dwMajorVersion >= 5;
467 if (IsGDIEnabled()) { 467 if (IsGDIEnabled()) {
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 SelectObject(m_hDC, m_hOldBitmap); 1357 SelectObject(m_hDC, m_hOldBitmap);
1358 DeleteDC(m_hDC); 1358 DeleteDC(m_hDC);
1359 } 1359 }
1360 if (m_hBitmap) { 1360 if (m_hBitmap) {
1361 DeleteObject(m_hBitmap); 1361 DeleteObject(m_hBitmap);
1362 } 1362 }
1363 delete GetBitmap(); 1363 delete GetBitmap();
1364 } 1364 }
1365 1365
1366 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ 1366 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_
OLDNEW
« no previous file with comments | « core/fxge/ge/fx_ge_text.cpp ('k') | fpdfsdk/formfiller/cba_fontmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698