summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-06-10 08:12:11 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-06-10 08:12:11 +0000
commit143a50d2dac7e938098c351ebfa1faff413fc31e (patch)
treec0a1cd8c99978c0244b37217eb9e06a6f31db102 /desktop
parentce3ca2bd0e9215cac676ac80fd0db54a989aae3a (diff)
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
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 9289c542611a..0442312537a5 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -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 ) );
}