summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authorJun Fang <jun_fang@foxitsoftware.com>2015-12-01 12:03:21 +0800
committerJun Fang <jun_fang@foxitsoftware.com>2015-12-01 12:03:21 +0800
commitcd0e00a305479505b9c759e86bc8ebfd4ecdc4f4 (patch)
tree2bd81c35e2d77043fe3d1b98b8d041bafc37e9b5 /xfa
parentc46d0005880b24d38d9e7eab2f446e9724e93537 (diff)
downloadpdfium-cd0e00a305479505b9c759e86bc8ebfd4ecdc4f4.tar.xz
Use c++ style casts in CPWL_Color::CPWL_Color()
BUG=pdfium:281 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1481503002 .
Diffstat (limited to 'xfa')
-rw-r--r--xfa/src/fxfa/src/app/xfa_textlayout.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/xfa/src/fxfa/src/app/xfa_textlayout.cpp b/xfa/src/fxfa/src/app/xfa_textlayout.cpp
index 667fc11b4c..12e517de41 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;
}