summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-03-05 16:47:51 +0000
committerKurt Zenker <kz@openoffice.org>2008-03-05 16:47:51 +0000
commitc17e3943f470b42555ee7be3b37dc7b1dd1f7e36 (patch)
tree8b2adc07095b68ddc962360babf52af0d25ece5d /desktop
parent68ffb2b9c695cda18b76fe0ae5eba580c401f640 (diff)
INTEGRATION: CWS aquavcl05_DEV300 (1.211.8); FILE MERGED
2008/02/18 12:03:18 pl 1.211.8.7: #i85963# no backing component if loading file 2008/02/14 21:39:04 pl 1.211.8.6: #i85963# StartCenter moved into backing component 2008/02/14 15:57:50 pl 1.211.8.5: RESYNC: (1.211-1.213); FILE MERGED 2008/02/12 09:38:15 pl 1.211.8.4: #i85963# no startup dlg if command line has an application already 2008/02/08 10:23:06 pl 1.211.8.3: #i85963# new startup dialog 2008/02/07 13:29:46 pl 1.211.8.2: #i67502# new INPUT_APPEVENT 2008/02/06 10:07:11 pl 1.211.8.1: #i67502# evaluate application event for SHOWDIALOG (sent in case no frame available)
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx43
1 files changed, 39 insertions, 4 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 0fdf735e8a26..5bb7510fefac 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: app.cxx,v $
*
- * $Revision: 1.215 $
+ * $Revision: 1.216 $
*
- * last change: $Author: obo $ $Date: 2008-02-27 10:28:25 $
+ * last change: $Author: kz $ $Date: 2008-03-05 17:47:51 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1768,7 +1768,8 @@ void Desktop::Main()
(pCmdLineArgs->IsEmptyOrAcceptOnly() ) &&
(SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SSTARTMODULE)) &&
(!bExistsRecoveryData ) &&
- (!bExistsSessionData )
+ (!bExistsSessionData ) &&
+ (!Application::AnyInput( INPUT_APPEVENT ) )
)
{
RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ create BackingComponent" );
@@ -2847,7 +2848,7 @@ void Desktop::OpenClients()
if ( xList->hasElements() || pArgs->IsServer() )
return;
- if ( pArgs->IsQuickstart() || pArgs->IsInvisible() || pArgs->IsBean() )
+ if ( pArgs->IsQuickstart() || pArgs->IsInvisible() || pArgs->IsBean() || Application::AnyInput( INPUT_APPEVENT ) )
// soffice was started as tray icon ...
return;
{
@@ -3103,6 +3104,40 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
displayCmdlineHelp();
}
#endif
+ else if ( rAppEvent.GetEvent() == "SHOWDIALOG" )
+ {
+ // ignore all errors here. It's clicking a menu entry only ...
+ // The user will try it again, in case nothing happens .-)
+ try
+ {
+ css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
+
+ com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >
+ xDesktop( xSMGR->createInstance( OUSTRING(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ),
+ ::com::sun::star::uno::UNO_QUERY );
+
+ // check provider ... we know it's weak reference only
+ if ( ! xDesktop.is())
+ return;
+
+ css::uno::Reference< css::util::XURLTransformer > xParser(xSMGR->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer"))), css::uno::UNO_QUERY_THROW);
+ css::util::URL aCommand;
+ if( rAppEvent.GetData().EqualsAscii( "PREFERENCES" ) )
+ aCommand.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:OptionsTreeDialog" ) );
+ else if( rAppEvent.GetData().EqualsAscii( "ABOUT" ) )
+ aCommand.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:About" ) );
+ if( aCommand.Complete.getLength() )
+ {
+ xParser->parseStrict(aCommand);
+
+ css::uno::Reference< css::frame::XDispatch > xDispatch = xDesktop->queryDispatch(aCommand, rtl::OUString(), 0);
+ if (xDispatch.is())
+ xDispatch->dispatch(aCommand, css::uno::Sequence< css::beans::PropertyValue >());
+ }
+ }
+ catch(const css::uno::Exception&)
+ {}
+ }
}
void Desktop::OpenSplashScreen()