diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-08 10:34:47 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-08 14:30:53 +0100 |
commit | f7936b021f7f0d08dc2baeddefb1b5613a8f87f6 (patch) | |
tree | 286409307a8107d1218d7ccf3608d5ef2122595c /sc | |
parent | 31911b3cdcd405973b689e10ee86add6f1c40bd1 (diff) |
Do not use SvxShapeCollection directly.
Change-Id: I1dd51df0e78a3cc89cdfcaec91ffd9a753393e2e
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/pch/precompiled_sc.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleDocument.cxx | 9 | ||||
-rw-r--r-- | sc/source/ui/unoobj/viewuno.cxx | 10 |
3 files changed, 11 insertions, 9 deletions
diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx index a83fe7201b6b..22f19b969d69 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 2f1e514800f3..6271438fb537 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 1b9319f4bc1f..ea92ba769f82 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); |