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

Unified Diff: xfa/src/fxfa/src/app/xfa_textlayout.cpp

Issue 1481503002: Use c++ style casts in CPWL_Color::CPWL_Color() (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fxfa/src/app/xfa_textlayout.cpp
diff --git a/xfa/src/fxfa/src/app/xfa_textlayout.cpp b/xfa/src/fxfa/src/app/xfa_textlayout.cpp
index 667fc11b4cfb778effb9f9c39abd74bbf63bd8d6..12e517de41835831cd61b7dcee74349c625fd6fb 100644
--- a/xfa/src/fxfa/src/app/xfa_textlayout.cpp
+++ b/xfa/src/fxfa/src/app/xfa_textlayout.cpp
@@ -398,16 +398,15 @@ FX_FLOAT CXFA_TextParser::GetFontSize(IXFA_TextProvider* pTextProvider,
int32_t CXFA_TextParser::GetHorScale(IXFA_TextProvider* pTextProvider,
IFDE_CSSComputedStyle* pStyle,
IFDE_XMLNode* pXMLNode) const {
- if (pStyle != NULL) {
+ if (pStyle) {
CFX_WideString wsValue;
if (pStyle->GetCustomStyle(FX_WSTRC(L"xfa-font-horizontal-scale"),
wsValue)) {
return wsValue.GetInteger();
}
while (pXMLNode) {
- CXFA_TextParseContext* pContext =
- (CXFA_TextParseContext*)m_mapXMLNodeToParseContext.GetValueAt(
- pXMLNode);
+ CXFA_TextParseContext* pContext = static_cast<CXFA_TextParseContext*>(
+ m_mapXMLNodeToParseContext.GetValueAt(pXMLNode));
if (pContext && pContext->m_pParentStyle &&
pContext->m_pParentStyle->GetCustomStyle(
FX_WSTRC(L"xfa-font-horizontal-scale"), wsValue)) {
@@ -417,7 +416,7 @@ int32_t CXFA_TextParser::GetHorScale(IXFA_TextProvider* pTextProvider,
}
}
if (CXFA_Font font = pTextProvider->GetFontNode()) {
- return (int32_t)font.GetHorizontalScale();
+ return static_cast<int32_t>(font.GetHorizontalScale());
}
return 100;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698