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

Unified Diff: xfa/fwl/core/ifwl_checkbox.cpp

Issue 2522663002: Remove the GetCaption dataprovider method (Closed)
Patch Set: Remove tooltip Created 4 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 | « xfa/fwl/core/cfwl_pushbutton.cpp ('k') | xfa/fwl/core/ifwl_datetimepicker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_checkbox.cpp
diff --git a/xfa/fwl/core/ifwl_checkbox.cpp b/xfa/fwl/core/ifwl_checkbox.cpp
index 04f367f7721edd15a4bff6e7c8dc13eea2b16d7e..4af7cc78fad36eee6cc690802572e07eb3553859 100644
--- a/xfa/fwl/core/ifwl_checkbox.cpp
+++ b/xfa/fwl/core/ifwl_checkbox.cpp
@@ -60,14 +60,10 @@ void IFWL_CheckBox::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) {
if (!m_pProperties->m_pDataProvider)
return;
- CFX_WideString wsCaption;
- m_pProperties->m_pDataProvider->GetCaption(this, wsCaption);
- if (wsCaption.GetLength() > 0) {
- CFX_SizeF sz = CalcTextSize(
- wsCaption, m_pProperties->m_pThemeProvider,
- !!(m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CKB_MultiLine));
- rect.Set(0, 0, sz.x, sz.y);
- }
+ CFX_SizeF sz = CalcTextSize(
+ L"Check box", m_pProperties->m_pThemeProvider,
+ !!(m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CKB_MultiLine));
+ rect.Set(0, 0, sz.x, sz.y);
rect.Inflate(kCaptionMargin, kCaptionMargin);
IFWL_CheckBox::DataProvider* pData =
@@ -124,11 +120,6 @@ void IFWL_CheckBox::DrawWidget(CFX_Graphics* pGraphics,
if (!m_pProperties->m_pDataProvider)
return;
- CFX_WideString wsCaption;
- m_pProperties->m_pDataProvider->GetCaption(this, wsCaption);
- if (wsCaption.GetLength() <= 0)
- return;
-
CFWL_ThemeText textParam;
textParam.m_pWidget = this;
textParam.m_iPart = CFWL_Part::Caption;
@@ -137,7 +128,7 @@ void IFWL_CheckBox::DrawWidget(CFX_Graphics* pGraphics,
if (pMatrix)
textParam.m_matrix.Concat(*pMatrix);
textParam.m_rtPart = m_rtCaption;
- textParam.m_wsText = wsCaption;
+ textParam.m_wsText = L"Check box";
textParam.m_dwTTOStyles = m_dwTTOStyles;
textParam.m_iTTOAlign = m_iTTOAlign;
pTheme->DrawText(&textParam);
@@ -211,14 +202,7 @@ void IFWL_CheckBox::Layout() {
rtFocus.Set(m_rtCaption.left, m_rtCaption.top, m_rtCaption.width,
m_rtCaption.height);
- CFX_WideString wsCaption;
- m_pProperties->m_pDataProvider->GetCaption(this, wsCaption);
- if (wsCaption.IsEmpty()) {
- m_rtFocus.Set(0, 0, 0, 0);
- return;
- }
-
- CalcTextRect(wsCaption, m_pProperties->m_pThemeProvider, m_dwTTOStyles,
+ CalcTextRect(L"Check box", m_pProperties->m_pThemeProvider, m_dwTTOStyles,
m_iTTOAlign, rtFocus);
if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CKB_MultiLine) == 0) {
FX_FLOAT fWidth = std::max(m_rtCaption.width, rtFocus.width);
« no previous file with comments | « xfa/fwl/core/cfwl_pushbutton.cpp ('k') | xfa/fwl/core/ifwl_datetimepicker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698