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

Side by Side Diff: xfa/fxfa/app/xfa_fwltheme.cpp

Issue 1830323006: Remove FX_DWORD from XFA. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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/fxfa/app/xfa_fontmgr.cpp ('k') | xfa/fxfa/app/xfa_rendercontext.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/fxfa/app/xfa_fwltheme.h" 7 #include "xfa/fxfa/app/xfa_fwltheme.h"
8 8
9 #include "xfa/fde/tto/fde_textout.h" 9 #include "xfa/fde/tto/fde_textout.h"
10 #include "xfa/fgas/crt/fgas_codepage.h" 10 #include "xfa/fgas/crt/fgas_codepage.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 if (m_pCalendarFont) { 105 if (m_pCalendarFont) {
106 m_pCalendarFont->Release(); 106 m_pCalendarFont->Release();
107 m_pCalendarFont = NULL; 107 m_pCalendarFont = NULL;
108 } 108 }
109 FWLTHEME_Release(); 109 FWLTHEME_Release();
110 return FWL_ERR_Succeeded; 110 return FWL_ERR_Succeeded;
111 } 111 }
112 FX_BOOL CXFA_FWLTheme::IsValidWidget(IFWL_Widget* pWidget) { 112 FX_BOOL CXFA_FWLTheme::IsValidWidget(IFWL_Widget* pWidget) {
113 return TRUE; 113 return TRUE;
114 } 114 }
115 FX_DWORD CXFA_FWLTheme::GetThemeID(IFWL_Widget* pWidget) { 115 uint32_t CXFA_FWLTheme::GetThemeID(IFWL_Widget* pWidget) {
116 return 0; 116 return 0;
117 } 117 }
118 FX_DWORD CXFA_FWLTheme::SetThemeID(IFWL_Widget* pWidget, 118 uint32_t CXFA_FWLTheme::SetThemeID(IFWL_Widget* pWidget,
119 FX_DWORD dwThemeID, 119 uint32_t dwThemeID,
120 FX_BOOL bChildren) { 120 FX_BOOL bChildren) {
121 return 0; 121 return 0;
122 } 122 }
123 FX_BOOL CXFA_FWLTheme::DrawBackground(CFWL_ThemeBackground* pParams) { 123 FX_BOOL CXFA_FWLTheme::DrawBackground(CFWL_ThemeBackground* pParams) {
124 return GetTheme(pParams->m_pWidget)->DrawBackground(pParams); 124 return GetTheme(pParams->m_pWidget)->DrawBackground(pParams);
125 } 125 }
126 FX_BOOL CXFA_FWLTheme::DrawText(CFWL_ThemeText* pParams) { 126 FX_BOOL CXFA_FWLTheme::DrawText(CFWL_ThemeText* pParams) {
127 if (pParams->m_wsText.IsEmpty()) { 127 if (pParams->m_wsText.IsEmpty()) {
128 return FWL_ERR_Indefinite; 128 return FWL_ERR_Indefinite;
129 } 129 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 CFX_Matrix* pMatrix = pGraphics->GetMatrix(); 184 CFX_Matrix* pMatrix = pGraphics->GetMatrix();
185 if (pMatrix) { 185 if (pMatrix) {
186 mtPart.Concat(*pMatrix); 186 mtPart.Concat(*pMatrix);
187 } 187 }
188 m_pTextOut->SetMatrix(mtPart); 188 m_pTextOut->SetMatrix(mtPart);
189 m_pTextOut->DrawLogicText(pParams->m_wsText, pParams->m_wsText.GetLength(), 189 m_pTextOut->DrawLogicText(pParams->m_wsText, pParams->m_wsText.GetLength(),
190 pParams->m_rtPart); 190 pParams->m_rtPart);
191 return TRUE; 191 return TRUE;
192 } 192 }
193 void* CXFA_FWLTheme::GetCapacity(CFWL_ThemePart* pThemePart, 193 void* CXFA_FWLTheme::GetCapacity(CFWL_ThemePart* pThemePart,
194 FX_DWORD dwCapacity) { 194 uint32_t dwCapacity) {
195 switch (dwCapacity) { 195 switch (dwCapacity) {
196 case FWL_WGTCAPACITY_Font: { 196 case FWL_WGTCAPACITY_Font: {
197 if (CXFA_FFWidget* pWidget = 197 if (CXFA_FFWidget* pWidget =
198 XFA_ThemeGetOuterWidget(pThemePart->m_pWidget)) { 198 XFA_ThemeGetOuterWidget(pThemePart->m_pWidget)) {
199 return pWidget->GetDataAcc()->GetFDEFont(); 199 return pWidget->GetDataAcc()->GetFDEFont();
200 } 200 }
201 } break; 201 } break;
202 case FWL_WGTCAPACITY_FontSize: { 202 case FWL_WGTCAPACITY_FontSize: {
203 if (CXFA_FFWidget* pWidget = 203 if (CXFA_FFWidget* pWidget =
204 XFA_ThemeGetOuterWidget(pThemePart->m_pWidget)) { 204 XFA_ThemeGetOuterWidget(pThemePart->m_pWidget)) {
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 pParams->m_dwStates, &pParams->m_matrix); 370 pParams->m_dwStates, &pParams->m_matrix);
371 } 371 }
372 return TRUE; 372 return TRUE;
373 } 373 }
374 void CXFA_FWLCheckBoxTP::DrawCheckSign(IFWL_Widget* pWidget, 374 void CXFA_FWLCheckBoxTP::DrawCheckSign(IFWL_Widget* pWidget,
375 CFX_Graphics* pGraphics, 375 CFX_Graphics* pGraphics,
376 const CFX_RectF* pRtBox, 376 const CFX_RectF* pRtBox,
377 int32_t iState, 377 int32_t iState,
378 CFX_Matrix* pMatrix) { 378 CFX_Matrix* pMatrix) {
379 CFX_RectF rtSign(*pRtBox); 379 CFX_RectF rtSign(*pRtBox);
380 FX_DWORD dwColor = 0xFF000000; 380 uint32_t dwColor = 0xFF000000;
381 if ((iState & FWL_PARTSTATE_CKB_Mask2) == FWL_PARTSTATE_CKB_Neutral) { 381 if ((iState & FWL_PARTSTATE_CKB_Mask2) == FWL_PARTSTATE_CKB_Neutral) {
382 dwColor = 0xFFA9A9A9; 382 dwColor = 0xFFA9A9A9;
383 } 383 }
384 { 384 {
385 FX_DWORD dwStyle = pWidget->GetStylesEx(); 385 uint32_t dwStyle = pWidget->GetStylesEx();
386 rtSign.Deflate(rtSign.width / 4, rtSign.height / 4); 386 rtSign.Deflate(rtSign.width / 4, rtSign.height / 4);
387 switch (dwStyle & FWL_STYLEEXT_CKB_SignShapeMask) { 387 switch (dwStyle & FWL_STYLEEXT_CKB_SignShapeMask) {
388 case FWL_STYLEEXT_CKB_SignShapeCheck: 388 case FWL_STYLEEXT_CKB_SignShapeCheck:
389 DrawSignCheck(pGraphics, &rtSign, dwColor, pMatrix); 389 DrawSignCheck(pGraphics, &rtSign, dwColor, pMatrix);
390 break; 390 break;
391 case FWL_STYLEEXT_CKB_SignShapeCircle: 391 case FWL_STYLEEXT_CKB_SignShapeCircle:
392 DrawSignCircle(pGraphics, &rtSign, dwColor, pMatrix); 392 DrawSignCircle(pGraphics, &rtSign, dwColor, pMatrix);
393 break; 393 break;
394 case FWL_STYLEEXT_CKB_SignShapeCross: 394 case FWL_STYLEEXT_CKB_SignShapeCross:
395 DrawSignCross(pGraphics, &rtSign, dwColor, pMatrix); 395 DrawSignCross(pGraphics, &rtSign, dwColor, pMatrix);
(...skipping 27 matching lines...) Expand all
423 } 423 }
424 } 424 }
425 CFX_Color crLine(cr); 425 CFX_Color crLine(cr);
426 pParams->m_pGraphics->SetStrokeColor(&crLine); 426 pParams->m_pGraphics->SetStrokeColor(&crLine);
427 pParams->m_pGraphics->SetLineWidth(fWidth); 427 pParams->m_pGraphics->SetLineWidth(fWidth);
428 pParams->m_pGraphics->StrokePath(pParams->m_pPath, &pParams->m_matrix); 428 pParams->m_pGraphics->StrokePath(pParams->m_pPath, &pParams->m_matrix);
429 return TRUE; 429 return TRUE;
430 } 430 }
431 return CFWL_EditTP::DrawBackground(pParams); 431 return CFWL_EditTP::DrawBackground(pParams);
432 } 432 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_fontmgr.cpp ('k') | xfa/fxfa/app/xfa_rendercontext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698