summaryrefslogtreecommitdiff
path: root/chart2/source/controller/dialogs/dlg_DataEditor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/dialogs/dlg_DataEditor.cxx')
-rw-r--r--chart2/source/controller/dialogs/dlg_DataEditor.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
index 502579f539af..4f4ce2f09230 100644
--- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
@@ -48,7 +48,7 @@ DataEditor::DataEditor(vcl::Window* pParent,
, m_xChartDoc(xChartDoc)
, m_xContext(xContext)
{
- m_xBrwData.reset(new DataBrowser(get<vcl::Window>("datawindow"), WB_BORDER | WB_TABSTOP, true /* bLiveUpdate */));
+ m_xBrwData.reset(VclPtr<DataBrowser>::Create(get<vcl::Window>("datawindow"), WB_BORDER | WB_TABSTOP, true /* bLiveUpdate */));
m_xBrwData->set_hexpand(true);
m_xBrwData->set_vexpand(true);
m_xBrwData->set_expand(true);
@@ -95,12 +95,20 @@ DataEditor::DataEditor(vcl::Window* pParent,
DataEditor::~DataEditor()
{
+ disposeOnce();
+}
+
+void DataEditor::dispose()
+{
notifySystemWindow( this, m_pTbxData, ::comphelper::mem_fun( & TaskPaneList::RemoveWindow ));
SvtMiscOptions aMiscOptions;
aMiscOptions.RemoveListenerLink( LINK( this, DataEditor, MiscHdl ) );
OSL_TRACE( "DataEditor: DTOR" );
+ m_pTbxData.clear();
+ m_xBrwData.disposeAndClear();
+ ModalDialog::dispose();
}
// react on click (or keypress) on toolbar icon