summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-04-14 16:40:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-04-15 08:37:34 +0200
commit897493fbd34a1bd10320767b48cbf04d422f89b3 (patch)
tree6d35dd000343e533cf6b3eef2f816533bea4b048 /vbahelper
parent7facde27194b866e589eada3f5657b0b5c69efb0 (diff)
loplugin:sequentialassign in ucb..vbahelper
Change-Id: I0fff9ee06225d4ff2e9c0611b1b11f1d3b896be2 Reviewed-on: https://gerrit.libreoffice.org/70733 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/msforms/vbatextbox.cxx9
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarhelper.cxx4
-rw-r--r--vbahelper/source/vbahelper/vbafontbase.cxx3
-rw-r--r--vbahelper/source/vbahelper/vbashape.cxx6
-rw-r--r--vbahelper/source/vbahelper/vbashapes.cxx3
5 files changed, 8 insertions, 17 deletions
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;