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

Side by Side Diff: xfa/fde/fde_gedevice.cpp

Issue 2095653002: Remove NULL in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 5 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 | « xfa/fde/css/fde_cssstylesheet.cpp ('k') | xfa/fgas/crt/fgas_codepage.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 "xfa/fde/fde_gedevice.h" 7 #include "xfa/fde/fde_gedevice.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 FX_FLOAT* pAM; 119 FX_FLOAT* pAM;
120 for (int32_t i = 0; i < iCount; ++i) { 120 for (int32_t i = 0; i < iCount; ++i) {
121 static const FX_FLOAT mc = 0.267949f; 121 static const FX_FLOAT mc = 0.267949f;
122 pAM = pCP->m_AdjustMatrix; 122 pAM = pCP->m_AdjustMatrix;
123 pAM[2] = mc * pAM[0] + pAM[2]; 123 pAM[2] = mc * pAM[0] + pAM[2];
124 pAM[3] = mc * pAM[1] + pAM[3]; 124 pAM[3] = mc * pAM[1] + pAM[3];
125 pCP++; 125 pCP++;
126 } 126 }
127 } 127 }
128 FXTEXT_CHARPOS* pCP = (FXTEXT_CHARPOS*)pCharPos; 128 FXTEXT_CHARPOS* pCP = (FXTEXT_CHARPOS*)pCharPos;
129 CFGAS_GEFont* pCurFont = NULL; 129 CFGAS_GEFont* pCurFont = nullptr;
130 CFGAS_GEFont* pSTFont = NULL; 130 CFGAS_GEFont* pSTFont = nullptr;
131 FXTEXT_CHARPOS* pCurCP = NULL; 131 FXTEXT_CHARPOS* pCurCP = nullptr;
132 int32_t iCurCount = 0; 132 int32_t iCurCount = 0;
133 133
134 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ 134 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
135 uint32_t dwFontStyle = pFont->GetFontStyles(); 135 uint32_t dwFontStyle = pFont->GetFontStyles();
136 CFX_Font FxFont; 136 CFX_Font FxFont;
137 CFX_SubstFont SubstFxFont; 137 CFX_SubstFont SubstFxFont;
138 FxFont.SetSubstFont(&SubstFxFont); 138 FxFont.SetSubstFont(&SubstFxFont);
139 SubstFxFont.m_Weight = dwFontStyle & FX_FONTSTYLE_Bold ? 700 : 400; 139 SubstFxFont.m_Weight = dwFontStyle & FX_FONTSTYLE_Bold ? 700 : 400;
140 SubstFxFont.m_ItalicAngle = dwFontStyle & FX_FONTSTYLE_Italic ? -12 : 0; 140 SubstFxFont.m_ItalicAngle = dwFontStyle & FX_FONTSTYLE_Italic ? -12 : 0;
141 SubstFxFont.m_WeightCJK = SubstFxFont.m_Weight; 141 SubstFxFont.m_WeightCJK = SubstFxFont.m_Weight;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 const CFX_Matrix* pMatrix) { 323 const CFX_Matrix* pMatrix) {
324 CFDE_Path* pGePath = (CFDE_Path*)pPath; 324 CFDE_Path* pGePath = (CFDE_Path*)pPath;
325 if (!pGePath) 325 if (!pGePath)
326 return FALSE; 326 return FALSE;
327 if (!pBrush) 327 if (!pBrush)
328 return FALSE; 328 return FALSE;
329 return m_pDevice->DrawPath(&pGePath->m_Path, pMatrix, nullptr, 329 return m_pDevice->DrawPath(&pGePath->m_Path, pMatrix, nullptr,
330 pBrush->GetColor(), 0, FXFILL_WINDING); 330 pBrush->GetColor(), 0, FXFILL_WINDING);
331 } 331 }
332 332
OLDNEW
« no previous file with comments | « xfa/fde/css/fde_cssstylesheet.cpp ('k') | xfa/fgas/crt/fgas_codepage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698