Kaydet (Commit) 7fd7b7af authored tarafından Andrzej Hunt's avatar Andrzej Hunt Kaydeden (comit) Michael Meeks

Introduce osl_areCommandArgsSet.

We cannot call osl_setCommandArgs twice, however there is currently
no way to determine whether or not this has already been done. This is
necessary e.g. for LibreOfficeKit where we may also be using UNO
separately (and also for unit tests where LO is already set-up prior
to the unit test running, and therefore we can't set up osl again
from within LOK).

Change-Id: Id1f357ef604eb2b6b7814c9a04ac6933a39fd3eb
üst e003e9a9
......@@ -366,6 +366,11 @@ SAL_DLLPUBLIC sal_uInt32 SAL_CALL osl_getCommandArgCount(void);
SAL_DLLPUBLIC oslProcessError SAL_CALL osl_getCommandArg(
sal_uInt32 nArg, rtl_uString **strCommandArg);
/** Determine whether or not the command args have already been set.
@return The command args are already set, and may not be set again.
*/
SAL_DLLPUBLIC int SAL_CALL osl_areCommandArgsSet (void);
/** Set the command-line arguments as passed to the main-function of this process.
Deprecated: This function is only for internal use. Passing the args from main will
......
......@@ -191,6 +191,11 @@ oslProcessError SAL_CALL osl_getCommandArg (sal_uInt32 nArg, rtl_uString ** strC
return (result);
}
int SAL_CALL osl_areCommandArgsSet (void)
{
return (g_command_args.m_nCount > 0);
}
/***************************************
osl_setCommandArgs().
**************************************/
......
......@@ -374,6 +374,12 @@ oslProcessError SAL_CALL osl_getCommandArg( sal_uInt32 nArg, rtl_uString **strCo
/***************************************************************************/
int SAL_CALL osl_areCommandArgsSet(void)
{
return (g_command_args.m_nCount > 0);
}
void SAL_CALL osl_setCommandArgs (int argc, char ** argv)
{
osl_acquireMutex (*osl_getGlobalMutex());
......
......@@ -675,6 +675,7 @@ LIBO_UDK_4.3 { # symbols available in >= LibO 4.3
osl_createDirectoryWithFlags;
rtl_allocateAlignedMemory;
rtl_freeAlignedMemory;
osl_areCommandArgsSet;
} LIBO_UDK_4.2;
PRIVATE_1.0 {
......
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