diff options
author | Noel Grandin <noel@peralex.com> | 2016-01-13 12:06:54 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-01-13 12:16:23 +0200 |
commit | 8a43ba529a9cd5ba7658334f9546f978175921ab (patch) | |
tree | 341989675bc88cec3bd5cea0f1192e61b56255c3 | |
parent | c263b4ae5fa9f56199129febeeea74a036535cc2 (diff) |
loplugin:unusedmethods unused return value in ucb/
Change-Id: Ib988c919a21f58b7dc302810ec6c63534a51f382
-rw-r--r-- | ucb/source/cacher/contentresultsetwrapper.cxx | 6 | ||||
-rw-r--r-- | ucb/source/cacher/contentresultsetwrapper.hxx | 4 | ||||
-rw-r--r-- | ucb/source/core/ucb.cxx | 8 | ||||
-rw-r--r-- | ucb/source/core/ucb.hxx | 2 | ||||
-rw-r--r-- | ucb/source/inc/regexpmap.hxx | 34 | ||||
-rw-r--r-- | ucb/source/ucp/ftp/ftpstrcont.hxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchycontent.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchycontent.hxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkgcontent.cxx | 10 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkgcontent.hxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkgprovider.cxx | 5 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkgprovider.hxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_content.cxx | 20 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_content.hxx | 2 |
14 files changed, 33 insertions, 74 deletions
diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx b/ucb/source/cacher/contentresultsetwrapper.cxx index 6390550c8efd..ebad2c624f98 100644 --- a/ucb/source/cacher/contentresultsetwrapper.cxx +++ b/ucb/source/cacher/contentresultsetwrapper.cxx @@ -178,22 +178,20 @@ void SAL_CALL ContentResultSetWrapper::impl_EnsureNotDisposed() throw DisposedException(); } -ContentResultSetWrapper::PropertyChangeListenerContainer_Impl* SAL_CALL ContentResultSetWrapper::impl_getPropertyChangeListenerContainer() +void SAL_CALL ContentResultSetWrapper::impl_getPropertyChangeListenerContainer() { osl::Guard< osl::Mutex > aGuard( m_aMutex ); if ( !m_pPropertyChangeListeners ) m_pPropertyChangeListeners = new PropertyChangeListenerContainer_Impl( m_aContainerMutex ); - return m_pPropertyChangeListeners; } -ContentResultSetWrapper::PropertyChangeListenerContainer_Impl* SAL_CALL ContentResultSetWrapper::impl_getVetoableChangeListenerContainer() +void SAL_CALL ContentResultSetWrapper::impl_getVetoableChangeListenerContainer() { osl::Guard< osl::Mutex > aGuard( m_aMutex ); if ( !m_pVetoableChangeListeners ) m_pVetoableChangeListeners = new PropertyChangeListenerContainer_Impl( m_aContainerMutex ); - return m_pVetoableChangeListeners; } void SAL_CALL ContentResultSetWrapper::impl_notifyPropertyChangeListeners( const PropertyChangeEvent& rEvt ) diff --git a/ucb/source/cacher/contentresultsetwrapper.hxx b/ucb/source/cacher/contentresultsetwrapper.hxx index 138856ce27d2..baf84f181f2d 100644 --- a/ucb/source/cacher/contentresultsetwrapper.hxx +++ b/ucb/source/cacher/contentresultsetwrapper.hxx @@ -142,10 +142,10 @@ private: //methods: private: - PropertyChangeListenerContainer_Impl* SAL_CALL + void SAL_CALL impl_getPropertyChangeListenerContainer(); - PropertyChangeListenerContainer_Impl* SAL_CALL + void SAL_CALL impl_getVetoableChangeListenerContainer(); protected: diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx index 5f5cff3df809..b25e266b9c53 100644 --- a/ucb/source/core/ucb.cxx +++ b/ucb/source/core/ucb.cxx @@ -815,7 +815,7 @@ Reference< XContentProvider > UniversalContentBroker::queryContentProvider( : Reference< XContentProvider >(); } -bool UniversalContentBroker::configureUcb() +void UniversalContentBroker::configureUcb() throw (uno::RuntimeException) { OUString aKey1; @@ -824,19 +824,17 @@ bool UniversalContentBroker::configureUcb() || !(m_aArguments[0] >>= aKey1) || !(m_aArguments[1] >>= aKey2)) { OSL_FAIL("UniversalContentBroker::configureUcb(): Bad arguments"); - return false; + return; } ContentProviderDataList aData; if (!getContentProviderData(aKey1, aKey2, aData)) { OSL_TRACE("UniversalContentBroker::configureUcb(): No configuration"); - return false; + return; } prepareAndRegister(aData); - - return true; } void UniversalContentBroker::prepareAndRegister( diff --git a/ucb/source/core/ucb.hxx b/ucb/source/core/ucb.hxx index 4e094de42d63..a280832b2372 100644 --- a/ucb/source/core/ucb.hxx +++ b/ucb/source/core/ucb.hxx @@ -190,7 +190,7 @@ private: const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv ) throw( css::uno::Exception ); - bool configureUcb() + void configureUcb() throw ( css::uno::RuntimeException); bool getContentProviderData( diff --git a/ucb/source/inc/regexpmap.hxx b/ucb/source/inc/regexpmap.hxx index 7485e1e6e5f9..389b8fe1fcbc 100644 --- a/ucb/source/inc/regexpmap.hxx +++ b/ucb/source/inc/regexpmap.hxx @@ -268,8 +268,6 @@ public: RegexpMapConstIter operator ++(int); - RegexpMapEntry< Val > const & operator *() const; - RegexpMapEntry< Val > const * operator ->() const; bool equals(RegexpMapConstIter const & rOther) const; @@ -328,12 +326,6 @@ RegexpMapConstIter< Val > RegexpMapConstIter< Val >::operator ++(int) } template< typename Val > -RegexpMapEntry< Val > const & RegexpMapConstIter< Val >::operator *() const -{ - return m_pImpl->get(); -} - -template< typename Val > RegexpMapEntry< Val > const * RegexpMapConstIter< Val >::operator ->() const { return &m_pImpl->get(); @@ -359,10 +351,6 @@ public: RegexpMapIter operator ++(int); - RegexpMapEntry< Val > & operator *(); - - RegexpMapEntry< Val > const & operator *() const; - RegexpMapEntry< Val > * operator ->(); RegexpMapEntry< Val > const * operator ->() const; @@ -392,18 +380,6 @@ RegexpMapIter< Val > RegexpMapIter< Val >::operator ++(int) } template< typename Val > -RegexpMapEntry< Val > & RegexpMapIter< Val >::operator *() -{ - return this->m_pImpl->get(); -} - -template< typename Val > -RegexpMapEntry< Val > const & RegexpMapIter< Val >::operator *() const -{ - return this->m_pImpl->get(); -} - -template< typename Val > RegexpMapEntry< Val > * RegexpMapIter< Val >::operator ->() { return &this->m_pImpl->get(); @@ -432,7 +408,7 @@ public: RegexpMap & operator =(RegexpMap const & rOther); - bool add(OUString const & rKey, Val const & rValue, bool bOverwrite, + void add(OUString const & rKey, Val const & rValue, bool bOverwrite, OUString * pReverse = nullptr); iterator find(OUString const & rKey, OUString * pReverse = nullptr); @@ -481,7 +457,7 @@ RegexpMap< Val > & RegexpMap< Val >::operator =(RegexpMap const & rOther) } template< typename Val > -bool RegexpMap< Val >::add(rtl::OUString const & rKey, Val const & rValue, +void RegexpMap< Val >::add(rtl::OUString const & rKey, Val const & rValue, bool bOverwrite, rtl::OUString * pReverse) { Regexp aRegexp(Regexp::parse(rKey)); @@ -491,7 +467,7 @@ bool RegexpMap< Val >::add(rtl::OUString const & rKey, Val const & rValue, if (m_pImpl->m_pDefault) { if (!bOverwrite) - return false; + return; delete m_pImpl->m_pDefault; } m_pImpl->m_pDefault = new Entry< Val >(aRegexp, rValue); @@ -511,7 +487,7 @@ bool RegexpMap< Val >::add(rtl::OUString const & rKey, Val const & rValue, break; } else - return false; + return; } } @@ -520,8 +496,6 @@ bool RegexpMap< Val >::add(rtl::OUString const & rKey, Val const & rValue, if (pReverse) *pReverse = aRegexp.getRegexp(true); - - return true; } template< typename Val > diff --git a/ucb/source/ucp/ftp/ftpstrcont.hxx b/ucb/source/ucp/ftp/ftpstrcont.hxx index fe766ab9819d..44fda8f230b3 100644 --- a/ucb/source/ucp/ftp/ftpstrcont.hxx +++ b/ucb/source/ucp/ftp/ftpstrcont.hxx @@ -52,8 +52,6 @@ namespace ftp { explicit FTPInputStreamContainer(FTPInputStream* out); virtual ~FTPInputStreamContainer() {} - - css::uno::Reference< css::io::XInputStream> operator()(); }; } diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index 4260e7fffa5f..1961ff559784 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -694,13 +694,13 @@ bool HierarchyContent::storeData() } -bool HierarchyContent::renameData( +void HierarchyContent::renameData( const uno::Reference< ucb::XContentIdentifier >& xOldId, const uno::Reference< ucb::XContentIdentifier >& xNewId ) { HierarchyEntry aEntry( m_xContext, m_pProvider, xOldId->getContentIdentifier() ); - return aEntry.move( xNewId->getContentIdentifier(), + aEntry.move( xNewId->getContentIdentifier(), m_aProps.getHierarchyEntryData() ); } diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.hxx b/ucb/source/ucp/hierarchy/hierarchycontent.hxx index 60740ae039ca..ff2d46cd66c8 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.hxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.hxx @@ -143,7 +143,7 @@ private: const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier, HierarchyContentProperties& rProps ); bool storeData(); - bool renameData( const css::uno::Reference< css::ucb::XContentIdentifier >& xOldId, + void renameData( const css::uno::Reference< css::ucb::XContentIdentifier >& xOldId, const css::uno::Reference< css::ucb::XContentIdentifier >& xNewId ); bool removeData(); diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index c0929f272865..7bce4df0fb12 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -2439,7 +2439,7 @@ bool Content::loadData( } -bool Content::renameData( +void Content::renameData( const uno::Reference< ucb::XContentIdentifier >& xOldId, const uno::Reference< ucb::XContentIdentifier >& xNewId ) { @@ -2450,7 +2450,7 @@ bool Content::renameData( aURI ); if ( !xNA->hasByHierarchicalName( aURI.getPath() ) ) - return false; + return; try { @@ -2461,22 +2461,18 @@ bool Content::renameData( if ( !xNamed.is() ) { OSL_FAIL( "Content::renameData - Got no XNamed interface!" ); - return false; + return; } PackageUri aNewURI( xNewId->getContentIdentifier() ); // No success indicator!? No return value / exceptions specified. xNamed->setName( aNewURI.getName() ); - - return true; } catch ( container::NoSuchElementException const & ) { // getByHierarchicalName } - - return false; } diff --git a/ucb/source/ucp/package/pkgcontent.hxx b/ucb/source/ucp/package/pkgcontent.hxx index ff0a91741a54..241b92c03c67 100644 --- a/ucb/source/ucp/package/pkgcontent.hxx +++ b/ucb/source/ucp/package/pkgcontent.hxx @@ -155,7 +155,7 @@ private: bool hasData( const PackageUri& rURI ); - bool + void renameData( const css::uno::Reference< css::ucb::XContentIdentifier >& xOldId, const css::uno::Reference< css::ucb::XContentIdentifier >& xNewId ); bool diff --git a/ucb/source/ucp/package/pkgprovider.cxx b/ucb/source/ucp/package/pkgprovider.cxx index 64ebe11b3f69..b4e62b919ab7 100644 --- a/ucb/source/ucp/package/pkgprovider.cxx +++ b/ucb/source/ucp/package/pkgprovider.cxx @@ -262,7 +262,7 @@ ContentProvider::createPackage( const PackageUri & rURI ) } -bool ContentProvider::removePackage( const OUString & rName ) +void ContentProvider::removePackage( const OUString & rName ) { osl::MutexGuard aGuard( m_aMutex ); @@ -272,10 +272,9 @@ bool ContentProvider::removePackage( const OUString & rName ) if ( it != m_pPackages->end() ) { m_pPackages->erase( it ); - return true; + return; } } - return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/package/pkgprovider.hxx b/ucb/source/ucp/package/pkgprovider.hxx index cec29da07554..c335499c8b99 100644 --- a/ucb/source/ucp/package/pkgprovider.hxx +++ b/ucb/source/ucp/package/pkgprovider.hxx @@ -89,16 +89,12 @@ public: css::uno::RuntimeException, std::exception ) override; - // Additional interfaces - - - // Non-interface methods. css::uno::Reference< css::container::XHierarchicalNameAccess > createPackage( const PackageUri & rParam ); - bool + void removePackage( const OUString & rName ); }; diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx index d28f750576ab..d35cdda98faa 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.cxx +++ b/ucb/source/ucp/tdoc/tdoc_content.cxx @@ -2488,7 +2488,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xData, } -bool Content::renameData( +void Content::renameData( const uno::Reference< ucb::XContentIdentifier >& xOldId, const uno::Reference< ucb::XContentIdentifier >& xNewId ) { @@ -2498,7 +2498,7 @@ bool Content::renameData( if ( ( eType == ROOT ) || ( eType == DOCUMENT ) ) { OSL_FAIL( "renameData not supported by root and documents!" ); - return false; + return; } Uri aOldUri( xOldId->getContentIdentifier() ); @@ -2507,7 +2507,7 @@ bool Content::renameData( aOldUri.getParentUri(), READ_WRITE_NOCREATE ); if ( !xStorage.is() ) - return false; + return; try { @@ -2519,40 +2519,40 @@ bool Content::renameData( { // this storage is in invalid state for eny reason OSL_FAIL( "Caught InvalidStorageException!" ); - return false; + return; } catch ( lang::IllegalArgumentException const & ) { // an illegal argument is provided OSL_FAIL( "Caught IllegalArgumentException!" ); - return false; + return; } catch ( container::NoSuchElementException const & ) { // there is no element with old name in this storage OSL_FAIL( "Caught NoSuchElementException!" ); - return false; + return; } catch ( container::ElementExistException const & ) { // an element with new name already exists in this storage OSL_FAIL( "Caught ElementExistException!" ); - return false; + return; } catch ( io::IOException const & ) { // in case of io errors during renaming OSL_FAIL( "Caught IOException!" ); - return false; + return; } catch ( embed::StorageWrappedTargetException const & ) { // wraps other exceptions OSL_FAIL( "Caught StorageWrappedTargetException!" ); - return false; + return; } - return commitStorage( xStorage ); + commitStorage( xStorage ); } diff --git a/ucb/source/ucp/tdoc/tdoc_content.hxx b/ucb/source/ucp/tdoc/tdoc_content.hxx index 1ae0e658e383..8d04503cdca3 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.hxx +++ b/ucb/source/ucp/tdoc/tdoc_content.hxx @@ -126,7 +126,7 @@ private: throw ( css::ucb::CommandFailedException, css::task::DocumentPasswordRequest, css::uno::RuntimeException ); - bool renameData( const css::uno::Reference< css::ucb::XContentIdentifier >& xOldId, + void renameData( const css::uno::Reference< css::ucb::XContentIdentifier >& xOldId, const css::uno::Reference< css::ucb::XContentIdentifier >& xNewId ); bool removeData(); |