summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_fwltheme.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-08-21 09:50:55 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-21 15:00:47 +0000
commit8c6dc95678810e3a054744a6a229606ac0d75134 (patch)
tree8aaaeeeb754884f868b66fa9ece3f2ffbe8d7857 /xfa/fxfa/cxfa_fwltheme.cpp
parent2f7653c0d8fe60f1a4956382dcb3d73822694dda (diff)
downloadpdfium-8c6dc95678810e3a054744a6a229606ac0d75134.tar.xz
Cleanup CFDE_TextOut
This CL cleans up formatting and simplifies logic in CFDE_TextOut. Change-Id: Ib675a35da79df77854f51e86bf24e5dc90b33b06 Reviewed-on: https://pdfium-review.googlesource.com/11334 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_fwltheme.cpp')
-rw-r--r--xfa/fxfa/cxfa_fwltheme.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/xfa/fxfa/cxfa_fwltheme.cpp b/xfa/fxfa/cxfa_fwltheme.cpp
index 67258c1868..ec0ce4586a 100644
--- a/xfa/fxfa/cxfa_fwltheme.cpp
+++ b/xfa/fxfa/cxfa_fwltheme.cpp
@@ -116,8 +116,8 @@ void CXFA_FWLTheme::DrawText(CFWL_ThemeText* pParams) {
mtPart.Concat(*pMatrix);
m_pTextOut->SetMatrix(mtPart);
- m_pTextOut->DrawLogicText(pRenderDevice, pParams->m_wsText.c_str(),
- pParams->m_wsText.GetLength(), pParams->m_rtPart);
+ m_pTextOut->DrawLogicText(pRenderDevice, pParams->m_wsText.AsStringC(),
+ pParams->m_rtPart);
return;
}
CXFA_FFWidget* pWidget = XFA_ThemeGetOuterWidget(pParams->m_pWidget);
@@ -141,8 +141,8 @@ void CXFA_FWLTheme::DrawText(CFWL_ThemeText* pParams) {
mtPart.Concat(*pMatrix);
m_pTextOut->SetMatrix(mtPart);
- m_pTextOut->DrawLogicText(pRenderDevice, pParams->m_wsText.c_str(),
- pParams->m_wsText.GetLength(), pParams->m_rtPart);
+ m_pTextOut->DrawLogicText(pRenderDevice, pParams->m_wsText.AsStringC(),
+ pParams->m_rtPart);
}
CFX_RectF CXFA_FWLTheme::GetUIMargin(CFWL_ThemePart* pThemePart) const {
@@ -231,8 +231,7 @@ void CXFA_FWLTheme::CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) {
m_pTextOut->SetTextColor(FWLTHEME_CAPACITY_TextColor);
m_pTextOut->SetAlignment(pParams->m_iTTOAlign);
m_pTextOut->SetStyles(pParams->m_dwTTOStyles);
- m_pTextOut->CalcLogicSize(pParams->m_wsText.c_str(),
- pParams->m_wsText.GetLength(), rect);
+ m_pTextOut->CalcLogicSize(pParams->m_wsText, rect);
}
CXFA_FFWidget* pWidget = XFA_ThemeGetOuterWidget(pParams->m_pWidget);
@@ -248,8 +247,7 @@ void CXFA_FWLTheme::CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) {
m_pTextOut->SetAlignment(pParams->m_iTTOAlign);
m_pTextOut->SetStyles(pParams->m_dwTTOStyles);
- m_pTextOut->CalcLogicSize(pParams->m_wsText.c_str(),
- pParams->m_wsText.GetLength(), rect);
+ m_pTextOut->CalcLogicSize(pParams->m_wsText, rect);
}
CFWL_WidgetTP* CXFA_FWLTheme::GetTheme(CFWL_Widget* pWidget) const {