summaryrefslogtreecommitdiff
path: root/vbahelper/source/vbahelper/vbashaperange.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vbahelper/source/vbahelper/vbashaperange.cxx')
-rw-r--r--vbahelper/source/vbahelper/vbashaperange.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/vbahelper/source/vbahelper/vbashaperange.cxx b/vbahelper/source/vbahelper/vbashaperange.cxx
index 4dd837259bf7..53d9d4268401 100644
--- a/vbahelper/source/vbahelper/vbashaperange.cxx
+++ b/vbahelper/source/vbahelper/vbashaperange.cxx
@@ -24,6 +24,7 @@
#include <ooo/vba/office/MsoShapeType.hpp>
#include <utility>
+#include <comphelper/servicehelper.hxx>
#include <vbahelper/vbashaperange.hxx>
#include <vbahelper/vbashape.hxx>
using namespace ::ooo::vba;
@@ -44,7 +45,7 @@ public:
}
virtual uno::Any SAL_CALL nextElement( ) override
{
- ScVbaShapeRange* pCollectionImpl = dynamic_cast< ScVbaShapeRange* >(m_xParent.get());
+ ScVbaShapeRange* pCollectionImpl = comphelper::getFromUnoTunnel< ScVbaShapeRange >(m_xParent);
if ( pCollectionImpl && hasMoreElements() )
return pCollectionImpl->createCollectionObject( m_xIndexAccess->getByIndex( nIndex++ ) );
throw container::NoSuchElementException();
@@ -391,6 +392,15 @@ ScVbaShapeRange::createEnumeration()
return new VbShapeRangeEnumHelper( this, m_xIndexAccess );
}
+sal_Int64 ScVbaShapeRange::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
+ return comphelper::getSomethingImpl(aIdentifier, this);
+}
+
+css::uno::Sequence<sal_Int8> const & ScVbaShapeRange::getUnoTunnelId() {
+ static comphelper::UnoIdInit const id;
+ return id.getSeq();
+}
+
uno::Any
ScVbaShapeRange:: createCollectionObject( const css::uno::Any& aSource )
{