summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-04-14 16:39:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-04-15 08:37:21 +0200
commit7facde27194b866e589eada3f5657b0b5c69efb0 (patch)
tree73c66b4faf608a3ade0058ef2f72c5a49de44aaf
parent9f392d0c09bd946e4660ccc2d48ee3ae1367343c (diff)
loplugin:sequentialassign in test..tools
Change-Id: I3a6c5807c3262dde6756551e9e955c4ceae09b4f Reviewed-on: https://gerrit.libreoffice.org/70732 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--test/source/sheet/xdatabaserange.cxx3
-rw-r--r--test/source/sheet/xdatapilotdescriptor.cxx3
-rw-r--r--test/source/sheet/xfunctiondescriptions.cxx3
-rw-r--r--toolkit/source/awt/vclxaccessiblecomponent.cxx3
-rw-r--r--toolkit/source/awt/vclxprinter.cxx6
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx3
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx3
-rw-r--r--toolkit/source/controls/geometrycontrolmodel.cxx3
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx3
-rw-r--r--tools/source/generic/b3dtrans.cxx6
10 files changed, 12 insertions, 24 deletions
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)