summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-18 10:21:00 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-18 10:21:00 -0700
commit9b3656b8b49db7f228304aff9ffa599999199a0c (patch)
tree631b0f75045167298be00db2091c1334518ff920
parent7adef41ed27ced7e18ee649a3d4f27a3cc00c51f (diff)
downloadpdfium-9b3656b8b49db7f228304aff9ffa599999199a0c.tar.xz
Remove unused FWL Panel code.
This code was used to subclass Form only, the one method in Panel is overridden in Form. Review URL: https://codereview.chromium.org/1899743002
-rw-r--r--BUILD.gn3
-rw-r--r--xfa.gyp3
-rw-r--r--xfa/fwl/basewidget/fwl_comboboximp.cpp1
-rw-r--r--xfa/fwl/basewidget/fwl_datetimepickerimp.cpp1
-rw-r--r--xfa/fwl/basewidget/fwl_formproxyimp.cpp1
-rw-r--r--xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp1
-rw-r--r--xfa/fwl/core/fwl_formimp.cpp29
-rw-r--r--xfa/fwl/core/fwl_formimp.h7
-rw-r--r--xfa/fwl/core/fwl_noteimp.cpp1
-rw-r--r--xfa/fwl/core/fwl_panelimp.cpp34
-rw-r--r--xfa/fwl/core/fwl_panelimp.h27
-rw-r--r--xfa/fwl/core/ifwl_form.h4
-rw-r--r--xfa/fwl/core/ifwl_panel.h21
-rw-r--r--xfa/fwl/lightwidget/cfwl_tooltip.cpp1
14 files changed, 21 insertions, 113 deletions
diff --git a/BUILD.gn b/BUILD.gn
index a286d12c11..eede1bbd56 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1043,8 +1043,6 @@ if (pdf_enable_xfa) {
"xfa/fwl/core/fwl_formimp.h",
"xfa/fwl/core/fwl_noteimp.cpp",
"xfa/fwl/core/fwl_noteimp.h",
- "xfa/fwl/core/fwl_panelimp.cpp",
- "xfa/fwl/core/fwl_panelimp.h",
"xfa/fwl/core/fwl_sdadapterimp.cpp",
"xfa/fwl/core/fwl_sdadapterimp.h",
"xfa/fwl/core/fwl_targetimp.cpp",
@@ -1065,7 +1063,6 @@ if (pdf_enable_xfa) {
"xfa/fwl/core/ifwl_form.h",
"xfa/fwl/core/ifwl_notedriver.h",
"xfa/fwl/core/ifwl_noteloop.h",
- "xfa/fwl/core/ifwl_panel.h",
"xfa/fwl/core/ifwl_target.h",
"xfa/fwl/core/ifwl_themeprovider.h",
"xfa/fwl/core/ifwl_thread.h",
diff --git a/xfa.gyp b/xfa.gyp
index e2cedd08ed..6fdbf48d93 100644
--- a/xfa.gyp
+++ b/xfa.gyp
@@ -188,8 +188,6 @@
"xfa/fwl/core/fwl_formimp.h",
"xfa/fwl/core/fwl_noteimp.cpp",
"xfa/fwl/core/fwl_noteimp.h",
- "xfa/fwl/core/fwl_panelimp.cpp",
- "xfa/fwl/core/fwl_panelimp.h",
"xfa/fwl/core/fwl_sdadapterimp.cpp",
"xfa/fwl/core/fwl_sdadapterimp.h",
"xfa/fwl/core/fwl_targetimp.cpp",
@@ -210,7 +208,6 @@
"xfa/fwl/core/ifwl_form.h",
"xfa/fwl/core/ifwl_notedriver.h",
"xfa/fwl/core/ifwl_noteloop.h",
- "xfa/fwl/core/ifwl_panel.h",
"xfa/fwl/core/ifwl_target.h",
"xfa/fwl/core/ifwl_themeprovider.h",
"xfa/fwl/core/ifwl_thread.h",
diff --git a/xfa/fwl/basewidget/fwl_comboboximp.cpp b/xfa/fwl/basewidget/fwl_comboboximp.cpp
index f066436622..b7d85d3174 100644
--- a/xfa/fwl/basewidget/fwl_comboboximp.cpp
+++ b/xfa/fwl/basewidget/fwl_comboboximp.cpp
@@ -18,7 +18,6 @@
#include "xfa/fwl/core/fwl_appimp.h"
#include "xfa/fwl/core/fwl_formimp.h"
#include "xfa/fwl/core/fwl_noteimp.h"
-#include "xfa/fwl/core/fwl_panelimp.h"
#include "xfa/fwl/core/fwl_targetimp.h"
#include "xfa/fwl/core/fwl_threadimp.h"
#include "xfa/fwl/core/fwl_widgetimp.h"
diff --git a/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp b/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp
index 978fb619e2..d436c47374 100644
--- a/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp
+++ b/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp
@@ -14,7 +14,6 @@
#include "xfa/fwl/core/cfwl_themebackground.h"
#include "xfa/fwl/core/fwl_formimp.h"
#include "xfa/fwl/core/fwl_noteimp.h"
-#include "xfa/fwl/core/fwl_panelimp.h"
#include "xfa/fwl/core/fwl_targetimp.h"
#include "xfa/fwl/core/fwl_widgetimp.h"
#include "xfa/fwl/core/fwl_widgetmgrimp.h"
diff --git a/xfa/fwl/basewidget/fwl_formproxyimp.cpp b/xfa/fwl/basewidget/fwl_formproxyimp.cpp
index 27a608795b..b86f287cee 100644
--- a/xfa/fwl/basewidget/fwl_formproxyimp.cpp
+++ b/xfa/fwl/basewidget/fwl_formproxyimp.cpp
@@ -8,7 +8,6 @@
#include "xfa/fwl/core/fwl_formimp.h"
#include "xfa/fwl/core/fwl_noteimp.h"
-#include "xfa/fwl/core/fwl_panelimp.h"
#include "xfa/fwl/core/fwl_targetimp.h"
#include "xfa/fwl/core/fwl_widgetimp.h"
diff --git a/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp b/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp
index 97ead0e44c..3f5fccd0e9 100644
--- a/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp
+++ b/xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp
@@ -13,7 +13,6 @@
#include "xfa/fwl/core/cfwl_themetext.h"
#include "xfa/fwl/core/fwl_formimp.h"
#include "xfa/fwl/core/fwl_noteimp.h"
-#include "xfa/fwl/core/fwl_panelimp.h"
#include "xfa/fwl/core/fwl_targetimp.h"
#include "xfa/fwl/core/fwl_widgetimp.h"
#include "xfa/fwl/core/ifwl_themeprovider.h"
diff --git a/xfa/fwl/core/fwl_formimp.cpp b/xfa/fwl/core/fwl_formimp.cpp
index 3ed6eef95b..4e67670ad2 100644
--- a/xfa/fwl/core/fwl_formimp.cpp
+++ b/xfa/fwl/core/fwl_formimp.cpp
@@ -14,7 +14,6 @@
#include "xfa/fwl/core/cfwl_themetext.h"
#include "xfa/fwl/core/fwl_appimp.h"
#include "xfa/fwl/core/fwl_noteimp.h"
-#include "xfa/fwl/core/fwl_panelimp.h"
#include "xfa/fwl/core/fwl_targetimp.h"
#include "xfa/fwl/core/fwl_threadimp.h"
#include "xfa/fwl/core/fwl_widgetimp.h"
@@ -60,13 +59,13 @@ FWL_ERR IFWL_Form::SetBorderRegion(CFX_Path* pPath) {
CFWL_FormImp::CFWL_FormImp(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
- : CFWL_PanelImp(properties, pOuter),
- m_pCloseBox(NULL),
- m_pMinBox(NULL),
- m_pMaxBox(NULL),
- m_pCaptionBox(NULL),
- m_pNoteLoop(NULL),
- m_pSubFocus(NULL),
+ : CFWL_WidgetImp(properties, pOuter),
+ m_pCloseBox(nullptr),
+ m_pMinBox(nullptr),
+ m_pMaxBox(nullptr),
+ m_pCaptionBox(nullptr),
+ m_pNoteLoop(nullptr),
+ m_pSubFocus(nullptr),
m_fCXBorder(0),
m_fCYBorder(0),
m_iCaptureBtn(-1),
@@ -78,8 +77,8 @@ CFWL_FormImp::CFWL_FormImp(const CFWL_WidgetImpProperties& properties,
m_bCustomizeLayout(FALSE),
m_eFormSize(FWL_FORMSIZE_Manual),
m_bDoModalFlag(FALSE),
- m_pBigIcon(NULL),
- m_pSmallIcon(NULL),
+ m_pBigIcon(nullptr),
+ m_pSmallIcon(nullptr),
m_bMouseIn(FALSE) {
m_rtRelative.Reset();
m_rtCaption.Reset();
@@ -87,23 +86,27 @@ CFWL_FormImp::CFWL_FormImp(const CFWL_WidgetImpProperties& properties,
m_rtCaptionText.Reset();
m_rtIcon.Reset();
}
+
CFWL_FormImp::~CFWL_FormImp() {
RemoveSysButtons();
delete m_pNoteLoop;
}
+
FWL_ERR CFWL_FormImp::GetClassName(CFX_WideString& wsClass) const {
wsClass = FWL_CLASS_Form;
return FWL_ERR_Succeeded;
}
+
uint32_t CFWL_FormImp::GetClassID() const {
return FWL_CLASSHASH_Form;
}
+
FX_BOOL CFWL_FormImp::IsInstance(const CFX_WideStringC& wsClass) const {
- if (wsClass == CFX_WideStringC(FWL_CLASS_Form)) {
+ if (wsClass == CFX_WideStringC(FWL_CLASS_Form))
return TRUE;
- }
- return CFWL_PanelImp::IsInstance(wsClass);
+ return CFWL_WidgetImp::IsInstance(wsClass);
}
+
FWL_ERR CFWL_FormImp::Initialize() {
if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded)
return FWL_ERR_Indefinite;
diff --git a/xfa/fwl/core/fwl_formimp.h b/xfa/fwl/core/fwl_formimp.h
index b56a51b2da..4e419f8ffc 100644
--- a/xfa/fwl/core/fwl_formimp.h
+++ b/xfa/fwl/core/fwl_formimp.h
@@ -7,7 +7,6 @@
#ifndef XFA_FWL_CORE_FWL_FORMIMP_H_
#define XFA_FWL_CORE_FWL_FORMIMP_H_
-#include "xfa/fwl/core/fwl_panelimp.h"
#include "xfa/fwl/core/fwl_widgetimp.h"
#include "xfa/fwl/core/ifwl_form.h"
@@ -32,9 +31,8 @@ class CFWL_SysBtn {
m_dwState = 0;
}
- FX_BOOL IsHover() { return m_dwState & FWL_SYSBUTTONSTATE_Hover; }
- FX_BOOL IsPressed() { return m_dwState & FWL_SYSBUTTONSTATE_Pressed; }
FX_BOOL IsDisabled() { return m_dwState & FWL_SYSBUTTONSTATE_Disabled; }
+
void SetNormal() { m_dwState &= 0xFFF0; }
void SetPressed() {
SetNormal();
@@ -66,7 +64,7 @@ typedef struct RestoreResizeInfo {
CFX_SizeF m_szStart;
} RestoreInfo;
-class CFWL_FormImp : public CFWL_PanelImp {
+class CFWL_FormImp : public CFWL_WidgetImp {
public:
CFWL_FormImp(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter);
virtual ~CFWL_FormImp();
@@ -165,6 +163,7 @@ class CFWL_FormImp : public CFWL_PanelImp {
FX_BOOL m_bMouseIn;
friend class CFWL_FormImpDelegate;
};
+
class CFWL_FormImpDelegate : public CFWL_WidgetImpDelegate {
public:
CFWL_FormImpDelegate(CFWL_FormImp* pOwner);
diff --git a/xfa/fwl/core/fwl_noteimp.cpp b/xfa/fwl/core/fwl_noteimp.cpp
index 7de0465a1b..355531b407 100644
--- a/xfa/fwl/core/fwl_noteimp.cpp
+++ b/xfa/fwl/core/fwl_noteimp.cpp
@@ -12,7 +12,6 @@
#include "xfa/fwl/core/cfwl_message.h"
#include "xfa/fwl/core/fwl_appimp.h"
#include "xfa/fwl/core/fwl_formimp.h"
-#include "xfa/fwl/core/fwl_panelimp.h"
#include "xfa/fwl/core/fwl_targetimp.h"
#include "xfa/fwl/core/fwl_threadimp.h"
#include "xfa/fwl/core/fwl_widgetimp.h"
diff --git a/xfa/fwl/core/fwl_panelimp.cpp b/xfa/fwl/core/fwl_panelimp.cpp
deleted file mode 100644
index 29ff60634f..0000000000
--- a/xfa/fwl/core/fwl_panelimp.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#include "xfa/fwl/core/fwl_panelimp.h"
-
-#include "xfa/fwl/core/cfwl_widgetimpproperties.h"
-#include "xfa/fwl/core/fwl_noteimp.h"
-#include "xfa/fwl/core/fwl_targetimp.h"
-#include "xfa/fwl/core/fwl_widgetimp.h"
-#include "xfa/fwl/core/fwl_widgetmgrimp.h"
-#include "xfa/fwl/core/ifwl_panel.h"
-
-IFWL_Panel::IFWL_Panel() {}
-
-CFWL_PanelImp::CFWL_PanelImp(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter)
- : CFWL_WidgetImp(properties, pOuter) {}
-CFWL_PanelImp::~CFWL_PanelImp() {}
-FWL_ERR CFWL_PanelImp::GetClassName(CFX_WideString& wsClass) const {
- wsClass = FWL_CLASS_Panel;
- return FWL_ERR_Succeeded;
-}
-uint32_t CFWL_PanelImp::GetClassID() const {
- return FWL_CLASSHASH_Panel;
-}
-FWL_ERR CFWL_PanelImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) {
- if (!bAutoSize)
- rect = m_pProperties->m_rtWidget;
-
- return FWL_ERR_Succeeded;
-}
diff --git a/xfa/fwl/core/fwl_panelimp.h b/xfa/fwl/core/fwl_panelimp.h
deleted file mode 100644
index 34e236da1a..0000000000
--- a/xfa/fwl/core/fwl_panelimp.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef XFA_FWL_CORE_FWL_PANELIMP_H_
-#define XFA_FWL_CORE_FWL_PANELIMP_H_
-
-#include "xfa/fwl/core/fwl_widgetimp.h"
-
-class CFWL_WidgetImpProperties;
-class IFWL_Widget;
-class IFWL_Content;
-
-class CFWL_PanelImp : public CFWL_WidgetImp {
- public:
- CFWL_PanelImp(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter);
- virtual ~CFWL_PanelImp();
-
- virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const;
- virtual uint32_t GetClassID() const;
- virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE);
-};
-
-#endif // XFA_FWL_CORE_FWL_PANELIMP_H_
diff --git a/xfa/fwl/core/ifwl_form.h b/xfa/fwl/core/ifwl_form.h
index 0022759436..95cae64fa2 100644
--- a/xfa/fwl/core/ifwl_form.h
+++ b/xfa/fwl/core/ifwl_form.h
@@ -7,8 +7,8 @@
#ifndef XFA_FWL_CORE_IFWL_FORM_H_
#define XFA_FWL_CORE_IFWL_FORM_H_
-#include "xfa/fwl/core/ifwl_panel.h"
#include "xfa/fwl/core/ifwl_dataprovider.h"
+#include "xfa/fwl/core/ifwl_widget.h"
#include "core/fxcrt/include/fx_system.h"
#include "xfa/fwl/core/cfwl_widgetimpproperties.h"
@@ -66,7 +66,7 @@ class IFWL_FormDP : public IFWL_DataProvider {
virtual CFX_DIBitmap* GetIcon(IFWL_Widget* pWidget, FX_BOOL bBig) = 0;
};
-class IFWL_Form : public IFWL_Panel {
+class IFWL_Form : public IFWL_Widget {
public:
static IFWL_Form* CreateFormProxy(CFWL_WidgetImpProperties& properties,
CFX_WideString* classname,
diff --git a/xfa/fwl/core/ifwl_panel.h b/xfa/fwl/core/ifwl_panel.h
deleted file mode 100644
index 2261703b94..0000000000
--- a/xfa/fwl/core/ifwl_panel.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef XFA_FWL_CORE_IFWL_PANEL_H_
-#define XFA_FWL_CORE_IFWL_PANEL_H_
-
-#include "xfa/fwl/core/fwl_widgetimp.h"
-#include "xfa/fwl/core/ifwl_widget.h"
-
-#define FWL_CLASS_Panel L"FWL_Panel"
-#define FWL_CLASSHASH_Panel 881567292
-
-class IFWL_Panel : public IFWL_Widget {
- protected:
- IFWL_Panel();
-};
-
-#endif // XFA_FWL_CORE_IFWL_PANEL_H_
diff --git a/xfa/fwl/lightwidget/cfwl_tooltip.cpp b/xfa/fwl/lightwidget/cfwl_tooltip.cpp
index abdf48997c..2c16cfdc54 100644
--- a/xfa/fwl/lightwidget/cfwl_tooltip.cpp
+++ b/xfa/fwl/lightwidget/cfwl_tooltip.cpp
@@ -10,7 +10,6 @@
#include "xfa/fwl/core/fwl_formimp.h"
#include "xfa/fwl/core/fwl_noteimp.h"
-#include "xfa/fwl/core/fwl_panelimp.h"
#include "xfa/fwl/core/fwl_targetimp.h"
#include "xfa/fwl/core/fwl_threadimp.h"
#include "xfa/fwl/core/fwl_widgetimp.h"