diff options
Diffstat (limited to 'sd/source/ui/unoidl/DrawController.cxx')
-rwxr-xr-x | sd/source/ui/unoidl/DrawController.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx index 230feabe956a..b0eac4990c50 100755 --- a/sd/source/ui/unoidl/DrawController.cxx +++ b/sd/source/ui/unoidl/DrawController.cxx @@ -29,6 +29,7 @@ #include "precompiled_sd.hxx" #include "DrawController.hxx" +#include "DrawDocShell.hxx" #include "DrawSubController.hxx" #include "sdpage.hxx" @@ -54,6 +55,7 @@ #include <svx/fmshell.hxx> #include <vos/mutex.hxx> #include <vcl/svapp.hxx> +#include <boost/shared_ptr.hpp> using namespace ::std; using ::rtl::OUString; @@ -164,6 +166,16 @@ void SAL_CALL DrawController::dispose (void) { mbDisposing = true; + boost::shared_ptr<ViewShell> pViewShell = mpBase->GetMainViewShell(); + if ( pViewShell ) + { + pViewShell->DeactivateCurrentFunction(); + DrawDocShell* pDocShell = pViewShell->GetDocSh(); + if ( pDocShell != NULL ) + pDocShell->SetDocShellFunction(0); + } + pViewShell.reset(); + // When the controller has not been detached from its view // shell, i.e. mpViewShell is not NULL, then tell PaneManager // and ViewShellManager to clear the shell stack. |