diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-02-27 10:09:37 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-09 22:23:55 +0100 |
commit | 7fd0cd651dbca1df4ea94b949e9e8e5b0fab1830 (patch) | |
tree | d4bf9453da515e98ccbb97ca349905052a0ad148 /dbaccess | |
parent | 5800a27b9c4bb6d3c766d4f2e3960b42cabdc6df (diff) |
dbaccess: nail the last double-dispose issue breaking the test.
Change-Id: I861c970db9c36c973bcb2fa94a3e8e12f8de4f13
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.cxx | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppDetailPageHelper.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppDetailPageHelper.hxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dataview.cxx | 13 |
4 files changed, 11 insertions, 11 deletions
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index c7ea9f32d2d9..59c5c578290b 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -1505,6 +1505,7 @@ void SAL_CALL ODatabaseDocument::close( sal_Bool _bDeliverOwnership ) throw (Clo // SYNCHRONIZED -> { DocumentGuard aGuard(*this, DocumentGuard::DefaultMethod); + assert (!m_bClosing); m_bClosing = true; } // <- SYNCHRONIZED diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 9f264c4c8432..61a047e8809f 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -193,7 +193,6 @@ OAppDetailPageHelper::OAppDetailPageHelper(vcl::Window* _pParent,OAppBorderWindo ,m_aBorder(new Window(this,WB_BORDER | WB_READONLY)) ,m_aPreview(new OPreviewWindow(m_aBorder.get())) ,m_aDocumentInfo(new ::svtools::ODocumentInfoPreview(m_aBorder.get(), WB_LEFT | WB_VSCROLL | WB_READONLY) ) - ,m_pTablePreview(NULL) ,m_ePreviewMode(_ePreviewMode) { @@ -212,7 +211,7 @@ OAppDetailPageHelper::OAppDetailPageHelper(vcl::Window* _pParent,OAppBorderWindo m_aPreview->SetHelpId(HID_APP_VIEW_PREVIEW_1); - m_pTablePreview = new OTablePreviewWindow(m_aBorder.get(), WB_READONLY | WB_DIALOGCONTROL ); + m_pTablePreview.set( new OTablePreviewWindow(m_aBorder.get(), WB_READONLY | WB_DIALOGCONTROL ) ); m_pTablePreview->SetHelpId(HID_APP_VIEW_PREVIEW_2); m_aDocumentInfo->SetHelpId(HID_APP_VIEW_PREVIEW_3); @@ -259,6 +258,7 @@ void OAppDetailPageHelper::dispose() m_aTBPreview.disposeAndClear(); m_aPreview.disposeAndClear(); m_aDocumentInfo.disposeAndClear(); + m_pTablePreview.disposeAndClear(); m_aBorder.disposeAndClear(); m_aMenu.reset(); diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx index a9272fa22415..90de8ea493d1 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx @@ -84,8 +84,8 @@ namespace dbaui VclPtr<Window> m_aBorder; VclPtr<OPreviewWindow> m_aPreview; VclPtr<::svtools::ODocumentInfoPreview> - m_aDocumentInfo; - vcl::Window* m_pTablePreview; + m_aDocumentInfo; + VclPtr<vcl::Window> m_pTablePreview; ::std::unique_ptr<PopupMenu> m_aMenu; PreviewMode m_ePreviewMode; ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 > diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx index ab23fb28f627..5e617a1e19d8 100644 --- a/dbaccess/source/ui/browser/dataview.cxx +++ b/dbaccess/source/ui/browser/dataview.cxx @@ -65,10 +65,9 @@ namespace dbaui WinBits nStyle) :Window(pParent,nStyle) ,m_xContext(_rxContext) - ,m_rController( _rController ) + ,m_xController( &_rController ) ,m_aSeparator( new FixedLine(this) ) { - m_rController.acquire(); m_pAccel.reset(::svt::AcceleratorExecute::createAcceleratorHelper()); m_aSeparator->Show(); } @@ -84,7 +83,7 @@ namespace dbaui void ODataView::dispose() { - m_rController.release(); + m_xController.clear(); m_aSeparator.disposeAndClear(); m_pAccel.reset(); vcl::Window::dispose(); @@ -141,7 +140,7 @@ namespace dbaui case MouseNotifyEvent::KEYUP: case MouseNotifyEvent::MOUSEBUTTONDOWN: case MouseNotifyEvent::MOUSEBUTTONUP: - bHandled = m_rController.interceptUserInput( _rNEvt ); + bHandled = m_xController->interceptUserInput( _rNEvt ); break; default: break; @@ -155,7 +154,7 @@ namespace dbaui if ( nType == StateChangedType::CONTROLBACKGROUND ) { // Check if we need to get new images for normal/high contrast mode - m_rController.notifyHiContrastChanged(); + m_xController->notifyHiContrastChanged(); } if ( nType == StateChangedType::INITSHOW ) @@ -164,7 +163,7 @@ namespace dbaui // model's arguments. try { - Reference< XController > xController( m_rController.getXController(), UNO_SET_THROW ); + Reference< XController > xController( m_xController->getXController(), UNO_SET_THROW ); Reference< XModel > xModel( xController->getModel(), UNO_QUERY ); if ( xModel.is() ) { @@ -190,7 +189,7 @@ namespace dbaui (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) { // Check if we need to get new images for normal/high contrast mode - m_rController.notifyHiContrastChanged(); + m_xController->notifyHiContrastChanged(); } } void ODataView::attachFrame(const Reference< XFrame >& _xFrame) |