summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/querydesign/querycontainerwindow.cxx')
-rw-r--r--dbaccess/source/ui/querydesign/querycontainerwindow.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
index 7372ec724d2a..9aa8ba3d6494 100644
--- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
+++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
@@ -49,20 +49,24 @@ namespace dbaui
{
m_pViewSwitch = new OQueryViewSwitch( this, _rController, _rxContext );
- m_pSplitter = new Splitter(this,WB_VSCROLL);
+ m_pSplitter = VclPtr<Splitter>::Create(this,WB_VSCROLL);
m_pSplitter->Hide();
m_pSplitter->SetSplitHdl( LINK( this, OQueryContainerWindow, SplitHdl ) );
m_pSplitter->SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetDialogColor() ) );
}
OQueryContainerWindow::~OQueryContainerWindow()
{
+ disposeOnce();
+ }
+ void OQueryContainerWindow::dispose()
+ {
{
boost::scoped_ptr<OQueryViewSwitch> aTemp(m_pViewSwitch);
m_pViewSwitch = NULL;
}
if ( m_pBeamer )
::dbaui::notifySystemWindow(this,m_pBeamer,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
- m_pBeamer = NULL;
+ m_pBeamer.clear();
if ( m_xBeamer.is() )
{
Reference< ::com::sun::star::util::XCloseable > xCloseable(m_xBeamer,UNO_QUERY);
@@ -71,9 +75,8 @@ namespace dbaui
xCloseable->close(sal_False); // false - holds the ownership of this frame
}
- boost::scoped_ptr<vcl::Window> aTemp(m_pSplitter);
- m_pSplitter = NULL;
-
+ m_pSplitter.disposeAndClear();
+ ODataView::dispose();
}
bool OQueryContainerWindow::switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo )
{
@@ -171,7 +174,7 @@ namespace dbaui
{
if(!m_pBeamer)
{
- m_pBeamer = new OBeamer(this);
+ m_pBeamer = VclPtr<OBeamer>::Create(this);
::dbaui::notifySystemWindow(this,m_pBeamer,::comphelper::mem_fun(&TaskPaneList::AddWindow));