LibreOffice Module sc (master) 1
|
Container for a specific type of drawing object in a spreadsheet. More...
Public Member Functions | |
ScVbaObjectContainer (uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, const uno::Reference< frame::XModel > &rxModel, const uno::Reference< sheet::XSpreadsheet > &rxSheet, const uno::Type &rVbaType) | |
const uno::Reference< XHelperInterface > & | getParent () const |
Returns the VBA helper interface of the VBA collection object. More... | |
const uno::Reference< uno::XComponentContext > & | getContext () const |
Returns the component context of the VBA collection object. More... | |
const uno::Type & | getVbaType () const |
Returns the VBA type information of the objects in this container. More... | |
void | collectShapes () |
Collects all shapes supported by this instance and inserts them into the internal shape vector. More... | |
uno::Reference< drawing::XShape > | createShape (const awt::Point &rPos, const awt::Size &rSize) |
Creates and returns a new UNO shape. More... | |
sal_Int32 | insertShape (const uno::Reference< drawing::XShape > &rxShape) |
Inserts the passed shape into the draw page and into this container, and returns its index in the draw page. More... | |
::rtl::Reference< ScVbaSheetObjectBase > | createVbaObject (const uno::Reference< drawing::XShape > &rxShape) |
Creates and returns a new VBA implementation object for the passed shape. More... | |
uno::Any | createCollectionObject (const uno::Any &rSource) |
Creates and returns a new VBA implementation object for the passed shape in an Any. More... | |
uno::Any | getItemByStringIndex (const OUString &rIndex) |
Returns the VBA implementation object with the specified name. More... | |
virtual sal_Int32 SAL_CALL | getCount () override |
virtual uno::Any SAL_CALL | getByIndex (sal_Int32 nIndex) override |
virtual uno::Type SAL_CALL | getElementType () override |
virtual sal_Bool SAL_CALL | hasElements () override |
Protected Member Functions | |
virtual bool | implPickShape (const uno::Reference< drawing::XShape > &rxShape) const =0 |
Derived classes return true, if the passed shape is supported by the instance. More... | |
virtual rtl::Reference< ScVbaSheetObjectBase > | implCreateVbaObject (const uno::Reference< drawing::XShape > &rxShape)=0 |
Derived classes create and return a new VBA implementation object for the passed shape. More... | |
virtual OUString | implGetShapeServiceName () const =0 |
Derived classes return the service name of the UNO shape. More... | |
virtual OUString | implGetShapeName (const uno::Reference< drawing::XShape > &rxShape) const |
Returns the shape name via 'Name' property of the UNO shape. More... | |
virtual void | implOnShapeCreated (const uno::Reference< drawing::XShape > &rxShape) |
Is called when a new UNO shape has been created but not yet inserted into the drawing page. More... | |
Protected Attributes | |
uno::Reference< XHelperInterface > | mxParent |
uno::Reference< uno::XComponentContext > | mxContext |
uno::Reference< frame::XModel > | mxModel |
uno::Reference< lang::XMultiServiceFactory > | mxFactory |
uno::Reference< drawing::XShapes > | mxShapes |
Private Types | |
typedef ::std::vector< uno::Reference< drawing::XShape > > | ShapeVector |
Private Attributes | |
const uno::Type | maVbaType |
ShapeVector | maShapes |
Container for a specific type of drawing object in a spreadsheet.
Derived classes provide all required functionality specific to the type of shapes covered by the container.
Definition at line 78 of file vbasheetobjects.cxx.
|
private |
Definition at line 166 of file vbasheetobjects.cxx.
|
explicit |
void ScVbaObjectContainer::collectShapes | ( | ) |
Collects all shapes supported by this instance and inserts them into the internal shape vector.
uno::RuntimeException |
Definition at line 187 of file vbasheetobjects.cxx.
References implPickShape(), maShapes, mxShapes, nCount, and nIndex.
Creates and returns a new VBA implementation object for the passed shape in an Any.
uno::RuntimeException |
Definition at line 220 of file vbasheetobjects.cxx.
References implCreateVbaObject().
Referenced by getItemByStringIndex().
uno::Reference< drawing::XShape > ScVbaObjectContainer::createShape | ( | const awt::Point & | rPos, |
const awt::Size & | rSize | ||
) |
Creates and returns a new UNO shape.
uno::RuntimeException |
Definition at line 198 of file vbasheetobjects.cxx.
References implGetShapeServiceName(), implOnShapeCreated(), and mxFactory.
rtl::Reference< ScVbaSheetObjectBase > ScVbaObjectContainer::createVbaObject | ( | const uno::Reference< drawing::XShape > & | rxShape | ) |
Creates and returns a new VBA implementation object for the passed shape.
uno::RuntimeException |
Definition at line 214 of file vbasheetobjects.cxx.
References implCreateVbaObject().
|
overridevirtual |
Definition at line 243 of file vbasheetobjects.cxx.
References getCount(), maShapes, and nIndex.
|
inline |
Returns the component context of the VBA collection object.
Definition at line 92 of file vbasheetobjects.cxx.
References mxContext.
|
overridevirtual |
Definition at line 238 of file vbasheetobjects.cxx.
References maShapes.
Referenced by getByIndex().
|
overridevirtual |
Definition at line 252 of file vbasheetobjects.cxx.
References cppu::UnoType< typename T >::get().
uno::Any ScVbaObjectContainer::getItemByStringIndex | ( | const OUString & | rIndex | ) |
Returns the VBA implementation object with the specified name.
uno::RuntimeException |
Definition at line 227 of file vbasheetobjects.cxx.
References createCollectionObject(), and maShapes.
|
inline |
Returns the VBA helper interface of the VBA collection object.
Definition at line 90 of file vbasheetobjects.cxx.
References mxParent.
|
inline |
Returns the VBA type information of the objects in this container.
Definition at line 94 of file vbasheetobjects.cxx.
References maVbaType.
|
overridevirtual |
Definition at line 257 of file vbasheetobjects.cxx.
References maShapes.
|
protectedpure virtual |
Derived classes create and return a new VBA implementation object for the passed shape.
uno::RuntimeException |
Referenced by createCollectionObject(), and createVbaObject().
|
protectedvirtual |
Returns the shape name via 'Name' property of the UNO shape.
May be overwritten.
uno::RuntimeException |
Definition at line 264 of file vbasheetobjects.cxx.
|
protectedpure virtual |
Derived classes return the service name of the UNO shape.
Referenced by createShape().
|
protectedvirtual |
Is called when a new UNO shape has been created but not yet inserted into the drawing page.
uno::RuntimeException |
Definition at line 270 of file vbasheetobjects.cxx.
Referenced by createShape().
|
protectedpure virtual |
Derived classes return true, if the passed shape is supported by the instance.
Referenced by collectShapes().
sal_Int32 ScVbaObjectContainer::insertShape | ( | const uno::Reference< drawing::XShape > & | rxShape | ) |
Inserts the passed shape into the draw page and into this container, and returns its index in the draw page.
uno::RuntimeException |
Definition at line 207 of file vbasheetobjects.cxx.
|
private |
Definition at line 168 of file vbasheetobjects.cxx.
Referenced by collectShapes(), getByIndex(), getCount(), getItemByStringIndex(), hasElements(), and insertShape().
|
private |
Definition at line 167 of file vbasheetobjects.cxx.
Referenced by getVbaType().
|
protected |
Definition at line 160 of file vbasheetobjects.cxx.
Referenced by getContext().
|
protected |
Definition at line 162 of file vbasheetobjects.cxx.
Referenced by createShape().
|
protected |
Definition at line 161 of file vbasheetobjects.cxx.
|
protected |
Definition at line 159 of file vbasheetobjects.cxx.
Referenced by getParent().
|
protected |
Definition at line 163 of file vbasheetobjects.cxx.
Referenced by collectShapes(), insertShape(), and ScVbaObjectContainer().