Kaydet (Commit) 12f68968 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Ifdefify temporary (?) Android hacks

üst 21858498
...@@ -102,7 +102,13 @@ ...@@ -102,7 +102,13 @@
#include <sys/wait.h> #include <sys/wait.h>
#endif #endif
#ifdef ANDROID
// mmeeks debugging stuff?
extern void VCL_DLLPUBLIC plasma_now(const char *msg); extern void VCL_DLLPUBLIC plasma_now(const char *msg);
#define PLASMA_NOW(s) plasma_now(s)
#else
#define PLASMA_NOW(s)
#endif
#define DEFINE_CONST_UNICODE(CONSTASCII) UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII)) #define DEFINE_CONST_UNICODE(CONSTASCII) UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII))
#define U2S(STRING) ::rtl::OUStringToOString(STRING, RTL_TEXTENCODING_UTF8) #define U2S(STRING) ::rtl::OUStringToOString(STRING, RTL_TEXTENCODING_UTF8)
...@@ -1472,7 +1478,7 @@ int Desktop::Main() ...@@ -1472,7 +1478,7 @@ int Desktop::Main()
ResMgr::SetReadStringHook( ReplaceStringHookProc ); ResMgr::SetReadStringHook( ReplaceStringHookProc );
// ::plasma_now("after desktoppy bits"); - fine to here ... // ::PLASMA_NOW("after desktoppy bits"); - fine to here ...
// Startup screen // Startup screen
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main { OpenSplashScreen" ); RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main { OpenSplashScreen" );
...@@ -1481,7 +1487,7 @@ int Desktop::Main() ...@@ -1481,7 +1487,7 @@ int Desktop::Main()
SetSplashScreenProgress(10); SetSplashScreenProgress(10);
// ::plasma_now("after splash open"); // ::PLASMA_NOW("after splash open");
{ {
UserInstall::UserInstallError instErr_fin = UserInstall::finalize(); UserInstall::UserInstallError instErr_fin = UserInstall::finalize();
if ( instErr_fin != UserInstall::E_None) if ( instErr_fin != UserInstall::E_None)
...@@ -1509,7 +1515,7 @@ int Desktop::Main() ...@@ -1509,7 +1515,7 @@ int Desktop::Main()
{ {
RegisterServices( xSMgr ); RegisterServices( xSMgr );
// ::plasma_now("registered services"); // ::PLASMA_NOW("registered services");
SetSplashScreenProgress(25); SetSplashScreenProgress(25);
...@@ -1555,7 +1561,7 @@ int Desktop::Main() ...@@ -1555,7 +1561,7 @@ int Desktop::Main()
if ( !InitializeConfiguration() ) if ( !InitializeConfiguration() )
return EXIT_FAILURE; return EXIT_FAILURE;
// ::plasma_now("init configuration"); // ::PLASMA_NOW("init configuration");
SetSplashScreenProgress(30); SetSplashScreenProgress(30);
...@@ -1574,7 +1580,7 @@ int Desktop::Main() ...@@ -1574,7 +1580,7 @@ int Desktop::Main()
String aTitle = pLabelResMgr ? String( ResId( RID_APPTITLE, *pLabelResMgr ) ) : String(); String aTitle = pLabelResMgr ? String( ResId( RID_APPTITLE, *pLabelResMgr ) ) : String();
delete pLabelResMgr; delete pLabelResMgr;
// ::plasma_now("after title string"); // ::PLASMA_NOW("after title string");
#ifdef DBG_UTIL #ifdef DBG_UTIL
//include version ID in non product builds //include version ID in non product builds
...@@ -1592,7 +1598,7 @@ int Desktop::Main() ...@@ -1592,7 +1598,7 @@ int Desktop::Main()
SetSplashScreenProgress(40); SetSplashScreenProgress(40);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create SvtPathOptions and SvtLanguageOptions" ); RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create SvtPathOptions and SvtLanguageOptions" );
// ::plasma_now("unrestricted folders"); -- got this. // ::PLASMA_NOW("unrestricted folders"); -- got this.
// Check special env variable // Check special env variable
std::vector< String > aUnrestrictedFolders; std::vector< String > aUnrestrictedFolders;
...@@ -1614,7 +1620,7 @@ int Desktop::Main() ...@@ -1614,7 +1620,7 @@ int Desktop::Main()
( xSMgr->createInstance( ( xSMgr->createInstance(
DEFINE_CONST_UNICODE( "com.sun.star.frame.GlobalEventBroadcaster" ) ), UNO_QUERY ); DEFINE_CONST_UNICODE( "com.sun.star.frame.GlobalEventBroadcaster" ) ), UNO_QUERY );
::plasma_now("done global event broadcaster"); ::PLASMA_NOW("done global event broadcaster");
/* ensure existance of a default window that messages can be dispatched to /* ensure existance of a default window that messages can be dispatched to
This is for the benefit of testtool which uses PostUserEvent extensively This is for the benefit of testtool which uses PostUserEvent extensively
...@@ -1653,7 +1659,7 @@ int Desktop::Main() ...@@ -1653,7 +1659,7 @@ int Desktop::Main()
pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent); pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent);
} }
::plasma_now("invoked OnStartupApp"); ::PLASMA_NOW("invoked OnStartupApp");
SetSplashScreenProgress(50); SetSplashScreenProgress(50);
...@@ -1684,7 +1690,7 @@ int Desktop::Main() ...@@ -1684,7 +1690,7 @@ int Desktop::Main()
aMiscOptions.SetUseSystemFileDialog( sal_False ); aMiscOptions.SetUseSystemFileDialog( sal_False );
} }
::plasma_now("nearly there !"); ::PLASMA_NOW("nearly there !");
if ( !pExecGlobals->bRestartRequested ) if ( !pExecGlobals->bRestartRequested )
{ {
...@@ -1755,7 +1761,7 @@ int Desktop::Main() ...@@ -1755,7 +1761,7 @@ int Desktop::Main()
aOptions.SetVCLSettings(); aOptions.SetVCLSettings();
SetSplashScreenProgress(60); SetSplashScreenProgress(60);
::plasma_now("setup appearance !"); ::PLASMA_NOW("setup appearance !");
if ( !pExecGlobals->bRestartRequested ) if ( !pExecGlobals->bRestartRequested )
{ {
...@@ -1790,7 +1796,7 @@ int Desktop::Main() ...@@ -1790,7 +1796,7 @@ int Desktop::Main()
// Release solar mutex just before we wait for our client to connect // Release solar mutex just before we wait for our client to connect
int nAcquireCount = Application::ReleaseSolarMutex(); int nAcquireCount = Application::ReleaseSolarMutex();
::plasma_now("wait client connect !"); ::PLASMA_NOW("wait client connect !");
// Post user event to startup first application component window // Post user event to startup first application component window
// We have to send this OpenClients message short before execute() to // We have to send this OpenClients message short before execute() to
...@@ -1810,7 +1816,7 @@ int Desktop::Main() ...@@ -1810,7 +1816,7 @@ int Desktop::Main()
// call Application::Execute to process messages in vcl message loop // call Application::Execute to process messages in vcl message loop
RTL_LOGFILE_PRODUCT_TRACE( "PERFORMANCE - enter Application::Execute()" ); RTL_LOGFILE_PRODUCT_TRACE( "PERFORMANCE - enter Application::Execute()" );
::plasma_now("before java foo !"); ::PLASMA_NOW("before java foo !");
try try
{ {
...@@ -1827,15 +1833,16 @@ int Desktop::Main() ...@@ -1827,15 +1833,16 @@ int Desktop::Main()
// if this run of the office is triggered by restart, some additional actions should be done // if this run of the office is triggered by restart, some additional actions should be done
DoRestartActionsIfNecessary( !rCmdLineArgs.IsInvisible() && !rCmdLineArgs.IsNoQuickstart() ); DoRestartActionsIfNecessary( !rCmdLineArgs.IsInvisible() && !rCmdLineArgs.IsNoQuickstart() );
::plasma_now("pre hit execute!"); #ifdef ANDROID
::PLASMA_NOW("pre hit execute!");
// For some reason we're not getting a desktop frame or component [odd] // For some reason we're not getting a desktop frame or component [odd]
ErrorBox aKickStartVCL( NULL, WB_OK, rtl::OUString::createFromAscii("My very own title!") ); ErrorBox aKickStartVCL( NULL, WB_OK, rtl::OUString::createFromAscii("My very own title!") );
aKickStartVCL.SetText( rtl::OUString::createFromAscii("Delphic Utterance") ); aKickStartVCL.SetText( rtl::OUString::createFromAscii("Delphic Utterance") );
aKickStartVCL.Show(); // don't execute - just leave it lying around .... aKickStartVCL.Show(); // don't execute - just leave it lying around ....
::plasma_now("hit execute!"); ::PLASMA_NOW("hit execute!");
#endif
Execute(); Execute();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment