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

Side by Side Diff: xfa/fwl/theme/cfwl_widgettp.cpp

Issue 1882043004: Remove implicit cast from CFX_WideString to (const wchar_t*) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: win error #2 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
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/fwl/theme/cfwl_widgettp.h" 7 #include "xfa/fwl/theme/cfwl_widgettp.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 int32_t iLen = pParams->m_wsText.GetLength(); 70 int32_t iLen = pParams->m_wsText.GetLength();
71 if (iLen <= 0) 71 if (iLen <= 0)
72 return FALSE; 72 return FALSE;
73 CFX_Graphics* pGraphics = pParams->m_pGraphics; 73 CFX_Graphics* pGraphics = pParams->m_pGraphics;
74 m_pTextOut->SetRenderDevice(pGraphics->GetRenderDevice()); 74 m_pTextOut->SetRenderDevice(pGraphics->GetRenderDevice());
75 m_pTextOut->SetStyles(pParams->m_dwTTOStyles); 75 m_pTextOut->SetStyles(pParams->m_dwTTOStyles);
76 m_pTextOut->SetAlignment(pParams->m_iTTOAlign); 76 m_pTextOut->SetAlignment(pParams->m_iTTOAlign);
77 CFX_Matrix* pMatrix = &pParams->m_matrix; 77 CFX_Matrix* pMatrix = &pParams->m_matrix;
78 pMatrix->Concat(*pGraphics->GetMatrix()); 78 pMatrix->Concat(*pGraphics->GetMatrix());
79 m_pTextOut->SetMatrix(*pMatrix); 79 m_pTextOut->SetMatrix(*pMatrix);
80 m_pTextOut->DrawLogicText(pParams->m_wsText, iLen, pParams->m_rtPart); 80 m_pTextOut->DrawLogicText(pParams->m_wsText.c_str(), iLen, pParams->m_rtPart);
81 return TRUE; 81 return TRUE;
82 } 82 }
83 void* CFWL_WidgetTP::GetCapacity(CFWL_ThemePart* pThemePart, 83 void* CFWL_WidgetTP::GetCapacity(CFWL_ThemePart* pThemePart,
84 uint32_t dwCapacity) { 84 uint32_t dwCapacity) {
85 switch (dwCapacity) { 85 switch (dwCapacity) {
86 case FWL_WGTCAPACITY_CXBorder: { 86 case FWL_WGTCAPACITY_CXBorder: {
87 m_fValue = FWLTHEME_CAPACITY_CXBorder; 87 m_fValue = FWLTHEME_CAPACITY_CXBorder;
88 break; 88 break;
89 } 89 }
90 case FWL_WGTCAPACITY_CYBorder: { 90 case FWL_WGTCAPACITY_CYBorder: {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 FX_FLOAT fy) { 147 FX_FLOAT fy) {
148 return TRUE; 148 return TRUE;
149 } 149 }
150 FX_BOOL CFWL_WidgetTP::CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) { 150 FX_BOOL CFWL_WidgetTP::CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) {
151 if (!pParams) 151 if (!pParams)
152 return FALSE; 152 return FALSE;
153 if (!m_pTextOut) 153 if (!m_pTextOut)
154 return FALSE; 154 return FALSE;
155 m_pTextOut->SetAlignment(pParams->m_iTTOAlign); 155 m_pTextOut->SetAlignment(pParams->m_iTTOAlign);
156 m_pTextOut->SetStyles(pParams->m_dwTTOStyles | FDE_TTOSTYLE_ArabicContext); 156 m_pTextOut->SetStyles(pParams->m_dwTTOStyles | FDE_TTOSTYLE_ArabicContext);
157 m_pTextOut->CalcLogicSize(pParams->m_wsText, pParams->m_wsText.GetLength(), 157 m_pTextOut->CalcLogicSize(pParams->m_wsText.c_str(),
158 rect); 158 pParams->m_wsText.GetLength(), rect);
159 return TRUE; 159 return TRUE;
160 } 160 }
161 FWL_ERR CFWL_WidgetTP::Initialize() { 161 FWL_ERR CFWL_WidgetTP::Initialize() {
162 m_dwThemeID = 0; 162 m_dwThemeID = 0;
163 _ctm.SetIdentity(); 163 _ctm.SetIdentity();
164 return FWL_ERR_Succeeded; 164 return FWL_ERR_Succeeded;
165 } 165 }
166 FWL_ERR CFWL_WidgetTP::Finalize() { 166 FWL_ERR CFWL_WidgetTP::Finalize() {
167 if (!m_pTextOut) { 167 if (!m_pTextOut) {
168 FinalizeTTO(); 168 FinalizeTTO();
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 m_pColorData->clrEnd[0] = ArgbEncode(255, 175, 204, 251); 793 m_pColorData->clrEnd[0] = ArgbEncode(255, 175, 204, 251);
794 m_pColorData->clrEnd[1] = ArgbEncode(255, 185, 218, 251); 794 m_pColorData->clrEnd[1] = ArgbEncode(255, 185, 218, 251);
795 m_pColorData->clrEnd[2] = ArgbEncode(255, 210, 222, 235); 795 m_pColorData->clrEnd[2] = ArgbEncode(255, 210, 222, 235);
796 m_pColorData->clrEnd[3] = ArgbEncode(255, 243, 241, 236); 796 m_pColorData->clrEnd[3] = ArgbEncode(255, 243, 241, 236);
797 m_pColorData->clrSign[0] = ArgbEncode(255, 77, 97, 133); 797 m_pColorData->clrSign[0] = ArgbEncode(255, 77, 97, 133);
798 m_pColorData->clrSign[1] = ArgbEncode(255, 77, 97, 133); 798 m_pColorData->clrSign[1] = ArgbEncode(255, 77, 97, 133);
799 m_pColorData->clrSign[2] = ArgbEncode(255, 77, 97, 133); 799 m_pColorData->clrSign[2] = ArgbEncode(255, 77, 97, 133);
800 m_pColorData->clrSign[3] = ArgbEncode(255, 128, 128, 128); 800 m_pColorData->clrSign[3] = ArgbEncode(255, 128, 128, 128);
801 } 801 }
802 } 802 }
OLDNEW
« no previous file with comments | « xfa/fgas/localization/fgas_localemgr.cpp ('k') | xfa/fxbarcode/BC_BufferedImageLuminanceSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698