Kaydet (Commit) 5032455f authored tarafından Henry Castro's avatar Henry Castro

lok: rework use preInitBootstrap

Change-Id: Ifdba1eaf4cec448fe3284015c36ea7fd1b3440b0
üst 1bea5bf9
...@@ -894,7 +894,7 @@ static void aBasicErrorFunc(const OUString& rError, const OUString& rAction) ...@@ -894,7 +894,7 @@ static void aBasicErrorFunc(const OUString& rError, const OUString& rAction)
fprintf(stderr, "Unexpected basic error dialog '%s'\n", aBuffer.getStr()); fprintf(stderr, "Unexpected basic error dialog '%s'\n", aBuffer.getStr());
} }
static bool initialize_uno(const OUString& aAppProgramURL) static bool initialize_uno(const OUString& aAppProgramURL, bool bPreInit)
{ {
#ifdef IOS #ifdef IOS
// For iOS we already hardocde the inifile as "rc" in the .app directory. // For iOS we already hardocde the inifile as "rc" in the .app directory.
...@@ -903,6 +903,13 @@ static bool initialize_uno(const OUString& aAppProgramURL) ...@@ -903,6 +903,13 @@ static bool initialize_uno(const OUString& aAppProgramURL)
rtl::Bootstrap::setIniFilename(aAppProgramURL + "/" SAL_CONFIGFILE("soffice")); rtl::Bootstrap::setIniFilename(aAppProgramURL + "/" SAL_CONFIGFILE("soffice"));
#endif #endif
if (bPreInit)
{
// pre-load all component libraries.
cppu::preInitBootstrap();
return true;
}
xContext = cppu::defaultBootstrap_InitialComponentContext(); xContext = cppu::defaultBootstrap_InitialComponentContext();
if (!xContext.is()) if (!xContext.is())
{ {
...@@ -966,11 +973,6 @@ static void lo_status_indicator_callback(void *data, comphelper::LibreOfficeKit: ...@@ -966,11 +973,6 @@ static void lo_status_indicator_callback(void *data, comphelper::LibreOfficeKit:
} }
} }
/// pre-load all C++ component factories and leak references to them.
static void forceLoadAllNativeComponents()
{
}
/// pre-load and parse all filter XML /// pre-load and parse all filter XML
static void forceLoadFilterXML() static void forceLoadFilterXML()
{ {
...@@ -1032,9 +1034,11 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char ...@@ -1032,9 +1034,11 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
{ {
SAL_INFO("lok", "Attempting to initalize UNO"); SAL_INFO("lok", "Attempting to initalize UNO");
if (!initialize_uno(aAppURL)) if (!initialize_uno(aAppURL, (eStage == PRE_INIT)))
return false; return false;
force_c_locale();
if (eStage != PRE_INIT)
force_c_locale();
// Force headless -- this is only for bitmap rendering. // Force headless -- this is only for bitmap rendering.
rtl::Bootstrap::set("SAL_USE_VCLPLUGIN", "svp"); rtl::Bootstrap::set("SAL_USE_VCLPLUGIN", "svp");
...@@ -1049,7 +1053,6 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char ...@@ -1049,7 +1053,6 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
if (eStage == PRE_INIT) if (eStage == PRE_INIT)
{ {
forceLoadAllNativeComponents();
forceLoadFilterXML(); forceLoadFilterXML();
} }
......
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