From ba8919e8129b5e8da112ad4f1d11bb39096c1e0e Mon Sep 17 00:00:00 2001 From: Elton Chung Date: Sat, 25 Feb 2012 13:52:32 +0800 Subject: Remove unused code --- .../source/container/containermultiplexer.cxx | 12 --- comphelper/source/misc/accessibleeventnotifier.cxx | 14 ---- comphelper/source/misc/interaction.cxx | 6 -- comphelper/source/misc/logging.cxx | 85 ---------------------- comphelper/source/misc/officeresourcebundle.cxx | 8 -- comphelper/source/misc/serviceinfohelper.cxx | 24 ------ comphelper/source/property/propertysethelper.cxx | 17 ----- comphelper/source/property/propertysetinfo.cxx | 5 -- comphelper/source/streaming/streamsection.cxx | 14 ---- comphelper/source/xml/attributelist.cxx | 25 ------- 10 files changed, 210 deletions(-) (limited to 'comphelper/source') diff --git a/comphelper/source/container/containermultiplexer.cxx b/comphelper/source/container/containermultiplexer.cxx index d5a957aaf69e..b4d5723af40e 100644 --- a/comphelper/source/container/containermultiplexer.cxx +++ b/comphelper/source/container/containermultiplexer.cxx @@ -126,18 +126,6 @@ namespace comphelper { } - //------------------------------------------------------------------ - void OContainerListenerAdapter::lock() - { - ++m_nLockCount; - } - - //------------------------------------------------------------------ - void OContainerListenerAdapter::unlock() - { - --m_nLockCount; - } - //------------------------------------------------------------------ void OContainerListenerAdapter::dispose() { diff --git a/comphelper/source/misc/accessibleeventnotifier.cxx b/comphelper/source/misc/accessibleeventnotifier.cxx index cae07bc567f6..636d356a81c9 100644 --- a/comphelper/source/misc/accessibleeventnotifier.cxx +++ b/comphelper/source/misc/accessibleeventnotifier.cxx @@ -201,20 +201,6 @@ namespace comphelper return aClientPos->second->getLength(); } - //--------------------------------------------------------------------- - Sequence< Reference< XInterface > > AccessibleEventNotifier::getEventListeners( const TClientId _nClient ) SAL_THROW( ( ) ) - { - Sequence< Reference< XInterface > > aListeners; - - ::osl::MutexGuard aGuard( lclMutex::get() ); - - ClientMap::iterator aClientPos; - if ( implLookupClient( _nClient, aClientPos ) ) - aListeners = aClientPos->second->getElements(); - - return aListeners; - } - //--------------------------------------------------------------------- void AccessibleEventNotifier::addEvent( const TClientId _nClient, const AccessibleEventObject& _rEvent ) SAL_THROW( ( ) ) { diff --git a/comphelper/source/misc/interaction.cxx b/comphelper/source/misc/interaction.cxx index cce5e6a9337f..fd8bce046d50 100644 --- a/comphelper/source/misc/interaction.cxx +++ b/comphelper/source/misc/interaction.cxx @@ -73,12 +73,6 @@ namespace comphelper } } - //------------------------------------------------------------------------- - void OInteractionRequest::clearContinuations() - { - m_aContinuations.realloc(0); - } - //------------------------------------------------------------------------- Any SAL_CALL OInteractionRequest::getRequest( ) throw(RuntimeException) { diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx index 1d95b154aa51..98a497cc7498 100644 --- a/comphelper/source/misc/logging.cxx +++ b/comphelper/source/misc/logging.cxx @@ -126,44 +126,6 @@ namespace comphelper { } - //-------------------------------------------------------------------- - const ::rtl::OUString& EventLogger::getName() const - { - return m_pImpl->getName(); - } - - //-------------------------------------------------------------------- - sal_Int32 EventLogger::getLogLevel() const - { - try - { - if ( m_pImpl->isValid() ) - return m_pImpl->getLogger()->getLevel(); - } - catch( const Exception& e ) - { - (void)e; - OSL_FAIL( "EventLogger::getLogLevel: caught an exception!" ); - } - - return LogLevel::OFF; - } - - //-------------------------------------------------------------------- - void EventLogger::setLogLevel( const sal_Int32 _nLogLevel ) const - { - try - { - if ( m_pImpl->isValid() ) - m_pImpl->getLogger()->setLevel( _nLogLevel ); - } - catch( const Exception& e ) - { - (void)e; - OSL_FAIL( "EventLogger::setLogLevel: caught an exception!" ); - } - } - //-------------------------------------------------------------------- bool EventLogger::isLoggable( const sal_Int32 _nLogLevel ) const { @@ -183,44 +145,6 @@ namespace comphelper return false; } - //-------------------------------------------------------------------- - bool EventLogger::addLogHandler( const Reference< XLogHandler >& _rxLogHandler ) - { - try - { - if ( m_pImpl->isValid() ) - { - m_pImpl->getLogger()->addLogHandler( _rxLogHandler ); - return true; - } - } - catch( const Exception& e ) - { - (void)e; - OSL_FAIL( "EventLogger::addLogHandler: caught an exception!" ); - } - return false; - } - - //-------------------------------------------------------------------- - bool EventLogger::removeLogHandler( const Reference< XLogHandler >& _rxLogHandler ) - { - try - { - if ( m_pImpl->isValid() ) - { - m_pImpl->getLogger()->removeLogHandler( _rxLogHandler ); - return true; - } - } - catch( const Exception& e ) - { - (void)e; - OSL_FAIL( "EventLogger::removeLogHandler: caught an exception!" ); - } - return false; - } - //-------------------------------------------------------------------- namespace { @@ -362,15 +286,6 @@ namespace comphelper //==================================================================== //= ResourceBasedEventLogger //==================================================================== - //-------------------------------------------------------------------- - ResourceBasedEventLogger::ResourceBasedEventLogger( const Reference< XComponentContext >& _rxContext, const ::rtl::OUString& _rResourceBundleBaseName, - const ::rtl::OUString& _rLoggerName ) - :EventLogger( _rxContext, _rLoggerName ) - ,m_pData( new ResourceBasedEventLogger_Data ) - { - m_pData->sBundleBaseName = _rResourceBundleBaseName; - } - //-------------------------------------------------------------------- ResourceBasedEventLogger::ResourceBasedEventLogger( const Reference< XComponentContext >& _rxContext, const sal_Char* _pResourceBundleBaseName, const sal_Char* _pAsciiLoggerName ) diff --git a/comphelper/source/misc/officeresourcebundle.cxx b/comphelper/source/misc/officeresourcebundle.cxx index 16193185de5d..db51b134cef1 100644 --- a/comphelper/source/misc/officeresourcebundle.cxx +++ b/comphelper/source/misc/officeresourcebundle.cxx @@ -201,14 +201,6 @@ namespace comphelper //==================================================================== //= OfficeResourceBundle //==================================================================== - //-------------------------------------------------------------------- - OfficeResourceBundle::OfficeResourceBundle( const Reference< XComponentContext >& _context, const ::rtl::OUString& _bundleBaseName ) - :m_pImpl( new ResourceBundle_Impl( _context, _bundleBaseName ) ) - { - if ( !_context.is() ) - throw NullPointerException(); - } - //-------------------------------------------------------------------- OfficeResourceBundle::OfficeResourceBundle( const Reference< XComponentContext >& _context, const sal_Char* _bundleBaseAsciiName ) :m_pImpl( new ResourceBundle_Impl( _context, ::rtl::OUString::createFromAscii( _bundleBaseAsciiName ) ) ) diff --git a/comphelper/source/misc/serviceinfohelper.cxx b/comphelper/source/misc/serviceinfohelper.cxx index f90598e93489..1d648ae29139 100644 --- a/comphelper/source/misc/serviceinfohelper.cxx +++ b/comphelper/source/misc/serviceinfohelper.cxx @@ -63,30 +63,6 @@ sal_Bool SAL_CALL ServiceInfoHelper::supportsService( const ::rtl::OUString& Ser return aSeq; } -/** this method concatenates the given sequences and returns the result - */ -::com::sun::star::uno::Sequence< ::rtl::OUString > ServiceInfoHelper::concatSequences( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rSeq1, - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rSeq2 ) throw() -{ - const sal_Int32 nLen1 = rSeq1.getLength(); - const sal_Int32 nLen2 = rSeq2.getLength(); - - ::com::sun::star::uno::Sequence< ::rtl::OUString > aSeq( nLen1 + nLen2 ); - - ::rtl::OUString* pStrings = aSeq.getArray(); - - sal_Int32 nIdx; - const ::rtl::OUString* pStringSrc = rSeq1.getConstArray(); - for( nIdx = 0; nIdx < nLen1; nIdx++ ) - *pStrings++ = *pStringSrc++; - - pStringSrc = rSeq2.getConstArray(); - for( nIdx = 0; nIdx < nLen2; nIdx++ ) - *pStrings++ = *pStringSrc++; - - return aSeq; -} - /** this method adds a variable number of char pointer to a given Sequence */ void ServiceInfoHelper::addToSequence( ::com::sun::star::uno::Sequence< ::rtl::OUString >& rSeq, sal_uInt16 nServices, /* char * */ ... ) throw() diff --git a/comphelper/source/property/propertysethelper.cxx b/comphelper/source/property/propertysethelper.cxx index 19646af5c5ad..43b2b4df4927 100644 --- a/comphelper/source/property/propertysethelper.cxx +++ b/comphelper/source/property/propertysethelper.cxx @@ -66,13 +66,6 @@ PropertyMapEntry* PropertySetHelperImpl::find( const OUString& aName ) const thr /////////////////////////////////////////////////////////////////////// -PropertySetHelper::PropertySetHelper( ) -{ - mp = new PropertySetHelperImpl; - mp->mpInfo = new PropertySetInfo; - mp->mpInfo->acquire(); -} - PropertySetHelper::PropertySetHelper( comphelper::PropertySetInfo* pInfo ) throw() { mp = new PropertySetHelperImpl; @@ -92,16 +85,6 @@ PropertySetHelper::~PropertySetHelper() throw() delete mp; } -void PropertySetHelper::setInfo( comphelper::PropertySetInfo* pInfo ) throw() -{ - OSL_ENSURE( pInfo != NULL, "need pInfo" ); - OSL_ENSURE( mp->mpInfo != NULL, "where's the old pInfo?" ); - - mp->mpInfo->release(); - mp->mpInfo = pInfo; - mp->mpInfo->acquire(); -} - // XPropertySet Reference< XPropertySetInfo > SAL_CALL PropertySetHelper::getPropertySetInfo( ) throw(RuntimeException) { diff --git a/comphelper/source/property/propertysetinfo.cxx b/comphelper/source/property/propertysetinfo.cxx index 547277783ae8..c007f6b74ebd 100644 --- a/comphelper/source/property/propertysetinfo.cxx +++ b/comphelper/source/property/propertysetinfo.cxx @@ -182,11 +182,6 @@ void PropertySetInfo::add( PropertyMapEntry* pMap ) throw() mpMap->add( pMap ); } -void PropertySetInfo::add( PropertyMapEntry* pMap, sal_Int32 nCount ) throw() -{ - mpMap->add( pMap, nCount ); -} - void PropertySetInfo::remove( const rtl::OUString& aName ) throw() { mpMap->remove( aName ); diff --git a/comphelper/source/streaming/streamsection.cxx b/comphelper/source/streaming/streamsection.cxx index 249a1642f925..25b1efefd4f5 100644 --- a/comphelper/source/streaming/streamsection.cxx +++ b/comphelper/source/streaming/streamsection.cxx @@ -101,20 +101,6 @@ OStreamSection::~OStreamSection() } } // ----------------------------------------------------------------------------- -sal_Int32 OStreamSection::available() -{ - sal_Int32 nBytes = 0; - try - { // don't allow any exceptions to leave this block, this may be called during the stack unwinding of an exception - if (m_xInStream.is() && m_xMarkStream.is()) - nBytes = m_xMarkStream->offsetToMark(m_nBlockStart) - sizeof(m_nBlockLen); - } - catch(const staruno::Exception&) - { - } - return nBytes; -} -// ----------------------------------------------------------------------------- } // namespace comphelper diff --git a/comphelper/source/xml/attributelist.cxx b/comphelper/source/xml/attributelist.cxx index a31ea94fa7a2..5fbb81ffb766 100644 --- a/comphelper/source/xml/attributelist.cxx +++ b/comphelper/source/xml/attributelist.cxx @@ -131,31 +131,6 @@ void AttributeList::AddAttribute( const OUString &sName , m_pImpl->vecAttribute.push_back( TagAttribute_Impl( sName , sType , sValue ) ); } -void AttributeList::Clear() -{ - m_pImpl->vecAttribute.clear(); - - OSL_ENSURE( ! getLength(), "Length > 0 after AttributeList::Clear!"); -} - -void AttributeList::AppendAttributeList( const uno::Reference< ::com::sun::star::xml::sax::XAttributeList > &r ) -{ - OSL_ENSURE( r.is(), "r isn't!" ); - - sal_Int32 nMax = r->getLength(); - sal_Int32 nTotalSize = m_pImpl->vecAttribute.size() + nMax; - m_pImpl->vecAttribute.reserve( nTotalSize ); - - for( sal_Int16 i = 0 ; i < nMax ; i ++ ) { - m_pImpl->vecAttribute.push_back( TagAttribute_Impl( - r->getNameByIndex( i ) , - r->getTypeByIndex( i ) , - r->getValueByIndex( i ))); - } - - OSL_ENSURE( nTotalSize == getLength(), "nTotalSize != getLength()"); -} - } // namespace comphelper /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit