19#include <com/sun/star/drawing/ShapeCollection.hpp>
20#include <com/sun/star/drawing/XShapeGrouper.hpp>
21#include <com/sun/star/drawing/XDrawPage.hpp>
22#include <com/sun/star/frame/XModel.hpp>
23#include <com/sun/star/view/XSelectionSupplier.hpp>
24#include <ooo/vba/office/MsoShapeType.hpp>
36 uno::Reference< XCollection > m_xParent;
37 uno::Reference<container::XIndexAccess > m_xIndexAccess;
40 VbShapeRangeEnumHelper( uno::Reference< XCollection > xParent, uno::Reference< container::XIndexAccess > xIndexAccess ) : m_xParent(
std::move( xParent )), m_xIndexAccess(
std::move( xIndexAccess )),
nIndex( 0 ) {}
41 virtual sal_Bool SAL_CALL hasMoreElements( )
override
43 return ( nIndex < m_xIndexAccess->getCount() );
45 virtual uno::Any SAL_CALL nextElement( )
override
48 if ( pCollectionImpl && hasMoreElements() )
50 throw container::NoSuchElementException();
57ScVbaShapeRange::ScVbaShapeRange(
const uno::Reference< XHelperInterface >& xParent,
const uno::Reference< uno::XComponentContext >& xContext,
const uno::Reference< container::XIndexAccess >& xShapes, uno::Reference< drawing::XDrawPage > xDrawPage, uno::Reference< frame::XModel > xModel ) :
ScVbaShapeRange_BASE( xParent, xContext, xShapes ), m_xDrawPage(
std::move( xDrawPage )),
m_xModel(
std::move(
xModel ))
65 uno::Reference< view::XSelectionSupplier > xSelectSupp(
m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
69uno::Reference< msforms::XShape > SAL_CALL
72 uno::Reference< drawing::XShapeGrouper > xShapeGrouper(
m_xDrawPage, uno::UNO_QUERY_THROW );
73 uno::Reference< drawing::XShapeGroup > xShapeGroup( xShapeGrouper->group(
getShapes() ), uno::UNO_SET_THROW );
74 uno::Reference< drawing::XShape > xShape( xShapeGroup, uno::UNO_QUERY_THROW );
78uno::Reference< drawing::XShapes >
const &
100 xShape->IncrementRotation( Increment );
111 xShape->IncrementLeft( Increment );
122 xShape->IncrementTop( Increment );
133 return xShape->getName( );
135 throw uno::RuntimeException();
144 xShape->setName( _name );
155 return xShape->getHeight( );
157 throw uno::RuntimeException();
166 xShape->setHeight( _height );
177 return xShape->getWidth( );
179 throw uno::RuntimeException();
188 xShape->setWidth( _width );
199 return xShape->getLeft();
201 throw uno::RuntimeException();
210 xShape->setLeft( _left );
221 return xShape->getTop();
223 throw uno::RuntimeException();
232 xShape->setTop( _top );
243 return xShape->getLine();
245 throw uno::RuntimeException();
255 return xShape->getFill();
257 throw uno::RuntimeException();
267 return xShape->getLockAspectRatio();
269 throw uno::RuntimeException();
278 xShape->setLockAspectRatio( _lockaspectratio );
289 return xShape->getLockAnchor();
291 throw uno::RuntimeException();
300 xShape->setLockAnchor( _lockanchor );
311 return xShape->getRelativeHorizontalPosition();
313 throw uno::RuntimeException();
322 xShape->setRelativeHorizontalPosition( _relativehorizontalposition );
333 return xShape->getRelativeVerticalPosition();
335 throw uno::RuntimeException();
344 xShape->setRelativeVerticalPosition( _relativeverticalposition );
355 return xShape->TextFrame();
357 throw uno::RuntimeException();
367 return xShape->WrapFormat();
369 throw uno::RuntimeException();
378 xShape->ZOrder( ZOrderCmd );
388uno::Reference< container::XEnumeration > SAL_CALL
397 uno::Reference< drawing::XShape > xShape( aSource, uno::UNO_QUERY_THROW );
407 return "ScVbaShapeRange";
410uno::Sequence< OUString >
415 "ooo.vba.msform.ShapeRange"
css::uno::Reference< css::uno::XComponentContext > mxContext
virtual css::uno::Reference< ov::XHelperInterface > SAL_CALL getParent() override
virtual css::uno::Any SAL_CALL Item(const css::uno::Any &Index1, const css::uno::Any &) override
css::uno::Reference< css::container::XIndexAccess > m_xIndexAccess
virtual ::sal_Int32 SAL_CALL getCount() override
virtual void SAL_CALL IncrementLeft(double Increment) override
virtual void SAL_CALL setRelativeVerticalPosition(::sal_Int32 _relativeverticalposition) override
virtual void SAL_CALL setLeft(double _left) override
virtual void SAL_CALL setWidth(double _width) override
virtual css::uno::Any createCollectionObject(const css::uno::Any &aSource) override
virtual void SAL_CALL setLockAspectRatio(sal_Bool _lockaspectratio) override
virtual void SAL_CALL IncrementTop(double Increment) override
css::uno::Reference< css::frame::XModel > m_xModel
virtual void SAL_CALL setRelativeHorizontalPosition(::sal_Int32 _relativehorizontalposition) override
virtual css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Any SAL_CALL WrapFormat() override
virtual OUString SAL_CALL getName() override
virtual double SAL_CALL getHeight() override
virtual OUString getServiceImplName() override
virtual ::sal_Int32 SAL_CALL getRelativeVerticalPosition() override
virtual void SAL_CALL setTop(double _top) override
virtual css::uno::Reference< ov::msforms::XLineFormat > SAL_CALL getLine() override
virtual double SAL_CALL getTop() override
virtual css::uno::Any SAL_CALL TextFrame() override
virtual void SAL_CALL setName(const OUString &_name) override
virtual css::uno::Reference< ov::msforms::XFillFormat > SAL_CALL getFill() override
virtual sal_Bool SAL_CALL getLockAnchor() override
virtual void SAL_CALL setLockAnchor(sal_Bool _lockanchor) override
css::uno::Reference< css::drawing::XDrawPage > m_xDrawPage
virtual double SAL_CALL getWidth() override
virtual void SAL_CALL ZOrder(sal_Int32 ZOrderCmd) override
css::uno::Reference< css::drawing::XShapes > const & getShapes()
virtual css::uno::Sequence< OUString > getServiceNames() override
virtual void SAL_CALL IncrementRotation(double Increment) override
virtual void SAL_CALL setHeight(double _height) override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
ScVbaShapeRange(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::container::XIndexAccess > &xShapes, css::uno::Reference< css::drawing::XDrawPage > xDrawShape, css::uno::Reference< css::frame::XModel > xModel)
virtual void SAL_CALL Select() override
virtual double SAL_CALL getLeft() override
virtual sal_Bool SAL_CALL getLockAspectRatio() override
virtual ::sal_Int32 SAL_CALL getRelativeHorizontalPosition() override
css::uno::Reference< css::drawing::XShapes > m_xShapes
virtual css::uno::Reference< ::ooo::vba::msforms::XShape > SAL_CALL Group() override
virtual sal_Int32 SAL_CALL getType() override
css::uno::Type const & get()
Reference< frame::XModel > m_xModel
Sequence< OUString > aServiceNames
Reference< XModel > xModel
::cppu::WeakImplHelper< css::container::XEnumeration > EnumerationHelper_BASE