summaryrefslogtreecommitdiff
path: root/ucb/source/ucp
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-27 14:06:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-28 08:55:10 +0200
commit26c82e22bf4f077022ae88d0a7f8ad0fa6d2a5ba (patch)
tree42bf27db4a1da0fa3ea3bdd7997e7058c1638f98 /ucb/source/ucp
parentef531e85d95fe18d553bce1a6926d24c08ffe2bf (diff)
loplugin:oncevar in ucb..vbahelper
Change-Id: I1fc7c7505a42b3bf9d4a5ab22961930b9831d4ae Reviewed-on: https://gerrit.libreoffice.org/39327 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb/source/ucp')
-rw-r--r--ucb/source/ucp/cmis/auth_provider.cxx3
-rw-r--r--ucb/source/ucp/ext/ucpext_content.cxx4
-rw-r--r--ucb/source/ucp/file/filglob.cxx3
-rw-r--r--ucb/source/ucp/file/filrset.cxx12
-rw-r--r--ucb/source/ucp/file/filtask.cxx5
-rw-r--r--ucb/source/ucp/tdoc/tdoc_storage.cxx2
-rw-r--r--ucb/source/ucp/webdav-neon/LinkSequence.cxx10
7 files changed, 13 insertions, 26 deletions
diff --git a/ucb/source/ucp/cmis/auth_provider.cxx b/ucb/source/ucp/cmis/auth_provider.cxx
index b3370eb26fab..c6d5b28bcb56 100644
--- a/ucb/source/ucp/cmis/auth_provider.cxx
+++ b/ucb/source/ucp/cmis/auth_provider.cxx
@@ -126,7 +126,6 @@ namespace cmis
const char* /*password*/ )
{
OUString instructions = "PIN:";
- OUString url_oustr( "" );
const css::uno::Reference<
css::ucb::XCommandEnvironment> xEnv = getXEnv( );
@@ -139,7 +138,7 @@ namespace cmis
{
rtl::Reference< ucbhelper::AuthenticationFallbackRequest > xRequest
= new ucbhelper::AuthenticationFallbackRequest (
- instructions, url_oustr );
+ instructions, "" );
xIH->handle( xRequest.get() );
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index 1dd52774ab9f..378c402db518 100644
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -528,10 +528,8 @@ namespace ucb { namespace ucp { namespace ext
Sequence< CommandInfo > Content::getCommands( const Reference< XCommandEnvironment > & /*xEnv*/ )
{
- sal_uInt32 nCommandCount = 5;
static const CommandInfo aCommandInfoTable[] =
{
-
// Mandatory commands
CommandInfo(
@@ -564,7 +562,7 @@ namespace ucb { namespace ucp { namespace ext
)
};
- return Sequence< CommandInfo >( aCommandInfoTable, nCommandCount );
+ return Sequence< CommandInfo >( aCommandInfoTable, SAL_N_ELEMENTS(aCommandInfoTable) );
}
diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx
index 32010ebf050e..83c6e2ca1a9c 100644
--- a/ucb/source/ucp/file/filglob.cxx
+++ b/ucb/source/ucp/file/filglob.cxx
@@ -186,8 +186,7 @@ namespace fileaccess {
OUString getTitle( const OUString& aPath )
{
- sal_Unicode slash = '/';
- sal_Int32 lastIndex = aPath.lastIndexOf( slash );
+ sal_Int32 lastIndex = aPath.lastIndexOf( '/' );
return aPath.copy( lastIndex + 1 );
}
diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx
index 3234e975ab10..ff49703198a5 100644
--- a/ucb/source/ucp/file/filrset.cxx
+++ b/ucb/source/ucp/file/filrset.cxx
@@ -190,10 +190,8 @@ void XResultSet_impl::isFinalChanged()
aEv.PropertyName = "IsRowCountFinal";
aEv.Further = false;
aEv.PropertyHandle = -1;
- bool fval = false;
- bool tval = true;
- aEv.OldValue <<= fval;
- aEv.NewValue <<= tval;
+ aEv.OldValue <<= false;
+ aEv.NewValue <<= true;
for( const auto& r : seq )
{
uno::Reference< beans::XPropertyChangeListener > listener(
@@ -609,12 +607,10 @@ XResultSet_impl::getMetaData()
{
if ( m_sProperty.getConstArray()[ n ].Name == "Title" )
{
- // @@@ #82177# - Determine correct value!
- bool bCaseSensitiveChildren = false;
-
std::vector< ::ucbhelper::ResultSetColumnData >
aColumnData( m_sProperty.getLength() );
- aColumnData[ n ].isCaseSensitive = bCaseSensitiveChildren;
+ // @@@ #82177# - Determine correct value!
+ aColumnData[ n ].isCaseSensitive = false;
::ucbhelper::ResultSetMetaData* p =
new ::ucbhelper::ResultSetMetaData(
diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx
index efad9a8ed735..8ae56e8fba74 100644
--- a/ucb/source/ucp/file/filtask.cxx
+++ b/ucb/source/ucp/file/filtask.cxx
@@ -978,12 +978,11 @@ TaskManager::setv( const OUString& aUnqPath,
"Uri", -1,
uno::makeAny(aUnqPath),
beans::PropertyState_DIRECT_VALUE);
- IOErrorCode ioError(IOErrorCode_GENERAL);
ret[i] <<= InteractiveAugmentedIOException(
OUString(),
nullptr,
task::InteractionClassification_ERROR,
- ioError,
+ IOErrorCode_GENERAL,
names );
}
}
@@ -2069,7 +2068,7 @@ TaskManager::copy_recursive( const OUString& srcUnqPath,
osl::FileBase::RC next = err;
if( err == osl::FileBase::E_None )
{
- sal_Int32 n_Mask = osl_FileStatus_Mask_FileURL | osl_FileStatus_Mask_FileName | osl_FileStatus_Mask_Type;
+ sal_Int32 const n_Mask = osl_FileStatus_Mask_FileURL | osl_FileStatus_Mask_FileName | osl_FileStatus_Mask_Type;
osl::DirectoryItem aDirItem;
diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx
index 39a0742d2ab8..f21c656795d2 100644
--- a/ucb/source/ucp/tdoc/tdoc_storage.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx
@@ -456,7 +456,7 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage(
{
try
{
- sal_Int32 nOpenMode = embed::ElementModes::READ
+ sal_Int32 const nOpenMode = embed::ElementModes::READ
| embed::ElementModes::NOCREATE;
xStorage
= xParentStorage->openStorageElement( rName, nOpenMode );
diff --git a/ucb/source/ucp/webdav-neon/LinkSequence.cxx b/ucb/source/ucp/webdav-neon/LinkSequence.cxx
index 392584ebf5fc..cad12cda2894 100644
--- a/ucb/source/ucp/webdav-neon/LinkSequence.cxx
+++ b/ucb/source/ucp/webdav-neon/LinkSequence.cxx
@@ -197,17 +197,13 @@ bool LinkSequence::toXML( const uno::Sequence< ucb::Link > & rInData,
sal_Int32 nCount = rInData.getLength();
if ( nCount )
{
- OUString aPre( "<link><src>" );
- OUString aMid( "</src><dst>" );
- OUString aEnd( "</dst></link>" );
-
for ( sal_Int32 n = 0; n < nCount; ++n )
{
- rOutData += aPre;
+ rOutData += "<link><src>";
rOutData += rInData[ n ].Source;
- rOutData += aMid;
+ rOutData += "</src><dst>";
rOutData += rInData[ n ].Destination;
- rOutData += aEnd;
+ rOutData += "</dst></link>";
}
return true;
}