From 39f7e8187da53962b481629dd4065709aa4c5991 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 20 Sep 2010 23:42:56 +0200 Subject: dba33j: #i114627# do not let the SubComponentManager manage reports executed for data display --- dbaccess/source/ui/app/AppController.cxx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'dbaccess/source/ui/app/AppController.cxx') diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index 9d659c26e7078..595d9b4128513 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -1789,7 +1789,7 @@ bool OApplicationController::onEntryDoubleClick( SvTreeListBox& _rTree ) } catch(const Exception&) { - OSL_ENSURE(0,"Could not open element!"); + DBG_UNHANDLED_EXCEPTION(); } } return false; // not handled @@ -1842,12 +1842,20 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const getContainer()->showPreview(NULL); } + bool isStandaloneDocument = false; switch ( _eType ) { case E_REPORT: + if ( _eOpenMode != E_OPEN_DESIGN ) + { + // reports which are opened in a mode other than design are no sub components of our application + // component, but standalone documents. + isStandaloneDocument = true; + } + // NO break! case E_FORM: { - if ( !m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode, xRet ) ) + if ( isStandaloneDocument || !m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode, xRet ) ) { ::std::auto_ptr< OLinkedDocumentsAccess > aHelper = getDocumentsAccess( _eType ); if ( !aHelper->isConnected() ) @@ -1856,7 +1864,8 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const Reference< XComponent > xDefinition; xRet = aHelper->open( _sName, xDefinition, _eOpenMode, _rAdditionalArguments ); - onDocumentOpened( _sName, _eType, _eOpenMode, xRet, xDefinition ); + if ( !isStandaloneDocument ) + onDocumentOpened( _sName, _eType, _eOpenMode, xRet, xDefinition ); } } break; @@ -2781,9 +2790,9 @@ void OApplicationController::containerFound( const Reference< XContainer >& _xCo _xContainer->addContainerListener(this); } } - catch(Exception) + catch(const Exception&) { - OSL_ENSURE(0,"Could not listener on the container!"); + DBG_UNHANDLED_EXCEPTION(); } } // ----------------------------------------------------------------------------- -- cgit