summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbashaperange.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vbahelper/source/vbahelper/vbashaperange.cxx b/vbahelper/source/vbahelper/vbashaperange.cxx
index fb2ca53022bd..87168bbcead7 100644
--- a/vbahelper/source/vbahelper/vbashaperange.cxx
+++ b/vbahelper/source/vbahelper/vbashaperange.cxx
@@ -16,6 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <com/sun/star/drawing/ShapeCollection.hpp>
#include <com/sun/star/drawing/XShapeGrouper.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
#include<com/sun/star/view/XSelectionSupplier.hpp>
@@ -73,8 +74,7 @@ ScVbaShapeRange::getShapes() throw (uno::RuntimeException)
{
if ( !m_xShapes.is() )
{
- uno::Reference< lang::XMultiServiceFactory > xMSF( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
- m_xShapes.set( xMSF->createInstance( rtl::OUString("com.sun.star.drawing.ShapeCollection") ), uno::UNO_QUERY_THROW );
+ m_xShapes.set( drawing::ShapeCollection::create(mxContext), uno::UNO_QUERY_THROW );
sal_Int32 nLen = m_xIndexAccess->getCount();
for ( sal_Int32 index = 0; index < nLen; ++index )
m_xShapes->add( uno::Reference< drawing::XShape >( m_xIndexAccess->getByIndex( index ), uno::UNO_QUERY_THROW ) );