summaryrefslogtreecommitdiff
path: root/ucb/source/ucp
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-13 12:06:54 +0200
committerNoel Grandin <noel@peralex.com>2016-01-13 12:16:23 +0200
commit8a43ba529a9cd5ba7658334f9546f978175921ab (patch)
tree341989675bc88cec3bd5cea0f1192e61b56255c3 /ucb/source/ucp
parentc263b4ae5fa9f56199129febeeea74a036535cc2 (diff)
loplugin:unusedmethods unused return value in ucb/
Change-Id: Ib988c919a21f58b7dc302810ec6c63534a51f382
Diffstat (limited to 'ucb/source/ucp')
-rw-r--r--ucb/source/ucp/ftp/ftpstrcont.hxx2
-rw-r--r--ucb/source/ucp/hierarchy/hierarchycontent.cxx4
-rw-r--r--ucb/source/ucp/hierarchy/hierarchycontent.hxx2
-rw-r--r--ucb/source/ucp/package/pkgcontent.cxx10
-rw-r--r--ucb/source/ucp/package/pkgcontent.hxx2
-rw-r--r--ucb/source/ucp/package/pkgprovider.cxx5
-rw-r--r--ucb/source/ucp/package/pkgprovider.hxx6
-rw-r--r--ucb/source/ucp/tdoc/tdoc_content.cxx20
-rw-r--r--ucb/source/ucp/tdoc/tdoc_content.hxx2
9 files changed, 21 insertions, 32 deletions
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();