OpenXLSX 1.9.1
Loading...
Searching...
No Matches
OpenXLSX::XLVmlDrawing Class Reference

The XLVmlDrawing class is the base class for worksheet comments. More...

#include <XLDrawing.hpp>

Inheritance diagram for OpenXLSX::XLVmlDrawing:
OpenXLSX::XLXmlFile

Public Member Functions

 XLVmlDrawing ()
 Constructor.
 
 XLVmlDrawing (gsl::not_null< XLXmlData * > xmlData)
 The constructor.
 
 XLVmlDrawing (const XLVmlDrawing &other)=default
 The copy constructor.
 
 XLVmlDrawing (XLVmlDrawing &&other) noexcept=default
 
 ~XLVmlDrawing ()=default
 The destructor.
 
XLVmlDrawingoperator= (const XLVmlDrawing &)=default
 Assignment operator.
 
XLVmlDrawingoperator= (XLVmlDrawing &&other) noexcept=default
 
XMLNode shapeNode (std::string_view cellRef) const
 Get the shape XML node that is associated with the cell indicated by cellRef.
 
uint32_t shapeCount () const
 
XLShape shape (uint32_t index) const
 
bool deleteShape (uint32_t index)
 
bool deleteShape (std::string_view cellRef)
 
XLShape createShape (const XLShape &shapeTemplate=XLShape())
 
void print (std::basic_ostream< char > &ostr) const
 Print the XML contents of this XLVmlDrawing instance using the underlying XMLNode print function.
 
- Public Member Functions inherited from OpenXLSX::XLXmlFile
 XLXmlFile ()=default
 Default constructor.
 
std::string xmlData (XLXmlSavingDeclaration savingDeclaration=XLXmlSavingDeclaration{}) const
 Method for getting the XML data represented by the object.
 
 XLXmlFile (XLXmlData *xmlData)
 Constructor. Creates an object based on the xmlData input.
 
 XLXmlFile (const XLXmlFile &other)=default
 Copy constructor. Default implementation used.
 
 XLXmlFile (XLXmlFile &&other) noexcept=default
 Move constructor. Default implementation used.
 
 ~XLXmlFile ()=default
 Destructor. Default implementation used.
 
bool valid () const
 check whether class is linked to a valid XML file
 
XLXmlFileoperator= (const XLXmlFile &other)=default
 The copy assignment operator. The default implementation has been used.
 
XLXmlFileoperator= (XLXmlFile &&other) noexcept=default
 The move assignment operator. The default implementation has been used.
 
XLDocumentparentDoc ()
 This function provides access to the parent XLDocument object.
 
const XLDocumentparentDoc () const
 This function provides access to the parent XLDocument object.
 
XMLDocumentxmlDocument ()
 This function provides access to the underlying XMLDocument object.
 
const XMLDocumentxmlDocument () const
 This function provides access to the underlying XMLDocument object.
 
std::string getXmlPath () const
 Retrieve the path of the XML data in the .xlsx zip archive via m_xmlData->getXmlPath.
 

Friends

class XLWorksheet
 
class XLComments
 

Additional Inherited Members

- Protected Member Functions inherited from OpenXLSX::XLXmlFile
void setXmlData (std::string_view xmlData)
 Provide the XML data represented by the object.
 
std::string relationshipID () const
 This function returns the relationship ID (the ID used in the XLRelationships objects) for the object.
 
- Protected Attributes inherited from OpenXLSX::XLXmlFile
XLXmlDatam_xmlData {nullptr}
 

Detailed Description

The XLVmlDrawing class is the base class for worksheet comments.

Constructor & Destructor Documentation

◆ XLVmlDrawing() [1/4]

OpenXLSX::XLVmlDrawing::XLVmlDrawing ( )
inline

Constructor.

◆ XLVmlDrawing() [2/4]

XLVmlDrawing::XLVmlDrawing ( gsl::not_null< XLXmlData * >  xmlData)
explicit

The constructor.

Parameters
xmlDatathe source XML of the comments file

◆ XLVmlDrawing() [3/4]

OpenXLSX::XLVmlDrawing::XLVmlDrawing ( const XLVmlDrawing other)
default

The copy constructor.

Parameters
otherThe object to be copied.
Note
The default copy constructor is used, i.e. only shallow copying of pointer data members.

◆ XLVmlDrawing() [4/4]

OpenXLSX::XLVmlDrawing::XLVmlDrawing ( XLVmlDrawing &&  other)
defaultnoexcept

◆ ~XLVmlDrawing()

OpenXLSX::XLVmlDrawing::~XLVmlDrawing ( )
default

The destructor.

Note
The default destructor is used, since cleanup of pointer data members is not required.

Member Function Documentation

◆ createShape()

XLShape XLVmlDrawing::createShape ( const XLShape shapeTemplate = XLShape())

◆ deleteShape() [1/2]

bool XLVmlDrawing::deleteShape ( std::string_view  cellRef)

◆ deleteShape() [2/2]

bool XLVmlDrawing::deleteShape ( uint32_t  index)

◆ operator=() [1/2]

XLVmlDrawing & OpenXLSX::XLVmlDrawing::operator= ( const XLVmlDrawing )
default

Assignment operator.

Returns
A reference to the new object.
Note
The default assignment operator is used, i.e. only shallow copying of pointer data members.

◆ operator=() [2/2]

XLVmlDrawing & OpenXLSX::XLVmlDrawing::operator= ( XLVmlDrawing &&  other)
defaultnoexcept

◆ print()

void XLVmlDrawing::print ( std::basic_ostream< char > &  ostr) const

Print the XML contents of this XLVmlDrawing instance using the underlying XMLNode print function.

◆ shape()

XLShape XLVmlDrawing::shape ( uint32_t  index) const

◆ shapeCount()

uint32_t XLVmlDrawing::shapeCount ( ) const

◆ shapeNode()

XMLNode XLVmlDrawing::shapeNode ( std::string_view  cellRef) const

Get the shape XML node that is associated with the cell indicated by cellRef.

Parameters
cellRefthe reference to the cell for which a shape shall be found
Returns
the XMLNode that contains the desired shape, or an empty XMLNode if not found

Friends And Related Symbol Documentation

◆ XLComments

friend class XLComments
friend

◆ XLWorksheet

friend class XLWorksheet
friend

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