[Libreoffice-commits] core.git: 2 commits - chart2/inc chart2/source include/svx sc/inc sc/source sd/inc sd/source svx/source sw/inc sw/source
Matúš Kukan
matus.kukan at collabora.com
Wed Jan 8 05:31:37 PST 2014
chart2/inc/pch/precompiled_chartcontroller.hxx | 1
chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx | 7
include/svx/unoshcol.hxx | 89 ----------
sc/inc/pch/precompiled_sc.hxx | 1
sc/source/ui/Accessibility/AccessibleDocument.cxx | 9 -
sc/source/ui/unoobj/viewuno.cxx | 10 -
sd/inc/pch/precompiled_sd.hxx | 1
sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx | 9 -
sd/source/ui/unoidl/SdUnoDrawView.cxx | 6
svx/source/unodraw/unoshcol.cxx | 78 ++++++--
sw/inc/pch/precompiled_sw.hxx | 1
sw/source/ui/uno/unotxvw.cxx | 6
12 files changed, 88 insertions(+), 130 deletions(-)
New commits:
commit 0196a81910753f3d14add062b83a03ca83ca9e0b
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Wed Jan 8 14:16:58 2014 +0100
SvxShapeCollection is not used directly anymore; hide it.
Change-Id: I81c62c0a3ed880c0523e6ae54a27da56ff5acdca
diff --git a/include/svx/unoshcol.hxx b/include/svx/unoshcol.hxx
deleted file mode 100644
index f0e85f7..0000000
--- a/include/svx/unoshcol.hxx
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_SVX_UNOSHCOL_HXX
-#define INCLUDED_SVX_UNOSHCOL_HXX
-
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/drawing/XShapes.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <osl/mutex.hxx>
-#include <cppuhelper/interfacecontainer.hxx>
-
-#include <cppuhelper/implbase3.hxx>
-#include <svx/svxdllapi.h>
-
-class SvxShapeCollectionMutex
-{
-public:
- ::osl::Mutex maMutex;
-};
-
-/***********************************************************************
-* *
-***********************************************************************/
-class SVX_DLLPUBLIC SvxShapeCollection : public ::cppu::WeakAggImplHelper3<
- ::com::sun::star::drawing::XShapes,
- ::com::sun::star::lang::XServiceInfo,
- ::com::sun::star::lang::XComponent
- >,
- public SvxShapeCollectionMutex
-{
-private:
- cppu::OInterfaceContainerHelper maShapeContainer;
-
- cppu::OBroadcastHelper mrBHelper;
-
- SVX_DLLPRIVATE virtual void disposing() throw();
-
-public:
- SvxShapeCollection() throw();
- virtual ~SvxShapeCollection() throw();
-
- // XInterface
- virtual void SAL_CALL release() throw();
-
- // XComponent
- virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
-
- // XIndexAccess
- virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException) ;
- virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- // XElementAccess
- virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
-
- // XShapes
- virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo
- virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
-};
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx
index 1c10e4b..553723f 100644
--- a/svx/source/unodraw/unoshcol.cxx
+++ b/svx/source/unodraw/unoshcol.cxx
@@ -18,22 +18,69 @@
*/
#include <com/sun/star/document/EventObject.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <svx/unoprov.hxx>
-#include <svx/unoshcol.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <osl/mutex.hxx>
+#include <svx/unoprov.hxx>
-using namespace ::cppu;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::drawing;
-/***********************************************************************
-* *
-***********************************************************************/
+namespace {
+
+class SvxShapeCollectionMutex
+{
+public:
+ ::osl::Mutex maMutex;
+};
+
+class SvxShapeCollection :
+ public cppu::WeakAggImplHelper3<drawing::XShapes, lang::XServiceInfo, lang::XComponent>,
+ public SvxShapeCollectionMutex
+{
+private:
+ cppu::OInterfaceContainerHelper maShapeContainer;
+
+ cppu::OBroadcastHelper mrBHelper;
+
+ virtual void disposing() throw();
+
+public:
+ SvxShapeCollection() throw();
+ virtual ~SvxShapeCollection() throw();
+
+ // XInterface
+ virtual void SAL_CALL release() throw();
+
+ // XComponent
+ virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException) ;
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
+
+ // XShapes
+ virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+};
+
SvxShapeCollection::SvxShapeCollection() throw()
: maShapeContainer( maMutex ), mrBHelper( maMutex )
{
@@ -184,7 +231,7 @@ uno::Any SAL_CALL SvxShapeCollection::getByIndex( sal_Int32 Index )
uno::Sequence< Reference< uno::XInterface> > xElements( maShapeContainer.getElements() );
- return uno::makeAny( Reference< XShape>(static_cast< drawing::XShape* >( xElements.getArray()[Index].get())) );
+ return uno::makeAny( Reference< drawing::XShape>(static_cast< drawing::XShape* >( xElements.getArray()[Index].get())) );
}
// XElementAccess
@@ -219,6 +266,8 @@ uno::Sequence< OUString > SAL_CALL SvxShapeCollection::getSupportedServiceNames(
return aSeq;
}
+}
+
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_drawing_SvxShapeCollection_implementation_getFactory(
SAL_UNUSED_PARAMETER css::uno::XComponentContext *,
commit f7936b021f7f0d08dc2baeddefb1b5613a8f87f6
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Wed Jan 8 10:34:47 2014 +0100
Do not use SvxShapeCollection directly.
Change-Id: I1dd51df0e78a3cc89cdfcaec91ffd9a753393e2e
diff --git a/chart2/inc/pch/precompiled_chartcontroller.hxx b/chart2/inc/pch/precompiled_chartcontroller.hxx
index d449375..7ce733c 100644
--- a/chart2/inc/pch/precompiled_chartcontroller.hxx
+++ b/chart2/inc/pch/precompiled_chartcontroller.hxx
@@ -273,7 +273,6 @@
#include <svx/unopage.hxx>
#include <svx/unoprov.hxx>
#include <svx/unoshape.hxx>
-#include <svx/unoshcol.hxx>
#include <svx/unoshtxt.hxx>
#include <svx/xbtmpit.hxx>
#include <svx/xflbmtit.hxx>
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index de42006..e1e38cd 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -51,10 +51,10 @@
#include <com/sun/star/chart2/data/XDataReceiver.hpp>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <comphelper/InlineContainer.hxx>
-// header for function SvxShapeCollection_NewInstance
-#include <svx/unoshcol.hxx>
+#include <comphelper/processfactory.hxx>
#include <vcl/svapp.hxx>
+#include <com/sun/star/drawing/ShapeCollection.hpp>
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
@@ -1100,7 +1100,8 @@ Reference< drawing::XShapes > ChartDocumentWrapper::getAdditionalShapes() const
if( !aShapeVector.empty() )
{
// create a shape collection
- xFoundShapes = uno::Reference< drawing::XShapes >( SvxShapeCollection_NewInstance(), uno::UNO_QUERY );
+ xFoundShapes = uno::Reference< drawing::XShapes >( drawing::ShapeCollection::create(
+ comphelper::getProcessComponentContext()), uno::UNO_QUERY );
OSL_ENSURE( xFoundShapes.is(), "Couldn't create a shape collection!" );
if( xFoundShapes.is())
diff --git a/include/svx/unoshcol.hxx b/include/svx/unoshcol.hxx
index 523313f..f0e85f7 100644
--- a/include/svx/unoshcol.hxx
+++ b/include/svx/unoshcol.hxx
@@ -34,8 +34,6 @@ public:
::osl::Mutex maMutex;
};
-SVX_DLLPUBLIC com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SvxShapeCollection_NewInstance() throw();
-
/***********************************************************************
* *
***********************************************************************/
diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx
index a83fe72..22f19b9 100644
--- a/sc/inc/pch/precompiled_sc.hxx
+++ b/sc/inc/pch/precompiled_sc.hxx
@@ -876,7 +876,6 @@
#include <svx/unomod.hxx>
#include <svx/unomodel.hxx>
#include <svx/unoshape.hxx>
-#include <svx/unoshcol.hxx>
#include <svx/verttexttbxctrl.hxx>
#include <svx/xbtmpit.hxx>
#include <svx/xdef.hxx>
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 2f1e514..6271438 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -55,6 +55,7 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/drawing/ShapeCollection.hpp>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
@@ -70,7 +71,6 @@
#include <comphelper/servicehelper.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/docfile.hxx>
-#include <svx/unoshcol.hxx>
#include <svx/unoshape.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
#include <toolkit/helper/convert.hxx>
@@ -710,7 +710,8 @@ void ScChildrenShapes::Select(sal_Int32 nIndex)
xSelectionSupplier->getSelection() >>= xShapes;
if (!xShapes.is())
- xShapes = new SvxShapeCollection();
+ xShapes = drawing::ShapeCollection::create(
+ comphelper::getProcessComponentContext());
xShapes->add(maZOrderedShapes[nIndex]->xShape);
@@ -757,8 +758,8 @@ void ScChildrenShapes::SelectAll()
if (maZOrderedShapes.size() > 1)
{
- uno::Reference<drawing::XShapes> xShapes;
- xShapes = new SvxShapeCollection();
+ uno::Reference<drawing::XShapes> xShapes = drawing::ShapeCollection::create(
+ comphelper::getProcessComponentContext());
try
{
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 1b9319f..ea92ba7 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -19,6 +19,7 @@
#include <com/sun/star/awt/MouseButton.hpp>
+#include <com/sun/star/drawing/ShapeCollection.hpp>
#include <com/sun/star/script/vba/VBAEventId.hpp>
#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
#include <com/sun/star/view/DocumentZoomType.hpp>
@@ -32,7 +33,6 @@
#include <svx/svdpagv.hxx>
#include <svx/svdview.hxx>
#include <svx/unoshape.hxx>
-#include <svx/unoshcol.hxx>
#include <svx/fmshell.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
@@ -897,8 +897,10 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException)
// ShapeCollection erzeugen (wie in SdXImpressView::getSelection im Draw)
// Zurueckgegeben wird XInterfaceRef, das muss das UsrObject-XInterface sein
- SvxShapeCollection* pShapes = new SvxShapeCollection();
- uno::Reference<uno::XInterface> xRet(static_cast<cppu::OWeakObject*>(pShapes));
+ uno::Reference< drawing::XShapes > xShapes = drawing::ShapeCollection::create(
+ comphelper::getProcessComponentContext());
+
+ uno::Reference<uno::XInterface> xRet(xShapes);
for (sal_uLong i=0; i<nMarkCount; i++)
{
@@ -907,7 +909,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException)
{
uno::Reference<drawing::XShape> xShape( pDrawObj->getUnoShape(), uno::UNO_QUERY );
if (xShape.is())
- pShapes->add(xShape);
+ xShapes->add(xShape);
}
}
return uno::makeAny(xRet);
diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index 9521901..12101c3 100644
--- a/sd/inc/pch/precompiled_sd.hxx
+++ b/sd/inc/pch/precompiled_sd.hxx
@@ -752,7 +752,6 @@
#include <svx/unopool.hxx>
#include <svx/unoprov.hxx>
#include <svx/unoshape.hxx>
-#include <svx/unoshcol.hxx>
#include <svx/unoshprp.hxx>
#include <svx/verttexttbxctrl.hxx>
#include <svx/view3d.hxx>
diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
index 25fd564..3eee56d 100644
--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
@@ -18,6 +18,7 @@
*/
#include "AccessibleDrawDocumentView.hxx"
+#include <com/sun/star/drawing/ShapeCollection.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <com/sun/star/drawing/XDrawView.hpp>
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
@@ -30,6 +31,7 @@
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <comphelper/processfactory.hxx>
#include <rtl/ustring.h>
#include<sfx2/viewfrm.hxx>
@@ -38,7 +40,6 @@
#include <svx/svdobj.hxx>
#include <svx/svdmodel.hxx>
#include <svx/unoapi.hxx>
-#include <svx/unoshcol.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include "Window.hxx"
#include <vcl/svapp.hxx>
@@ -751,7 +752,8 @@ void
xSel->select( aAny );
else
{
- uno::Reference< drawing::XShapes > xShapes( new SvxShapeCollection() );
+ uno::Reference< drawing::XShapes > xShapes = drawing::ShapeCollection::create(
+ comphelper::getProcessComponentContext());
for(sal_Int32 i = 0, nCount = getAccessibleChildCount(); i < nCount; ++i )
{
@@ -800,7 +802,8 @@ void
}
else
// Create an empty selection to add the shape to.
- xShapes = new SvxShapeCollection();
+ xShapes = drawing::ShapeCollection::create(
+ comphelper::getProcessComponentContext());
// Update the selection.
if( !bFound && bSelect )
diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx
index 4e4e8ac..cafb61c 100644
--- a/sd/source/ui/unoidl/SdUnoDrawView.cxx
+++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx
@@ -30,15 +30,16 @@
#include "Window.hxx"
#include "pres.hxx"
+#include <comphelper/processfactory.hxx>
#include <cppuhelper/proptypehlp.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
#include <svx/svdpagv.hxx>
#include <svx/unoshape.hxx>
-#include <svx/unoshcol.hxx>
#include <sfx2/zoomitem.hxx>
#include <com/sun/star/drawing/DrawViewMode.hpp>
+#include <com/sun/star/drawing/ShapeCollection.hpp>
#include <com/sun/star/drawing/XLayerManager.hpp>
#include <com/sun/star/view/DocumentZoomType.hpp>
@@ -287,7 +288,8 @@ Any SAL_CALL SdUnoDrawView::getSelection()
sal_uInt32 nCount = rMarkList.GetMarkCount();
if( nCount )
{
- Reference< drawing::XShapes > xShapes( SvxShapeCollection_NewInstance(), UNO_QUERY );
+ Reference< drawing::XShapes > xShapes( drawing::ShapeCollection::create(
+ comphelper::getProcessComponentContext()), UNO_QUERY );
for( sal_uInt32 nNum = 0; nNum < nCount; nNum++)
{
SdrMark *pMark = rMarkList.GetMark(nNum);
diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx
index 66b2195..1c10e4b 100644
--- a/svx/source/unodraw/unoshcol.cxx
+++ b/svx/source/unodraw/unoshcol.cxx
@@ -44,15 +44,6 @@ SvxShapeCollection::~SvxShapeCollection() throw()
{
}
-
-//----------------------------------------------------------------------
-Reference< uno::XInterface > SvxShapeCollection_NewInstance() throw()
-{
- Reference< drawing::XShapes > xShapes( new SvxShapeCollection() );
- Reference< uno::XInterface > xRef( xShapes, UNO_QUERY );
- return xRef;
-}
-
// XInterface
void SvxShapeCollection::release() throw()
{
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index a9856d9..acce6e5 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -930,7 +930,6 @@
#include <svx/unomodel.hxx>
#include <svx/unoprov.hxx>
#include <svx/unoshape.hxx>
-#include <svx/unoshcol.hxx>
#include <svx/verttexttbxctrl.hxx>
#include <svx/viewlayoutitem.hxx>
#include <svx/xbtmpit.hxx>
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index c0bf06a..68c12b3 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -54,7 +54,6 @@
#include <IMark.hxx>
#include <unotxdoc.hxx>
#include <unodraw.hxx>
-#include <svx/unoshcol.hxx>
#include <svx/unoshape.hxx>
#include <svx/svdpagv.hxx>
#include <swerror.h>
@@ -63,6 +62,7 @@
#include <SwStyleNameMapper.hxx>
#include <crsskip.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/drawing/ShapeCollection.hpp>
#include <editeng/outliner.hxx>
#include <editeng/editview.hxx>
#include <unoparagraph.hxx>
@@ -72,6 +72,7 @@
#include <switerator.hxx>
#include "swdtflvr.hxx"
#include <vcl/svapp.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -405,7 +406,8 @@ uno::Any SwXTextView::getSelection(void) throw( uno::RuntimeException )
getSomething(SwXTextDocument::getUnoTunnelId()));
SwFmDrawPage* pSvxDrawPage = pTextDoc->GetDrawPage()->GetSvxPage();
- uno::Reference< drawing::XShapes > xShCol = new SvxShapeCollection();
+ uno::Reference< drawing::XShapes > xShCol = drawing::ShapeCollection::create(
+ comphelper::getProcessComponentContext());
const SdrMarkList& rMarkList = rSh.GetDrawView()->GetMarkedObjectList();
for(sal_uInt16 i = 0; i < rMarkList.GetMarkCount(); i++)
More information about the Libreoffice-commits
mailing list