diff options
Diffstat (limited to 'xfa/fxfa')
-rw-r--r-- | xfa/fxfa/cxfa_fffield.cpp | 8 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_fffield.h | 1 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_ffimage.cpp | 9 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_ffimage.h | 1 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_ffimageedit.cpp | 7 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_ffimageedit.h | 1 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_ffpushbutton.cpp | 13 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_ffpushbutton.h | 1 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_ffwidget.cpp | 2 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_ffwidget.h | 1 |
10 files changed, 5 insertions, 39 deletions
diff --git a/xfa/fxfa/cxfa_fffield.cpp b/xfa/fxfa/cxfa_fffield.cpp index fe53da1a46..6f7aab899f 100644 --- a/xfa/fxfa/cxfa_fffield.cpp +++ b/xfa/fxfa/cxfa_fffield.cpp @@ -41,9 +41,7 @@ CXFA_FFField* ToField(CXFA_LayoutItem* widget) { CXFA_FFField::CXFA_FFField(CXFA_Node* pNode) : CXFA_FFWidget(pNode) {} -CXFA_FFField::~CXFA_FFField() { - CXFA_FFField::UnloadWidget(); -} +CXFA_FFField::~CXFA_FFField() = default; CFX_RectF CXFA_FFField::GetBBox(uint32_t dwStatus, bool bDrawFocus) { if (!bDrawFocus) @@ -133,10 +131,6 @@ bool CXFA_FFField::LoadWidget() { return true; } -void CXFA_FFField::UnloadWidget() { - m_pNormalWidget.reset(); -} - void CXFA_FFField::SetEditScrollOffset() { XFA_FFWidgetType eType = m_pNode->GetFFWidgetType(); if (eType != XFA_FFWidgetType::kTextEdit && diff --git a/xfa/fxfa/cxfa_fffield.h b/xfa/fxfa/cxfa_fffield.h index b51234a437..5b3251145b 100644 --- a/xfa/fxfa/cxfa_fffield.h +++ b/xfa/fxfa/cxfa_fffield.h @@ -31,7 +31,6 @@ class CXFA_FFField : public CXFA_FFWidget, public IFWL_WidgetDelegate { uint32_t dwStatus) override; bool IsLoaded() override; bool LoadWidget() override; - void UnloadWidget() override; bool PerformLayout() override; bool OnMouseEnter() override; bool OnMouseExit() override; diff --git a/xfa/fxfa/cxfa_ffimage.cpp b/xfa/fxfa/cxfa_ffimage.cpp index cb4990eb81..cc640cef3b 100644 --- a/xfa/fxfa/cxfa_ffimage.cpp +++ b/xfa/fxfa/cxfa_ffimage.cpp @@ -18,7 +18,7 @@ CXFA_FFImage::CXFA_FFImage(CXFA_Node* pNode) : CXFA_FFWidget(pNode) {} CXFA_FFImage::~CXFA_FFImage() { - CXFA_FFImage::UnloadWidget(); + GetNode()->SetImageImage(nullptr); } bool CXFA_FFImage::IsLoaded() { @@ -29,12 +29,7 @@ bool CXFA_FFImage::LoadWidget() { if (GetNode()->GetImageImage()) return true; - return GetNode()->LoadImageImage(GetDoc()) ? CXFA_FFWidget::LoadWidget() - : false; -} - -void CXFA_FFImage::UnloadWidget() { - GetNode()->SetImageImage(nullptr); + return GetNode()->LoadImageImage(GetDoc()) && CXFA_FFWidget::LoadWidget(); } void CXFA_FFImage::RenderWidget(CXFA_Graphics* pGS, diff --git a/xfa/fxfa/cxfa_ffimage.h b/xfa/fxfa/cxfa_ffimage.h index 9f289dce64..7859f106ba 100644 --- a/xfa/fxfa/cxfa_ffimage.h +++ b/xfa/fxfa/cxfa_ffimage.h @@ -20,7 +20,6 @@ class CXFA_FFImage : public CXFA_FFWidget { uint32_t dwStatus) override; bool IsLoaded() override; bool LoadWidget() override; - void UnloadWidget() override; }; #endif // XFA_FXFA_CXFA_FFIMAGE_H_ diff --git a/xfa/fxfa/cxfa_ffimageedit.cpp b/xfa/fxfa/cxfa_ffimageedit.cpp index c1d1a09bac..c80841f647 100644 --- a/xfa/fxfa/cxfa_ffimageedit.cpp +++ b/xfa/fxfa/cxfa_ffimageedit.cpp @@ -28,7 +28,7 @@ CXFA_FFImageEdit::CXFA_FFImageEdit(CXFA_Node* pNode) : CXFA_FFField(pNode), m_pOldDelegate(nullptr) {} CXFA_FFImageEdit::~CXFA_FFImageEdit() { - CXFA_FFImageEdit::UnloadWidget(); + m_pNode->SetImageEditImage(nullptr); } bool CXFA_FFImageEdit::LoadWidget() { @@ -51,11 +51,6 @@ bool CXFA_FFImageEdit::LoadWidget() { return true; } -void CXFA_FFImageEdit::UnloadWidget() { - m_pNode->SetImageEditImage(nullptr); - CXFA_FFField::UnloadWidget(); -} - void CXFA_FFImageEdit::RenderWidget(CXFA_Graphics* pGS, const CFX_Matrix& matrix, uint32_t dwStatus) { diff --git a/xfa/fxfa/cxfa_ffimageedit.h b/xfa/fxfa/cxfa_ffimageedit.h index 3359696b42..c2fd7f7f62 100644 --- a/xfa/fxfa/cxfa_ffimageedit.h +++ b/xfa/fxfa/cxfa_ffimageedit.h @@ -20,7 +20,6 @@ class CXFA_FFImageEdit : public CXFA_FFField { const CFX_Matrix& matrix, uint32_t dwStatus) override; bool LoadWidget() override; - void UnloadWidget() override; bool AcceptsFocusOnButtonDown(uint32_t dwFlags, const CFX_PointF& point, FWL_MouseCommand command) override; diff --git a/xfa/fxfa/cxfa_ffpushbutton.cpp b/xfa/fxfa/cxfa_ffpushbutton.cpp index 295422dcf3..0753a8349a 100644 --- a/xfa/fxfa/cxfa_ffpushbutton.cpp +++ b/xfa/fxfa/cxfa_ffpushbutton.cpp @@ -28,9 +28,7 @@ CXFA_FFPushButton::CXFA_FFPushButton(CXFA_Node* pNode, CXFA_Button* button) : CXFA_FFField(pNode), button_(button) {} -CXFA_FFPushButton::~CXFA_FFPushButton() { - CXFA_FFPushButton::UnloadWidget(); -} +CXFA_FFPushButton::~CXFA_FFPushButton() = default; void CXFA_FFPushButton::RenderWidget(CXFA_Graphics* pGS, const CFX_Matrix& matrix, @@ -88,15 +86,6 @@ void CXFA_FFPushButton::UpdateWidgetProperty() { m_pNormalWidget->ModifyStylesEx(dwStyleEx, 0xFFFFFFFF); } -void CXFA_FFPushButton::UnloadWidget() { - m_pRolloverTextLayout.reset(); - m_pDownTextLayout.reset(); - m_pRollProvider.reset(); - m_pDownProvider.reset(); - m_pOldDelegate = nullptr; - CXFA_FFField::UnloadWidget(); -} - bool CXFA_FFPushButton::PerformLayout() { CXFA_FFWidget::PerformLayout(); CFX_RectF rtWidget = GetRectWithoutRotate(); diff --git a/xfa/fxfa/cxfa_ffpushbutton.h b/xfa/fxfa/cxfa_ffpushbutton.h index 73308c0c8f..9c12daccbc 100644 --- a/xfa/fxfa/cxfa_ffpushbutton.h +++ b/xfa/fxfa/cxfa_ffpushbutton.h @@ -30,7 +30,6 @@ class CXFA_FFPushButton : public CXFA_FFField { const CFX_Matrix& matrix, uint32_t dwStatus) override; bool LoadWidget() override; - void UnloadWidget() override; bool PerformLayout() override; void UpdateWidgetProperty() override; void OnProcessMessage(CFWL_Message* pMessage) override; diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp index 55ae35de27..a81063b335 100644 --- a/xfa/fxfa/cxfa_ffwidget.cpp +++ b/xfa/fxfa/cxfa_ffwidget.cpp @@ -318,8 +318,6 @@ bool CXFA_FFWidget::LoadWidget() { return true; } -void CXFA_FFWidget::UnloadWidget() {} - bool CXFA_FFWidget::PerformLayout() { RecacheWidgetRect(); return true; diff --git a/xfa/fxfa/cxfa_ffwidget.h b/xfa/fxfa/cxfa_ffwidget.h index 419532d58c..f8d97dc551 100644 --- a/xfa/fxfa/cxfa_ffwidget.h +++ b/xfa/fxfa/cxfa_ffwidget.h @@ -93,7 +93,6 @@ class CXFA_FFWidget : public CXFA_ContentLayoutItem { uint32_t dwStatus); virtual bool IsLoaded(); virtual bool LoadWidget(); - virtual void UnloadWidget(); virtual bool PerformLayout(); virtual bool UpdateFWLData(); virtual void UpdateWidgetProperty(); |