CWS-TOOLING: integrate CWS sb126

This commit is contained in:
Vladimir Glazunov 2010-09-28 17:07:12 +02:00
commit 73365c46d1
8 changed files with 39 additions and 72 deletions

View File

@ -241,7 +241,7 @@ Service::createInstanceWithArguments(
if (nodepath.getLength() == 0) { if (nodepath.getLength() == 0) {
badNodePath(); badNodePath();
} }
// For backwards compatibility, allow a notepath that misses the leading // For backwards compatibility, allow a nodepath that misses the leading
// slash: // slash:
if (nodepath[0] != '/') { if (nodepath[0] != '/') {
nodepath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + nodepath; nodepath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + nodepath;
@ -456,7 +456,8 @@ Factory::createInstanceWithArgumentsAndContext(
" arguments")), " arguments")),
0); 0);
} }
// For backwards compatibility, allow "Locale" in any case: // For backwards compatibility, allow "Locale" and (ignored)
// "EnableAsync" in any case:
if (name.equalsIgnoreAsciiCaseAsciiL( if (name.equalsIgnoreAsciiCaseAsciiL(
RTL_CONSTASCII_STRINGPARAM("locale"))) RTL_CONSTASCII_STRINGPARAM("locale")))
{ {
@ -471,8 +472,9 @@ Factory::createInstanceWithArgumentsAndContext(
" one, non-empty, string Locale argument")), " one, non-empty, string Locale argument")),
0); 0);
} }
} else { } else if (!name.equalsIgnoreAsciiCaseAsciiL(
//TODO RTL_CONSTASCII_STRINGPARAM("enableasync")))
{
throw css::uno::Exception( throw css::uno::Exception(
rtl::OUString( rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( RTL_CONSTASCII_USTRINGPARAM(

View File

@ -65,11 +65,6 @@ void Pad::clear() {
buffer_.setLength(0); buffer_.setLength(0);
} }
bool Pad::is() const {
OSL_ASSERT(!(span_.is() && buffer_.getLength() != 0));
return span_.is() || buffer_.getLength() != 0;
}
Span Pad::get() const { Span Pad::get() const {
OSL_ASSERT(!(span_.is() && buffer_.getLength() != 0)); OSL_ASSERT(!(span_.is() && buffer_.getLength() != 0));
if (span_.is()) { if (span_.is()) {

View File

@ -45,8 +45,6 @@ public:
void clear(); void clear();
bool is() const;
Span get() const; Span get() const;
private: private:

View File

@ -43,15 +43,14 @@ export SAL_ENABLE_FILE_LOCKING
#@# export JITC_PROCESSOR_TYPE=6 #@# export JITC_PROCESSOR_TYPE=6
# resolve installation directory # resolve installation directory
sd_cwd="`pwd`" sd_cwd=`pwd`
if [ -h "$0" ] ; then sd_res=$0
sd_basename=`basename "$0"` while [ -h "$sd_res" ] ; do
sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"` cd "`dirname "$sd_res"`"
cd "`dirname "$0"`" sd_basename=`basename "$sd_res"`
cd "`dirname "$sd_script"`" sd_res=`ls -l "$sd_basename" | sed "s/.*$sd_basename -> //g"`
else done
cd "`dirname "$0"`" cd "`dirname "$sd_res"`"
fi
sd_prog=`pwd` sd_prog=`pwd`
cd "$sd_cwd" cd "$sd_cwd"

View File

@ -29,14 +29,13 @@
set -e set -e
# resolve installation directory # resolve installation directory
if [ -h "$0" ] ; then sd_res=$0
sd_basename=`basename "$0"` while [ -h "$sd_res" ] ; do
sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"` cd "`dirname "$sd_res"`"
cd "`dirname "$0"`" sd_basename=`basename "$sd_res"`
cd "`dirname "$sd_script"`" sd_res=`ls -l "$sd_basename" | sed "s/.*$sd_basename -> //g"`
else done
cd "`dirname "$0"`" cd "`dirname "$sd_res"`"
fi
sd_prog=`pwd` sd_prog=`pwd`
case $1 in case $1 in

View File

@ -31,15 +31,14 @@ SAL_ENABLE_FILE_LOCKING=1
export SAL_ENABLE_FILE_LOCKING export SAL_ENABLE_FILE_LOCKING
# resolve installation directory # resolve installation directory
sd_cwd="`pwd`" sd_cwd=`pwd`
if [ -h "$0" ] ; then sd_res=$0
sd_basename=`basename "$0"` while [ -h "$sd_res" ] ; do
sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"` cd "`dirname "$sd_res"`"
cd "`dirname "$0"`" sd_basename=`basename "$sd_res"`
cd "`dirname "$sd_script"`" sd_res=`ls -l "$sd_basename" | sed "s/.*$sd_basename -> //g"`
else done
cd "`dirname "$0"`" cd "`dirname "$sd_res"`"
fi
sd_prog=`pwd` sd_prog=`pwd`
cd "$sd_cwd" cd "$sd_cwd"

View File

@ -274,8 +274,9 @@ UcbStore::createPropertySetRegistry( const OUString& )
{ {
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex ); osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
if ( !m_pImpl->m_xTheRegistry.is() ) if ( !m_pImpl->m_xTheRegistry.is() )
m_pImpl->m_xTheRegistry = new PropertySetRegistry( m_xSMgr, *this ); m_pImpl->m_xTheRegistry = new PropertySetRegistry( m_xSMgr, getInitArgs() );
} }
return m_pImpl->m_xTheRegistry; return m_pImpl->m_xTheRegistry;
} }
@ -293,22 +294,6 @@ void SAL_CALL UcbStore::initialize( const Sequence< Any >& aArguments )
m_pImpl->m_aInitArgs = aArguments; m_pImpl->m_aInitArgs = aArguments;
} }
//=========================================================================
//
// New methods.
//
//=========================================================================
void UcbStore::removeRegistry()
{
if ( m_pImpl->m_xTheRegistry.is() )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
if ( m_pImpl->m_xTheRegistry.is() )
m_pImpl->m_xTheRegistry = 0;
}
}
//========================================================================= //=========================================================================
const Sequence< Any >& UcbStore::getInitArgs() const const Sequence< Any >& UcbStore::getInitArgs() const
{ {
@ -323,7 +308,7 @@ const Sequence< Any >& UcbStore::getInitArgs() const
struct PropertySetRegistry_Impl struct PropertySetRegistry_Impl
{ {
UcbStore* m_pCreator; const Sequence< Any > m_aInitArgs;
PropertySetMap_Impl m_aPropSets; PropertySetMap_Impl m_aPropSets;
Reference< XMultiServiceFactory > m_xConfigProvider; Reference< XMultiServiceFactory > m_xConfigProvider;
Reference< XInterface > m_xRootReadAccess; Reference< XInterface > m_xRootReadAccess;
@ -332,18 +317,11 @@ struct PropertySetRegistry_Impl
sal_Bool m_bTriedToGetRootReadAccess; // #82494# sal_Bool m_bTriedToGetRootReadAccess; // #82494#
sal_Bool m_bTriedToGetRootWriteAccess; // #82494# sal_Bool m_bTriedToGetRootWriteAccess; // #82494#
PropertySetRegistry_Impl( UcbStore& rCreator ) PropertySetRegistry_Impl( const Sequence< Any > &rInitArgs )
: m_pCreator( &rCreator ), : m_aInitArgs( rInitArgs ),
m_bTriedToGetRootReadAccess( sal_False ), m_bTriedToGetRootReadAccess( sal_False ),
m_bTriedToGetRootWriteAccess( sal_False ) m_bTriedToGetRootWriteAccess( sal_False )
{ {
m_pCreator->acquire();
}
~PropertySetRegistry_Impl()
{
m_pCreator->removeRegistry();
m_pCreator->release();
} }
}; };
@ -359,9 +337,9 @@ struct PropertySetRegistry_Impl
PropertySetRegistry::PropertySetRegistry( PropertySetRegistry::PropertySetRegistry(
const Reference< XMultiServiceFactory >& rXSMgr, const Reference< XMultiServiceFactory >& rXSMgr,
UcbStore& rCreator ) const Sequence< Any > &rInitArgs )
: m_xSMgr( rXSMgr ), : m_xSMgr( rXSMgr ),
m_pImpl( new PropertySetRegistry_Impl( rCreator ) ) m_pImpl( new PropertySetRegistry_Impl( rInitArgs ) )
{ {
} }
@ -1094,8 +1072,7 @@ Reference< XMultiServiceFactory > PropertySetRegistry::getConfigProvider()
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex ); osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
if ( !m_pImpl->m_xConfigProvider.is() ) if ( !m_pImpl->m_xConfigProvider.is() )
{ {
const Sequence< Any >& rInitArgs const Sequence< Any >& rInitArgs = m_pImpl->m_aInitArgs;
= m_pImpl->m_pCreator->getInitArgs();
if ( rInitArgs.getLength() > 0 ) if ( rInitArgs.getLength() > 0 )
{ {

View File

@ -93,9 +93,6 @@ public:
throw( ::com::sun::star::uno::Exception, throw( ::com::sun::star::uno::Exception,
::com::sun::star::uno::RuntimeException ); ::com::sun::star::uno::RuntimeException );
// New
void removeRegistry();
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >&
getInitArgs() const; getInitArgs() const;
}; };
@ -132,7 +129,8 @@ public:
PropertySetRegistry( PropertySetRegistry(
const com::sun::star::uno::Reference< const com::sun::star::uno::Reference<
com::sun::star::lang::XMultiServiceFactory >& rXSMgr, com::sun::star::lang::XMultiServiceFactory >& rXSMgr,
UcbStore& rCreator ); const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Any >& rInitArgs);
virtual ~PropertySetRegistry(); virtual ~PropertySetRegistry();
// XInterface // XInterface