summaryrefslogtreecommitdiff
path: root/scripting/source/basprov
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2005-01-13 16:43:24 +0000
committerKurt Zenker <kz@openoffice.org>2005-01-13 16:43:24 +0000
commit583ab109bb5ec5a1cfb157d12e02bbedafed022b (patch)
tree969318e5dc22083357e4a3e6b962c0028a3c0e22 /scripting/source/basprov
parent565aefdc1102d72099d1d1a237229e57b2b51440 (diff)
INTEGRATION: CWS tbe15 (1.6.12); FILE MERGED
2004/12/03 16:24:19 tbe 1.6.12.1: #i38139# Tools/Macro/Run Macro freezes office when Basic macro is already running
Diffstat (limited to 'scripting/source/basprov')
-rw-r--r--scripting/source/basprov/basscript.cxx22
1 files changed, 19 insertions, 3 deletions
diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx
index 34373e3b1541..6b81db7b9b5f 100644
--- a/scripting/source/basprov/basscript.cxx
+++ b/scripting/source/basprov/basscript.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: basscript.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: rt $ $Date: 2004-10-22 14:03:16 $
+ * last change: $Author: kz $ $Date: 2005-01-13 17:43:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,6 +63,12 @@
#include "basscript.hxx"
#endif
+#ifndef _VOS_MUTEX_HXX_
+#include <vos/mutex.hxx>
+#endif
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
#ifndef _SBXCLASS_HXX
#include <svtools/sbx.hxx>
#endif
@@ -123,7 +129,17 @@ namespace basprov
// TODO: throw CannotConvertException
// TODO: check length of aOutParamIndex, aOutParam
- ::osl::MutexGuard aGuard( StarBASIC::GetGlobalMutex() );
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
+ if ( StarBASIC::IsRunning() )
+ {
+ throw provider::ScriptFrameworkErrorException(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Basic is already running!" ) ),
+ Reference< XInterface >(),
+ m_funcName,
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Basic" ) ),
+ provider::ScriptFrameworkErrorType::UNKNOWN );
+ }
Any aReturn;