summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-02 13:38:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-04 14:06:14 +0200
commit27f1827afa11ba9c5d912614dc84dd308ecf8b5f (patch)
tree1c1970f9f2d2eacc2c57ccd0fb1b7e8687652241 /ucb
parent2a338d521618333a0630a31b46fd0fc9decbe0e5 (diff)
loplugin:reducevarscope in toolkit..unotools
Change-Id: I439b9f456ac0bfaa3eb9bf17472053bd4787e828 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/cacher/cachedcontentresultsetstub.cxx2
-rw-r--r--ucb/source/core/ucbstore.cxx7
-rw-r--r--ucb/source/ucp/file/filtask.cxx11
-rw-r--r--ucb/source/ucp/webdav-neon/webdavcontent.cxx2
4 files changed, 10 insertions, 12 deletions
diff --git a/ucb/source/cacher/cachedcontentresultsetstub.cxx b/ucb/source/cacher/cachedcontentresultsetstub.cxx
index cedd3d588dac..f570929e1ebf 100644
--- a/ucb/source/cacher/cachedcontentresultsetstub.cxx
+++ b/ucb/source/cacher/cachedcontentresultsetstub.cxx
@@ -226,9 +226,9 @@ FetchResult CachedContentResultSetStub::impl_fetchHelper(
if( !nOldOriginal_Pos )
bOldOriginal_AfterLast = m_xResultSetOrigin->isAfterLast();
sal_Int32 nN = 1;
- bool bValidNewPos = false;
try
{
+ bool bValidNewPos = false;
try
{
/*if( nOldOriginal_Pos != nRowStartPosition )*/
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 3274c777fdc5..1ee882ff18d4 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -1553,15 +1553,12 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
- OUString aFullValuesName;
- OUString aFullPropName;
-
Reference< XHierarchicalNameAccess > xRootHierNameAccess(
m_pImpl->m_pCreator->getRootConfigReadAccess(), UNO_QUERY );
if ( xRootHierNameAccess.is() )
{
- aFullValuesName = getFullKey();
- aFullPropName = aFullValuesName + "/";
+ OUString aFullValuesName = getFullKey();
+ OUString aFullPropName = aFullValuesName + "/";
aFullPropName += makeHierarchalNameSegment( Name );
// Property in set?
diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx
index 790dd3d7ba8c..4a8a36a35516 100644
--- a/ucb/source/ucp/file/filtask.cxx
+++ b/ucb/source/ucp/file/filtask.cxx
@@ -2274,7 +2274,7 @@ TaskManager::commit( const TaskManager::ContentMap::iterator& it,
}
- bool isDirectory,isFile,isVolume,isRemoveable,isRemote,isFloppy,isCompactDisc;
+ bool isDirectory;
sal_Int64 dirSize = 0;
@@ -2283,6 +2283,7 @@ TaskManager::commit( const TaskManager::ContentMap::iterator& it,
if( aFileStatus.isValid( osl_FileStatus_Mask_Type ) )
{
+ bool isFile,isVolume;
if( osl::FileStatus::Link == aFileStatus.getFileType() &&
aFileStatus.isValid( osl_FileStatus_Mask_LinkTargetURL ) )
{
@@ -2343,10 +2344,10 @@ TaskManager::commit( const TaskManager::ContentMap::iterator& it,
aVolumeInfo.isValid( osl_VolumeInfo_Mask_Attributes ) )
{
// Retrieve the flags;
- isRemote = aVolumeInfo.getRemoteFlag();
- isRemoveable = aVolumeInfo.getRemoveableFlag();
- isCompactDisc = aVolumeInfo.getCompactDiscFlag();
- isFloppy = aVolumeInfo.getFloppyDiskFlag();
+ bool isRemote = aVolumeInfo.getRemoteFlag();
+ bool isRemoveable = aVolumeInfo.getRemoveableFlag();
+ bool isCompactDisc = aVolumeInfo.getCompactDiscFlag();
+ bool isFloppy = aVolumeInfo.getFloppyDiskFlag();
it1 = properties.find( MyProperty( IsRemote ) );
if( it1 != properties.end() )
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index fd78627c146f..a874390ceb33 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -3921,12 +3921,12 @@ void Content::getResourceOptions(
const std::unique_ptr< DAVResourceAccess > & rResAccess,
bool * networkAccessAllowed )
{
- OUString aRedirURL;
OUString aTargetURL = rResAccess->getURL();
DAVOptions aDAVOptions;
// first check if in cache, if not, then send method to server
if ( !aStaticDAVOptionsCache.getDAVOptions( aTargetURL, aDAVOptions ) )
{
+ OUString aRedirURL;
try
{
rResAccess->OPTIONS( aDAVOptions, xEnv );