summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-01-28 00:03:11 +0000
committerMichael Meeks <michael.meeks@suse.com>2012-01-28 00:04:56 +0000
commita6e06bdbd3d22ce995c2bc8e4d2dd82a3854f1c4 (patch)
treefb2c1dc4f7e6ddbf4136114ef4e185b9d77256a6 /desktop
parentf231418c5ba9bed32a4058ba0a9cdcfb16bb2ee4 (diff)
android: add debug hooks through app.cxx, comment chunks and add a dialog
without the dialog, the main window never appears to get shown.
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx37
1 files changed, 37 insertions, 0 deletions
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 <sys/wait.h>
#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();
}
}