summaryrefslogtreecommitdiff
path: root/sal/osl
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-07-10 12:17:05 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-07-14 10:46:45 +0000
commit8ab5d9ccb68e3785cdcfdfe0bc6abc774d91bc55 (patch)
tree5e7048a8349c4967462a6046be4eabd30548af49 /sal/osl
parent85ad903b57d1d1362f0d9a64ca3de37606645dee (diff)
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 Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/10225 Reviewed-by: Matúš Kukan <matus.kukan@collabora.com> Reviewed-by: Zolnai Tamás <zolnaitamas2000@gmail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sal/osl')
-rw-r--r--sal/osl/unx/process_impl.cxx5
-rw-r--r--sal/osl/w32/process.cxx6
2 files changed, 11 insertions, 0 deletions
diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx
index d28f46d44138..b63f222ec15f 100644
--- a/sal/osl/unx/process_impl.cxx
+++ b/sal/osl/unx/process_impl.cxx
@@ -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().
**************************************/
diff --git a/sal/osl/w32/process.cxx b/sal/osl/w32/process.cxx
index 3dd0e77d57fc..25f4e58be7e4 100644
--- a/sal/osl/w32/process.cxx
+++ b/sal/osl/w32/process.cxx
@@ -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());