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

A class encapsulating modern Excel threaded comments (ThreadedComments.xml) More...

#include <XLThreadedComments.hpp>

Inheritance diagram for OpenXLSX::XLThreadedComments:
OpenXLSX::XLXmlFile

Public Member Functions

 XLThreadedComments ()
 
 XLThreadedComments (gsl::not_null< XLXmlData * > xmlData)
 
 ~XLThreadedComments ()=default
 
 XLThreadedComments (const XLThreadedComments &other)=default
 
 XLThreadedComments (XLThreadedComments &&other)=default
 
XLThreadedCommentsoperator= (const XLThreadedComments &other)=default
 
XLThreadedCommentsoperator= (XLThreadedComments &&other)=default
 
XLThreadedComment comment (const std::string &ref) const
 Get the top-level comment thread for a specific cell reference.
 
std::vector< XLThreadedCommentreplies (const std::string &parentId) const
 Get all replies in a specific comment thread by parent ID.
 
XLThreadedComment addComment (std::string_view ref, std::string_view personId, std::string_view text)
 Add a new top-level threaded comment.
 
XLThreadedComment addReply (const std::string &parentId, const std::string &personId, const std::string &text)
 Add a reply to an existing threaded comment.
 
bool deleteComment (const std::string &ref)
 Removes a threaded comment and its replies.
 
- 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.
 

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

A class encapsulating modern Excel threaded comments (ThreadedComments.xml)

Constructor & Destructor Documentation

◆ XLThreadedComments() [1/4]

OpenXLSX::XLThreadedComments::XLThreadedComments ( )
inline

◆ XLThreadedComments() [2/4]

OpenXLSX::XLThreadedComments::XLThreadedComments ( gsl::not_null< XLXmlData * >  xmlData)
inlineexplicit

◆ ~XLThreadedComments()

OpenXLSX::XLThreadedComments::~XLThreadedComments ( )
default

◆ XLThreadedComments() [3/4]

OpenXLSX::XLThreadedComments::XLThreadedComments ( const XLThreadedComments other)
default

◆ XLThreadedComments() [4/4]

OpenXLSX::XLThreadedComments::XLThreadedComments ( XLThreadedComments &&  other)
default

Member Function Documentation

◆ addComment()

XLThreadedComment XLThreadedComments::addComment ( std::string_view  ref,
std::string_view  personId,
std::string_view  text 
)

Add a new top-level threaded comment.

◆ addReply()

XLThreadedComment XLThreadedComments::addReply ( const std::string &  parentId,
const std::string &  personId,
const std::string &  text 
)

Add a reply to an existing threaded comment.

◆ comment()

XLThreadedComment XLThreadedComments::comment ( const std::string &  ref) const

Get the top-level comment thread for a specific cell reference.

◆ deleteComment()

bool XLThreadedComments::deleteComment ( const std::string &  ref)

Removes a threaded comment and its replies.

◆ operator=() [1/2]

XLThreadedComments & OpenXLSX::XLThreadedComments::operator= ( const XLThreadedComments other)
default

◆ operator=() [2/2]

XLThreadedComments & OpenXLSX::XLThreadedComments::operator= ( XLThreadedComments &&  other)
default

◆ replies()

std::vector< XLThreadedComment > XLThreadedComments::replies ( const std::string &  parentId) const

Get all replies in a specific comment thread by parent ID.


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