[Libreoffice-commits] core.git: 2 commits - test/source toolkit/source tools/source ucb/source unotools/source uui/source vbahelper/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Mon Apr 15 06:38:22 UTC 2019
test/source/sheet/xdatabaserange.cxx | 3 +--
test/source/sheet/xdatapilotdescriptor.cxx | 3 +--
test/source/sheet/xfunctiondescriptions.cxx | 3 +--
toolkit/source/awt/vclxaccessiblecomponent.cxx | 3 +--
toolkit/source/awt/vclxprinter.cxx | 6 ++----
toolkit/source/awt/vclxtoolkit.cxx | 3 +--
toolkit/source/controls/dialogcontrol.cxx | 3 +--
toolkit/source/controls/geometrycontrolmodel.cxx | 3 +--
toolkit/source/controls/unocontrolmodel.cxx | 3 +--
tools/source/generic/b3dtrans.cxx | 6 ++----
ucb/source/cacher/cachedcontentresultset.cxx | 3 +--
ucb/source/cacher/cachedcontentresultsetstub.cxx | 3 +--
ucb/source/cacher/cacheddynamicresultset.cxx | 3 +--
ucb/source/cacher/cacheddynamicresultsetstub.cxx | 3 +--
ucb/source/sorter/sortdynres.cxx | 3 +--
ucb/source/ucp/gio/gio_content.cxx | 3 +--
ucb/source/ucp/hierarchy/hierarchycontent.cxx | 3 +--
ucb/source/ucp/package/pkgcontent.cxx | 4 +---
ucb/source/ucp/tdoc/tdoc_content.cxx | 3 +--
ucb/source/ucp/webdav-neon/DAVTypes.cxx | 12 ++++--------
ucb/source/ucp/webdav-neon/PropfindCache.cxx | 6 ++----
ucb/source/ucp/webdav-neon/webdavcontent.cxx | 3 +--
unotools/source/config/compatibility.cxx | 3 +--
unotools/source/config/optionsdlg.cxx | 3 +--
unotools/source/ucbhelper/ucblockbytes.cxx | 3 +--
uui/source/sslwarndlg.cxx | 5 ++---
vbahelper/source/msforms/vbatextbox.cxx | 9 +++------
vbahelper/source/vbahelper/vbacommandbarhelper.cxx | 4 +---
vbahelper/source/vbahelper/vbafontbase.cxx | 3 +--
vbahelper/source/vbahelper/vbashape.cxx | 6 ++----
vbahelper/source/vbahelper/vbashapes.cxx | 3 +--
31 files changed, 41 insertions(+), 83 deletions(-)
New commits:
commit 897493fbd34a1bd10320767b48cbf04d422f89b3
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sun Apr 14 16:40:35 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Apr 15 08:37:34 2019 +0200
loplugin:sequentialassign in ucb..vbahelper
Change-Id: I0fff9ee06225d4ff2e9c0611b1b11f1d3b896be2
Reviewed-on: https://gerrit.libreoffice.org/70733
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index c9592879397f..0765e2baed3b 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -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;
}
diff --git a/ucb/source/cacher/cachedcontentresultsetstub.cxx b/ucb/source/cacher/cachedcontentresultsetstub.cxx
index a648beac5e76..c410c19dfa68 100644
--- a/ucb/source/cacher/cachedcontentresultsetstub.cxx
+++ b/ucb/source/cacher/cachedcontentresultsetstub.cxx
@@ -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;
diff --git a/ucb/source/cacher/cacheddynamicresultset.cxx b/ucb/source/cacher/cacheddynamicresultset.cxx
index 9f7f5e438b70..ba1f72616071 100644
--- a/ucb/source/cacher/cacheddynamicresultset.cxx
+++ b/ucb/source/cacher/cacheddynamicresultset.cxx
@@ -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;
}
diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.cxx b/ucb/source/cacher/cacheddynamicresultsetstub.cxx
index 679ddbc0823a..927a6ac4e08c 100644
--- a/ucb/source/cacher/cacheddynamicresultsetstub.cxx
+++ b/ucb/source/cacher/cacheddynamicresultsetstub.cxx
@@ -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;
}
diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx
index e5b34599ea0d..06cd751eaf24 100644
--- a/ucb/source/sorter/sortdynres.cxx
+++ b/ucb/source/sorter/sortdynres.cxx
@@ -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;
}
diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx
index 7f363f5e2921..b1b51551ef15 100644
--- a/ucb/source/ucp/gio/gio_content.cxx
+++ b/ucb/source/ucp/gio/gio_content.cxx
@@ -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 ) ) )
{
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index ec47a14f1f1c..056527010065 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
@@ -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 ) ) )
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx
index e428044625e8..2facec6e88a9 100644
--- a/ucb/source/ucp/package/pkgcontent.cxx
+++ b/ucb/source/ucp/package/pkgcontent.cxx
@@ -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() );
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx
index 688662e30a95..e74039e9a0d8 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -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 ) ) )
diff --git a/ucb/source/ucp/webdav-neon/DAVTypes.cxx b/ucb/source/ucp/webdav-neon/DAVTypes.cxx
index 2cd4ec27ef11..6cf4a01b304a 100644
--- a/ucb/source/ucp/webdav-neon/DAVTypes.cxx
+++ b/ucb/source/ucp/webdav-neon/DAVTypes.cxx
@@ -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
diff --git a/ucb/source/ucp/webdav-neon/PropfindCache.cxx b/ucb/source/ucp/webdav-neon/PropfindCache.cxx
index 546c6c8545f7..a54003661ec0 100644
--- a/ucb/source/ucp/webdav-neon/PropfindCache.cxx
+++ b/ucb/source/ucp/webdav-neon/PropfindCache.cxx
@@ -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 );
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 8ef0956b2eff..9c139fb4a30d 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -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 ) ) )
diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx
index 469a944b9e8f..358decc82041 100644
--- a/unotools/source/config/compatibility.cxx
+++ b/unotools/source/config/compatibility.cxx
@@ -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;
diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx
index ec251ec8b3a0..93cfe5d1a0bc 100644
--- a/unotools/source/config/optionsdlg.cxx
+++ b/unotools/source/config/optionsdlg.cxx
@@ -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 );
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index 61e02c87072e..40b42ad1538b 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -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:
diff --git a/uui/source/sslwarndlg.cxx b/uui/source/sslwarndlg.cxx
index a1c340cc0afe..a6c1e1a39b38 100644
--- a/uui/source/sslwarndlg.cxx
+++ b/uui/source/sslwarndlg.cxx
@@ -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);
}
diff --git a/vbahelper/source/msforms/vbatextbox.cxx b/vbahelper/source/msforms/vbatextbox.cxx
index 3f0eba580934..4c2e7a89b73d 100644
--- a/vbahelper/source/msforms/vbatextbox.cxx
+++ b/vbahelper/source/msforms/vbatextbox.cxx
@@ -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;
diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
index 1406376ed307..0ffd29eb2e1c 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
@@ -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;
diff --git a/vbahelper/source/vbahelper/vbafontbase.cxx b/vbahelper/source/vbahelper/vbafontbase.cxx
index 408801e947d0..95359aa78637 100644
--- a/vbahelper/source/vbahelper/vbafontbase.cxx
+++ b/vbahelper/source/vbahelper/vbafontbase.cxx
@@ -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;
}
diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx
index 8f45589740b7..709957bfcb27 100644
--- a/vbahelper/source/vbahelper/vbashape.cxx
+++ b/vbahelper/source/vbahelper/vbashape.cxx
@@ -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 ) );
}
}
diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx
index 74fb90504bcf..873f01a2ea03 100644
--- a/vbahelper/source/vbahelper/vbashapes.cxx
+++ b/vbahelper/source/vbahelper/vbashapes.cxx
@@ -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;
commit 7facde27194b866e589eada3f5657b0b5c69efb0
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sun Apr 14 16:39:53 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Apr 15 08:37:21 2019 +0200
loplugin:sequentialassign in test..tools
Change-Id: I3a6c5807c3262dde6756551e9e955c4ceae09b4f
Reviewed-on: https://gerrit.libreoffice.org/70732
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/test/source/sheet/xdatabaserange.cxx b/test/source/sheet/xdatabaserange.cxx
index d00631820647..36ce1d5362fb 100644
--- a/test/source/sheet/xdatabaserange.cxx
+++ b/test/source/sheet/xdatabaserange.cxx
@@ -46,8 +46,7 @@ void XDatabaseRange::testDataArea()
aCellAddress.StartRow = 2;
aCellAddress.EndRow = 5;
xDBRange->setDataArea(aCellAddress);
- table::CellRangeAddress aValue;
- aValue = xDBRange->getDataArea();
+ table::CellRangeAddress aValue = xDBRange->getDataArea();
CPPUNIT_ASSERT_EQUAL( aCellAddress.Sheet, aValue.Sheet );
CPPUNIT_ASSERT_EQUAL( aCellAddress.StartRow, aValue.StartRow );
CPPUNIT_ASSERT_EQUAL( aCellAddress.EndRow, aValue.EndRow );
diff --git a/test/source/sheet/xdatapilotdescriptor.cxx b/test/source/sheet/xdatapilotdescriptor.cxx
index eb3b69636315..df1ccaaf2bee 100644
--- a/test/source/sheet/xdatapilotdescriptor.cxx
+++ b/test/source/sheet/xdatapilotdescriptor.cxx
@@ -47,8 +47,7 @@ void XDataPilotDescriptor::testSourceRange()
aAddress.EndRow = 5;
xDescr->setSourceRange(aAddress);
- table::CellRangeAddress aReturn;
- aReturn = xDescr->getSourceRange();
+ table::CellRangeAddress aReturn = xDescr->getSourceRange();
CPPUNIT_ASSERT_EQUAL(aAddress.Sheet, aReturn.Sheet);
CPPUNIT_ASSERT_EQUAL(aAddress.StartColumn, aReturn.StartColumn);
diff --git a/test/source/sheet/xfunctiondescriptions.cxx b/test/source/sheet/xfunctiondescriptions.cxx
index 5a71f532a4be..fb3820590586 100644
--- a/test/source/sheet/xfunctiondescriptions.cxx
+++ b/test/source/sheet/xfunctiondescriptions.cxx
@@ -53,8 +53,7 @@ void XFunctionDescriptions::testGetById()
// fetch the same descriptions by its id
sal_Int32 aId2 = 0;
OUString aName2;
- uno::Sequence<beans::PropertyValue> aProps2;
- aProps2 = xFD->getById(aId1);
+ uno::Sequence<beans::PropertyValue> aProps2 = xFD->getById(aId1);
CPPUNIT_ASSERT_MESSAGE("Received empty FunctionDescriptions from getById()",
aProps2.getLength());
for (const auto& aProp : aProps2)
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index 6f768ac2cbd9..8bd78e5d9c1b 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -533,9 +533,8 @@ uno::Reference< accessibility::XAccessible > VCLXAccessibleComponent::getAccessi
{
OExternalLockGuard aGuard( this );
- uno::Reference< accessibility::XAccessible > xAcc;
// we do _not_ have a foreign-controlled parent -> default to our VCL parent
- xAcc = getVclParent();
+ uno::Reference< accessibility::XAccessible > xAcc = getVclParent();
return xAcc;
}
diff --git a/toolkit/source/awt/vclxprinter.cxx b/toolkit/source/awt/vclxprinter.cxx
index 912e721b6eda..6d78cdce558c 100644
--- a/toolkit/source/awt/vclxprinter.cxx
+++ b/toolkit/source/awt/vclxprinter.cxx
@@ -343,15 +343,13 @@ css::uno::Sequence< OUString > VCLXPrinterServer::getPrinterNames( )
css::uno::Reference< css::awt::XPrinter > VCLXPrinterServer::createPrinter( const OUString& rPrinterName )
{
- css::uno::Reference< css::awt::XPrinter > xP;
- xP = new VCLXPrinter( rPrinterName );
+ css::uno::Reference< css::awt::XPrinter > xP = new VCLXPrinter( rPrinterName );
return xP;
}
css::uno::Reference< css::awt::XInfoPrinter > VCLXPrinterServer::createInfoPrinter( const OUString& rPrinterName )
{
- css::uno::Reference< css::awt::XInfoPrinter > xP;
- xP = new VCLXInfoPrinter( rPrinterName );
+ css::uno::Reference< css::awt::XInfoPrinter > xP = new VCLXInfoPrinter( rPrinterName );
return xP;
}
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index f0e000146e1f..8750d90beb0f 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -1079,8 +1079,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
const css::awt::WindowDescriptor& rDescriptor,
vcl::Window* pParent, WinBits nWinBits, MessBoxStyle nMessBoxStyle )
{
- OUString aServiceName( rDescriptor.WindowServiceName );
- aServiceName = aServiceName.toAsciiLowerCase();
+ OUString aServiceName = rDescriptor.WindowServiceName.toAsciiLowerCase();
VclPtr<vcl::Window> pNewWindow;
WindowType nType = ImplGetComponentType( aServiceName );
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index e163b832c3d1..cb8b45afda8d 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -1054,8 +1054,7 @@ void UnoFrameControl::ImplSetPosSize( Reference< XControl >& rxCtrl )
if ( pOutDev )
{
// Adjust Y based on height of Title
- ::tools::Rectangle aRect;
- aRect = pOutDev->GetTextRect( aRect, sTitle );
+ ::tools::Rectangle aRect = pOutDev->GetTextRect( aRect, sTitle );
nY = nY + ( aRect.GetHeight() / 2 );
}
else
diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx
index fedcd4dc1d29..5d183f09aa41 100644
--- a/toolkit/source/controls/geometrycontrolmodel.cxx
+++ b/toolkit/source/controls/geometrycontrolmodel.cxx
@@ -524,8 +524,7 @@
OPropertyContainer::describeProperties( aProps );
// the aggregate properties
- Sequence< Property > aAggregateProps;
- aAggregateProps = AggregateProperties::get()[ _nId ];
+ Sequence< Property > aAggregateProps = AggregateProperties::get()[ _nId ];
// look for duplicates, and remember them
IntArrayArray::value_type& rDuplicateIds = AmbiguousPropertyIds::get()[ _nId ];
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index 37b185438867..b2ac375acba8 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -1262,8 +1262,7 @@ void UnoControlModel::setFastPropertyValue( sal_Int32 nPropId, const css::uno::A
Any aNewValue;
aNewValue <<= aNewFontDescriptor;
- sal_Int32 nDescriptorId( BASEPROPERTY_FONTDESCRIPTOR );
- nDescriptorId = BASEPROPERTY_FONTDESCRIPTOR;
+ sal_Int32 nDescriptorId = BASEPROPERTY_FONTDESCRIPTOR;
// also, we need fire a propertyChange event for the single property, since with
// the above line, only an event for the FontDescriptor property will be fired
diff --git a/tools/source/generic/b3dtrans.cxx b/tools/source/generic/b3dtrans.cxx
index 99aee062eafc..1c3a420cbaf7 100644
--- a/tools/source/generic/b3dtrans.cxx
+++ b/tools/source/generic/b3dtrans.cxx
@@ -424,8 +424,7 @@ void B3dCamera::CalcNewViewportValues()
aNewVUV.normalize();
aNewVPN.normalize();
- basegfx::B3DVector aNewToTheRight = aNewVPN;
- aNewToTheRight = aNewToTheRight.getPerpendicular(aNewVUV);
+ basegfx::B3DVector aNewToTheRight = aNewVPN.getPerpendicular(aNewVUV);
aNewToTheRight.normalize();
aNewVUV = aNewToTheRight.getPerpendicular(aNewVPN);
aNewVUV.normalize();
@@ -450,8 +449,7 @@ void B3dCamera::CalcFocalLength()
double fWidth = GetDeviceRectangleWidth();
// Adjust focal length based on given position
- basegfx::B3DPoint aOldPosition;
- aOldPosition = WorldToEyeCoor(aOldPosition);
+ basegfx::B3DPoint aOldPosition = WorldToEyeCoor(aOldPosition);
if(fWidth != 0.0)
fFocalLength = aOldPosition.getZ() / fWidth * 35.0;
if(fFocalLength < 5.0)
More information about the Libreoffice-commits
mailing list