summaryrefslogtreecommitdiff
path: root/sc/source/ui/vba/vbarange.cxx
diff options
context:
space:
mode:
authorDaniel Rentz <dr@openoffice.org>2010-08-04 09:56:54 +0200
committerDaniel Rentz <dr@openoffice.org>2010-08-04 09:56:54 +0200
commit32876274fc8fae906bdb52e76059ddedadfa8572 (patch)
tree353e2ce26befd378a397572300e97e6782b0c832 /sc/source/ui/vba/vbarange.cxx
parentfaa445a0730322e8522999ffb30fdde97bb9b9b9 (diff)
mib18: #162937# extract all integer and floating values from an 'Any' for Boolean parameters
Diffstat (limited to 'sc/source/ui/vba/vbarange.cxx')
-rwxr-xr-xsc/source/ui/vba/vbarange.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 50a005779..c3ae2d80c 100755
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -2315,8 +2315,7 @@ ScVbaRange::Columns(const uno::Any& aIndex ) throw (uno::RuntimeException)
void
ScVbaRange::setMergeCells( const uno::Any& aIsMerged ) throw (script::BasicErrorException, uno::RuntimeException)
{
- bool bMerge = false;
- aIsMerged >>= bMerge;
+ bool bMerge = extractBoolFromAny( aIsMerged );
if( mxRanges.is() )
{
@@ -2517,7 +2516,8 @@ ScVbaRange::setWrapText( const uno::Any& aIsWrapped ) throw (script::BasicErrorE
}
uno::Reference< beans::XPropertySet > xProps(mxRange, ::uno::UNO_QUERY_THROW );
- xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsTextWrapped" ) ), aIsWrapped );
+ bool bIsWrapped = extractBoolFromAny( aIsWrapped );
+ xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsTextWrapped" ) ), uno::Any( bIsWrapped ) );
}
uno::Any
@@ -2896,13 +2896,11 @@ ScVbaRange::setHidden( const uno::Any& _hidden ) throw (uno::RuntimeException)
return;
}
- sal_Bool bHidden = sal_False;
- _hidden >>= bHidden;
-
+ bool bHidden = extractBoolFromAny( _hidden );
try
{
uno::Reference< beans::XPropertySet > xProps = getRowOrColumnProps( mxRange, mbIsRows );
- xProps->setPropertyValue( ISVISIBLE, uno::makeAny( !bHidden ) );
+ xProps->setPropertyValue( ISVISIBLE, uno::Any( !bHidden ) );
}
catch( uno::Exception& e )
{
@@ -4931,8 +4929,7 @@ void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::Ru
if( m_Areas->getCount() > 1 )
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not set Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
- sal_Bool bShowDetail = sal_False;
- aShowDetail >>= bShowDetail;
+ bool bShowDetail = extractBoolFromAny( aShowDetail );
RangeHelper helper( mxRange );
uno::Reference< sheet::XSheetCellCursor > xSheetCellCursor = helper.getSheetCellCursor();