Kaydet (Commit) 897493fb authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:sequentialassign in ucb..vbahelper

Change-Id: I0fff9ee06225d4ff2e9c0611b1b11f1d3b896be2
Reviewed-on: https://gerrit.libreoffice.org/70733
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 7facde27
......@@ -2136,8 +2136,7 @@ Reference< XResultSet > SAL_CALL CachedContentResultSetFactory
const Reference< XResultSet > & xSource,
const Reference< XContentIdentifierMapping > & xMapping )
{
Reference< XResultSet > xRet;
xRet = new CachedContentResultSet( m_xContext, xSource, xMapping );
Reference< XResultSet > xRet = new CachedContentResultSet( m_xContext, xSource, xMapping );
return xRet;
}
......
......@@ -572,8 +572,7 @@ Reference< XResultSet > SAL_CALL CachedContentResultSetStubFactory
{
if( xSource.is() )
{
Reference< XResultSet > xRet;
xRet = new CachedContentResultSetStub( xSource );
Reference< XResultSet > xRet = new CachedContentResultSetStub( xSource );
return xRet;
}
return nullptr;
......
......@@ -227,8 +227,7 @@ Reference< XDynamicResultSet > SAL_CALL CachedDynamicResultSetFactory
const Reference< XDynamicResultSet > & SourceStub
, const Reference< XContentIdentifierMapping > & ContentIdentifierMapping )
{
Reference< XDynamicResultSet > xRet;
xRet = new CachedDynamicResultSet( SourceStub, ContentIdentifierMapping, m_xContext );
Reference< XDynamicResultSet > xRet = new CachedDynamicResultSet( SourceStub, ContentIdentifierMapping, m_xContext );
return xRet;
}
......
......@@ -218,8 +218,7 @@ Reference< XDynamicResultSet > SAL_CALL CachedDynamicResultSetStubFactory
::createCachedDynamicResultSetStub(
const Reference< XDynamicResultSet > & Source )
{
Reference< XDynamicResultSet > xRet;
xRet = new CachedDynamicResultSetStub( Source, m_xContext );
Reference< XDynamicResultSet > xRet = new CachedDynamicResultSetStub( Source, m_xContext );
return xRet;
}
......
......@@ -473,8 +473,7 @@ SortedDynamicResultSetFactory::createSortedDynamicResultSet(
const Sequence< NumberedSortingInfo > & Info,
const Reference< XAnyCompareFactory > & CompareFactory )
{
Reference< XDynamicResultSet > xRet;
xRet = new SortedDynamicResultSet( Source, Info, CompareFactory, m_xContext );
Reference< XDynamicResultSet > xRet = new SortedDynamicResultSet( Source, Info, CompareFactory, m_xContext );
return xRet;
}
......
......@@ -584,8 +584,7 @@ void Content::queryChildren( ContentRefList& rChildren )
// Is aURL a prefix of aChildURL?
if ( ( aChildURL.getLength() > nLen ) && aChildURL.startsWith( aURL ) )
{
sal_Int32 nPos = nLen;
nPos = aChildURL.indexOf( '/', nPos );
sal_Int32 nPos = aChildURL.indexOf( '/', nLen );
if ( ( nPos == -1 ) || ( nPos == ( aChildURL.getLength() - 1 ) ) )
{
......
......@@ -751,8 +751,7 @@ void HierarchyContent::queryChildren( HierarchyContentRefVector& rChildren )
if ( ( aChildURL.getLength() > nLen ) &&
( aChildURL.startsWith( aURL ) ) )
{
sal_Int32 nPos = nLen;
nPos = aChildURL.indexOf( '/', nPos );
sal_Int32 nPos = aChildURL.indexOf( '/', nLen );
if ( ( nPos == -1 ) ||
( nPos == ( aChildURL.getLength() - 1 ) ) )
......
......@@ -214,9 +214,7 @@ Content* Content::create(
getContentType( aURI.getScheme(), false ) ) )
return nullptr;
uno::Reference< container::XHierarchicalNameAccess > xPackage;
xPackage = pProvider->createPackage( aURI );
uno::Reference< container::XHierarchicalNameAccess > xPackage = pProvider->createPackage( aURI );
uno::Reference< ucb::XContentIdentifier > xId
= new ::ucbhelper::ContentIdentifier( aURI.getUri() );
......
......@@ -738,8 +738,7 @@ void Content::queryChildren( ContentRefList& rChildren )
if ( ( aChildURL.getLength() > nLen ) &&
( aChildURL.startsWith( aURL ) ) )
{
sal_Int32 nPos = nLen;
nPos = aChildURL.indexOf( '/', nPos );
sal_Int32 nPos = aChildURL.indexOf( '/', nLen );
if ( ( nPos == -1 ) ||
( nPos == ( aChildURL.getLength() - 1 ) ) )
......
......@@ -107,8 +107,7 @@ bool DAVOptionsCache::getDAVOptions( const OUString & rURL, DAVOptions & rDAVOpt
normalizeURLLastChar( aEncodedUrl );
// search the URL in the static map
DAVOptionsMap::iterator it;
it = m_aTheCache.find( aEncodedUrl );
DAVOptionsMap::iterator it = m_aTheCache.find( aEncodedUrl );
if ( it == m_aTheCache.end() )
return false;
else
......@@ -134,8 +133,7 @@ void DAVOptionsCache::removeDAVOptions( const OUString & rURL )
OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( NeonUri::unescape( rURL ) ) );
normalizeURLLastChar( aEncodedUrl );
DAVOptionsMap::iterator it;
it = m_aTheCache.find( aEncodedUrl );
DAVOptionsMap::iterator it = m_aTheCache.find( aEncodedUrl );
if ( it != m_aTheCache.end() )
{
m_aTheCache.erase( it );
......@@ -156,8 +154,7 @@ void DAVOptionsCache::addDAVOptions( DAVOptions & rDAVOptions, const sal_uInt32
rDAVOptions.setRedirectedURL( aRedirURL );
// check if already cached
DAVOptionsMap::iterator it;
it = m_aTheCache.find( aEncodedUrl );
DAVOptionsMap::iterator it = m_aTheCache.find( aEncodedUrl );
if ( it != m_aTheCache.end() )
{ // already in cache, check LifeTime
if ( (*it).second.getRequestedTimeLife() == nLifeTime )
......@@ -177,8 +174,7 @@ void DAVOptionsCache::setHeadAllowed( const OUString & rURL, const bool HeadAllo
OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( NeonUri::unescape( rURL ) ) );
normalizeURLLastChar( aEncodedUrl );
DAVOptionsMap::iterator it;
it = m_aTheCache.find( aEncodedUrl );
DAVOptionsMap::iterator it = m_aTheCache.find( aEncodedUrl );
if ( it != m_aTheCache.end() )
{
// first check for stale
......
......@@ -43,8 +43,7 @@ namespace webdav_ucp
{
// search the URL in the static map
osl::MutexGuard aGuard( m_aMutex );
PropNameCache::const_iterator it;
it = m_aTheCache.find( rURL );
PropNameCache::const_iterator it = m_aTheCache.find( rURL );
if ( it == m_aTheCache.end() )
return false;
else
......@@ -67,8 +66,7 @@ namespace webdav_ucp
void PropertyNamesCache::removeCachedPropertyNames( const OUString& rURL )
{
osl::MutexGuard aGuard( m_aMutex );
PropNameCache::const_iterator it;
it = m_aTheCache.find( rURL );
PropNameCache::const_iterator it = m_aTheCache.find( rURL );
if ( it != m_aTheCache.end() )
{
m_aTheCache.erase( it );
......
......@@ -2403,8 +2403,7 @@ void Content::queryChildren( ContentRefList& rChildren )
if ( ( aChildURL.getLength() > nLen ) &&
( aChildURL.startsWith( aURL ) ) )
{
sal_Int32 nPos = nLen;
nPos = aChildURL.indexOf( '/', nPos );
sal_Int32 nPos = aChildURL.indexOf( '/', nLen );
if ( ( nPos == -1 ) ||
( nPos == ( aChildURL.getLength() - 1 ) ) )
......
......@@ -298,8 +298,7 @@ Sequence< OUString > SvtCompatibilityOptions_Impl::impl_GetPropertyNames( Sequen
// Copy entries to destination and expand every item with 2 supported sub properties.
for ( sal_Int32 nSourceStep = 0; nSourceStep < nSourceCount; ++nSourceStep )
{
OUString sFixPath;
sFixPath = SETNODE_ALLFILEFORMATS;
OUString sFixPath = SETNODE_ALLFILEFORMATS;
sFixPath += PATHDELIMITER;
sFixPath += rItems[ nSourceStep ];
sFixPath += PATHDELIMITER;
......
......@@ -137,8 +137,7 @@ void SvtOptionsDlgOptions_Impl::ReadNode( const OUString& _rNode, NodeType _eTyp
if ( _eType != NT_Option )
lResult[1] = sNode + sSet;
Sequence< Any > aValues;
aValues = GetProperties( lResult );
Sequence< Any > aValues = GetProperties( lResult );
bool bHide = false;
if ( aValues[0] >>= bHide )
m_aOptionNodeList.emplace( sNode, bHide );
......
......@@ -682,9 +682,8 @@ static bool UCBOpenContentSync(
sal_uInt32 nTimeout(5000); // initially 5000 milliSec
while(!bResultAchieved) {
Moderator::Result res;
// try to get the result for with timeout
res = pMod->getResult(nTimeout);
Moderator::Result res = pMod->getResult(nTimeout);
switch(res.type) {
case Moderator::ResultType::STREAM:
......
......@@ -28,9 +28,8 @@ using namespace css;
IMPL_LINK_NOARG(SSLWarnDialog, ViewCertHdl, weld::Button&, void)
{
uno::Reference< css::security::XDocumentDigitalSignatures > xDocumentDigitalSignatures;
xDocumentDigitalSignatures = css::security::DocumentDigitalSignatures::createDefault( m_xContext );
uno::Reference< css::security::XDocumentDigitalSignatures > xDocumentDigitalSignatures
= css::security::DocumentDigitalSignatures::createDefault( m_xContext );
xDocumentDigitalSignatures->setParentWindow(m_xDialog->GetXWindow());
xDocumentDigitalSignatures->showCertificate(m_rXCert);
}
......
......@@ -50,8 +50,7 @@ ScVbaTextBox::setValue( const uno::Any& _value )
OUString SAL_CALL
ScVbaTextBox::getText()
{
uno::Any aValue;
aValue = m_xProps->getPropertyValue( "Text" );
uno::Any aValue = m_xProps->getPropertyValue( "Text" );
OUString sString;
aValue >>= sString;
return sString;
......@@ -75,8 +74,7 @@ ScVbaTextBox::setText( const OUString& _text )
sal_Int32 SAL_CALL
ScVbaTextBox::getMaxLength()
{
uno::Any aValue;
aValue = m_xProps->getPropertyValue( "MaxTextLen" );
uno::Any aValue = m_xProps->getPropertyValue( "MaxTextLen" );
sal_Int16 nMaxLength = 0;
aValue >>= nMaxLength;
return static_cast<sal_Int32>(nMaxLength);
......@@ -93,8 +91,7 @@ ScVbaTextBox::setMaxLength( sal_Int32 _maxlength )
sal_Bool SAL_CALL
ScVbaTextBox::getMultiline()
{
uno::Any aValue;
aValue = m_xProps->getPropertyValue( "MultiLine" );
uno::Any aValue = m_xProps->getPropertyValue( "MultiLine" );
bool bRet = false;
aValue >>= bRet;
return bRet;
......
......@@ -180,10 +180,8 @@ bool VbaCommandBarHelper::hasToolbar( const OUString& sResourceUrl, const OUStri
// return the resource url if found
OUString VbaCommandBarHelper::findToolbarByName( const css::uno::Reference< css::container::XNameAccess >& xNameAccess, const OUString& sName )
{
OUString sResourceUrl;
// check if it is an buildin toolbar
sResourceUrl = MSO2OOCommandbarHelper::getMSO2OOCommandbarHelper()->findBuildinToolbar( sName );
OUString sResourceUrl = MSO2OOCommandbarHelper::getMSO2OOCommandbarHelper()->findBuildinToolbar( sName );
if( !sResourceUrl.isEmpty() )
return sResourceUrl;
......
......@@ -259,8 +259,7 @@ VbaFontBase::getName()
uno::Any
VbaFontBase::getColor()
{
uno::Any aAny;
aAny = OORGBToXLRGB( mxFont->getPropertyValue( VBAFONTBASE_PROPNAME( "CharColor", "TextColor" ) ) );
uno::Any aAny = OORGBToXLRGB( mxFont->getPropertyValue( VBAFONTBASE_PROPNAME( "CharColor", "TextColor" ) ) );
return aAny;
}
......
......@@ -283,8 +283,7 @@ ScVbaShape::setLeft( double _left )
}
catch( uno::Exception& )
{
sal_Int32 nLeft = 0;
nLeft = Millimeter::getInHundredthsOfOneMillimeter( _left );
sal_Int32 nLeft = Millimeter::getInHundredthsOfOneMillimeter( _left );
m_xPropertySet->setPropertyValue( "HoriOrientPosition" , uno::makeAny( nLeft ) );
}
}
......@@ -315,8 +314,7 @@ ScVbaShape::setTop( double _top )
}
catch( uno::Exception& )
{
sal_Int32 nTop = 0;
nTop = Millimeter::getInHundredthsOfOneMillimeter( _top );
sal_Int32 nTop = Millimeter::getInHundredthsOfOneMillimeter( _top );
m_xPropertySet->setPropertyValue( "VertOrientPosition" , uno::makeAny( nTop ) );
}
}
......
......@@ -139,8 +139,7 @@ ScVbaShapes::getShapesByArrayIndices( const uno::Any& Index )
throw uno::RuntimeException();
const uno::Reference< script::XTypeConverter >& xConverter = getTypeConverter(mxContext);
uno::Any aConverted;
aConverted = xConverter->convertTo( Index, cppu::UnoType<uno::Sequence< uno::Any >>::get() );
uno::Any aConverted = xConverter->convertTo( Index, cppu::UnoType<uno::Sequence< uno::Any >>::get() );
uno::Sequence< uno::Any > sIndices;
aConverted >>= sIndices;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment