summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2010-10-21 15:10:42 +0200
committerMathias Bauer <mba@openoffice.org>2010-10-21 15:10:42 +0200
commit14e356fa33c96e3175ed60937a4a4610b22de9f8 (patch)
treebdb4bc2af27c26a5ccb34f4ecd34bfe61a8f21c2 /dbaccess/source/ui
parent8579e2faea4c0a5082058aa4c4b039c3cfe8e25d (diff)
parent7fc0d537db56cc6cc29ba735468f2531ba225b11 (diff)
CWS changehid: resync to m90ooo/DEV300_m91
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r--dbaccess/source/ui/app/AppController.cxx19
-rw-r--r--dbaccess/source/ui/app/AppControllerGen.cxx3
2 files changed, 16 insertions, 6 deletions
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 001105bc1..b5e8aa501 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();
}
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index 7d2575220..70253590b 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -676,7 +676,8 @@ void OApplicationController::onDocumentOpened( const ::rtl::OUString& _rName, co
try
{
- m_pSubComponentManager->onSubComponentOpened( _rName, _nType, _eMode, _rxDefinition.is() ? _rxDefinition : _xDocument );
+ OSL_ENSURE( _xDocument.is(), "OApplicationController::onDocumentOpened: is there any *valid* scenario where this fails?" );
+ m_pSubComponentManager->onSubComponentOpened( _rName, _nType, _eMode, _xDocument.is() ? _xDocument : _rxDefinition );
if ( _rxDefinition.is() )
{