diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-02-04 13:57:55 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-02-04 13:57:55 +0100 |
commit | e07db4f176317b156fcd3410d683c9f2892b083a (patch) | |
tree | e517159178119f43dc409aa8adfb7adf6da64cec /scripting | |
parent | 4a84176c89b66982f7a5556e02a5a38e74b5f355 (diff) |
Fix typo and remove dead code.
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/source/storage/ScriptMetadataImporter.cxx | 9 | ||||
-rw-r--r-- | scripting/source/storage/ScriptSecurityManager.cxx | 29 | ||||
-rw-r--r-- | scripting/source/storage/ScriptStorage.cxx | 43 | ||||
-rw-r--r-- | scripting/source/storage/ScriptStorageManager.cxx | 32 | ||||
-rw-r--r-- | scripting/source/storage/ScriptURI.cxx | 1 |
5 files changed, 1 insertions, 113 deletions
diff --git a/scripting/source/storage/ScriptMetadataImporter.cxx b/scripting/source/storage/ScriptMetadataImporter.cxx index b6a7e78838fd..70fcca0bd3af 100644 --- a/scripting/source/storage/ScriptMetadataImporter.cxx +++ b/scripting/source/storage/ScriptMetadataImporter.cxx @@ -310,15 +310,6 @@ void ScriptMetadataImporter::startElement( RTL_TEXTENCODING_ASCII_US).pData->buffer ); break; case FILEPROPS: - /** - mm_files.insert( strpair_pair( ms_filename, - str_pair( xAttribs->getValueByName( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("name")) ), - xAttribs->getValueByName( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")) ) ) - ) - ); - */ mv_fileprops.push_back(str_pair( xAttribs->getValueByName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("name")) ), xAttribs->getValueByName( diff --git a/scripting/source/storage/ScriptSecurityManager.cxx b/scripting/source/storage/ScriptSecurityManager.cxx index b653f6ce92c6..8ca3859cb430 100644 --- a/scripting/source/storage/ScriptSecurityManager.cxx +++ b/scripting/source/storage/ScriptSecurityManager.cxx @@ -132,35 +132,6 @@ throw ( RuntimeException ) //need to check if storage has any scripts try { - /* need to replace this with something better, now logical names are - * gone - - Reference< XInterface > xInterface; - Any a = m_xContext->getValueByName( - OUString(RTL_CONSTASCII_USTRINGPARAM( SCRIPTSTORAGEMANAGER_SERVICE )) ); - if ( sal_False == ( a >>= xInterface ) ) - { - throw RuntimeException( - OUSTR( "ScriptSecurityManager::addScriptStorage: could not obtain ScriptStorageManager singleton" ), - Reference< XInterface >() ); - } - validateXRef( xInterface, - "ScriptSecurityManager::addScriptStorage: cannot get Storage service" ); - Reference< storage::XScriptStorageManager > xScriptStorageManager( - xInterface, UNO_QUERY_THROW ); - Reference< XInterface > xScriptStorage = - xScriptStorageManager->getScriptStorage( storageID ); - validateXRef( xScriptStorage, - "ScriptNameResolverImpl::getStorageInstance: cannot get Script Storage service" ); - Reference< storage::XScriptInfoAccess > xScriptInfoAccess = - Reference< storage::XScriptInfoAccess > ( xScriptStorage, - UNO_QUERY_THROW ); - Sequence< ::rtl::OUString > logicalNames = xScriptInfoAccess->getScriptLogicalNames(); - if( !logicalNames.getLength() ) // we have no logical names - { - return; - } */ - // we have some scripts so read config & decide on that basis // Setup flags: m_runMacroSetting, m_warning, m_confirmationRequired, readConfiguration(); diff --git a/scripting/source/storage/ScriptStorage.cxx b/scripting/source/storage/ScriptStorage.cxx index c32e1683f638..f5ee1e766210 100644 --- a/scripting/source/storage/ScriptStorage.cxx +++ b/scripting/source/storage/ScriptStorage.cxx @@ -77,9 +77,6 @@ static Sequence< OUString > ss_serviceNames = const sal_uInt16 NUMBER_STORAGE_INITIALIZE_ARGS = 3; -//extern ::rtl_StandardModuleCount s_moduleCount; - - //************************************************************************* ScriptStorage::ScriptStorage( const Reference < @@ -163,14 +160,12 @@ throw ( RuntimeException ) } } } -// s_moduleCount.modCnt.acquire( &s_moduleCount.modCnt ); } //************************************************************************* ScriptStorage::~ScriptStorage() SAL_THROW( () ) { OSL_TRACE( "< ScriptStorage dtor called >\n" ); -// s_moduleCount.modCnt.release( &s_moduleCount.modCnt ); } //************************************************************************* @@ -693,43 +688,6 @@ ScriptStorage::getScriptLogicalNames() throw ( RuntimeException ) { Sequence< ::rtl::OUString > results; - // comment out the rest, and ultimately remove method - /*ScriptInfo_hash::iterator h_it = mh_implementations.begin(); - ScriptInfo_hash::iterator h_itEnd = mh_implementations.end(); - if ( h_it == h_itEnd ) - { - OSL_TRACE( "ScriptStorage::getImplementations: EMPTY STORAGE"); - return results; - } - results.realloc( mh_implementations.size() ); - - //find the implementations for the given logical name - try - { - - ::osl::Guard< osl::Mutex > aGuard( m_mutex ); - - for ( sal_Int32 count = 0; h_it != h_itEnd ; ++h_it ) - { - ::rtl::OUString logicalName = h_it->first; - OSL_TRACE( "Adding %s at index %d ", ::rtl::OUStringToOString( - logicalName, RTL_TEXTENCODING_ASCII_US ).pData->buffer, count); - results[ count++ ] = logicalName; - } - - } - catch ( RuntimeException & re ) - { - throw RuntimeException( - OUSTR( "ScriptStorage::getScriptLogicalNames RuntimeException: " ).concat( re.Message ), - Reference< XInterface > () ); - } - catch ( Exception & e ) - { - throw RuntimeException( OUSTR( - "ScriptStorage::getScriptLogicalNames Exception: " ).concat( - e.Message ), Reference< XInterface > () ); - } */ return results; } @@ -748,7 +706,6 @@ throw ( lang::IllegalArgumentException, // definined in the parcel-desc.xml. As an interim temp solution the Datas_vec // structure that is returned from ScriptMetDataImporter sets the logicalname // to the function name. ScriptURI class has been changed in the same way. -// Sequence< Reference< storage::XScriptInfo > > results; ScriptURI scriptURI( queryURI ); OSL_TRACE( "getting impl for language %s, function name: %s", diff --git a/scripting/source/storage/ScriptStorageManager.cxx b/scripting/source/storage/ScriptStorageManager.cxx index 07e5031376dc..eee479d0e040 100644 --- a/scripting/source/storage/ScriptStorageManager.cxx +++ b/scripting/source/storage/ScriptStorageManager.cxx @@ -56,14 +56,11 @@ namespace scripting_impl { static OUString s_implName(RTL_CONSTASCII_USTRINGPARAM( - "drafts.com.sun.star.script.framework.storage.ScriptStorageManager" ); + "drafts.com.sun.star.script.framework.storage.ScriptStorageManager" )); static OUString s_serviceName(RTL_CONSTASCII_USTRINGPARAM( "drafts.com.sun.star.script.framework.storage.ScriptStorageManager" )); static Sequence< OUString > s_serviceNames = Sequence< OUString >( &s_serviceName, 1 ); -//extern ::rtl_StandardModuleCount s_moduleCount = MODULE_COUNT_INIT; -//extern ::rtl_StandardModuleCount s_moduleCount; - //************************************************************************* // ScriptStorageManager Constructor @@ -72,7 +69,6 @@ ScriptStorageManager::ScriptStorageManager( const Reference< : m_xContext( xContext ), m_count( 0 ), m_securityMgr( xContext ) { OSL_TRACE( "< ScriptStorageManager ctor called >\n" ); - //s_moduleCount.modCnt.acquire( &s_moduleCount.modCnt ); validateXRef( m_xContext, "ScriptStorageManager::ScriptStorageManager : cannot get component context" ); @@ -202,7 +198,6 @@ ScriptStorageManager::~ScriptStorageManager() SAL_THROW ( () ) { OSL_TRACE( "< ScriptStorageManager dtor called >\n" ); -// s_moduleCount.modCnt.release( &s_moduleCount.modCnt ); } //************************************************************************* @@ -266,31 +261,6 @@ throw ( RuntimeException ) RTL_TEXTENCODING_ASCII_US ).pData->buffer ); } -// np - removed previous scripting framework security handling -// now handled by modification to existing calls in sfx for basic -// -/* if( displayDialog ) - { - try - { - OSL_TRACE("Adding to security mgr for %s", - ::rtl::OUStringToOString( stringURI, - RTL_TEXTENCODING_ASCII_US ).pData->buffer ); - m_securityMgr.addScriptStorage( stringURI, returnedID ); - } - catch ( RuntimeException & rte ) - { - throw RuntimeException( - OUSTR( "ScriptStorageManager::createScriptStorageWithURI: " ).concat( - rte.Message ), Reference< XInterface >() ); - } - } - else - { - OSL_TRACE("No need to security mgr for %s", - ::rtl::OUStringToOString( stringURI, - RTL_TEXTENCODING_ASCII_US ).pData->buffer ); - }*/ return returnedID; } diff --git a/scripting/source/storage/ScriptURI.cxx b/scripting/source/storage/ScriptURI.cxx index b001b1d25e67..72e91f32c549 100644 --- a/scripting/source/storage/ScriptURI.cxx +++ b/scripting/source/storage/ScriptURI.cxx @@ -145,7 +145,6 @@ void ScriptURI::set_values( scripting_impl::Uri values ) // In order to temporarly support the existing code functionname is // set to the logica name parsed by this class. So getLogicalName() and // getFunctionName() return identical string. -// m_functionName = values.logicalName; m_logicalName = values.logicalName; |