summaryrefslogtreecommitdiff
path: root/sc/source/ui/vba
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-09 13:59:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-12 07:37:24 +0100
commit2f5868c4309d49ad495e0763b5b57d1f7f98e377 (patch)
treeba498138c67436ce30b5d9585353c50a1c5020bf /sc/source/ui/vba
parentcb34e6083cdc82333d64ad9224e0d25e895d1dae (diff)
loplugin:redundantfcast look for redundant copies in return statements
Change-Id: I5f416c865dfe1c36018784246a8007452eb42008 Reviewed-on: https://gerrit.libreoffice.org/50996 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/vba')
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx12
-rw-r--r--sc/source/ui/vba/vbaglobals.cxx4
-rw-r--r--sc/source/ui/vba/vbainterior.cxx2
-rw-r--r--sc/source/ui/vba/vbaworkbook.cxx6
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx2
5 files changed, 13 insertions, 13 deletions
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 978de7118fce..5cb76a9d6192 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -352,7 +352,7 @@ ScVbaApplication::Workbooks( const uno::Any& aIndex )
return uno::Any( xWorkBooks );
}
- return uno::Any ( xWorkBooks->Item( aIndex, uno::Any() ) );
+ return xWorkBooks->Item( aIndex, uno::Any() );
}
uno::Any SAL_CALL
@@ -384,7 +384,7 @@ ScVbaApplication::Dialogs( const uno::Any &aIndex )
uno::Reference< excel::XDialogs > xDialogs( new ScVbaDialogs( uno::Reference< XHelperInterface >( this ), mxContext, getCurrentDocument() ) );
if( !aIndex.hasValue() )
return uno::Any( xDialogs );
- return uno::Any( xDialogs->Item( aIndex ) );
+ return xDialogs->Item( aIndex );
}
uno::Reference< excel::XWindow > SAL_CALL
@@ -480,7 +480,7 @@ ScVbaApplication::Windows( const uno::Any& aIndex )
uno::Reference< excel::XWindows > xWindows( new ScVbaWindows( this, mxContext ) );
if ( aIndex.getValueTypeClass() == uno::TypeClass_VOID )
return uno::Any( xWindows );
- return uno::Any( xWindows->Item( aIndex, uno::Any() ) );
+ return xWindows->Item( aIndex, uno::Any() );
}
void SAL_CALL
ScVbaApplication::wait( double time )
@@ -520,8 +520,8 @@ ScVbaApplication::Names( const css::uno::Any& aIndex )
if ( aIndex.getValueTypeClass() == uno::TypeClass_VOID )
{
return uno::Any( xNames );
-}
- return uno::Any( xNames->Item( aIndex, uno::Any() ) );
+ }
+ return xNames->Item( aIndex, uno::Any() );
}
uno::Reference< excel::XWorksheet > SAL_CALL
@@ -1332,7 +1332,7 @@ ScVbaApplication::MenuBars( const uno::Any& aIndex )
uno::Reference< XCollection > xMenuBars( new ScVbaMenuBars( this, mxContext, xCommandBars ) );
if ( aIndex.hasValue() )
{
- return uno::Any ( xMenuBars->Item( aIndex, uno::Any() ) );
+ return xMenuBars->Item( aIndex, uno::Any() );
}
return uno::Any( xMenuBars );
diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx
index c4636c7bf1f0..bc5c4ef22edb 100644
--- a/sc/source/ui/vba/vbaglobals.cxx
+++ b/sc/source/ui/vba/vbaglobals.cxx
@@ -93,7 +93,7 @@ ScVbaGlobals::getActiveSheet()
uno::Any SAL_CALL
ScVbaGlobals::WorkBooks( const uno::Any& aIndex )
{
- return uno::Any( getApplication()->Workbooks(aIndex) );
+ return getApplication()->Workbooks(aIndex);
}
uno::Any SAL_CALL
@@ -221,7 +221,7 @@ ScVbaGlobals::getDebug()
uno::Any SAL_CALL
ScVbaGlobals::MenuBars( const uno::Any& aIndex )
{
- return uno::Any( getApplication()->MenuBars(aIndex) );
+ return getApplication()->MenuBars(aIndex);
}
uno::Sequence< OUString > SAL_CALL
diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx
index 783baa466705..9e0019dbdf29 100644
--- a/sc/source/ui/vba/vbainterior.cxx
+++ b/sc/source/ui/vba/vbainterior.cxx
@@ -257,7 +257,7 @@ ScVbaInterior::GetAttributeData( uno::Any const & aValue )
{
return aDataValue.Value.toInt32();
}
- return sal_Int32( 0 );
+ return 0;
}
uno::Any
ScVbaInterior::SetAttributeData( sal_Int32 nValue )
diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx
index f0a6432df330..de08c8b59114 100644
--- a/sc/source/ui/vba/vbaworkbook.cxx
+++ b/sc/source/ui/vba/vbaworkbook.cxx
@@ -245,7 +245,7 @@ ScVbaWorkbook::Worksheets( const uno::Any& aIndex )
return uno::Any( xWorkSheets );
}
// pass on to collection
- return uno::Any( xWorkSheets->Item( aIndex, uno::Any() ) );
+ return xWorkSheets->Item( aIndex, uno::Any() );
}
uno::Any SAL_CALL
ScVbaWorkbook::Windows( const uno::Any& aIndex )
@@ -254,7 +254,7 @@ ScVbaWorkbook::Windows( const uno::Any& aIndex )
uno::Reference< excel::XWindows > xWindows( new ScVbaWindows( getParent(), mxContext ) );
if ( aIndex.getValueTypeClass() == uno::TypeClass_VOID )
return uno::Any( xWindows );
- return uno::Any( xWindows->Item( aIndex, uno::Any() ) );
+ return xWindows->Item( aIndex, uno::Any() );
}
void SAL_CALL
@@ -373,7 +373,7 @@ ScVbaWorkbook::Names( const uno::Any& aIndex )
uno::Reference< sheet::XNamedRanges > xNamedRanges( xProps->getPropertyValue("NamedRanges"), uno::UNO_QUERY_THROW );
uno::Reference< XCollection > xNames( new ScVbaNames( this, mxContext, xNamedRanges, xModel ) );
if ( aIndex.hasValue() )
- return uno::Any( xNames->Item( aIndex, uno::Any() ) );
+ return xNames->Item( aIndex, uno::Any() );
return uno::Any( xNames );
}
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index ff3aa2895ca0..427c5b8eecf5 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -789,7 +789,7 @@ ScVbaWorksheet::Names( const css::uno::Any& aIndex )
uno::Reference< sheet::XNamedRanges > xNamedRanges( xProps->getPropertyValue("NamedRanges"), uno::UNO_QUERY_THROW );
uno::Reference< XCollection > xNames( new ScVbaNames( this, mxContext, xNamedRanges, mxModel ) );
if ( aIndex.hasValue() )
- return uno::Any( xNames->Item( aIndex, uno::Any() ) );
+ return xNames->Item( aIndex, uno::Any() );
return uno::Any( xNames );
}