From a6e06bdbd3d22ce995c2bc8e4d2dd82a3854f1c4 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Sat, 28 Jan 2012 00:03:11 +0000 Subject: android: add debug hooks through app.cxx, comment chunks and add a dialog without the dialog, the main window never appears to get shown. --- desktop/source/app/app.cxx | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'desktop/source') diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 91c7531ef0e5..61018271bd5a 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -102,6 +102,8 @@ #include #endif +extern void VCL_DLLPUBLIC plasma_now(const char *msg); + #define DEFINE_CONST_UNICODE(CONSTASCII) UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII)) #define U2S(STRING) ::rtl::OUStringToOString(STRING, RTL_TEXTENCODING_UTF8) @@ -1503,12 +1505,16 @@ int Desktop::Main() ResMgr::SetReadStringHook( ReplaceStringHookProc ); +// ::plasma_now("after desktoppy bits"); - fine to here ... + // Startup screen RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main { OpenSplashScreen" ); OpenSplashScreen(); RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main } OpenSplashScreen" ); SetSplashScreenProgress(10); + +// ::plasma_now("after splash open"); { UserInstall::UserInstallError instErr_fin = UserInstall::finalize(); if ( instErr_fin != UserInstall::E_None) @@ -1536,6 +1542,8 @@ int Desktop::Main() { RegisterServices( xSMgr ); +// ::plasma_now("registered services"); + SetSplashScreenProgress(25); #ifndef UNX @@ -1580,6 +1588,8 @@ int Desktop::Main() if ( !InitializeConfiguration() ) return EXIT_FAILURE; +// ::plasma_now("init configuration"); + SetSplashScreenProgress(30); // set static variable to enabled/disable crash reporter @@ -1597,6 +1607,8 @@ int Desktop::Main() String aTitle = pLabelResMgr ? String( ResId( RID_APPTITLE, *pLabelResMgr ) ) : String(); delete pLabelResMgr; +// ::plasma_now("after title string"); + #ifdef DBG_UTIL //include version ID in non product builds ::rtl::OUString aDefault(RTL_CONSTASCII_USTRINGPARAM("development")); @@ -1613,6 +1625,8 @@ int Desktop::Main() SetSplashScreenProgress(40); RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create SvtPathOptions and SvtLanguageOptions" ); +// ::plasma_now("unrestricted folders"); -- got this. + // Check special env variable std::vector< String > aUnrestrictedFolders; svt::getUnrestrictedFolders( aUnrestrictedFolders ); @@ -1633,6 +1647,8 @@ int Desktop::Main() ( xSMgr->createInstance( DEFINE_CONST_UNICODE( "com.sun.star.frame.GlobalEventBroadcaster" ) ), UNO_QUERY ); + ::plasma_now("done global event broadcaster"); + /* ensure existance of a default window that messages can be dispatched to This is for the benefit of testtool which uses PostUserEvent extensively and else can deadlock while creating this window from another tread while @@ -1640,6 +1656,7 @@ int Desktop::Main() */ Application::GetDefaultDevice(); +#ifndef ANDROID // Check if bundled or shared extensions were added /removed // and process those extensions (has to be done before checking // the extension dependencies! @@ -1657,6 +1674,7 @@ int Desktop::Main() pExecGlobals->bRestartRequested = ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) ); Migration::migrateSettingsIfNecessary(); +#endif // keep a language options instance... pExecGlobals->pLanguageOptions.reset( new SvtLanguageOptions(sal_True)); @@ -1668,6 +1686,8 @@ int Desktop::Main() pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent); } + ::plasma_now("invoked OnStartupApp"); + SetSplashScreenProgress(50); // Backing Component @@ -1697,6 +1717,8 @@ int Desktop::Main() aMiscOptions.SetUseSystemFileDialog( sal_False ); } + ::plasma_now("nearly there !"); + if ( !pExecGlobals->bRestartRequested ) { if ((!rCmdLineArgs.WantsToLoadDocument() && !rCmdLineArgs.IsInvisible() && !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsQuickstart()) && @@ -1766,6 +1788,8 @@ int Desktop::Main() aOptions.SetVCLSettings(); SetSplashScreenProgress(60); + ::plasma_now("setup appearance !"); + if ( !pExecGlobals->bRestartRequested ) { Application::SetFilterHdl( LINK( this, Desktop, ImplInitFilterHdl ) ); @@ -1799,6 +1823,8 @@ int Desktop::Main() // Release solar mutex just before we wait for our client to connect int nAcquireCount = Application::ReleaseSolarMutex(); + ::plasma_now("wait client connect !"); + // Post user event to startup first application component window // We have to send this OpenClients message short before execute() to // minimize the risk that this message overtakes type detection contruction!! @@ -1817,6 +1843,8 @@ int Desktop::Main() // call Application::Execute to process messages in vcl message loop RTL_LOGFILE_PRODUCT_TRACE( "PERFORMANCE - enter Application::Execute()" ); + ::plasma_now("before java foo !"); + try { // The JavaContext contains an interaction handler which is used when @@ -1832,6 +1860,15 @@ int Desktop::Main() // if this run of the office is triggered by restart, some additional actions should be done DoRestartActionsIfNecessary( !rCmdLineArgs.IsInvisible() && !rCmdLineArgs.IsNoQuickstart() ); + ::plasma_now("pre hit execute!"); + + // For some reason we're not getting a desktop frame or component [odd] + ErrorBox aKickStartVCL( NULL, WB_OK, rtl::OUString::createFromAscii("Title!") ); + aKickStartVCL.SetText( rtl::OUString::createFromAscii("Foo") ); + aKickStartVCL.Execute(); + + ::plasma_now("hit execute!"); + Execute(); } } -- cgit From 755227bf6dd5d8061869e68f5c970780a5e3b53b Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 31 Jan 2012 17:32:09 +0000 Subject: android: get non-modal message dialog up, and continue to main app execute --- desktop/source/app/app.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'desktop/source') diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 61018271bd5a..966bebb5fa47 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1863,9 +1863,9 @@ int Desktop::Main() ::plasma_now("pre hit execute!"); // For some reason we're not getting a desktop frame or component [odd] - ErrorBox aKickStartVCL( NULL, WB_OK, rtl::OUString::createFromAscii("Title!") ); - aKickStartVCL.SetText( rtl::OUString::createFromAscii("Foo") ); - aKickStartVCL.Execute(); + ErrorBox aKickStartVCL( NULL, WB_OK, rtl::OUString::createFromAscii("My very own title!") ); + aKickStartVCL.SetText( rtl::OUString::createFromAscii("Delphic Utterance") ); + aKickStartVCL.Show(); // don't execute - just leave it lying around .... ::plasma_now("hit execute!"); -- cgit