diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2009-11-23 21:43:54 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2009-11-23 21:43:54 +0100 |
commit | 8a09f55aaede159defcb32f2ea2ae02ea3d5c4a0 (patch) | |
tree | e6f9d478fd00d30f17f3af3f33640cc5be8fcd2e | |
parent | ac9a1cd44c34c7692b5c0ffb36f21d42420e80a7 (diff) |
[CWS autorecovery] #i65597# when reloading an SFX document, do this via UNO, not via internal methods.
In particular, do not re-use existing SfxTopFrames.
This implies slightly more flickering, but this should be bearable nowadays. The advantage is more
simplified code. Also, on the medium run, when UNO view factories are implemented for SFX documents,
the old approach would not have worked, anyway.
-rw-r--r-- | sd/source/ui/view/drviews3.cxx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 87374cce8c04..d6e25701fc96 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -101,9 +101,12 @@ #include <com/sun/star/drawing/framework/XControllerManager.hpp> #include <com/sun/star/drawing/framework/XConfigurationController.hpp> #include <com/sun/star/drawing/framework/XConfiguration.hpp> +#include <com/sun/star/frame/XFrame.hpp> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::drawing::framework; +using ::com::sun::star::frame::XFrame; +using ::com::sun::star::frame::XController; namespace sd { @@ -378,17 +381,15 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) try { + Reference< XFrame > xFrame( pFrame->GetFrame()->GetFrameInterface(), UNO_SET_THROW ); + // Save the current configuration of panes and views. Reference<XControllerManager> xControllerManager ( GetViewShellBase().GetController(), UNO_QUERY_THROW); Reference<XConfigurationController> xConfigurationController ( - xControllerManager->getConfigurationController()); - if ( ! xConfigurationController.is()) - throw RuntimeException(); + xControllerManager->getConfigurationController(), UNO_QUERY_THROW ); Reference<XConfiguration> xConfiguration ( - xConfigurationController->getRequestedConfiguration()); - if ( ! xConfiguration.is()) - throw RuntimeException(); + xConfigurationController->getRequestedConfiguration(), UNO_SET_THROW ); SfxChildWindow* pWindow = pFrame->GetChildWindow(nId); if(pWindow) @@ -401,14 +402,12 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) // Normale Weiterleitung an ViewFrame zur Ausfuehrung GetViewFrame()->ExecuteSlot(rReq); - // From here on we must cope with this object already being + // From here on we must cope with this object and the frame already being // deleted. Do not call any methods or use data members. - ViewShellBase* pBase = ViewShellBase::GetViewShellBase(pFrame); - OSL_ASSERT(pBase!=NULL); + Reference<XController> xController( xFrame->getController(), UNO_SET_THROW ); // Restore the configuration. - xControllerManager = Reference<XControllerManager>( - pBase->GetController(), UNO_QUERY_THROW); + xControllerManager = Reference<XControllerManager>( xController, UNO_QUERY_THROW); xConfigurationController = Reference<XConfigurationController>( xControllerManager->getConfigurationController()); if ( ! xConfigurationController.is()) |