diff options
author | Michael Stahl <mstahl@redhat.com> | 2011-11-02 13:21:14 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2011-11-02 13:21:14 +0100 |
commit | b2254d5d6fde8c28501e99e29bc824e935a25247 (patch) | |
tree | ba72aceccf0b8d36ae13bda11c30466d371d91b3 /sd | |
parent | d33e8d9bfecb7602b65b10d628c807e1ca2dccc2 (diff) |
rhbz#657394: sd::DocumentRenderer:
Closing an Impress document while it is printing results in the document
being destroyed, but the DocumentRenderer still retaining views that
contain SfxItemSets that reference the document's SfxItemPool.
Prevent the crash by retaining a SfxObjectShellRef.
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 9966f6c7b993..0e79d610ddc0 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -1198,13 +1198,14 @@ class DocumentRenderer::Implementation { public: Implementation (ViewShellBase& rBase) - : mrBase(rBase), - mbIsDisposed(false), - mpPrinter(NULL), - mpOptions(), - maPrinterPages(), - mpPrintView(), - mbHasOrientationWarningBeenShown(false) + : mxObjectShell(rBase.GetDocShell()) + , mrBase(rBase) + , mbIsDisposed(false) + , mpPrinter(NULL) + , mpOptions() + , maPrinterPages() + , mpPrintView() + , mbHasOrientationWarningBeenShown(false) { DialogCreator aCreator( mrBase.GetDocShell()->GetDocumentType() == DOCUMENT_TYPE_IMPRESS ); m_aUIProperties = aCreator.GetDialogControls(); @@ -1400,6 +1401,8 @@ public: private: + // rhbz#657394: keep the document alive: prevents crash when + SfxObjectShellRef mxObjectShell; // destroying mpPrintView ViewShellBase& mrBase; bool mbIsDisposed; Printer* mpPrinter; |