INTEGRATION: CWS fwk05 (1.111.10); FILE MERGED

2003/06/03 12:02:02 lo 1.111.10.1: #110029# shut down again if OpenDefault() does not produce a valid component
This commit is contained in:
Vladimir Glazounov 2003-06-10 08:12:11 +00:00
parent ce3ca2bd0e
commit 143a50d2da

View file

@ -2,9 +2,9 @@
*
* $RCSfile: app.cxx,v $
*
* $Revision: 1.111 $
* $Revision: 1.112 $
*
* last change: $Author: vg $ $Date: 2003-05-22 08:51:28 $
* last change: $Author: vg $ $Date: 2003-06-10 09:12:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -1906,9 +1906,16 @@ void Desktop::OpenDefault()
Sequence < PropertyValue > aNoArgs;
Reference< XComponentLoader > xDesktop(
::comphelper::getProcessServiceFactory()->createInstance( OUSTRING(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ),
::comphelper::getProcessServiceFactory()->createInstance(
OUSTRING(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ),
::com::sun::star::uno::UNO_QUERY );
xDesktop->loadComponentFromURL( aName, ::rtl::OUString::createFromAscii( "_default" ), 0, aNoArgs );
Reference<XComponent> aComp = xDesktop->loadComponentFromURL(
aName, ::rtl::OUString::createFromAscii( "_default" ), 0, aNoArgs );
// shut down again if no component could be loaded
OSL_ENSURE(aComp.is(), "Desktop::OpenDesfault(), no component was loaded.");
if (!aComp.is())
Application::PostUserEvent( STATIC_LINK( 0, Desktop, AsyncTerminate ) );
}