summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-10-03 12:59:03 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-03 18:22:21 +0200
commit7501beafa6d25e3f1aaf0fd0fa07e49d1692c14a (patch)
tree0bfcf1e80ac60295fd7005c9461037a2a103ead1 /scripting
parent777d6de361cca2ee0ba2b6d41952107e8d8c0307 (diff)
Dead code
Change-Id: Id851bacb21bbe289cebd635853f4d2028aed9f78
Diffstat (limited to 'scripting')
-rw-r--r--scripting/README5
-rw-r--r--scripting/source/runtimemgr/ScriptExecDialog.hrc19
-rw-r--r--scripting/source/runtimemgr/ScriptExecDialog.src27
-rw-r--r--scripting/source/runtimemgr/ScriptNameResolverImpl.cxx611
-rw-r--r--scripting/source/runtimemgr/ScriptNameResolverImpl.hxx103
-rw-r--r--scripting/source/runtimemgr/ScriptRuntimeManager.cxx466
-rw-r--r--scripting/source/runtimemgr/ScriptRuntimeManager.hxx142
-rw-r--r--scripting/source/runtimemgr/StorageBridge.cxx124
-rw-r--r--scripting/source/runtimemgr/StorageBridge.hxx78
-rw-r--r--scripting/source/runtimemgr/StorageBridgeFactory.cxx59
-rw-r--r--scripting/source/runtimemgr/StorageBridgeFactory.hxx51
-rw-r--r--scripting/source/runtimemgr/makefile.mk39
-rw-r--r--scripting/source/runtimemgr/runtimemgr.xml64
13 files changed, 0 insertions, 1788 deletions
diff --git a/scripting/README b/scripting/README
index 0a664ececb92..322b46c11290 100644
--- a/scripting/README
+++ b/scripting/README
@@ -61,8 +61,3 @@ Support for developing scripts in IDEs such as NetBeans.
- source/pyprov
LanguageScriptProvider for Python
-
-- source/storage
-- source/runtimemgr
-
-Implementations of deprecated Scripting Framework UNO types
diff --git a/scripting/source/runtimemgr/ScriptExecDialog.hrc b/scripting/source/runtimemgr/ScriptExecDialog.hrc
deleted file mode 100644
index 9085e1f4fa3e..000000000000
--- a/scripting/source/runtimemgr/ScriptExecDialog.hrc
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#define DLG_SCRIPTEXEC 1000
diff --git a/scripting/source/runtimemgr/ScriptExecDialog.src b/scripting/source/runtimemgr/ScriptExecDialog.src
deleted file mode 100644
index 047bae74791c..000000000000
--- a/scripting/source/runtimemgr/ScriptExecDialog.src
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "ScriptExecDialog.hrc"
-
-QueryBox DLG_SCRIPTEXEC
-{
- Buttons = WB_YES_NO ;
- DefButton = WB_DEF_YES ;
- Title = "Script execution" ;
- Message = "You are about to execute a script. Do you want to execute this script?" ;
-};
diff --git a/scripting/source/runtimemgr/ScriptNameResolverImpl.cxx b/scripting/source/runtimemgr/ScriptNameResolverImpl.cxx
deleted file mode 100644
index 5e7b571a0970..000000000000
--- a/scripting/source/runtimemgr/ScriptNameResolverImpl.cxx
+++ /dev/null
@@ -1,611 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-#include <vector>
-#include <stdlib.h>
-
-#include <cppuhelper/implementationentry.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/security/AccessControlException.hpp>
-#include <com/sun/star/ucb/SimpleFileAccess.hpp>
-#include <com/sun/star/ucb/XSimpleFileAccess2.hpp>
-
-#include <util/util.hxx>
-#include <util/scriptingconstants.hxx>
-
-#include <drafts/com/sun/star/script/framework/storage/XScriptStorageManager.hpp>
-#include <drafts/com/sun/star/script/framework/security/XScriptSecurity.hpp>
-
-#include "ScriptNameResolverImpl.hxx"
-#include "ScriptRuntimeManager.hxx"
-
-using namespace ::rtl;
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::drafts::com::sun::star::script::framework;
-
-namespace scripting_runtimemgr
-{
-
-const sal_Char* const LANGUAGE_TO_RESOLVE_ON[] = { "All" }; // should be configurable
-OUString nrs_implName(
- "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" );
-OUString nrs_serviceName(
- "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" );
-Sequence< OUString > nrs_serviceNames = Sequence< OUString >( &nrs_serviceName, 1 );
-
-const char* const SCRIPTSTORAGEMANAGER_SERVICE =
- "/singletons/drafts.com.sun.star.script.framework.storage.theScriptStorageManager";
-
-extern ::rtl_StandardModuleCount s_moduleCount;
-
-// define storages to search
-static ::std::vector< sal_Int32 >* m_pSearchIDs = NULL;
-
-//*************************************************************************
-ScriptNameResolverImpl::ScriptNameResolverImpl(
- const Reference< XComponentContext > & xContext ) :
- m_xContext( xContext, UNO_SET_THROW )
-{
- OSL_TRACE( "< ScriptNameResolverImpl ctor called >" );
- validateXRef( m_xContext, "ScriptNameResolverImpl::ScriptNameResolverImpl: invalid context" );
- m_xMultiComFac.set( m_xContext->getServiceManager(), UNO_SET_THROW );
-
- if( !m_pSearchIDs )
- {
- osl::Guard< osl::Mutex > aGuard( m_mutex );
- if( !m_pSearchIDs )
- {
- scripting_constants::ScriptingConstantsPool& scriptingConstantsPool =
- scripting_constants::ScriptingConstantsPool::instance();
- m_pSearchIDs = new ::std::vector< sal_Int32 >();
- m_pSearchIDs->push_back( scriptingConstantsPool.DOC_STORAGE_ID_NOT_SET );
- m_pSearchIDs->push_back( scriptingConstantsPool.USER_STORAGE_ID );
- m_pSearchIDs->push_back( scriptingConstantsPool.SHARED_STORAGE_ID );
- }
- }
-
- s_moduleCount.modCnt.acquire( &s_moduleCount.modCnt );
-}
-
-//*************************************************************************
-ScriptNameResolverImpl::~ScriptNameResolverImpl()
-{
- OSL_TRACE( "< ScriptNameResolverImpl dtor called >" );
- s_moduleCount.modCnt.release( &s_moduleCount.modCnt );
-}
-
-//*************************************************************************
-Reference< storage::XScriptInfo > ScriptNameResolverImpl::resolve(
-const ::rtl::OUString & scriptURI, Any& invocationCtx )
-throw ( lang::IllegalArgumentException, script::CannotConvertException, RuntimeException )
-{
-
- Reference< storage::XScriptInfo > resolvedName;
- Reference< beans::XPropertySet > xPropSetScriptingContext;
- scripting_constants::ScriptingConstantsPool& scriptingConstantsPool =
- scripting_constants::ScriptingConstantsPool::instance();
-
- OSL_TRACE( "ScriptNameResolverImpl::resolve: in resolve - start" );
-
- if ( sal_False == ( invocationCtx >>= xPropSetScriptingContext ) )
- {
- throw RuntimeException( OUSTR(
- "ScriptNameResolverImpl::resolve : unable to get XScriptingContext from param" ),
- Reference< XInterface > () );
- }
-
- Any any;
- OUString docUri;
- sal_Int32 filesysScriptStorageID = -1;
- Reference < storage::XScriptStorageManager > xScriptStorageMgr;
- sal_Int32 docSid;
- try
- {
- any = xPropSetScriptingContext->getPropertyValue(
- scriptingConstantsPool.DOC_URI );
- OSL_TRACE( "ScriptNameResolverImpl::resolve: in resolve - got anyUri" );
- if ( sal_False == ( any >>= docUri ) )
- {
- throw RuntimeException( OUSTR(
- "ScriptNameResolverImpl::resolve : unable to get doc Uri from xPropSetScriptingContext" ),
- Reference< XInterface > () );
- }
- any = xPropSetScriptingContext->getPropertyValue(
- scriptingConstantsPool.DOC_STORAGE_ID );
- if ( sal_False == ( any >>= docSid ) )
- {
- throw RuntimeException( OUSTR(
- "ScriptNameResolverImpl::resolve : unable to get doc storage id from xPropSetScriptingContext" ),
- Reference< XInterface > () );
- }
- }
- catch ( const Exception & e )
- {
- OUString temp = OUSTR(
- "ScriptNameResolverImpl::resolve : problem with getPropertyValue" );
- throw RuntimeException( temp.concat( e.Message ),
- Reference< XInterface > () );
- }
-#ifdef _DEBUG
- catch ( ... )
- {
- throw RuntimeException( OUSTR(
- "ScriptNameResolverImpl::resolve Unknown Exception caught - RuntimeException rethrown" ),
- Reference< XInterface > () );
- }
-#endif
-
-
- ::rtl::OString docUriO(
- ::rtl::OUStringToOString( docUri , RTL_TEXTENCODING_ASCII_US ) );
- OSL_TRACE(
- "ScriptNameResolverImpl::resolve: *** >>> DOC URI: %s, doc sid is %d\n",
- docUriO.pData->buffer, docSid );
-
-
- OSL_TRACE( "ScriptNameResolverImpl::resolve Starting..." );
- OUString docString("location=document");
- OUString userString("location=user");
- OUString shareString("location=share");
- OUString filesysString("location=filesystem");
-
- // initialise vector with doc, user and share
-
- // m_pSearchIDs is initialised as follows,
- // m_pSearchIDs [ 0 ] empty
- // m_pSearchIDs [ 1 ] user storage id
- // m_pSearchIDs [ 2 ] share " "
-
- ::std::vector< sal_Int32 > m_vSearchIDs = *m_pSearchIDs;
- m_vSearchIDs[ 0 ] = docSid;
-
- if ( scriptURI.indexOf( docString ) != -1 )
- {
- OSL_TRACE("Full resolution available, search document");
- // search in document
- m_vSearchIDs.resize( 1 );
- }
- else if ( scriptURI.indexOf( userString ) != -1 )
- {
- OSL_TRACE("Full resolution available, search user");
- // search in user
- m_vSearchIDs[ 0 ] = ( *m_pSearchIDs )[ 1 ];
- m_vSearchIDs.resize( 1 );
- }
- else if ( scriptURI.indexOf( shareString ) != -1 )
- {
- OSL_TRACE("Full resolution available, search share");
- // search in share
- m_vSearchIDs[ 0 ] = ( *m_pSearchIDs )[ 2 ];
- m_vSearchIDs.resize( 1 );
- }
- else if ( scriptURI.indexOf( filesysString ) != -1 )
- {
- OSL_TRACE("Full resolution available, create & search filesystem");
- OUString filesysURL;
- try
- {
- filesysURL = getFilesysURL( scriptURI );
- }
- catch ( const lang::IllegalArgumentException & e )
- {
- OUString temp = OUSTR( "ScriptNameResolverImpl::resolve: " );
- throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
- }
- Reference < ucb::XSimpleFileAccess2 > xSimpleFileAccess = ucb::SimpleFileAccess::create(m_xContext);
-
- // do we need to encode this? hope not.
- OSL_TRACE( ">>>> About to create storage for %s",
- ::rtl::OUStringToOString( filesysURL,
- RTL_TEXTENCODING_ASCII_US ).pData->buffer );
- // ask storage manager to create storage
- try
- {
- // need to get the ScriptStorageManager
- xScriptStorageMgr.set( m_xContext->getValueByName(
- scriptingConstantsPool.SCRIPTSTORAGEMANAGER_SERVICE ), UNO_QUERY_THROW );
- filesysScriptStorageID =
- xScriptStorageMgr->createScriptStorageWithURI(
- xSimpleFileAccess, filesysURL );
- OSL_TRACE( ">>>> Created storage %d - for %s ",
- filesysScriptStorageID, ::rtl::OUStringToOString(
- filesysURL, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
- }
- catch ( const RuntimeException & e )
- {
- OUString temp = OUSTR( "ScriptNameResolverImpl::resolve: " );
- throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
- }
- m_vSearchIDs[ 0 ] = filesysScriptStorageID;
- m_vSearchIDs.resize( 1 );
- }
- else
- {
- OSL_TRACE("Only partial uri available, search doc, user & share");
- // is this illegal or do we search in a default way
- // if we get to here a uri has been passed in that has:
- // a) not got a location specified
- // b) an illegal location
-
- // detect illegal location
- if ( scriptURI.indexOf( "location=" ) != -1 )
- {
- OSL_TRACE(
- "ScriptNameResolver::resolve, throwing IllegalArgException" );
- throw lang::IllegalArgumentException(
- OUSTR( "invalid URI: " ).concat( scriptURI ),
- Reference < XInterface > (), 1 );
-
- }
- // leave vSearchIDs take care of the search...
- }
-
- ::std::vector< sal_Int32 >::const_iterator iter;
- ::std::vector< sal_Int32 >::const_iterator iterEnd = m_vSearchIDs.end();
-
- for ( iter = m_vSearchIDs.begin() ; iter != iterEnd; ++iter )
- {
- try
- {
- OSL_TRACE( "** about to resolve from storage using id %d from vector of size %d",
- *iter, m_vSearchIDs.size() );
- if ( ( resolvedName = resolveURIFromStorageID( *iter, docUri, scriptURI ) ).is() )
- {
- OSL_TRACE( "found match in uri from storage %d", *iter );
- xPropSetScriptingContext->setPropertyValue(
- scriptingConstantsPool.RESOLVED_STORAGE_ID, makeAny(*iter) );
- break;
- }
-
- }
- catch ( css::security::AccessControlException & )
- {
- // no execute permission
- OSL_TRACE( "ScriptNameResolverImpl::resolve : AccessControlException " );
- continue;
- }
- catch ( const beans::UnknownPropertyException & e )
- {
- OUString temp = OUSTR(
- "ScriptNameResolverImpl::resolve : UnknownPropertyException" );
- throw RuntimeException( temp.concat( e.Message ),
- Reference< XInterface > () );
- }
- catch ( const beans::PropertyVetoException & e )
- {
- OUString temp = OUSTR(
- "ScriptNameResolverImpl::resolve : PropertyVetoException " );
- throw RuntimeException( temp.concat( e.Message ),
- Reference< XInterface > () );
- }
- catch ( const lang::IllegalArgumentException & e )
- {
- OUString temp = OUSTR(
- "ScriptNameResolverImpl::resolve : IllegalArgumentException " );
- throw lang::IllegalArgumentException( temp.concat( e.Message ),
- Reference< XInterface > (), e.ArgumentPosition );
- }
- catch ( const lang::WrappedTargetException & e )
- {
- OUString temp = OUSTR(
- "ScriptNameResolverImpl::resolve : WrappedTargetException " );
- throw RuntimeException( temp.concat( e.Message ),
- Reference< XInterface > () );
- }
- catch ( const Exception & e )
- {
- OSL_TRACE(
- "Exception thrown by storage %d, failed to match uri: %s",
- *iter,
- ::rtl::OUStringToOString( e.Message,
- RTL_TEXTENCODING_ASCII_US ).pData->buffer );
- OUString temp = OUSTR(
- "ScriptNameResolverImpl::resolve : unknown exception" );
- throw RuntimeException( temp.concat( e.Message ),
- Reference< XInterface > () );
- }
-#ifdef _DEBUG
- catch ( ... )
- {
- OSL_TRACE(
- "unknown exception thrown by storage %d, failed to match uri",
- *iter );
- OUString temp = OUSTR(
- "ScriptNameResolverImpl::resolve Unknown exception caught - RuntimeException rethrown" );
- throw RuntimeException( temp,
- Reference< XInterface > () );
- }
-#endif
-
- }
- if ( !resolvedName.is() )
- {
- if( filesysScriptStorageID > 2 )
- {
- // get the filesys storage and dispose of it
- Reference< XInterface > xScriptStorage( xScriptStorageMgr->getScriptStorage( filesysScriptStorageID ), UNO_SET_THROW );
- Reference< storage::XScriptInfoAccess > xScriptInfoAccess = Reference<
- storage::XScriptInfoAccess > ( xScriptStorage, UNO_QUERY_THROW );
- Sequence< Reference< storage::XScriptInfo > > results =
- xScriptInfoAccess->getAllImplementations( );
- Reference < lang::XEventListener > xEL_ScriptStorageMgr( xScriptStorageMgr ,UNO_QUERY_THROW );
- lang::EventObject event( results[ 0 ] );
- xEL_ScriptStorageMgr->disposing( event );
- }
- throw lang::IllegalArgumentException( OUSTR(
- "ScriptNameResolverImpl::resolve: no script found for uri=" ).concat( scriptURI ),
- Reference< XInterface > (), 0 );
- }
- return resolvedName;
-}
-
-//*************************************************************************
-OUString SAL_CALL
-ScriptNameResolverImpl::getImplementationName( )
-throw( RuntimeException )
-{
- return nrs_implName;
-}
-
-//*************************************************************************
-sal_Bool SAL_CALL
-ScriptNameResolverImpl::supportsService( const OUString& serviceName )
-throw( RuntimeException )
-{
- OUString const * pNames = nrs_serviceNames.getConstArray();
- for ( sal_Int32 nPos = nrs_serviceNames.getLength(); nPos--; )
- {
- if ( serviceName.equals( pNames[ nPos ] ) )
- {
- return sal_True;
- }
- }
- return sal_False;
-}
-
-//*************************************************************************
-
-Reference< storage::XScriptInfo >
-ScriptNameResolverImpl::resolveURIFromStorageID
-( sal_Int32 sid, const ::rtl::OUString & docURI,
- const ::rtl::OUString& scriptURI )
-SAL_THROW ( ( lang::IllegalArgumentException, css::security::AccessControlException, RuntimeException ) )
-{
- Reference< storage::XScriptInfo > resolvedScriptInfo;
- scripting_constants::ScriptingConstantsPool& scriptingConstantsPool =
- scripting_constants::ScriptingConstantsPool::instance();
- if ( sid == scriptingConstantsPool.DOC_STORAGE_ID_NOT_SET )
- {
- OSL_TRACE( "@@@@ **** ScriptNameResolverImpl::resolve DOC_STORAGE_ID_NOT_SET" );
- return resolvedScriptInfo;
- }
- try
- {
- OUString permissionURI = docURI;
- OUString filesysString("location=filesystem");
- if ( scriptURI.indexOf( filesysString ) != -1 )
- {
- // in the case of filesys scripts we're checking whether the
- // location of the script, rather than the location of the document,
- // has execute permission
- try
- {
- permissionURI = getFilesysURL( scriptURI );
- }
- catch ( const lang::IllegalArgumentException & e )
- {
- OUString temp = OUSTR( "ScriptNameResolverImpl::resolveFromURI: " );
- throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
- }
- }
- Reference< storage::XScriptInfoAccess > storage( getStorageInstance( sid, permissionURI ), UNO_SET_THROW );
- Sequence< Reference< storage::XScriptInfo > > results =
- storage->getImplementations( scriptURI );
-
- const sal_Int32 length = results.getLength();
-
- if ( !length )
- {
- return resolvedScriptInfo;
- }
-
- OSL_TRACE( "ScriptNameResolverImpl::resolve Got some results..." );
- // if we get results, just return first in list,
- // storage has already matched language, function name etc. if
- // that information was in the uri
- resolvedScriptInfo = results[ 0 ];
- }
- catch ( const css::security::AccessControlException & ace )
- {
- OUString temp = OUSTR(
- "ScriptRuntimeManager::resolveURIFromStorageID AccessControlException: " );
- throw css::security::AccessControlException( temp.concat( ace.Message ),
- Reference< XInterface > (),
- ace.LackingPermission );
- }
- catch ( const lang::IllegalArgumentException & iae )
- {
- OUString temp = OUSTR(
- "ScriptRuntimeManager::resolveURIFromStorageID IllegalArgumentException: " );
- throw lang::IllegalArgumentException( temp.concat( iae.Message ),
- Reference< XInterface > (),
- iae.ArgumentPosition );
- }
- catch ( const RuntimeException & re )
- {
- OUString temp = OUSTR(
- "ScriptRuntimeManager::resolveURIFromStorageID RuntimeException: " );
- throw RuntimeException( temp.concat( re.Message ),
- Reference< XInterface > () );
- }
- catch ( const Exception & e )
- {
- OUString temp = OUSTR(
- "ScriptNameResolverImpl::resolveURIFromStorageID : Exception caught - RuntimeException rethrown" );
- throw RuntimeException( temp.concat( e.Message ),
- Reference< XInterface > () );
- }
-#ifdef _DEBUG
- catch ( ... )
- {
- throw RuntimeException( OUSTR(
- "ScriptNameResolverImpl::resolveURIFromStorageID Unknown exception caught - RuntimeException rethrown" ),
- Reference< XInterface > () );
- }
-#endif
- return resolvedScriptInfo;
-}
-//*************************************************************************
-
-Reference< storage::XScriptInfoAccess >
-
-ScriptNameResolverImpl::getStorageInstance( sal_Int32 sid,
-const ::rtl::OUString & permissionURI ) SAL_THROW ( ( RuntimeException, css::security::AccessControlException, lang::IllegalArgumentException ) )
-{
- Reference< storage::XScriptInfoAccess > xScriptInfoAccess;
- try
- {
- Reference< XInterface > xInterface( m_xContext->getValueByName(
- OUString::createFromAscii( SCRIPTSTORAGEMANAGER_SERVICE ) ), UNO_QUERY_THROW );
- // check that we have permissions for this storage
- Reference< ::drafts::com::sun::star::script::framework::security::XScriptSecurity > xScriptSecurity( xInterface, UNO_QUERY_THROW );
- scripting_constants::ScriptingConstantsPool& scriptingConstantsPool =
- scripting_constants::ScriptingConstantsPool::instance();
- // if we dealing with a document storage (ie. not user or share
- // we need to check the permission
- if( ( sid != scriptingConstantsPool.USER_STORAGE_ID ) &&
- ( sid != scriptingConstantsPool.SHARED_STORAGE_ID ) )
- {
- xScriptSecurity->checkPermission( permissionURI,
- OUString("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 );
- }
- Reference< storage::XScriptStorageManager > xScriptStorageManager( xInterface, UNO_QUERY_THROW );
- Reference< XInterface > xScriptStorage( ScriptStorageManager->getScriptStorage( sid ), UNO_SET_THROW );
- xScriptInfoAccess.set( xScriptStorage, UNO_QUERY_THROW );
- }
- catch ( const lang::IllegalArgumentException & e )
- {
- OUString temp = OUSTR( "ScriptNameResolverImpl::getStorageInstance: " );
- throw lang::IllegalArgumentException( temp.concat( e.Message ),
- Reference< XInterface >(), e.ArgumentPosition );
- }
- catch ( const css::security::AccessControlException & e )
- {
- OUString temp = OUSTR( "ScriptNameResolverImpl::getStorageInstance: AccessControlException " );
- throw css::security::AccessControlException( temp.concat( e.Message ), Reference< XInterface >(), e.LackingPermission );
- }
- catch ( const RuntimeException & re )
- {
- OUString temp = OUSTR( "ScriptNameResolverImpl::getStorageInstance: " );
- throw RuntimeException( temp.concat( re.Message ), Reference< XInterface >() );
- }
- catch ( const Exception & e )
- {
- OUString temp = OUSTR( "ScriptNameResolverImpl::getStorageInstance: " );
- throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
- }
- return xScriptInfoAccess;
-}
-//*************************************************************************
-OUString
-ScriptNameResolverImpl::getFilesysURL( const OUString & scriptURI )
-throw( lang::IllegalArgumentException )
-{
- OUString filePath;
- OUString fileName;
- OUString filesysString("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
- // so we should be ok searching for the '&'
- sal_Int32 filesysStrLen = filesysString.getLength() + 1;
- sal_Int32 endOfLocn = scriptURI.indexOf( '&', locationPos );
- if (endOfLocn == -1 )
- {
- filePath = scriptURI.copy( locationPos + filesysString.getLength() + 1 );
- }
- else
- {
- filePath = scriptURI.copy( locationPos + filesysStrLen,
- endOfLocn - locationPos - filesysStrLen );
- }
- //file name shoul also be encoded so again ok to search for '&'
- OUString functionKey("function=");
- sal_Int32 functionKeyLength = functionKey.getLength();
- sal_Int32 functionNamePos = scriptURI.indexOf( functionKey );
- if ( functionNamePos > 0 )
- {
- sal_Int32 endOfFn = scriptURI.indexOf( '&', functionNamePos );
- if ( endOfFn == -1 )
- {
- fileName = scriptURI.copy( functionNamePos + functionKeyLength );
- }
- else
- {
- fileName = scriptURI.copy( functionNamePos + functionKeyLength,
- endOfFn - functionNamePos - functionKeyLength );
- }
- }
- else
- {
- // we need to throw
- OUString temp = OUSTR( "ScriptNameResolverImpl::getFilesysURL: error getting the filesysURL" );
- throw lang::IllegalArgumentException( temp, Reference< XInterface >(), 0 );
- }
- filePath+=fileName;
- OSL_TRACE( "ScriptNameResolverImpl::getFilesysURL: filesys URL = %s",
- ::rtl::OUStringToOString( filePath,
- RTL_TEXTENCODING_ASCII_US ).pData->buffer );
- return filePath;
-}
-//*************************************************************************
-Sequence<OUString> SAL_CALL
-ScriptNameResolverImpl::getSupportedServiceNames( )
-throw( RuntimeException )
-{
- return nrs_serviceNames;
-}
-
-//*************************************************************************
-Reference< XInterface > SAL_CALL scriptnri_create(
- Reference< XComponentContext > const & xComponentContext )
-SAL_THROW( ( Exception ) )
-{
- return ( cppu::OWeakObject * ) new ScriptNameResolverImpl( xComponentContext );
-}
-
-//*************************************************************************
-Sequence< OUString > scriptnri_getSupportedServiceNames() SAL_THROW(())
-{
- return nrs_serviceNames;
-}
-
-//*************************************************************************
-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
deleted file mode 100644
index 8bcc16cfb432..000000000000
--- a/scripting/source/runtimemgr/ScriptNameResolverImpl.hxx
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _FRAMEWORK_SCRIPT_SCRIPTNAMERESOLVERIMPL_HXX_
-#define _FRAMEWORK_SCRIPT_SCRIPTNAMERESOLVERIMPL_HXX_
-
-#include <cppuhelper/implbase1.hxx> // helper for XInterface, XTypeProvider etc.
-
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <com/sun/star/uno/RuntimeException.hpp>
-#include <com/sun/star/script/CannotConvertException.hpp>
-#include <com/sun/star/reflection/InvocationTargetException.hpp>
-
-#include <drafts/com/sun/star/script/framework/runtime/XScriptNameResolver.hpp>
-#include <drafts/com/sun/star/script/framework/storage/XScriptInfoAccess.hpp>
-#include <drafts/com/sun/star/script/framework/storage/XScriptInfo.hpp>
-
-namespace css = ::com::sun::star;
-
-namespace scripting_runtimemgr
-{
-
-class ScriptNameResolverImpl : public
- ::cppu::WeakImplHelper1 < ::drafts::com::sun::star::script::framework::runtime::XScriptNameResolver >
-{
-public:
- /**********************************************
- ScriptNameResolverImpl Constructor
- @param the current context
- */
- ScriptNameResolverImpl(
- const css::uno::Reference< css::uno::XComponentContext > & xContext );
- ~ScriptNameResolverImpl();
-
- // XServiceInfo implementation
- virtual ::rtl::OUString SAL_CALL getImplementationName()
- throw( css::uno::RuntimeException );
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
- throw( css::uno::RuntimeException );
- virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
- throw( css::uno::RuntimeException );
-
- /**********************************************
- resolve method
- @param scriptURI this is the given ScriptURI
- @param invocationCtx the invocation context contains the
- documentStorageID and document reference for use in script name
- resolving. On full name resolution it sets the resolvedScriptStorageID to
- the actual storage location of the fully resolved script. May or may not * be the
- same as the documentStorageID.
- @exception CannotResolveScriptNameException
- @exception IllegalArgumentException
- @exception NullPointerException
- @return the resolved XScriptURI
- */
- css::uno::Reference < ::drafts::com::sun::star::script::framework::storage::XScriptInfo > SAL_CALL resolve(
- const ::rtl::OUString & scriptURI,
- css::uno::Any& invocationCtx )
- throw( css::script::CannotConvertException, css::lang::IllegalArgumentException,
- css::uno::RuntimeException );
-private:
- css::uno::Reference < ::drafts::com::sun::star::script::framework::storage::XScriptInfo >
- resolveURIFromStorageID( sal_Int32 sid, const rtl::OUString & docURI,
- const ::rtl::OUString & nameToResolve )
- SAL_THROW ( ( css::lang::IllegalArgumentException, css::uno::RuntimeException ) );
- css::uno::Reference< ::drafts::com::sun::star::script::framework::storage::XScriptInfoAccess >
- getStorageInstance( sal_Int32 sid, const rtl::OUString & permissionURI)
- SAL_THROW ( ( css::uno::RuntimeException ) );
- ::rtl::OUString
- ScriptNameResolverImpl::getFilesysURL( const ::rtl::OUString & scriptURI )
- throw( css::lang::IllegalArgumentException );
-
- /**********************************************
- Reference< XComponentContext > m_xContext
- to obtain other services if needed
- */
- css::uno::Reference< css::uno::XComponentContext > m_xContext;
- css::uno::Reference< css::lang::XMultiComponentFactory > m_xMultiComFac;
- ::osl::Mutex m_mutex;
-
-};
-} // 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
deleted file mode 100644
index 59f432b93ab6..000000000000
--- a/scripting/source/runtimemgr/ScriptRuntimeManager.cxx
+++ /dev/null
@@ -1,466 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-#include <vcl/msgbox.hxx>
-
-#include "ScriptExecDialog.hrc"
-
-#include <util/scriptingconstants.hxx>
-
-#include <cppuhelper/implementationentry.hxx>
-#include <tools/diagnose_ex.h>
-
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/lang/XEventListener.hpp>
-#include <com/sun/star/lang/EventObject.hpp>
-
-#include "ScriptNameResolverImpl.hxx"
-#include "ScriptRuntimeManager.hxx"
-#include <util/util.hxx>
-#include <util/scriptingconstants.hxx>
-
-using namespace ::rtl;
-using namespace ::osl;
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::drafts::com::sun::star::script::framework;
-
-namespace scripting_runtimemgr
-{
-
-static OUString s_implName(
- "drafts.com.sun.star.script.framework.runtime.ScriptRuntimeManager" );
-static OUString s_serviceName(
- "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;
-
-//*************************************************************************
-// ScriptRuntimeManager Constructor
-ScriptRuntimeManager::ScriptRuntimeManager(
- const Reference< XComponentContext > & xContext ) :
- m_xContext( xContext, UNO_SET_THROW )
-{
- OSL_TRACE( "< ScriptRuntimeManager ctor called >" );
- m_xMgr.set( m_xContext->getServiceManager(), UNO_SET_THROW );
- s_moduleCount.modCnt.acquire( &s_moduleCount.modCnt );
- // test
- //scripting_securitymgr::ScriptSecurityManager ssm(xContext);
-}
-
-//*************************************************************************
-// ScriptRuntimeManager Destructor
-ScriptRuntimeManager::~ScriptRuntimeManager()
-{
- OSL_TRACE( "< ScriptRuntimeManager dtor called >" );
- s_moduleCount.modCnt.release( &s_moduleCount.modCnt );
-}
-
-//*************************************************************************
-// Get the proper XScriptInvocation
-Reference< runtime::XScriptInvocation > SAL_CALL ScriptRuntimeManager::getScriptRuntime(
-const Reference< XInterface >& scriptInfo )
-throw( RuntimeException )
-{
- OSL_TRACE( "** ==> ScriptRuntimeManager in getScriptRuntime" );
-
- Reference< runtime::XScriptInvocation > xScriptInvocation;
-
- try
- {
- Reference< XInterface > xInterface;
-
- Reference< storage::XScriptInfo > sinfo =
- Reference< storage::XScriptInfo >( scriptInfo, UNO_QUERY_THROW );
-
- OUStringBuffer* buf( 80 );
- buf.appendAscii("/singletons/drafts.com.sun.star.script.framework.runtime.theScriptRuntimeFor");
- buf.append(sinfo->getLanguage());
-
- xInterface.set( m_xContext->getValueByName( buf.makeStringAndClear() ), UNO_QUERY_THROW );
- xScriptInvocation.set( xInterface, UNO_QUERY_THROW );
- }
- catch ( const Exception & e )
- {
- OUString temp = OUSTR( "ScriptRuntimeManager::GetScriptRuntime: " );
- throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
- }
-
- return xScriptInvocation;
-}
-
-//*************************************************************************
-// Get the proper XScriptNameResolver
-Reference< runtime::XScriptNameResolver > SAL_CALL
-ScriptRuntimeManager::getScriptNameResolver()
-throw( RuntimeException )
-{
- OSL_TRACE( "** ==> ScriptRuntimeManager in getScriptNameResolver" );
- Reference< runtime::XScriptNameResolver > xScriptNameResolver;
-
- try
- {
- Reference< XInterface > xInterface(
- m_xMgr->createInstanceWithContext(
- OUString(
- "drafts.com.sun.star.script.framework.runtime.DefaultScriptNameResolver" ),
- m_xContext
- ),
- UNO_SET_THROW
- );
- xScriptNameResolver.set( xInterface, UNO_QUERY_THROW );
- }
- catch ( const Exception & e )
- {
- OUString temp = OUSTR( "ScriptRuntimeManager::GetScriptNameResolver: " );
- throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
- }
- return xScriptNameResolver;
-}
-
-//*************************************************************************
-// XScriptInvocation implementation
-Any SAL_CALL ScriptRuntimeManager::invoke(
- const ::rtl::OUString & scriptURI,
- const Any& invocationCtx, const Sequence< Any >& aParams,
- Sequence< sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam )
- throw ( lang::IllegalArgumentException, script::CannotConvertException,
- reflection::InvocationTargetException, RuntimeException )
-{
- OSL_TRACE( "** ==> ScriptRuntimeManager in runtimemgr invoke" );
-
- Any results;
- scripting_constants::ScriptingConstantsPool& scriptingConstantsPool =
- scripting_constants::ScriptingConstantsPool::instance();
-
- // Initialise resolved context with invocation context,
- // the resolved context (resolvedCtx will be modified by the
- // resolve method to contain the storage where the script code is
- // stored
- Any resolvedCtx = invocationCtx;
-
- try
- {
- Reference< storage::XScriptInfo > resolvedScript = resolve( scriptURI, resolvedCtx );
- ENSURE_OR_THROW( resolvedScript.is(), "ScriptRuntimeManager::invoke: No resolvedURI" );
-
- Reference< beans::XPropertySet > xPropSetResolvedCtx;
- if ( sal_False == ( resolvedCtx >>= xPropSetResolvedCtx ) )
- {
- throw RuntimeException( OUSTR(
- "ScriptRuntimeManager::invoke : unable to get XPropSetScriptingContext from param" ),
- Reference< XInterface > () );
- }
-
- Any any = xPropSetResolvedCtx->getPropertyValue(
- scriptingConstantsPool.RESOLVED_STORAGE_ID );
- sal_Int32 resolvedSid;
- if ( sal_False == ( any >>= resolvedSid ) )
- {
- throw RuntimeException( OUSTR(
- "ScriptRuntimeManager::invoke : unable to get resolved storage id from xPropSetResolvedCtx" ),
- Reference< XInterface > () );
- }
-
- OSL_TRACE("Storage sid is: %d", resolvedSid);
-
- // modifying the XPropertySet on the resolved Context to contain the
- // full script info
- Any aResolvedScript;
- aResolvedScript <<= resolvedScript;
-
- xPropSetResolvedCtx->setPropertyValue( scriptingConstantsPool.SCRIPT_INFO,
- aResolvedScript );
-
- Reference< runtime::XScriptInvocation > xScriptInvocation =
- getScriptRuntime( resolvedScript );
- ENSURE_OR_THROW( xScriptInvocation.is(),
- "ScriptRuntimeManager::invoke: cannot get instance of language specific runtime." );
-
- // the scriptURI is currently passed to the language-dept runtime but
- // is not used (may be useful in the future?). All of the script info
- // is contained as a property(SCRIPT_INFO) within the resolvedCtx
- results = xScriptInvocation->invoke( scriptURI, resolvedCtx, aParams,
- aOutParamIndex, aOutParam );
-
- // need to dispose of filesystem storage
- OUString filesysString( "location=filesystem" );
- if ( scriptURI.indexOf( filesysString ) != -1 )
- {
- Any a = m_xContext->getValueByName(
- scriptingConstantsPool.SCRIPTSTORAGEMANAGER_SERVICE );
- Reference < lang::XEventListener > xEL_ScriptStorageManager( a, UNO_QUERY_THROW );
- lang::EventObject event(resolvedScript);
- xEL_ScriptStorageManager->disposing( event );
- }
- }
- catch ( const lang::IllegalArgumentException & iae )
- {
- OUString temp = OUSTR( "ScriptRuntimeManager::invoke IllegalArgumentException: " );
- throw lang::IllegalArgumentException( temp.concat( iae.Message ),
- Reference< XInterface > (),
- iae.ArgumentPosition );
- }
- catch ( const script::CannotConvertException & cce )
- {
- OUString temp = OUSTR( "ScriptRuntimeManager::invoke CannotConvertException: " );
- throw script::CannotConvertException( temp.concat( cce.Message ),
- Reference< XInterface > (),
- cce.DestinationTypeClass, cce.Reason,
- cce.ArgumentIndex );
- }
- catch ( const reflection::InvocationTargetException & ite )
- {
- OUString temp = OUSTR( "ScriptRuntimeManager::invoke InvocationTargetException: " );
- throw reflection::InvocationTargetException( temp.concat( ite.Message ),
- Reference< XInterface > (), ite.TargetException );
- }
- catch ( const beans::UnknownPropertyException & e )
- {
- OUString temp = OUSTR( "ScriptRuntimeManager::invoke UnknownPropertyException: " );
- throw RuntimeException( temp.concat( e.Message ),
- Reference< XInterface > () );
- }
- catch ( const lang::WrappedTargetException & e )
- {
- OUString temp = OUSTR( "ScriptRuntimeManager::invoke WrappedTargetException : " );
- throw RuntimeException( temp.concat( e.Message ),
- Reference< XInterface > () );
- }
- catch ( const RuntimeException & re )
- {
- OUString temp = OUSTR( "ScriptRuntimeManager::invoke RuntimeException: " );
- throw RuntimeException( temp.concat( re.Message ),
- Reference< XInterface > () );
- }
- catch ( const Exception & e )
- {
- OUString temp = OUSTR( "ScriptRuntimeManager::invoke Exception: " );
- throw RuntimeException( temp.concat( e.Message ),
- Reference< XInterface > () );
- }
-#ifdef _DEBUG
- catch ( ... )
- {
- throw RuntimeException( OUSTR( "ScriptRuntimeManager::invoke UnknownException: " ),
- Reference< XInterface > () );
- }
-#endif
- OSL_TRACE( "** ==> ScriptRuntimeManager returned from invoke: %s", ::rtl::OUStringToOString( results.getValueTypeName(), RTL_TEXTENCODING_ASCII_US ).pData->buffer );
- return results;
-}
-
-//*************************************************************************
-// XScriptNameResolver implementation
-Reference< storage::XScriptInfo > SAL_CALL
-ScriptRuntimeManager::resolve( const ::rtl::OUString& scriptURI,
- Any& invocationCtx )
-throw( lang::IllegalArgumentException, script::CannotConvertException, RuntimeException )
-{
- OSL_TRACE( "** ==> ScriptRuntimeManager in resolve" );
- Reference< storage::XScriptInfo > resolvedURI;
-
- Reference< runtime::XScriptNameResolver > xScriptNameResolver = getScriptNameResolver();
- ENSURE_OR_THROW( xScriptNameResolver.is(),
- "ScriptRuntimeManager::resolve: No ScriptNameResolver" );
-
- try
- {
- resolvedURI = xScriptNameResolver->resolve( scriptURI, invocationCtx );
- }
- catch ( const lang::IllegalArgumentException & iae )
- {
- OUString temp =
- OUSTR( "ScriptRuntimeManager::resolve IllegalArgumentException: " );
- throw lang::IllegalArgumentException( temp.concat( iae.Message ),
- Reference< XInterface > (),
- iae.ArgumentPosition );
- }
- catch ( const script::CannotConvertException & cce )
- {
- OUString temp = OUSTR( "ScriptRuntimeManager::resolve CannotConvertException: " );
- throw script::CannotConvertException( temp.concat( cce.Message ),
- Reference< XInterface > (),
- cce.DestinationTypeClass, cce.Reason,
- cce.ArgumentIndex );
- }
- catch ( const RuntimeException & re )
- {
- OUString temp = OUSTR( "ScriptRuntimeManager::resolve RuntimeException: " );
- throw RuntimeException( temp.concat( re.Message ),
- Reference< XInterface > () );
- }
-#ifdef _DEBUG
- catch ( ... )
- {
- throw RuntimeException(
- OUSTR( "ScriptRuntimeManager::resolve UnknownException: " ),
- Reference< XInterface > () );
- }
-#endif
-
- return resolvedURI;
-}
-
-//*************************************************************************
-OUString SAL_CALL ScriptRuntimeManager::getImplementationName( )
-throw( RuntimeException )
-{
- return s_implName;
-}
-
-//*************************************************************************
-sal_Bool SAL_CALL ScriptRuntimeManager::supportsService( const OUString& serviceName )
-throw( RuntimeException )
-{
- OUString const * pNames = s_serviceNames.getConstArray();
- for ( sal_Int32 nPos = s_serviceNames.getLength(); nPos--; )
- {
- if ( serviceName.equals( pNames[ nPos ] ) )
- {
- return sal_True;
- }
- }
- return sal_False;
-}
-
-//*************************************************************************
-Sequence<OUString> SAL_CALL ScriptRuntimeManager::getSupportedServiceNames( )
-throw( RuntimeException )
-{
- return s_serviceNames;
-}
-
-//*************************************************************************
-static Reference< XInterface > SAL_CALL srm_create(
- const Reference< XComponentContext > & xCompC )
-{
- return ( cppu::OWeakObject * ) new ScriptRuntimeManager( xCompC );
-}
-
-//*************************************************************************
-static Sequence<OUString> srm_getSupportedServiceNames( )
-SAL_THROW(())
-{
- return s_serviceNames;
-}
-
-//*************************************************************************
-static OUString srm_getImplementationName( )
-SAL_THROW(())
-{
- return s_implName;
-}
-
-//*************************************************************************
-Reference< XInterface > SAL_CALL scriptnri_create(
- Reference< XComponentContext > const & xComponentContext )
-SAL_THROW( ( Exception ) );
-
-//*************************************************************************
-Sequence< OUString > scriptnri_getSupportedServiceNames() SAL_THROW(());
-
-//*************************************************************************
-OUString scriptnri_getImplementationName() SAL_THROW(());
-
-//******************** ScriptStorageMangaer defines ***********************
-Reference< XInterface > SAL_CALL ssm_create(
- Reference< XComponentContext > const & xComponentContext )
-SAL_THROW( ( Exception ) );
-//*************************************************************************
-Sequence< OUString > ssm_getSupportedServiceNames() SAL_THROW(());
-//*************************************************************************
-OUString ssm_getImplementationName() SAL_THROW(());
-//*************************************************************************
-
-//************ Script Provider defines ************************************
-Reference< XInterface > SAL_CALL sp_create( const Reference< XComponentContext > & xCompC );
-//******************** ScriptProvider defines ***************************
-Sequence< OUString > sp_getSupportedServiceNames( ) SAL_THROW(());
-//*************************************************************************
-OUString sp_getImplementationName( ) SAL_THROW(());
-//*************************************************************************
-
-//************ ScriptStorage defines **************************************
-Reference< XInterface > SAL_CALL ss_create( const Reference< XComponentContext > & xCompC );
-//******************** ScriptProvider defines ***************************
-Sequence< OUString > ss_getSupportedServiceNames( ) SAL_THROW(());
-//*************************************************************************
-OUString ss_getImplementationName( ) SAL_THROW(());
-//*************************************************************************
-
-
-static struct cppu::ImplementationEntry s_entries [] =
- {
- {
- srm_create, srm_getImplementationName,
- srm_getSupportedServiceNames, cppu::createSingleComponentFactory,
- &s_moduleCount.modCnt, 0
- },
- {
- scriptnri_create, scriptnri_getImplementationName,
- scriptnri_getSupportedServiceNames, cppu::createSingleComponentFactory,
- &s_moduleCount.modCnt, 0
- },
- {
- ssm_create, ssm_getImplementationName,
- ssm_getSupportedServiceNames, cppu::createSingleComponentFactory,
- 0, 0
- },
- {
- ss_create, ss_getImplementationName,
- ss_getSupportedServiceNames, cppu::createSingleComponentFactory,
- 0, 0
- },
- {
- sp_create, sp_getImplementationName,
- sp_getSupportedServiceNames, cppu::createSingleComponentFactory,
- 0, 0
- },
- { 0, 0, 0, 0, 0, 0 }
- };
-} // Namespace
-
-//#######################################################################################
-//#### EXPORTED #########################################################################
-//#######################################################################################
-
-extern "C"
-{
- /**
- * This function is called to get service factories for an implementation.
- *
- * @param pImplName name of implementation
- * @param pServiceManager a service manager, need for component creation
- * @param pRegistryKey the registry key for this component, need for persistent
- * data
- * @return a component factory
- */
- SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName,
- lang::XMultiServiceFactory * pServiceManager,
- registry::XRegistryKey * pRegistryKey )
- {
- return ::cppu::component_getFactoryHelper( pImplName, pServiceManager,
- 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
deleted file mode 100644
index 168feb72f1db..000000000000
--- a/scripting/source/runtimemgr/ScriptRuntimeManager.hxx
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-#ifndef _FRAMEWORK_SCRIPT_SCRIPTRUNTIMEMANAGER_HXX_
-#define _FRAMEWORK_SCRIPT_SCRIPTRUNTIMEMANAGER_HXX_
-
-#include <osl/mutex.hxx>
-
-#include <cppuhelper/implbase3.hxx>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-
-#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <com/sun/star/uno/RuntimeException.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/script/CannotConvertException.hpp>
-#include <com/sun/star/reflection/InvocationTargetException.hpp>
-
-#include <drafts/com/sun/star/script/framework/runtime/XScriptInvocation.hpp>
-#include <drafts/com/sun/star/script/framework/runtime/XScriptNameResolver.hpp>
-
-namespace css = ::com::sun::star;
-
-namespace scripting_runtimemgr
-{
-
-/**
- * Class responsible for managing the various ScriptRuntime implementations.
- */
-class ScriptRuntimeManager : public
- ::cppu::WeakImplHelper3< ::drafts::com::sun::star::script::framework::runtime::XScriptInvocation, css::lang::XServiceInfo,
- ::drafts::com::sun::star::script::framework::runtime::XScriptNameResolver >
-{
-public:
- explicit ScriptRuntimeManager(
- const css::uno::Reference< css::uno::XComponentContext > & xContext );
- ~ScriptRuntimeManager();
-
-
- // XServiceInfo implementation
- virtual ::rtl::OUString SAL_CALL getImplementationName()
- throw( css::uno::RuntimeException );
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
- throw( css::uno::RuntimeException );
- virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
- throw( css::uno::RuntimeException );
-
- /**
- * implements XScriptInvocation, invokes the script named in scriptURI
- * (resolving it first, if necessary), with the args passed.
- *
- * @param scriptURI the URI, which may not be fully qualified, for the
- * script to be invoked
- *
- *************************************************************
- Invoke
- @param scriptUri script uri describing the script
- @param invocationCtx
- the invocation context contains the documentStorageID and document reference
- for use in script name resolving
-
- @param aParams all parameters; pure, out params are undefined in sequence,
- i.e., the value has to be ignored by the callee
- @param aOutParamIndex out indices
- @param aOutParam out parameters
-
- @returns
- the value returned from the function being invoked
-
- @throws IllegalArgumentException
- if there is no matching script name
-
- @throws CannotConvertException
- if args do not match or cannot be converted the those
- of the invokee
-
- @throws InvocationTargetException
- if the running script throws an exception this information is captured and
- rethrown as this exception type.
-
- */
- virtual css::uno::Any SAL_CALL invoke(
- const ::rtl::OUString & scriptUri,
- const css::uno::Any& invocationCtx,
- const css::uno::Sequence< css::uno::Any >& aParams,
- css::uno::Sequence< sal_Int16 >& aOutParamIndex,
- css::uno::Sequence< css::uno::Any >& aOutParam )
- throw ( css::lang::IllegalArgumentException,
- css::script::CannotConvertException,
- css::reflection::InvocationTargetException,
- css::uno::RuntimeException );
-
- /**
- * implements XScriptNameResolver, attempts to resolve the script URI
- * passed in
- *
- * @param scriptURI the URI to be resolved
- * @param invocationCtx the invocation context contains the
- * documentStorageID and document reference for use in script name
- * resolving. On full name resolution it sets the resolvedScriptStorageID to
- * the actual storage location of the fully resolved script. May or may not * be the
- same as the documentStorageID.
- * @return the resolved URI
- */
- virtual css::uno::Reference< ::drafts::com::sun::star::script::framework::storage::XScriptInfo > SAL_CALL resolve(
- const ::rtl::OUString& scriptUri,
- css::uno::Any& invocationCtx )
- throw( css::lang::IllegalArgumentException, css::script::CannotConvertException,
- css::uno::RuntimeException );
-
-private:
- css::uno::Reference< ::drafts::com::sun::star::script::framework::runtime::XScriptInvocation > SAL_CALL getScriptRuntime(
- const css::uno::Reference< css::uno::XInterface > & scriptInfo )
- throw( css::uno::RuntimeException );
- css::uno::Reference< ::drafts::com::sun::star::script::framework::runtime::XScriptNameResolver > SAL_CALL getScriptNameResolver()
- throw( css::uno::RuntimeException );
-
- css::uno::Reference< css::uno::XComponentContext > m_xContext;
- css::uno::Reference< css::lang::XMultiComponentFactory > m_xMgr;
- ::osl::Mutex m_mutex;
-};
-} // 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
deleted file mode 100644
index 7e223643c7e1..000000000000
--- a/scripting/source/runtimemgr/StorageBridge.cxx
+++ /dev/null
@@ -1,124 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <drafts/com/sun/star/script/framework/storage/XScriptStorageManager.hpp>
-
-#include "StorageBridge.hxx"
-#include <util/util.hxx>
-
-using namespace ::rtl;
-using namespace ::osl;
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::drafts::com::sun::star::script::framework;
-
-namespace scripting_runtimemgr
-{
-
-const char* const SCRIPTIMPLACCESS_SERVICE =
- "drafts.com.sun.star.script.framework.storage.StorageProxy";
-const char* const SCRIPTSTORAGEMANAGER_SERVICE =
- "/singletons/drafts.com.sun.star.script.framework.storage.theScriptStorageManager";
-const int STORAGEID = 0;
-const int STORAGEPROXY = 0;
-
-
-//*************************************************************************
-// StorageBridge Constructor
-StorageBridge::StorageBridge( const Reference< XComponentContext >& xContext,
- sal_Int32 sid ) : m_xContext( xContext, UNO_SET_THROW ), m_sid( sid )
-{
- try
- {
- initStorage();
- }
- catch ( const RuntimeException & re )
- {
- OUString temp = OUSTR( "StorageBridge::StorageBridge(salIn32&): " );
- throw RuntimeException( temp.concat( re.Message ), Reference< XInterface >() );
- }
-}
-
-//*************************************************************************
-void
-StorageBridge::initStorage() throw ( ::com::sun::star::uno::RuntimeException )
-{
- try
- {
- Reference< lang::XMultiComponentFactory > xMultiComFac( m_xContext->getServiceManager(), UNO_SET_THROW );
- Reference< XInterface > temp( m_xContext->getValueByName(
- OUString::createFromAscii( SCRIPTSTORAGEMANAGER_SERVICE ) ), UNO_QUERY_THROW );
- Reference< storage::XScriptStorageManager > xScriptStorageManager( temp, UNO_QUERY_THROW );
- Reference< XInterface > xScriptStorage( xScriptStorageManager->getScriptStorage( m_sid ), UNO_SET_THROW );
- m_xScriptInfoAccess.set( xScriptStorage, UNO_QUERY_THROW );
- }
- catch ( const RuntimeException & re )
- {
- OUString temp = OUSTR( "StorageBridge::StorageBridge: " );
- throw RuntimeException( temp.concat( re.Message ), Reference< XInterface >() );
- }
- catch ( const Exception & e )
- {
- OUString temp = OUSTR( "StorageBridge::StorageBridge: " );
- throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
- }
-}
-//*************************************************************************
-Sequence< ::rtl::OUString >
-StorageBridge::getScriptLogicalNames()
-throw ( lang::IllegalArgumentException,
- RuntimeException )
-{
- OSL_TRACE( "In StorageBridge getScriptLogicalNames..." );
- Sequence < ::rtl::OUString > results;
- try
- {
- results = m_xScriptInfoAccess->getScriptLogicalNames();
- }
- catch ( const Exception &e )
- {
- OUString temp = OUSTR( "StorageBridge::getScriptLogicalNames: " );
- throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
- }
- return results;
-}
-
-//*************************************************************************
-Sequence < Reference< storage::XScriptInfo > >
-StorageBridge::getImplementations( const ::rtl::OUString& queryURI )
-throw ( lang::IllegalArgumentException, RuntimeException )
-{
- OSL_TRACE( "In StorageBridge getImplementations..." );
- Sequence < Reference< storage::XScriptInfo > > results;
- try
- {
- results = m_xScriptInfoAccess->getImplementations( queryURI );
- }
- catch ( const Exception &e )
- {
- OUString temp = OUSTR( "StorageBridge::getImplementations: " );
- throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() );
- }
- return results;
-}
-}// namespace
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/scripting/source/runtimemgr/StorageBridge.hxx b/scripting/source/runtimemgr/StorageBridge.hxx
deleted file mode 100644
index 36307f796081..000000000000
--- a/scripting/source/runtimemgr/StorageBridge.hxx
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-#ifndef _FRAMEWORK_SCRIPT_STORAGEBRIDGE_HXX_
-#define _FRAMEWORK_SCRIPT_STORAGEBRIDGE_HXX_
-
-#include <cppuhelper/implbase1.hxx>
-#include <com/sun/star/uno/XComponentContext.hpp>
-
-#include <drafts/com/sun/star/script/framework/storage/XScriptInfoAccess.hpp>
-#include "StorageBridgeFactory.hxx"
-
-namespace css = ::com::sun::star;
-
-namespace scripting_runtimemgr
-{
-
-class StorageBridge : public ::cppu::WeakImplHelper1< ::drafts::com::sun::star::script::framework::storage::XScriptInfoAccess >
-{
- friend class StorageBridgeFactory;
-public:
- //XScriptInfoAccess
- //=========================================================================
- /**
- * Get the implementations for a given URI
- *
- * @param queryURI
- * The URI to get the implementations for
- *
- * @return XScriptURI
- * The URIs of the implementations
- */
- virtual css::uno::Sequence< css::uno::Reference< ::drafts::com::sun::star::script::framework::storage::XScriptInfo > >
- SAL_CALL getImplementations(
- const ::rtl::OUString& queryURI )
- throw ( css::lang::IllegalArgumentException,
- css::uno::RuntimeException );
- //=========================================================================
- /**
- * Get the all logical names stored in this storage
- *
- * @return sequence < ::rtl::OUString >
- * The logical names
- */
- virtual css::uno::Sequence< ::rtl::OUString >
- SAL_CALL getScriptLogicalNames()
- throw ( css::lang::IllegalArgumentException, css::uno::RuntimeException );
-private:
- StorageBridge( const css::uno::Reference< css::uno::XComponentContext >& xContext,
- sal_Int32 sid );
-
- void initStorage() throw ( css::uno::RuntimeException );
- css::uno::Reference< css::uno::XComponentContext > m_xContext;
- css::uno::Reference< ::drafts::com::sun::star::script::framework::storage::XScriptInfoAccess > m_xScriptInfoAccess;
- sal_Int32 m_sid;
-};
-}
-
-#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
deleted file mode 100644
index 003aab07e211..000000000000
--- a/scripting/source/runtimemgr/StorageBridgeFactory.cxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "StorageBridgeFactory.hxx"
-
-#include "StorageBridge.hxx"
-
-using namespace ::drafts::com::sun::star::script::framework;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star;
-
-namespace scripting_runtimemgr
-{
-
-//*************************************************************************
-StorageBridgeFactory::StorageBridgeFactory(
- const Reference< XComponentContext >& xContext ) :
- m_xContext( xContext )
-{}
-
-
-
-//*************************************************************************
-// StorageBridge is a bridge between us an storage, the StorageBridge implements the
-// XScriptInfoAccess
-// interface, it allows both the "real" storage and a java test storage component to be
-// configured.
-// @param location contains a url for the document.
-// @returns a storage instance for the location "location".
-// @see StorageBridge.cxx for flag "STORAGEPROXY", set to use java "test" component or
-// use "real" storage.
-
-Reference< storage::XScriptInfoAccess >
-StorageBridgeFactory::getStorageInstance( sal_Int32 sid )
-{
-
- Reference< storage::XScriptInfoAccess > storage = new StorageBridge( m_xContext,
- 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
deleted file mode 100644
index 6ea577507eed..000000000000
--- a/scripting/source/runtimemgr/StorageBridgeFactory.hxx
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-#ifndef _FRAMEWORK_SCRIPT_STORAGEBRIDGEFACTORY_HXX_
-#define _FRAMEWORK_SCRIPT_STORAGEBRIDGEFACTORY_HXX_
-
-#include <rtl/ustring>
-
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/uno/Reference.hxx>
-
-#include <drafts/com/sun/star/script/framework/storage/XScriptInfoAccess.hpp>
-
-namespace css = ::com::sun::star;
-
-namespace scripting_runtimemgr
-{
-
-class StorageBridgeFactory
-{
-
-public:
- explicit StorageBridgeFactory(
- const css::uno::Reference < css::uno::XComponentContext > & xContext );
- css::uno::Reference < ::drafts::com::sun::star::script::framework::storage::XScriptInfoAccess >
- getStorageInstance( sal_Int32 sid );
-private:
- StorageBridgeFactory(); // No definition for default ctor
- css::uno::Reference< css::uno::XComponentContext > m_xContext;
-};
-} // scripting_runtimemgr
-#endif //_FRAMEWORK_SCRIPT_NAMERESOLVER_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/scripting/source/runtimemgr/makefile.mk b/scripting/source/runtimemgr/makefile.mk
deleted file mode 100644
index a750b28179b3..000000000000
--- a/scripting/source/runtimemgr/makefile.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This file incorporates work covered by the following license notice:
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed
-# with this work for additional information regarding copyright
-# ownership. The ASF licenses this file to you under the Apache
-# License, Version 2.0 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.apache.org/licenses/LICENSE-2.0 .
-#
-PRJ=..$/..
-
-PRJNAME= scripting
-TARGET= runtimemgr
-USE_DEFFILE= TRUE
-ENABLE_EXCEPTIONS=TRUE
-COMP1TYPELIST=$(TARGET)
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# ------------------------------------------------------------------
-
-SLOFILES=\
- $(SLO)$/ScriptNameResolverImpl.obj\
- $(SLO)$/ScriptRuntimeManager.obj \
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/scripting/source/runtimemgr/runtimemgr.xml b/scripting/source/runtimemgr/runtimemgr.xml
deleted file mode 100644
index 84c912f5f0c3..000000000000
--- a/scripting/source/runtimemgr/runtimemgr.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE module-description PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "module-description.dtd">
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
--->
-<module-description xmlns:xlink="http://www.w3.org/1999/xlink">
- <module-name> ScriptRuntimeManager </module-name>
- <component-description>
- <author> Alexis Ledoux</author>
- <name> drafts.com.sun.star.script.framework.ScriptRuntimeManager </name>
- <description>
- This component is part of the Scripting Framework
-</description>
- <loader-name> com.sun.star.loader.SharedLibrary </loader-name>
- <language> c++ </language>
- <status value="final"/>
- <supported-service> drafts.com.sun.star.script.framework.ScriptRuntimeManager </supported-service>
- <type> com.sun.star.lang.XSingleServiceFactory </type>
- <type> com.sun.star.lang.XMultiComponentFactory </type>
- <type> com.sun.star.lang.XSingleComponentFactory </type>
- <type> com.sun.star.uno.XNamingService </type>
- <type> com.sun.star.uno.XWeak </type>
- <type> com.sun.star.lang.XMain </type>
- <type> com.sun.star.uno.XAggregation </type>
- <type> com.sun.star.lang.XMultiServiceFactory </type>
- <type> com.sun.star.lang.XTypeProvider </type>
- <type> com.sun.star.registry.XSimpleRegistry </type>
- <type> com.sun.star.loader.XImplementationLoader </type>
- <type> com.sun.star.registry.XImplementationRegistration </type>
- <type> com.sun.star.lang.XComponent </type>
- <type> com.sun.star.connection.XAcceptor </type>
- <type> com.sun.star.connection.XConnector </type>
- <type> com.sun.star.container.XHierarchicalNameAccess </type>
- <type> com.sun.star.lang.XServiceInfo </type>
- <type> com.sun.star.io.XOutputStream </type>
- <type> drafts.com.sun.star.script.framework.storage.XScriptInfoAccess </type>
- <type> drafts.com.sun.star.script.framework.storage.XScriptStorageManager </type>
- <type> drafts.com.sun.star.script.framework.runtime.XScriptInvocation </type>
- <type> drafts.com.sun.star.script.framework.runtime.XScriptNameResolver </type>
- </component-description>
- <project-build-dependency> cppuhelper </project-build-dependency>
- <project-build-dependency> cppu </project-build-dependency>
- <project-build-dependency> sal </project-build-dependency>
- <runtime-module-dependency> cppuhelper$(UDK_MAJOR)$(COM) </runtime-module-dependency>
- <runtime-module-dependency> salhelper$(UDK_MAJOR)$(COM) </runtime-module-dependency>
- <runtime-module-dependency> cppu$(UDK_MAJOR) </runtime-module-dependency>
- <runtime-module-dependency> reg$(UDK_MAJOR) </runtime-module-dependency>
- <runtime-module-dependency> store$(UDK_MAJOR) </runtime-module-dependency>
- <runtime-module-dependency> sal$(UDK_MAJOR) </runtime-module-dependency>
-</module-description>