summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_datetimepicker.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-01-03 15:46:55 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-01-03 21:10:00 +0000
commitc635c93c974db1c55032c36e81e98f3d214a249f (patch)
tree145a60ec7a1d43755e85e36890f73ba0e4625361 /xfa/fwl/cfwl_datetimepicker.cpp
parent3cdcfeb04b5c496199d8c88ebd2402c3db4413ab (diff)
downloadpdfium-c635c93c974db1c55032c36e81e98f3d214a249f.tar.xz
Remove the ::GetCapacity methods.
The GetCapacity methods return a void* because they return different types of internal class memory based on what the calling parameter was. This is confusing and makes it difficult to tell when then enum values can be removed. This CL removes GetCapacity and adds methods as needed to get the real values. Change-Id: I64c2edc858220624880e27f4ed49c2dae080f462 Reviewed-on: https://pdfium-review.googlesource.com/2137 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fwl/cfwl_datetimepicker.cpp')
-rw-r--r--xfa/fwl/cfwl_datetimepicker.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/xfa/fwl/cfwl_datetimepicker.cpp b/xfa/fwl/cfwl_datetimepicker.cpp
index 658cb036dc..861692f8e2 100644
--- a/xfa/fwl/cfwl_datetimepicker.cpp
+++ b/xfa/fwl/cfwl_datetimepicker.cpp
@@ -79,12 +79,12 @@ void CFWL_DateTimePicker::Update() {
m_pEdit->SetThemeProvider(m_pProperties->m_pThemeProvider);
m_rtClient = GetClientRect();
- FX_FLOAT* pFWidth = static_cast<FX_FLOAT*>(
- GetThemeCapacity(CFWL_WidgetCapacity::ScrollBarWidth));
- if (!pFWidth)
+
+ IFWL_ThemeProvider* theme = GetAvailableTheme();
+ if (!theme)
return;
- FX_FLOAT fBtn = *pFWidth;
+ FX_FLOAT fBtn = theme->GetScrollBarWidth();
m_rtBtn.Set(m_rtClient.right() - fBtn, m_rtClient.top, fBtn - 1,
m_rtClient.height - 1);
@@ -426,12 +426,11 @@ void CFWL_DateTimePicker::DisForm_Update() {
if (!m_pMonthCal->GetThemeProvider())
m_pMonthCal->SetThemeProvider(m_pProperties->m_pThemeProvider);
- FX_FLOAT* pWidth = static_cast<FX_FLOAT*>(
- GetThemeCapacity(CFWL_WidgetCapacity::ScrollBarWidth));
- if (!pWidth)
+ IFWL_ThemeProvider* theme = GetAvailableTheme();
+ if (!theme)
return;
- m_fBtn = *pWidth;
+ m_fBtn = theme->GetScrollBarWidth();
CFX_RectF rtMonthCal = m_pMonthCal->GetAutosizedWidgetRect();
CFX_RectF rtPopUp;
rtPopUp.Set(rtMonthCal.left, rtMonthCal.top + kDateTimePickerHeight,