summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-08 17:45:08 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-08 17:45:08 +0200
commit9222f5d065bb2aafcfef93e77c58a82672a9ad22 (patch)
tree0dfad9f13099a73ecf3893e9cbdd5020b55cd7b3 /vbahelper
parentc4dca26eafd60dc4c4f19e0be0b8e086108b3048 (diff)
A UNO Any can't contain an Any
...and css::uno::makeAny<css::uno::Any>() was never meant to be used. Introduce css::uno::toAny for the (template-code) cases that shall return an Any for both Any and non-Any inputs. Change-Id: Ifa977d73f1da71b2fedde7e8140b19497c4a0257
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/msforms/vbamultipage.cxx2
-rw-r--r--vbahelper/source/msforms/vbauserform.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbaapplicationbase.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/vbahelper/source/msforms/vbamultipage.cxx b/vbahelper/source/msforms/vbamultipage.cxx
index 4fa287efbc3d..2fb7016ac02e 100644
--- a/vbahelper/source/msforms/vbamultipage.cxx
+++ b/vbahelper/source/msforms/vbamultipage.cxx
@@ -102,7 +102,7 @@ ScVbaMultiPage::Pages( const uno::Any& index ) throw (uno::RuntimeException, std
uno::Reference< XCollection > xColl( new ScVbaPages( this, mxContext, getPages( xContainer->getElementNames().getLength() ) ) );
if ( !index.hasValue() )
return uno::makeAny( xColl );
- return xColl->Item( uno::makeAny( index ), uno::Any() );
+ return xColl->Item( index, uno::Any() );
}
uno::Sequence< OUString >
diff --git a/vbahelper/source/msforms/vbauserform.cxx b/vbahelper/source/msforms/vbauserform.cxx
index 23bbd23f80be..8b6fe02e666f 100644
--- a/vbahelper/source/msforms/vbauserform.cxx
+++ b/vbahelper/source/msforms/vbauserform.cxx
@@ -285,7 +285,7 @@ ScVbaUserForm::Controls( const uno::Any& index ) throw (uno::RuntimeException, s
uno::Reference< awt::XControl > xDialogControl( m_xDialog, uno::UNO_QUERY );
uno::Reference< XCollection > xControls( new ScVbaControls( this, mxContext, xDialogControl, m_xModel, mpGeometryHelper->getOffsetX(), mpGeometryHelper->getOffsetY() ) );
if ( index.hasValue() )
- return uno::makeAny( xControls->Item( index, uno::Any() ) );
+ return xControls->Item( index, uno::Any() );
return uno::makeAny( xControls );
}
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index 589c02917050..57f62684b581 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -293,7 +293,7 @@ VbaApplicationBase::CommandBars( const uno::Any& aIndex ) throw (uno::RuntimeExc
{
uno::Reference< XCommandBars > xCommandBars( new ScVbaCommandBars( this, mxContext, uno::Reference< container::XIndexAccess >(), getCurrentDocument() ) );
if( aIndex.hasValue() )
- return uno::makeAny( xCommandBars->Item( aIndex, uno::Any() ) );
+ return xCommandBars->Item( aIndex, uno::Any() );
return uno::makeAny( xCommandBars );
}