summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-03-05 08:47:27 +0000
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-03-05 08:48:21 +0000
commit60708af4a7ed48028cf3158d1101568aa5b0da81 (patch)
treea9960e6d5afb0cd4b68318d87dfea51b777ae29f /chart2
parent9ec55a085277e7ae98857edf64c425e35b73eab8 (diff)
Revert "tdf#99352: ensure ChartController is disposing its VclPtrs on DeInitVCL"
The original patch crashes charts on disposing, e.g. during the UI testing. This reverts commit 926c0d73e82bb1d5644c49fb95c56e241b6c8f34. Change-Id: I93cb5c41e3705a487d2547b55eac761c6952049c Reviewed-on: https://gerrit.libreoffice.org/34900 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/main/ChartController.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 93798c016ab6..0322808af53a 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -79,7 +79,6 @@
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-
// this is needed to properly destroy the unique_ptr to the AcceleratorExecute
// object in the DTOR
#include <svtools/acceleratorexecute.hxx>
@@ -442,15 +441,15 @@ void SAL_CALL ChartController::attachFrame(
pParent = VCLUnoHelper::GetWindow( xContainerWindow ).get();
}
+ if(m_pChartWindow)
+ {
+ //@todo delete ...
+ m_pChartWindow->clear();
+ m_apDropTargetHelper.reset();
+ }
{
// calls to VCL
SolarMutexGuard aSolarGuard;
- if(m_pChartWindow)
- {
- //@todo delete ...
- m_pChartWindow->clear();
- m_apDropTargetHelper.reset();
- }
m_pChartWindow = VclPtr<ChartWindow>::Create(this,pParent,pParent?pParent->GetStyle():0);
m_pChartWindow->SetBackground();//no Background
m_xViewWindow.set( m_pChartWindow->GetComponentInterface(), uno::UNO_QUERY );
@@ -765,9 +764,7 @@ void ChartController::impl_deleteDrawViewController()
void SAL_CALL ChartController::dispose()
{
- SolarMutexGuard aSolarGuard;
m_bDisposed = true;
- m_pChartWindow.disposeAndClear();
if (getModel().is())
{
@@ -821,12 +818,15 @@ void SAL_CALL ChartController::dispose()
xViewBroadcaster->removeModeChangeListener(this);
impl_invalidateAccessible();
+ SolarMutexGuard aSolarGuard;
impl_deleteDrawViewController();
m_pDrawModelWrapper.reset();
m_apDropTargetHelper.reset();
//the accessible view is disposed within window destructor of m_pChartWindow
+ m_pChartWindow->clear();
+ m_pChartWindow = nullptr;//m_pChartWindow is deleted via UNO due to dispose of m_xViewWindow (triggered by Framework (Controller pretends to be XWindow also))
m_xViewWindow->dispose();
m_xChartView.clear();
}