summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_fffield.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-04-14 17:07:09 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-18 14:11:29 +0000
commit5f28b86694455e5ef37736b73fe17d2c271ac721 (patch)
tree46c93dd9028d12f813f56ad8d1b12fee818de7a4 /xfa/fxfa/app/xfa_fffield.h
parent0f9b0a9d72a46cf708866aebc5f1103087b3d2c2 (diff)
downloadpdfium-5f28b86694455e5ef37736b73fe17d2c271ac721.tar.xz
Use unique_ptr for m_pNormalWidget
Change-Id: I8f28171b55c625061bb047899dbfcd4a61004e09 Reviewed-on: https://pdfium-review.googlesource.com/4253 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/app/xfa_fffield.h')
-rw-r--r--xfa/fxfa/app/xfa_fffield.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/xfa/fxfa/app/xfa_fffield.h b/xfa/fxfa/app/xfa_fffield.h
index 0e9ac8661c..902a84ba08 100644
--- a/xfa/fxfa/app/xfa_fffield.h
+++ b/xfa/fxfa/app/xfa_fffield.h
@@ -7,6 +7,8 @@
#ifndef XFA_FXFA_APP_XFA_FFFIELD_H_
#define XFA_FXFA_APP_XFA_FFFIELD_H_
+#include <memory>
+
#include "xfa/fwl/cfwl_widget.h"
#include "xfa/fwl/ifwl_widgetdelegate.h"
#include "xfa/fxfa/cxfa_ffpageview.h"
@@ -64,7 +66,7 @@ class CXFA_FFField : public CXFA_FFWidget, public IFWL_WidgetDelegate {
virtual void SetFWLRect();
void SetFWLThemeProvider();
- CFWL_Widget* GetNormalWidget() { return m_pNormalWidget; }
+ CFWL_Widget* GetNormalWidget() { return m_pNormalWidget.get(); }
CFX_PointF FWLToClient(const CFX_PointF& point);
void LayoutCaption();
void RenderCaption(CFX_Graphics* pGS, CFX_Matrix* pMatrix = nullptr);
@@ -89,7 +91,7 @@ class CXFA_FFField : public CXFA_FFWidget, public IFWL_WidgetDelegate {
int32_t iCapPlacement);
void SetEditScrollOffset();
- CFWL_Widget* m_pNormalWidget;
+ std::unique_ptr<CFWL_Widget> m_pNormalWidget;
CFX_RectF m_rtUI;
CFX_RectF m_rtCaption;
};