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

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

Issue 1406303006: Merge to XFA: Don't bother passing -1 as the length to the CFX_ByteString ctor. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 2 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/src/fxge/ge/fx_ge_fontmap.cpp ('k') | no next file » | 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 "../../../include/fxge/fx_ge.h" 7 #include "../../../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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } else if ((lVersion & 0xFFFF0000) == TT_MAKE_TAG(0x80, 0x01, 0x00, 0x00) || 115 } else if ((lVersion & 0xFFFF0000) == TT_MAKE_TAG(0x80, 0x01, 0x00, 0x00) ||
116 (lVersion & 0xFFFF0000) == TT_MAKE_TAG('%', '!', 0, 0)) { 116 (lVersion & 0xFFFF0000) == TT_MAKE_TAG('%', '!', 0, 0)) {
117 ret = TRUE; 117 ret = TRUE;
118 } 118 }
119 } 119 }
120 DeleteFont(hFont); 120 DeleteFont(hFont);
121 return ret; 121 return ret;
122 } 122 }
123 void CFX_Win32FontInfo::AddInstalledFont(const LOGFONTA* plf, 123 void CFX_Win32FontInfo::AddInstalledFont(const LOGFONTA* plf,
124 FX_DWORD FontType) { 124 FX_DWORD FontType) {
125 CFX_ByteString name(plf->lfFaceName, -1); 125 CFX_ByteString name(plf->lfFaceName);
126 if (name[0] == '@') { 126 if (name[0] == '@') {
127 return; 127 return;
128 } 128 }
129 if (name == m_LastFamily) { 129 if (name == m_LastFamily) {
130 m_pMapper->AddInstalledFont(name, plf->lfCharSet); 130 m_pMapper->AddInstalledFont(name, plf->lfCharSet);
131 return; 131 return;
132 } 132 }
133 if (!(FontType & TRUETYPE_FONTTYPE) && !(FontType & DEVICE_FONTTYPE)) { 133 if (!(FontType & TRUETYPE_FONTTYPE) && !(FontType & DEVICE_FONTTYPE)) {
134 return; 134 return;
135 } 135 }
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 SelectObject(m_hDC, m_hOldBitmap); 1358 SelectObject(m_hDC, m_hOldBitmap);
1359 DeleteDC(m_hDC); 1359 DeleteDC(m_hDC);
1360 } 1360 }
1361 if (m_hBitmap) { 1361 if (m_hBitmap) {
1362 DeleteObject(m_hBitmap); 1362 DeleteObject(m_hBitmap);
1363 } 1363 }
1364 delete GetBitmap(); 1364 delete GetBitmap();
1365 } 1365 }
1366 1366
1367 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ 1367 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_
OLDNEW
« no previous file with comments | « core/src/fxge/ge/fx_ge_fontmap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698