[Libreoffice-commits] .: scripting/source
Thomas Arnhold
tarnhold at kemper.freedesktop.org
Fri Feb 4 04:59:16 PST 2011
scripting/source/storage/ScriptMetadataImporter.cxx | 9 ----
scripting/source/storage/ScriptSecurityManager.cxx | 29 -------------
scripting/source/storage/ScriptStorage.cxx | 43 --------------------
scripting/source/storage/ScriptStorageManager.cxx | 32 --------------
scripting/source/storage/ScriptURI.cxx | 1
5 files changed, 1 insertion(+), 113 deletions(-)
New commits:
commit 8f399a83d045ce50aea7ae10de26ae1ff6259e19
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri Feb 4 13:57:55 2011 +0100
Fix typo and remove dead code.
diff --git a/scripting/source/storage/ScriptMetadataImporter.cxx b/scripting/source/storage/ScriptMetadataImporter.cxx
index c688997..0b5c439 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 824ef61..ae00c66 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 4837ffa..127346d 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 5f6d6f4..02c0e1f 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 7fa1955..2bd5883 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;
More information about the Libreoffice-commits
mailing list