summaryrefslogtreecommitdiff
path: root/sc/source/ui/vba/vbarange.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/vba/vbarange.cxx')
-rw-r--r--sc/source/ui/vba/vbarange.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index db7e146c5e5f..9ad878153c41 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -2158,21 +2158,18 @@ ScVbaRange::CellsHelper( const uno::Reference< ov::XHelperInterface >& xParent,
// set in the Any, we should convert as appropriate
// #FIXME - perhaps worth turning this into some sort of
// conversion routine e.g. bSuccess = getValueFromAny( nRow, nRowIndex, cppu::UnoType<sal_Int32>::get() )
- uno::Any aRowIndexAny = nRowIndex;
- if ( aRowIndexAny.hasValue() && !( aRowIndexAny >>= nRow ) )
+ if ( nRowIndex.hasValue() && !( nRowIndex >>= nRow ) )
{
uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( xContext );
uno::Any aConverted;
try
{
- aConverted = xConverter->convertTo( aRowIndexAny, cppu::UnoType<sal_Int32>::get() );
+ aConverted = xConverter->convertTo( nRowIndex, cppu::UnoType<sal_Int32>::get() );
bIsIndex = ( aConverted >>= nRow );
}
catch( uno::Exception& ) {} // silence any errors
}
- uno::Any aColumnAny = nColumnIndex;
-
if ( bIsColumnIndex )
{
// Column index can be a col address e.g Cells( 1, "B" ) etc.
@@ -2188,13 +2185,13 @@ ScVbaRange::CellsHelper( const uno::Reference< ov::XHelperInterface >& xParent,
}
else
{
- if ( !( aColumnAny >>= nColumn ) )
+ if ( !( nColumnIndex >>= nColumn ) )
{
uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( xContext );
uno::Any aConverted;
try
{
- aConverted = xConverter->convertTo( aColumnAny, cppu::UnoType<sal_Int32>::get() );
+ aConverted = xConverter->convertTo( nColumnIndex, cppu::UnoType<sal_Int32>::get() );
bIsColumnIndex = ( aConverted >>= nColumn );
}
catch( uno::Exception& ) {} // silence any errors