Kaydet (Commit) 7facde27 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:sequentialassign in test..tools

Change-Id: I3a6c5807c3262dde6756551e9e955c4ceae09b4f
Reviewed-on: https://gerrit.libreoffice.org/70732
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 9f392d0c
......@@ -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 );
......
......@@ -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);
......
......@@ -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)
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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 );
......
......@@ -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
......
......@@ -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 ];
......
......@@ -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
......
......@@ -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)
......
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