summaryrefslogtreecommitdiff
path: root/scripting/source/runtimemgr
diff options
context:
space:
mode:
Diffstat (limited to 'scripting/source/runtimemgr')
-rw-r--r--scripting/source/runtimemgr/ScriptNameResolverImpl.cxx35
-rw-r--r--scripting/source/runtimemgr/ScriptNameResolverImpl.hxx3
-rw-r--r--[-rwxr-xr-x]scripting/source/runtimemgr/ScriptRuntimeManager.cxx21
-rw-r--r--scripting/source/runtimemgr/ScriptRuntimeManager.hxx3
-rw-r--r--scripting/source/runtimemgr/StorageBridge.cxx5
-rw-r--r--scripting/source/runtimemgr/StorageBridge.hxx3
-rw-r--r--scripting/source/runtimemgr/StorageBridgeFactory.cxx3
-rw-r--r--scripting/source/runtimemgr/StorageBridgeFactory.hxx3
8 files changed, 49 insertions, 27 deletions
diff --git a/scripting/source/runtimemgr/ScriptNameResolverImpl.cxx b/scripting/source/runtimemgr/ScriptNameResolverImpl.cxx
index ffb2a52d88..f76b9aff3c 100644
--- a/scripting/source/runtimemgr/ScriptNameResolverImpl.cxx
+++ b/scripting/source/runtimemgr/ScriptNameResolverImpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,10 +54,10 @@ namespace scripting_runtimemgr
{
const sal_Char* const LANGUAGE_TO_RESOLVE_ON[] = { "All" }; // should be configurable
-OUString nrs_implName = OUString::createFromAscii(
- "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" );
-OUString nrs_serviceName = OUString::createFromAscii(
- "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" );
+OUString nrs_implName(RTL_CONSTASCII_USTRINGPARAM(
+ "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" ));
+OUString nrs_serviceName(RTL_CONSTASCII_USTRINGPARAM(
+ "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" ));
Sequence< OUString > nrs_serviceNames = Sequence< OUString >( &nrs_serviceName, 1 );
const char* const SCRIPTSTORAGEMANAGER_SERVICE =
@@ -172,10 +173,10 @@ throw ( lang::IllegalArgumentException, script::CannotConvertException, RuntimeE
OSL_TRACE( "ScriptNameResolverImpl::resolve Starting..." );
- OUString docString = OUString::createFromAscii( "location=document" );
- OUString userString = OUString::createFromAscii( "location=user" );
- OUString shareString = OUString::createFromAscii( "location=share" );
- OUString filesysString = OUString::createFromAscii( "location=filesystem" );
+ OUString docString(RTL_CONSTASCII_USTRINGPARAM("location=document"));
+ OUString userString(RTL_CONSTASCII_USTRINGPARAM("location=user"));
+ OUString shareString(RTL_CONSTASCII_USTRINGPARAM("location=share"));
+ OUString filesysString(RTL_CONSTASCII_USTRINGPARAM("location=filesystem"));
// initialise vector with doc, user and share
@@ -221,8 +222,8 @@ throw ( lang::IllegalArgumentException, script::CannotConvertException, RuntimeE
throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
}
Reference< XInterface > xInterface = m_xMultiComFac->createInstanceWithContext(
- ::rtl::OUString::createFromAscii(
- "com.sun.star.ucb.SimpleFileAccess" ), m_xContext );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.ucb.SimpleFileAccess" )), m_xContext );
validateXRef( xInterface,
"ScriptProvider::initialise: cannot get SimpleFileAccess Service\n" );
Reference < ucb::XSimpleFileAccess > xSimpleFileAccess = Reference <
@@ -269,7 +270,7 @@ throw ( lang::IllegalArgumentException, script::CannotConvertException, RuntimeE
// b) an illegal location
// detect illegal location
- if ( scriptURI.indexOf( OUString::createFromAscii( "location=" ) ) != -1 )
+ if ( scriptURI.indexOf( OUString(RTL_CONSTASCII_USTRINGPARAM("location=")) ) != -1 )
{
OSL_TRACE(
"ScriptNameResolver::resolve, throwing IllegalArgException" );
@@ -431,7 +432,7 @@ SAL_THROW ( ( lang::IllegalArgumentException, css::security::AccessControlExcept
try
{
OUString permissionURI = docURI;
- OUString filesysString = OUString::createFromAscii( "location=filesystem" );
+ OUString filesysString(RTL_CONSTASCII_USTRINGPARAM("location=filesystem"));
if ( scriptURI.indexOf( filesysString ) != -1 )
{
// in the case of filesys scripts we're checking whether the
@@ -519,7 +520,7 @@ const ::rtl::OUString & permissionURI ) SAL_THROW ( ( RuntimeException, css::sec
Reference< XInterface > xInterface;
Any a = m_xContext->getValueByName(
- OUString::createFromAscii( SCRIPTSTORAGEMANAGER_SERVICE ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM( SCRIPTSTORAGEMANAGER_SERVICE )) );
if ( sal_False == ( a >>= xInterface ) )
{
throw RuntimeException(
@@ -540,7 +541,7 @@ const ::rtl::OUString & permissionURI ) SAL_THROW ( ( RuntimeException, css::sec
( sid != scriptingConstantsPool.SHARED_STORAGE_ID ) )
{
xScriptSecurity->checkPermission( permissionURI,
- OUString::createFromAscii( "execute" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("execute")) );
// if we get here, the checkPermission hasn't thrown an
// AccessControlException, ie. permission has been granted
OSL_TRACE( "ScriptNameResolverImpl::getStorageInstance: got execute permission for ID=%d", sid );
@@ -585,7 +586,7 @@ throw( lang::IllegalArgumentException )
{
OUString filePath;
OUString fileName;
- OUString filesysString = OUString::createFromAscii( "location=filesystem" );
+ OUString filesysString(RTL_CONSTASCII_USTRINGPARAM("location=filesystem"));
sal_Int32 locationPos = scriptURI.indexOf( filesysString );
// expect location=filesys:file:///foo/bar/myscript.bsh etc
// except the file url at this point is encoded
@@ -602,7 +603,7 @@ throw( lang::IllegalArgumentException )
endOfLocn - locationPos - filesysStrLen );
}
//file name shoul also be encoded so again ok to search for '&'
- OUString functionKey = OUString::createFromAscii( "function=" );
+ OUString functionKey(RTL_CONSTASCII_USTRINGPARAM("function="));
sal_Int32 functionKeyLength = functionKey.getLength();
sal_Int32 functionNamePos = scriptURI.indexOf( functionKey );
if ( functionNamePos > 0 )
@@ -658,3 +659,5 @@ OUString scriptnri_getImplementationName() SAL_THROW( () )
return nrs_implName;
}
} // namespace scripting_runtimemgr
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/scripting/source/runtimemgr/ScriptNameResolverImpl.hxx b/scripting/source/runtimemgr/ScriptNameResolverImpl.hxx
index ef52e47ebf..089b300a1b 100644
--- a/scripting/source/runtimemgr/ScriptNameResolverImpl.hxx
+++ b/scripting/source/runtimemgr/ScriptNameResolverImpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -108,3 +109,5 @@ private:
} // scripting_runtimemgr
#endif //_FRAMEWORK_SCRIPT_SCRIPTNAMERESOLVERIMPL_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/scripting/source/runtimemgr/ScriptRuntimeManager.cxx b/scripting/source/runtimemgr/ScriptRuntimeManager.cxx
index e23265364b..43d19c624f 100755..100644
--- a/scripting/source/runtimemgr/ScriptRuntimeManager.cxx
+++ b/scripting/source/runtimemgr/ScriptRuntimeManager.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_scripting.hxx"
-#ifndef _VCL_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
#include "ScriptExecDialog.hrc"
@@ -56,10 +55,10 @@ using namespace ::drafts::com::sun::star::script::framework;
namespace scripting_runtimemgr
{
-static OUString s_implName = ::rtl::OUString::createFromAscii(
- "drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager" );
-static OUString s_serviceName = ::rtl::OUString::createFromAscii(
- "drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager" );
+static OUString s_implName(RTL_CONSTASCII_USTRINGPARAM(
+ "drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager" ));
+static OUString s_serviceName(RTL_CONSTASCII_USTRINGPARAM(
+ "drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager" ));
static Sequence< OUString > s_serviceNames = Sequence< OUString >( &s_serviceName, 1 );
::rtl_StandardModuleCount s_moduleCount = MODULE_COUNT_INIT;
@@ -144,8 +143,8 @@ throw( RuntimeException )
try
{
Reference< XInterface > xInterface = m_xMgr->createInstanceWithContext(
- OUString::createFromAscii(
- "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" )),
m_xContext );
validateXRef( xInterface,
"ScriptRuntimeManager::GetScriptRuntime: cannot get instance of DefaultScriptNameResolver" );
@@ -226,8 +225,8 @@ Any SAL_CALL ScriptRuntimeManager::invoke(
aOutParamIndex, aOutParam );
// need to dispose of filesystem storage
- OUString filesysString = OUString::createFromAscii(
- "location=filesystem" );
+ OUString filesysString(RTL_CONSTASCII_USTRINGPARAM(
+ "location=filesystem" ));
if ( scriptURI.indexOf( filesysString ) != -1 )
{
Any a = m_xContext->getValueByName(
@@ -502,3 +501,5 @@ extern "C"
pRegistryKey, ::scripting_runtimemgr::s_entries );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/scripting/source/runtimemgr/ScriptRuntimeManager.hxx b/scripting/source/runtimemgr/ScriptRuntimeManager.hxx
index 6bd25f5d04..9f97f00bda 100644
--- a/scripting/source/runtimemgr/ScriptRuntimeManager.hxx
+++ b/scripting/source/runtimemgr/ScriptRuntimeManager.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -147,3 +148,5 @@ private:
} // scripting_runtimemgr
#endif //_FRAMEWORK_SCRIPT_SCRIPTRUNTIMEMANAGER_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/scripting/source/runtimemgr/StorageBridge.cxx b/scripting/source/runtimemgr/StorageBridge.cxx
index 9a5105b576..cdb705122c 100644
--- a/scripting/source/runtimemgr/StorageBridge.cxx
+++ b/scripting/source/runtimemgr/StorageBridge.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,7 +82,7 @@ StorageBridge::initStorage() throw ( ::com::sun::star::uno::RuntimeException )
Reference< XInterface > temp;
Any a = m_xContext->getValueByName(
- OUString::createFromAscii( SCRIPTSTORAGEMANAGER_SERVICE ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM( SCRIPTSTORAGEMANAGER_SERVICE )) );
if ( sal_False == ( a >>= temp ) )
{
throw RuntimeException(
@@ -150,3 +151,5 @@ throw ( lang::IllegalArgumentException, RuntimeException )
return results;
}
}// namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/scripting/source/runtimemgr/StorageBridge.hxx b/scripting/source/runtimemgr/StorageBridge.hxx
index 54f3f8551b..7d0e0ca898 100644
--- a/scripting/source/runtimemgr/StorageBridge.hxx
+++ b/scripting/source/runtimemgr/StorageBridge.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -83,3 +84,5 @@ private:
}
#endif //_COM_SUN_STAR_SCRIPTING_STORAGEBRIDGE_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/scripting/source/runtimemgr/StorageBridgeFactory.cxx b/scripting/source/runtimemgr/StorageBridgeFactory.cxx
index 47fbdf22a6..9392eaf751 100644
--- a/scripting/source/runtimemgr/StorageBridgeFactory.cxx
+++ b/scripting/source/runtimemgr/StorageBridgeFactory.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,5 @@ StorageBridgeFactory::getStorageInstance( sal_Int32 sid )
return storage;
}
} //scripting_runtimemgr
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/scripting/source/runtimemgr/StorageBridgeFactory.hxx b/scripting/source/runtimemgr/StorageBridgeFactory.hxx
index 5e8dc69608..9631f9bb90 100644
--- a/scripting/source/runtimemgr/StorageBridgeFactory.hxx
+++ b/scripting/source/runtimemgr/StorageBridgeFactory.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,3 +57,5 @@ private:
};
} // scripting_runtimemgr
#endif //_FRAMEWORK_SCRIPT_NAMERESOLVER_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */