| Index: xfa/fwl/basewidget/fwl_editimp.cpp
|
| diff --git a/xfa/fwl/basewidget/fwl_editimp.cpp b/xfa/fwl/basewidget/fwl_editimp.cpp
|
| index ae0b7bcc9fdfee656b4c02f869baf73bf967d7f7..104054f4e1fc06f948194f9b2df2342341b144a5 100644
|
| --- a/xfa/fwl/basewidget/fwl_editimp.cpp
|
| +++ b/xfa/fwl/basewidget/fwl_editimp.cpp
|
| @@ -203,7 +203,6 @@ CFWL_EditImp::CFWL_EditImp(const CFWL_WidgetImpProperties& properties,
|
| m_fVAlignOffset(0.0f),
|
| m_fScrollOffsetX(0.0f),
|
| m_fScrollOffsetY(0.0f),
|
| - m_pEdtEngine(nullptr),
|
| m_bLButtonDown(FALSE),
|
| m_nSelStart(0),
|
| m_nLimit(-1),
|
| @@ -223,7 +222,6 @@ CFWL_EditImp::CFWL_EditImp(const CFWL_WidgetImpProperties& properties,
|
| }
|
|
|
| CFWL_EditImp::~CFWL_EditImp() {
|
| - delete m_pEdtEngine;
|
| ClearRecord();
|
| }
|
|
|
| @@ -898,26 +896,27 @@ void CFWL_EditImp::On_TextChanged(CFDE_TxtEdtEngine* pEdit,
|
| LayoutScrollBar();
|
| Repaint(&rtTemp);
|
| }
|
| +
|
| void CFWL_EditImp::On_SelChanged(CFDE_TxtEdtEngine* pEdit) {
|
| CFX_RectF rtTemp;
|
| GetClientRect(rtTemp);
|
| Repaint(&rtTemp);
|
| }
|
| +
|
| FX_BOOL CFWL_EditImp::On_PageLoad(CFDE_TxtEdtEngine* pEdit,
|
| int32_t nPageIndex,
|
| int32_t nPurpose) {
|
| - CFDE_TxtEdtEngine* pEdtEngine = m_pEdtEngine;
|
| - IFDE_TxtEdtPage* pPage = pEdtEngine->GetPage(nPageIndex);
|
| + IFDE_TxtEdtPage* pPage = m_pEdtEngine->GetPage(nPageIndex);
|
| if (!pPage)
|
| return FALSE;
|
| pPage->LoadPage(nullptr, nullptr);
|
| return TRUE;
|
| }
|
| +
|
| FX_BOOL CFWL_EditImp::On_PageUnload(CFDE_TxtEdtEngine* pEdit,
|
| int32_t nPageIndex,
|
| int32_t nPurpose) {
|
| - CFDE_TxtEdtEngine* pEdtEngine = m_pEdtEngine;
|
| - IFDE_TxtEdtPage* pPage = pEdtEngine->GetPage(nPageIndex);
|
| + IFDE_TxtEdtPage* pPage = m_pEdtEngine->GetPage(nPageIndex);
|
| if (!pPage)
|
| return FALSE;
|
| pPage->UnloadPage(nullptr);
|
| @@ -1630,7 +1629,7 @@ void CFWL_EditImp::InitScrollBar(FX_BOOL bVert) {
|
|
|
| void CFWL_EditImp::InitEngine() {
|
| if (!m_pEdtEngine)
|
| - m_pEdtEngine = new CFDE_TxtEdtEngine;
|
| + m_pEdtEngine.reset(new CFDE_TxtEdtEngine);
|
| }
|
|
|
| FX_BOOL FWL_ShowCaret(IFWL_Widget* pWidget,
|
|
|