diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-02-09 23:13:41 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-02-09 23:13:41 +0100 |
commit | ce04ad4d2a82e2e173c7e1053632fca1e7e354b6 (patch) | |
tree | d5698f3e84dc87165cf28cd73f06d032f38f9f27 /reportdesign/source | |
parent | 5f0d3499f04328f9419da976f7cb8552155a45ed (diff) |
autorecovery: disposing; be prepared for disposal of a not-yet-fully-constructed instance (happens e.g. when throwing during initialization)
Diffstat (limited to 'reportdesign/source')
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 36435f73eb90..cdaac3f601e2 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -368,11 +368,14 @@ void OReportController::disposing() { try { - ::boost::shared_ptr<OSectionWindow> pSectionWindow = getDesignView()->getMarkedSection(); + ::boost::shared_ptr<OSectionWindow> pSectionWindow; + if ( getDesignView() ) + pSectionWindow = getDesignView()->getMarkedSection(); if ( pSectionWindow ) pSectionWindow->getReportSection().deactivateOle(); getUndoMgr()->Clear(); // clear all undo redo things - listen(false); + if ( m_aReportModel ) + listen(false); m_pReportControllerObserver->Clear(); m_pReportControllerObserver->release(); } @@ -2616,16 +2619,6 @@ void OReportController::Notify(SfxBroadcaster & /* _rBc */, SfxHint const & _rHi ::boost::bind(&view::XSelectionChangeListener::selectionChanged,_1,boost::cref(aEvent))); } - // if (_rHint.ISA(SfxSimpleHint) - // && (static_cast< SfxSimpleHint const & >(_rHint).GetId() - // == SFX_HINT_COLORS_CHANGED)) - // { - // int dummy = 0; - // } - // if (m_pReportControllerObserver) - // { - // m_pReportControllerObserver->Notify(_rBc, _rHint); - // } } // ----------------------------------------------------------------------------- void OReportController::executeMethodWithUndo(USHORT _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun) |