Do not use SvxShapeCollection directly.
Change-Id: I1dd51df0e78a3cc89cdfcaec91ffd9a753393e2e
This commit is contained in:
@@ -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>
|
||||
|
@@ -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())
|
||||
|
@@ -34,8 +34,6 @@ public:
|
||||
::osl::Mutex maMutex;
|
||||
};
|
||||
|
||||
SVX_DLLPUBLIC com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SvxShapeCollection_NewInstance() throw();
|
||||
|
||||
/***********************************************************************
|
||||
* *
|
||||
***********************************************************************/
|
||||
|
@@ -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>
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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);
|
||||
|
@@ -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>
|
||||
|
@@ -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 )
|
||||
|
@@ -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);
|
||||
|
@@ -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()
|
||||
{
|
||||
|
@@ -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>
|
||||
|
@@ -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++)
|
||||
|
Reference in New Issue
Block a user