diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-01-03 15:46:55 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-01-03 21:10:00 +0000 |
commit | c635c93c974db1c55032c36e81e98f3d214a249f (patch) | |
tree | 145a60ec7a1d43755e85e36890f73ba0e4625361 /xfa/fwl/theme/cfwl_widgettp.cpp | |
parent | 3cdcfeb04b5c496199d8c88ebd2402c3db4413ab (diff) | |
download | pdfium-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/theme/cfwl_widgettp.cpp')
-rw-r--r-- | xfa/fwl/theme/cfwl_widgettp.cpp | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp index 3867257e0c..2d61a4100d 100644 --- a/xfa/fwl/theme/cfwl_widgettp.cpp +++ b/xfa/fwl/theme/cfwl_widgettp.cpp @@ -24,20 +24,6 @@ #include "xfa/fxgraphics/cfx_path.h" #include "xfa/fxgraphics/cfx_shading.h" -namespace { - -const float kEdgeFlat = 2.0f; -const float kEdgeRaised = 2.0f; -const float kEdgeSunken = 2.0f; -const float kLineHeight = 12.0f; -const float kScrollBarWidth = 17.0f; -const float kCXBorder = 1.0f; -const float kCYBorder = 1.0f; - -#define FWLTHEME_CAPACITY_TextSelColor (ArgbEncode(255, 153, 193, 218)) - -} // namespace - bool CFWL_WidgetTP::IsValidWidget(CFWL_Widget* pWidget) { return false; } @@ -62,62 +48,6 @@ void CFWL_WidgetTP::DrawText(CFWL_ThemeText* pParams) { m_pTextOut->DrawLogicText(pParams->m_wsText.c_str(), iLen, pParams->m_rtPart); } -void* CFWL_WidgetTP::GetCapacity(CFWL_ThemePart* pThemePart, - CFWL_WidgetCapacity dwCapacity) { - switch (dwCapacity) { - case CFWL_WidgetCapacity::CXBorder: { - m_fValue = kCXBorder; - break; - } - case CFWL_WidgetCapacity::CYBorder: { - m_fValue = kCYBorder; - break; - } - case CFWL_WidgetCapacity::EdgeFlat: { - m_fValue = kEdgeFlat; - break; - } - case CFWL_WidgetCapacity::EdgeRaised: { - m_fValue = kEdgeRaised; - break; - } - case CFWL_WidgetCapacity::EdgeSunken: { - m_fValue = kEdgeSunken; - break; - } - case CFWL_WidgetCapacity::FontSize: { - m_fValue = FWLTHEME_CAPACITY_FontSize; - break; - } - case CFWL_WidgetCapacity::TextColor: { - m_dwValue = FWLTHEME_CAPACITY_TextColor; - return &m_dwValue; - } - case CFWL_WidgetCapacity::ScrollBarWidth: { - m_fValue = kScrollBarWidth; - break; - } - case CFWL_WidgetCapacity::Font: { - return m_pFDEFont; - } - case CFWL_WidgetCapacity::TextSelColor: { - m_dwValue = FWLTHEME_CAPACITY_TextSelColor; - return &m_dwValue; - } - case CFWL_WidgetCapacity::LineHeight: { - m_fValue = kLineHeight; - break; - } - case CFWL_WidgetCapacity::UIMargin: { - m_rtMargin.Set(0, 0, 0, 0); - return &m_rtMargin; - } - default: - return nullptr; - } - return &m_fValue; -} - void CFWL_WidgetTP::CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) { if (!pParams || !m_pTextOut) return; |