Code review cleanup
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: ScriptNameResolverImpl.cxx,v $
|
||||
*
|
||||
* $Revision: 1.3 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
* last change: $Author: jmrice $ $Date: 2002-09-27 12:16:26 $
|
||||
* last change: $Author: jmrice $ $Date: 2002-09-30 12:56:39 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -87,7 +87,7 @@ Sequence< OUString > nrs_serviceNames = Sequence< OUString >( &nrs_serviceName,
|
||||
extern ::rtl_StandardModuleCount s_moduleCount;
|
||||
|
||||
// define storages to search
|
||||
static ::std::vector< int >* m_pSearchIDs = NULL;
|
||||
static ::std::vector< sal_uInt16 >* m_pSearchIDs = NULL;
|
||||
|
||||
//*************************************************************************
|
||||
ScriptNameResolverImpl::ScriptNameResolverImpl(
|
||||
@@ -100,7 +100,7 @@ ScriptNameResolverImpl::ScriptNameResolverImpl(
|
||||
osl::Guard< osl::Mutex > aGuard( m_mutex );
|
||||
if(!m_pSearchIDs)
|
||||
{
|
||||
m_pSearchIDs = new ::std::vector< int >();
|
||||
m_pSearchIDs = new ::std::vector< sal_uInt16 >();
|
||||
m_pSearchIDs->push_back( ::scripting_constants::DOC_STORAGE_ID_NOT_SET );
|
||||
m_pSearchIDs->push_back( ::scripting_constants::USER_STORAGE_ID );
|
||||
m_pSearchIDs->push_back( ::scripting_constants::SHARED_STORAGE_ID );
|
||||
@@ -136,7 +136,7 @@ throw ( lang::IllegalArgumentException, script::CannotConvertException, RuntimeE
|
||||
|
||||
Any any;
|
||||
OUString docUri;
|
||||
sal_Int16 docSid;
|
||||
sal_uInt16 docSid;
|
||||
try
|
||||
{
|
||||
any = xPropSetScriptingContext->getPropertyValue( scripting_constants::DOC_URI );
|
||||
@@ -182,10 +182,10 @@ throw ( lang::IllegalArgumentException, script::CannotConvertException, RuntimeE
|
||||
|
||||
|
||||
OSL_TRACE( "ScriptNameResolverImpl::resolve Starting..." );
|
||||
::std::vector< int >& m_vSearchIDs = *m_pSearchIDs;
|
||||
::std::vector< sal_uInt16 >& m_vSearchIDs = *m_pSearchIDs;
|
||||
m_vSearchIDs[ 0 ] = docSid;
|
||||
::std::vector< int >::const_iterator iter;
|
||||
::std::vector< int >::const_iterator iterEnd = m_vSearchIDs.end();
|
||||
::std::vector< sal_uInt16 >::const_iterator iter;
|
||||
::std::vector< sal_uInt16 >::const_iterator iterEnd = m_vSearchIDs.end();
|
||||
|
||||
for ( iter = m_vSearchIDs.begin() ; iter != iterEnd; ++iter )
|
||||
{
|
||||
@@ -249,7 +249,7 @@ throw( RuntimeException )
|
||||
|
||||
Reference< scripturi::XScriptURI >
|
||||
ScriptNameResolverImpl::resolveURIFromStorageID
|
||||
( sal_Int16 sid, const Reference< scripturi::XScriptURI >& scriptURI )
|
||||
( sal_uInt16 sid, const Reference< scripturi::XScriptURI >& scriptURI )
|
||||
SAL_THROW ( ( lang::IllegalArgumentException, RuntimeException ) )
|
||||
{
|
||||
|
||||
@@ -272,6 +272,7 @@ SAL_THROW ( ( lang::IllegalArgumentException, RuntimeException ) )
|
||||
Reference< scripturi::XScriptURI > resolvedName;
|
||||
if ( sid == ::scripting_constants::DOC_STORAGE_ID_NOT_SET )
|
||||
{
|
||||
OSL_TRACE( "@@@@ **** ScriptNameResolverImpl::resolve DOC_STORAGE_ID_NOT_SET" );
|
||||
return resolvedName;
|
||||
}
|
||||
try
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: ScriptNameResolverImpl.hxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: jmrice $ $Date: 2002-09-27 12:16:26 $
|
||||
* last change: $Author: jmrice $ $Date: 2002-09-30 12:56:40 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
private:
|
||||
::com::sun::star::uno::Reference <
|
||||
::drafts::com::sun::star::script::framework::scripturi::XScriptURI >
|
||||
resolveURIFromStorageID( sal_Int16 sid,
|
||||
resolveURIFromStorageID( sal_uInt16 sid,
|
||||
const ::com::sun::star::uno::Reference <
|
||||
::drafts::com::sun::star::script::framework::scripturi::XScriptURI > &
|
||||
nameToResolve )
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: StorageBridgeFactory.cxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: jmrice $ $Date: 2002-09-27 12:16:27 $
|
||||
* last change: $Author: jmrice $ $Date: 2002-09-30 12:56:40 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -90,7 +90,7 @@ StorageBridgeFactory::StorageBridgeFactory(
|
||||
// use "real" storage.
|
||||
|
||||
Reference< storage::XScriptImplAccess >
|
||||
StorageBridgeFactory::getStorageInstance( sal_Int16 sid )
|
||||
StorageBridgeFactory::getStorageInstance( sal_uInt16 sid )
|
||||
{
|
||||
|
||||
Reference< storage::XScriptImplAccess > storage = new StorageBridge( m_xContext,
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: StorageBridgeFactory.hxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: jmrice $ $Date: 2002-09-27 12:16:27 $
|
||||
* last change: $Author: jmrice $ $Date: 2002-09-30 12:56:40 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
);
|
||||
::com::sun::star::uno::Reference <
|
||||
::drafts::com::sun::star::script::framework::storage::XScriptImplAccess >
|
||||
getStorageInstance( sal_Int16 sid );
|
||||
getStorageInstance( sal_uInt16 sid );
|
||||
private:
|
||||
StorageBridgeFactory(); // No definition for default ctor
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
|
||||
|
@@ -2,8 +2,8 @@
|
||||
*
|
||||
* $RCSfile: ScriptStorage.cxx,v $
|
||||
*
|
||||
* $Revision: 1.5 $
|
||||
* last change: $Author: jmrice $ $Date: 2002-09-30 10:59:39 $
|
||||
* $Revision: 1.6 $
|
||||
* last change: $Author: jmrice $ $Date: 2002-09-30 12:57:02 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -186,7 +186,7 @@ throw ( RuntimeException, Exception )
|
||||
|
||||
Reference< io::XInputStream > xInput;
|
||||
sal_Int32 languageDirsLength = languageDirs.getLength();
|
||||
for ( int i = 0; i < languageDirsLength ; ++i )
|
||||
for ( sal_Int32 i = 0; i < languageDirsLength ; ++i )
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
fprintf( stderr, "contains: %s\n", ::rtl::OUStringToOString( languageDirs[ i ],
|
||||
@@ -204,7 +204,7 @@ throw ( RuntimeException, Exception )
|
||||
m_xSimpleFileAccess->getFolderContents( languageDirs[ i ], true );
|
||||
|
||||
sal_Int32 parcelDirsLength = parcelDirs.getLength();
|
||||
for ( int j = 0; j < parcelDirsLength ; ++j )
|
||||
for ( sal_Int32 j = 0; j < parcelDirsLength ; ++j )
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
fprintf( stderr, "contains: %s\n",
|
||||
@@ -468,9 +468,17 @@ throw ( RuntimeException )
|
||||
{
|
||||
::osl::Guard< osl::Mutex > aGuard( m_mutex );
|
||||
|
||||
Sequence< Reference< storage::XScriptInfo > > sr_xScriptInfo;
|
||||
|
||||
//Get iterator over the hash_map
|
||||
ScriptInfo_hash::const_iterator h_iter = mh_implementations.find( name );
|
||||
Sequence< Reference< storage::XScriptInfo > > sr_xScriptInfo( h_iter->second.size() );
|
||||
|
||||
if ( h_iter == mh_implementations.end() )
|
||||
{
|
||||
OSL_TRACE("ScriptStorage::getScriptInfoService: EMPTY STORAGE");
|
||||
return sr_xScriptInfo;
|
||||
}
|
||||
sr_xScriptInfo.realloc( h_iter->second.size() );
|
||||
|
||||
try
|
||||
{
|
||||
@@ -706,7 +714,7 @@ throw ( RuntimeException )
|
||||
OUString new_dest;
|
||||
sal_Int32 idx;
|
||||
sal_Int32 len = seq.getLength();
|
||||
for ( int i = 0; i < len; i++ )
|
||||
for ( sal_Int32 i = 0; i < len; i++ )
|
||||
{
|
||||
new_dest = dest;
|
||||
idx = seq[ i ].lastIndexOf( '/' );
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: ScriptStorageManager.hxx,v $
|
||||
*
|
||||
* $Revision: 1.3 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
* last change: $Author: dfoster $ $Date: 2002-09-27 14:14:14 $
|
||||
* last change: $Author: jmrice $ $Date: 2002-09-30 12:57:03 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -80,7 +80,7 @@ namespace scripting_impl
|
||||
|
||||
// Define a hash_map used to store the ScriptingStorages key;d by ID
|
||||
typedef ::std::hash_map <
|
||||
sal_Int16,
|
||||
sal_uInt16,
|
||||
::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface > >
|
||||
ScriptStorage_hash;
|
||||
|
||||
@@ -92,7 +92,7 @@ public ::cppu::WeakImplHelper3 <
|
||||
public:
|
||||
explicit ScriptStorageManager(
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::uno::XComponentContext > & xContext )
|
||||
::com::sun::star::uno::XComponentContext > & xContext )
|
||||
SAL_THROW ( ( ::com::sun::star::uno::RuntimeException ) );
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ private:
|
||||
::com::sun::star::lang::XMultiComponentFactory > m_xMgr;
|
||||
::osl::Mutex m_mutex;
|
||||
ScriptStorage_hash m_ScriptStorageHash;
|
||||
sal_Int16 m_count;
|
||||
sal_uInt16 m_count;
|
||||
|
||||
void setupAppStorage(
|
||||
const ::com::sun::star::uno::Reference<
|
||||
|
Reference in New Issue
Block a user