LibreOffice Module vbahelper (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
ScVbaShapes Class Referencefinal

#include <vbashapes.hxx>

Inheritance diagram for ScVbaShapes:
[legend]
Collaboration diagram for ScVbaShapes:
[legend]

Public Member Functions

 ScVbaShapes (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::frame::XModel > xModel)
 
virtual css::uno::Type SAL_CALL getElementType () override
 
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration () override
 
virtual void SAL_CALL SelectAll () override
 
virtual css::uno::Any SAL_CALL AddLine (sal_Int32 StartX, sal_Int32 StartY, sal_Int32 endX, sal_Int32 endY) override
 
virtual css::uno::Any SAL_CALL AddShape (sal_Int32 _nType, sal_Int32 _nLeft, sal_Int32 _nTop, sal_Int32 _nWidth, sal_Int32 _nHeight) override
 
virtual css::uno::Any SAL_CALL AddTextbox (sal_Int32 _nOrientation, sal_Int32 _nLeft, sal_Int32 _nTop, sal_Int32 _nWidth, sal_Int32 _nHeight) override
 
virtual css::uno::Reference< ov::msforms::XShapeRange > SAL_CALL Range (const css::uno::Any &shapes) override
 
virtual css::uno::Any createCollectionObject (const css::uno::Any &aSource) override
 
- Public Member Functions inherited from CollTestImplHelper< Ifc >
 CollTestImplHelper (const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::container::XIndexAccess > &xIndexAccess, bool bIgnoreCase=false)
 
- Public Member Functions inherited from ScVbaCollectionBase< ::cppu::WeakImplHelper< Ifc... > >
 ScVbaCollectionBase (const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, css::uno::Reference< css::container::XIndexAccess > xIndexAccess, bool bIgnoreCase=false)
 
virtual ::sal_Int32 SAL_CALL getCount () override
 
virtual css::uno::Any SAL_CALL Item (const css::uno::Any &Index1, const css::uno::Any &) override
 
OUString SAL_CALL getDefaultMethodName () override
 
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration () override=0
 
virtual css::uno::Type SAL_CALL getElementType () override=0
 
virtual sal_Bool SAL_CALL hasElements () override
 
virtual css::uno::Any createCollectionObject (const css::uno::Any &aSource)=0
 
- Public Member Functions inherited from InheritedHelperInterfaceImpl< Ifc... >
 InheritedHelperInterfaceImpl (const css::uno::Reference< ov::XHelperInterface > &xParent, css::uno::Reference< css::uno::XComponentContext > xContext)
 
virtual OUString getServiceImplName ()=0
 
virtual css::uno::Sequence< OUString > getServiceNames ()=0
 
virtual ::sal_Int32 SAL_CALL getCreator () override
 
virtual css::uno::Reference< ov::XHelperInterface > SAL_CALL getParent () override
 
virtual css::uno::Any SAL_CALL Application () override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 

Static Public Member Functions

static void setDefaultShapeProperties (const css::uno::Reference< css::drawing::XShape > &xShape)
 
static void setShape_NameProperty (const css::uno::Reference< css::drawing::XShape > &xShape, const OUString &sName)
 

Private Member Functions

void initBaseCollection ()
 
virtual OUString getServiceImplName () override
 
virtual css::uno::Sequence< OUString > getServiceNames () override
 
css::uno::Reference< css::container::XIndexAccess > getShapesByArrayIndices (const css::uno::Any &Index)
 
css::uno::Reference< css::drawing::XShape > createShape (const OUString &service)
 
css::uno::Any AddRectangle (sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight)
 
css::uno::Any AddEllipse (sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight)
 
css::uno::Any AddTextboxInWriter (sal_Int32 _nLeft, sal_Int32 _nTop, sal_Int32 _nWidth, sal_Int32 _nHeight)
 
OUString createName (std::u16string_view sName)
 

Private Attributes

css::uno::Reference< css::drawing::XShapes > m_xShapes
 
css::uno::Reference< css::drawing::XDrawPage > m_xDrawPage
 
sal_Int32 m_nNewShapeCount
 
css::uno::Reference< css::frame::XModel > m_xModel
 

Additional Inherited Members

- Protected Member Functions inherited from ScVbaCollectionBase< ::cppu::WeakImplHelper< Ifc... > >
virtual css::uno::Any getItemByStringIndex (const OUString &sIndex)
 
virtual css::uno::Any getItemByIntIndex (const sal_Int32 nIndex)
 
void UpdateCollectionIndex (const css::uno::Reference< css::container::XIndexAccess > &xIndexAccess)
 
- Protected Attributes inherited from ScVbaCollectionBase< ::cppu::WeakImplHelper< Ifc... > >
css::uno::Reference< css::container::XIndexAccess > m_xIndexAccess
 
css::uno::Reference< css::container::XNameAccess > m_xNameAccess
 
bool mbIgnoreCase
 
- Protected Attributes inherited from InheritedHelperInterfaceImpl< Ifc... >
css::uno::WeakReference< ov::XHelperInterface > mxParent
 
css::uno::Reference< css::uno::XComponentContext > mxContext
 

Detailed Description

Definition at line 55 of file vbashapes.hxx.

Constructor & Destructor Documentation

◆ ScVbaShapes()

ScVbaShapes::ScVbaShapes ( 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::frame::XModel >  xModel 
)

Definition at line 91 of file vbashapes.cxx.

References initBaseCollection(), m_xDrawPage, m_xModel, m_xShapes, and xModel.

Member Function Documentation

◆ AddEllipse()

uno::Any ScVbaShapes::AddEllipse ( sal_Int32  startX,
sal_Int32  startY,
sal_Int32  nLineWidth,
sal_Int32  nLineHeight 
)
private

◆ AddLine()

uno::Any SAL_CALL ScVbaShapes::AddLine ( sal_Int32  StartX,
sal_Int32  StartY,
sal_Int32  endX,
sal_Int32  endY 
)
overridevirtual

◆ AddRectangle()

uno::Any ScVbaShapes::AddRectangle ( sal_Int32  startX,
sal_Int32  startY,
sal_Int32  nLineWidth,
sal_Int32  nLineHeight 
)
private

◆ AddShape()

uno::Any SAL_CALL ScVbaShapes::AddShape ( sal_Int32  _nType,
sal_Int32  _nLeft,
sal_Int32  _nTop,
sal_Int32  _nWidth,
sal_Int32  _nHeight 
)
overridevirtual

Definition at line 324 of file vbashapes.cxx.

References AddEllipse(), and AddRectangle().

◆ AddTextbox()

uno::Any SAL_CALL ScVbaShapes::AddTextbox ( sal_Int32  _nOrientation,
sal_Int32  _nLeft,
sal_Int32  _nTop,
sal_Int32  _nWidth,
sal_Int32  _nHeight 
)
overridevirtual

Definition at line 338 of file vbashapes.cxx.

References AddTextboxInWriter(), and m_xModel.

◆ AddTextboxInWriter()

uno::Any ScVbaShapes::AddTextboxInWriter ( sal_Int32  _nLeft,
sal_Int32  _nTop,
sal_Int32  _nWidth,
sal_Int32  _nHeight 
)
private

◆ createCollectionObject()

uno::Any ScVbaShapes::createCollectionObject ( const css::uno::Any &  aSource)
overridevirtual

◆ createEnumeration()

uno::Reference< container::XEnumeration > ScVbaShapes::createEnumeration ( )
overridevirtual

◆ createName()

OUString ScVbaShapes::createName ( std::u16string_view  sName)
private

Definition at line 415 of file vbashapes.cxx.

References m_nNewShapeCount, and sName.

Referenced by AddEllipse(), AddLine(), AddRectangle(), and AddTextboxInWriter().

◆ createShape()

uno::Reference< drawing::XShape > ScVbaShapes::createShape ( const OUString &  service)
private
Exceptions
css::uno::RuntimeException

Definition at line 209 of file vbashapes.cxx.

References m_xModel.

Referenced by AddEllipse(), AddLine(), AddRectangle(), and AddTextboxInWriter().

◆ getElementType()

uno::Type ScVbaShapes::getElementType ( )
overridevirtual

◆ getServiceImplName()

OUString ScVbaShapes::getServiceImplName ( )
overrideprivatevirtual

Implements InheritedHelperInterfaceImpl< Ifc... >.

Definition at line 122 of file vbashapes.cxx.

◆ getServiceNames()

uno::Sequence< OUString > ScVbaShapes::getServiceNames ( )
overrideprivatevirtual

Implements InheritedHelperInterfaceImpl< Ifc... >.

Definition at line 128 of file vbashapes.cxx.

References aServiceNames.

◆ getShapesByArrayIndices()

css::uno::Reference< css::container::XIndexAccess > ScVbaShapes::getShapesByArrayIndices ( const css::uno::Any &  Index)
private

◆ initBaseCollection()

void ScVbaShapes::initBaseCollection ( )
private

◆ Range()

uno::Reference< msforms::XShapeRange > SAL_CALL ScVbaShapes::Range ( const css::uno::Any &  shapes)
overridevirtual

◆ SelectAll()

void SAL_CALL ScVbaShapes::SelectAll ( )
overridevirtual

Definition at line 193 of file vbashapes.cxx.

References m_xModel, and m_xShapes.

◆ setDefaultShapeProperties()

void ScVbaShapes::setDefaultShapeProperties ( const css::uno::Reference< css::drawing::XShape > &  xShape)
static
Exceptions
css::uno::RuntimeException

Definition at line 391 of file vbashapes.cxx.

Referenced by AddEllipse(), AddLine(), AddRectangle(), and AddTextboxInWriter().

◆ setShape_NameProperty()

void ScVbaShapes::setShape_NameProperty ( const css::uno::Reference< css::drawing::XShape > &  xShape,
const OUString &  sName 
)
static

Definition at line 402 of file vbashapes.cxx.

References sName.

Referenced by AddEllipse(), AddLine(), AddRectangle(), and AddTextboxInWriter().

Member Data Documentation

◆ m_nNewShapeCount

sal_Int32 ScVbaShapes::m_nNewShapeCount
private

Definition at line 60 of file vbashapes.hxx.

Referenced by createName().

◆ m_xDrawPage

css::uno::Reference< css::drawing::XDrawPage > ScVbaShapes::m_xDrawPage
private

Definition at line 59 of file vbashapes.hxx.

Referenced by Range(), and ScVbaShapes().

◆ m_xModel

css::uno::Reference< css::frame::XModel > ScVbaShapes::m_xModel
private

◆ m_xShapes

css::uno::Reference< css::drawing::XShapes > ScVbaShapes::m_xShapes
private

The documentation for this class was generated from the following files: