LibreOffice Module oox (master) 1
|
Represents the collection of VML shapes for a complete draw page. More...
#include <vmldrawing.hxx>
Public Member Functions | |
Drawing (::oox::core::XmlFilterBase &rFilter, const css::uno::Reference< css::drawing::XDrawPage > &rxDrawPage, DrawingType eType) | |
virtual | ~Drawing () |
::oox::core::XmlFilterBase & | getFilter () const |
Returns the filter object that imports/exports this VML drawing. More... | |
DrawingType | getType () const |
Returns the application type containing the drawing. More... | |
ShapeContainer & | getShapes () |
Returns read/write access to the container of shapes and templates. More... | |
const ShapeContainer & | getShapes () const |
Returns read access to the container of shapes and templates. More... | |
::oox::ole::EmbeddedForm & | getControlForm () const |
Returns the form object used to process ActiveX form controls. More... | |
void | registerBlockId (sal_Int32 nBlockId) |
Registers a block of shape identifiers reserved by this drawing. More... | |
void | registerOleObject (const OleObjectInfo &rOleObject) |
Registers the passed embedded OLE object. More... | |
void | registerControl (const ControlInfo &rControl) |
Registers the passed embedded form control. More... | |
void | finalizeFragmentImport () |
Final processing after import of the fragment. More... | |
void | convertAndInsert () const |
Creates and inserts all UNO shapes into the draw page. More... | |
sal_Int32 | getLocalShapeIndex (std::u16string_view rShapeId) const |
Returns the local shape index from the passed global shape identifier. More... | |
const OleObjectInfo * | getOleObjectInfo (const OUString &rShapeId) const |
Returns the registered info structure for an OLE object, if extant. More... | |
const ControlInfo * | getControlInfo (const OUString &rShapeId) const |
Returns the registered info structure for a form control, if extant. More... | |
css::uno::Reference< css::drawing::XShape > | createAndInsertXShape (const OUString &rService, const css::uno::Reference< css::drawing::XShapes > &rxShapes, const css::awt::Rectangle &rShapeRect) const |
Creates a new UNO shape object, inserts it into the passed UNO shape container, and sets the shape position and size. More... | |
css::uno::Reference< css::drawing::XShape > | createAndInsertXControlShape (const ::oox::ole::EmbeddedControl &rControl, const css::uno::Reference< css::drawing::XShapes > &rxShapes, const css::awt::Rectangle &rShapeRect, sal_Int32 &rnCtrlIndex) const |
Creates a new UNO shape object for a form control, inserts the control model into the form, and the shape into the passed UNO shape container. More... | |
virtual bool | isShapeSupported (const ShapeBase &rShape) const |
Derived classes may disable conversion of specific shapes. More... | |
virtual OUString | getShapeBaseName (const ShapeBase &rShape) const |
Derived classes may return additional base names for automatic shape name creation. More... | |
virtual bool | convertClientAnchor (css::awt::Rectangle &orShapeRect, const OUString &rShapeAnchor) const |
Derived classes may calculate the shape rectangle from a non-standard anchor information string. More... | |
virtual css::uno::Reference< css::drawing::XShape > | createAndInsertClientXShape (const ShapeBase &rShape, const css::uno::Reference< css::drawing::XShapes > &rxShapes, const css::awt::Rectangle &rShapeRect) const |
Derived classes create a UNO shape according to the passed shape model. More... | |
virtual void | notifyXShapeInserted (const css::uno::Reference< css::drawing::XShape > &rxShape, const css::awt::Rectangle &rShapeRect, const ShapeBase &rShape, bool bGroupChild) |
Derived classes may want to know that a UNO shape has been inserted. More... | |
Private Types | |
typedef ::std::vector< sal_Int32 > | BlockIdVector |
typedef ::std::map< OUString, OleObjectInfo > | OleObjectInfoMap |
typedef ::std::map< OUString, ControlInfo > | ControlInfoMap |
Private Attributes | |
::oox::core::XmlFilterBase & | mrFilter |
Filter object that imports/exports the VML drawing. More... | |
css::uno::Reference< css::drawing::XDrawPage > | mxDrawPage |
UNO draw page used to insert the shapes. More... | |
std::unique_ptr<::oox::ole::EmbeddedForm > | mxCtrlForm |
The control form used to process embedded controls. More... | |
BlockIdVector | maBlockIds |
Block identifiers used by this drawing. More... | |
std::unique_ptr< ShapeContainer > | mxShapes |
All shapes and shape templates. More... | |
OleObjectInfoMap | maOleObjects |
Info about all embedded OLE objects, mapped by shape id. More... | |
ControlInfoMap | maControls |
Info about all embedded form controls, mapped by control name. More... | |
const DrawingType | meType |
Application type containing the drawing. More... | |
Represents the collection of VML shapes for a complete draw page.
Definition at line 93 of file vmldrawing.hxx.
|
private |
Definition at line 186 of file vmldrawing.hxx.
|
private |
Definition at line 188 of file vmldrawing.hxx.
|
private |
Definition at line 187 of file vmldrawing.hxx.
|
explicit |
Definition at line 95 of file vmldrawing.cxx.
References eType, mxDrawPage, and mxDrawPage.
|
virtual |
Definition at line 104 of file vmldrawing.cxx.
void oox::vml::Drawing::convertAndInsert | ( | ) | const |
Creates and inserts all UNO shapes into the draw page.
The virtual function notifyXShapeInserted() will be called for each new shape.
Definition at line 148 of file vmldrawing.cxx.
References DBG_UNHANDLED_EXCEPTION, namespaces::i, mxDrawPage, mxShapes, and sName.
Referenced by createAndInsertXControlShape().
|
virtual |
Derived classes may calculate the shape rectangle from a non-standard anchor information string.
Definition at line 328 of file vmldrawing.cxx.
Referenced by oox::vml::ShapeBase::calcShapeRectangle().
|
virtual |
Derived classes create a UNO shape according to the passed shape model.
Called for shape models that specify being under host control.
Definition at line 333 of file vmldrawing.cxx.
Referenced by oox::vml::ComplexShape::implConvertAndInsert().
Reference< XShape > oox::vml::Drawing::createAndInsertXControlShape | ( | const ::oox::ole::EmbeddedControl & | rControl, |
const css::uno::Reference< css::drawing::XShapes > & | rxShapes, | ||
const css::awt::Rectangle & | rShapeRect, | ||
sal_Int32 & | rnCtrlIndex | ||
) | const |
Creates a new UNO shape object for a form control, inserts the control model into the form, and the shape into the passed UNO shape container.
Definition at line 296 of file vmldrawing.cxx.
References convertAndInsert(), createAndInsertXShape(), Exception, getControlForm(), and TOOLS_WARN_EXCEPTION.
Referenced by oox::vml::ComplexShape::implConvertAndInsert().
Reference< XShape > oox::vml::Drawing::createAndInsertXShape | ( | const OUString & | rService, |
const css::uno::Reference< css::drawing::XShapes > & | rxShapes, | ||
const css::awt::Rectangle & | rShapeRect | ||
) | const |
Creates a new UNO shape object, inserts it into the passed UNO shape container, and sets the shape position and size.
Definition at line 260 of file vmldrawing.cxx.
References Any, Exception, oox::core::FilterBase::getModelFactory(), mrFilter, and TOOLS_WARN_EXCEPTION.
Referenced by createAndInsertXControlShape(), oox::vml::SimpleShape::createPictureObject(), oox::vml::SimpleShape::implConvertAndInsert(), oox::vml::ComplexShape::implConvertAndInsert(), and oox::vml::GroupShape::implConvertAndInsert().
void oox::vml::Drawing::finalizeFragmentImport | ( | ) |
Final processing after import of the fragment.
Definition at line 143 of file vmldrawing.cxx.
References mxShapes.
oox::ole::EmbeddedForm & oox::vml::Drawing::getControlForm | ( | ) | const |
Returns the form object used to process ActiveX form controls.
Definition at line 108 of file vmldrawing.cxx.
References oox::core::FilterBase::getGraphicHelper(), oox::core::FilterBase::getModel(), mrFilter, mxCtrlForm, and mxDrawPage.
Referenced by createAndInsertXControlShape().
const ControlInfo * oox::vml::Drawing::getControlInfo | ( | const OUString & | rShapeId | ) | const |
Returns the registered info structure for a form control, if extant.
Definition at line 255 of file vmldrawing.cxx.
References oox::ContainerHelper::getMapElement(), and maControls.
Referenced by oox::vml::ComplexShape::implConvertAndInsert().
|
inline |
Returns the filter object that imports/exports this VML drawing.
Definition at line 104 of file vmldrawing.hxx.
References mrFilter.
Referenced by oox::vml::ShapeBase::convertShapeProperties(), oox::vml::SimpleShape::createEmbeddedPictureObject(), oox::vml::SimpleShape::createPictureObject(), oox::vml::SimpleShape::finalImplConvertAndInsert(), oox::vml::ShapeType::getAbsRectangle(), oox::vml::LineShape::getAbsRectangle(), oox::vml::SimpleShape::implConvertAndInsert(), oox::vml::BezierShape::implConvertAndInsert(), oox::vml::ComplexShape::implConvertAndInsert(), oox::vml::GroupShape::implConvertAndInsert(), oox::vml::ShapeContext::onCreateContext(), and oox::vml::ShapeContext::setPoints().
sal_Int32 oox::vml::Drawing::getLocalShapeIndex | ( | std::u16string_view | rShapeId | ) | const |
Returns the local shape index from the passed global shape identifier.
Definition at line 209 of file vmldrawing.cxx.
References maBlockIds, and nIndex.
Referenced by oox::vml::ShapeBase::getShapeName().
const OleObjectInfo * oox::vml::Drawing::getOleObjectInfo | ( | const OUString & | rShapeId | ) | const |
Returns the registered info structure for an OLE object, if extant.
Definition at line 250 of file vmldrawing.cxx.
References oox::ContainerHelper::getMapElement(), and maOleObjects.
Referenced by oox::vml::ComplexShape::implConvertAndInsert().
|
virtual |
Derived classes may return additional base names for automatic shape name creation.
Definition at line 323 of file vmldrawing.cxx.
Referenced by oox::vml::ShapeBase::getShapeName().
|
inline |
Returns read/write access to the container of shapes and templates.
Definition at line 108 of file vmldrawing.hxx.
Referenced by oox::vml::ShapeBase::finalizeFragmentImport().
|
inline |
Returns read access to the container of shapes and templates.
Definition at line 110 of file vmldrawing.hxx.
|
inline |
Returns the application type containing the drawing.
Definition at line 106 of file vmldrawing.hxx.
References meType.
Referenced by oox::vml::ShapeContainer::takeLastShape().
|
virtual |
Derived classes may disable conversion of specific shapes.
Definition at line 318 of file vmldrawing.cxx.
Referenced by oox::vml::ShapeBase::convertAndInsert().
|
virtual |
Derived classes may want to know that a UNO shape has been inserted.
Will be called from the convertAndInsert() implementation.
bGroupChild | True = inserted into a group shape, false = inserted directly into this drawing. |
Definition at line 339 of file vmldrawing.cxx.
Referenced by oox::vml::ShapeBase::convertAndInsert().
void oox::vml::Drawing::registerBlockId | ( | sal_Int32 | nBlockId | ) |
Registers a block of shape identifiers reserved by this drawing.
Block size is 1024, shape identifiers are one-based (block 1 => 1025-2048).
Definition at line 116 of file vmldrawing.cxx.
References maBlockIds.
Referenced by oox::vml::ShapeLayoutContext::onCreateContext().
void oox::vml::Drawing::registerControl | ( | const ControlInfo & | rControl | ) |
Registers the passed embedded form control.
The related shape will then load the control properties from the specified fragment.
Definition at line 135 of file vmldrawing.cxx.
References maControls, oox::vml::ControlInfo::maName, and oox::vml::ControlInfo::maShapeId.
Referenced by oox::vml::ControlShapeContext::ControlShapeContext().
void oox::vml::Drawing::registerOleObject | ( | const OleObjectInfo & | rOleObject | ) |
Registers the passed embedded OLE object.
The related shape will then load the OLE object data from the specified fragment.
Definition at line 128 of file vmldrawing.cxx.
References maOleObjects, and oox::vml::OleObjectInfo::maShapeId.
|
mutableprivate |
Block identifiers used by this drawing.
Definition at line 194 of file vmldrawing.hxx.
Referenced by getLocalShapeIndex(), and registerBlockId().
|
private |
Info about all embedded form controls, mapped by control name.
Definition at line 197 of file vmldrawing.hxx.
Referenced by getControlInfo(), and registerControl().
|
private |
Info about all embedded OLE objects, mapped by shape id.
Definition at line 196 of file vmldrawing.hxx.
Referenced by getOleObjectInfo(), and registerOleObject().
|
private |
Application type containing the drawing.
Definition at line 198 of file vmldrawing.hxx.
|
private |
Filter object that imports/exports the VML drawing.
Definition at line 190 of file vmldrawing.hxx.
Referenced by createAndInsertXShape(), and getControlForm().
|
mutableprivate |
The control form used to process embedded controls.
Definition at line 193 of file vmldrawing.hxx.
Referenced by getControlForm().
|
private |
UNO draw page used to insert the shapes.
Definition at line 192 of file vmldrawing.hxx.
Referenced by convertAndInsert(), Drawing(), and getControlForm().
|
private |
All shapes and shape templates.
Definition at line 195 of file vmldrawing.hxx.
Referenced by convertAndInsert(), and finalizeFragmentImport().