libs/flake
KoFrameShape Class Reference
Base class for shapes that are saved as a part of a draw:frame. More...
#include <KoFrameShape.h>
Public Member Functions | |
| KoFrameShape (const char *ns, const char *tag) | |
| virtual | ~KoFrameShape () |
| virtual bool | loadOdfFrame (const KoXmlElement &element, KoShapeLoadingContext &context) |
Protected Member Functions | |
| virtual bool | loadOdfFrameElement (const KoXmlElement &element, KoShapeLoadingContext &context)=0 |
Detailed Description
Base class for shapes that are saved as a part of a draw:frame.
Shapes like the TextShape or the PictureShape are implementing this class to deal with frames and their attributes.
What follows is a sample taken out of an ODT-file that shows how this works together;
<draw:frame draw:style-name="fr1" text:anchor-type="paragraph" svg:x="0.6429in" svg:y="0.1409in" svg:width="4.7638in" svg:height="3.3335in"> <draw:image xlink:href="Pictures/imagename.jpg" /> </draw:frame>
The loading code of the shape gets passed the draw:frame element. Out of this element the odf attributes can be loaded. Then it calls loadOdfFrame which loads the correct frame element the object supports. The loading of the frame element is done in the loadOdfFrameElement.
bool PictureShape::loadOdf( const KoXmlElement & element, KoShapeLoadingContext &context ) { loadOdfAttributes( element, context, OdfAllAttributes ); return loadOdfFrame( element, context ); }
Definition at line 54 of file KoFrameShape.h.
Constructor & Destructor Documentation
| KoFrameShape::KoFrameShape | ( | const char * | ns, | |
| const char * | tag | |||
| ) |
Constructor.
- Parameters:
-
ns The namespace. E.g. KoXmlNS::draw tag The tag-name. E.g. "image"
Definition at line 34 of file KoFrameShape.cpp.
| KoFrameShape::~KoFrameShape | ( | ) | [virtual] |
Destructor.
Definition at line 39 of file KoFrameShape.cpp.
Member Function Documentation
| bool KoFrameShape::loadOdfFrame | ( | const KoXmlElement & | element, | |
| KoShapeLoadingContext & | context | |||
| ) | [virtual] |
Loads the content of the draw:frame element and it's children.
This method calls the abstract loadOdfFrameElement() method.
Definition at line 44 of file KoFrameShape.cpp.
| virtual bool KoFrameShape::loadOdfFrameElement | ( | const KoXmlElement & | element, | |
| KoShapeLoadingContext & | context | |||
| ) | [protected, pure virtual] |
Abstract method to handle loading of the defined inner element like e.g.
the draw:image element.
The documentation for this class was generated from the following files:
