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

The XLProperties class represents the core properties of the document (docProps/core.xml). More...

#include <XLProperties.hpp>

Inheritance diagram for OpenXLSX::XLProperties:
OpenXLSX::XLXmlFile

Public Member Functions

 XLProperties ()=default
 Default constructor.
 
 XLProperties (XLXmlData *xmlData)
 Constructor that binds to existing XML data.
 
 XLProperties (const XLProperties &other)=default
 Copy constructor.
 
 XLProperties (XLProperties &&other) noexcept=default
 Move constructor.
 
 ~XLProperties ()
 Destructor.
 
XLPropertiesoperator= (const XLProperties &other)=default
 Copy assignment operator.
 
XLPropertiesoperator= (XLProperties &&other) noexcept=default
 Move assignment operator.
 
void setProperty (std::string_view name, std::string_view value)
 Set a property by name.
 
void setProperty (std::string_view name, int value)
 Set a numeric property.
 
void setProperty (std::string_view name, double value)
 Set a numeric property.
 
std::string property (std::string_view name) const
 Get a property value as a string.
 
void deleteProperty (std::string_view name)
 Delete a property.
 
std::string title () const
 
void setTitle (std::string_view title)
 
std::string subject () const
 
void setSubject (std::string_view subject)
 
std::string creator () const
 
void setCreator (std::string_view creator)
 
std::string keywords () const
 
void setKeywords (std::string_view keywords)
 
std::string description () const
 
void setDescription (std::string_view description)
 
std::string lastModifiedBy () const
 
void setLastModifiedBy (std::string_view author)
 
std::string revision () const
 
void setRevision (std::string_view revision)
 
std::string lastPrinted () const
 
void setLastPrinted (std::string_view date)
 
XLDateTime created () const
 
void setCreated (const XLDateTime &date)
 
XLDateTime modified () const
 
void setModified (const XLDateTime &date)
 
std::string category () const
 
void setCategory (std::string_view category)
 
std::string contentStatus () const
 
void setContentStatus (std::string_view status)
 
- 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

The XLProperties class represents the core properties of the document (docProps/core.xml).

Constructor & Destructor Documentation

◆ XLProperties() [1/4]

OpenXLSX::XLProperties::XLProperties ( )
default

Default constructor.

◆ XLProperties() [2/4]

XLProperties::XLProperties ( XLXmlData xmlData)
explicit

Constructor that binds to existing XML data.

Parameters
xmlDataPointer to the XML data.

◆ XLProperties() [3/4]

OpenXLSX::XLProperties::XLProperties ( const XLProperties other)
default

Copy constructor.

◆ XLProperties() [4/4]

OpenXLSX::XLProperties::XLProperties ( XLProperties &&  other)
defaultnoexcept

Move constructor.

◆ ~XLProperties()

XLProperties::~XLProperties ( )
default

Destructor.

Member Function Documentation

◆ category()

std::string XLProperties::category ( ) const

◆ contentStatus()

std::string XLProperties::contentStatus ( ) const

◆ created()

XLDateTime XLProperties::created ( ) const

◆ creator()

std::string XLProperties::creator ( ) const

◆ deleteProperty()

void XLProperties::deleteProperty ( std::string_view  name)

Delete a property.

Parameters
nameThe name of the property.

◆ description()

std::string XLProperties::description ( ) const

◆ keywords()

std::string XLProperties::keywords ( ) const

◆ lastModifiedBy()

std::string XLProperties::lastModifiedBy ( ) const

◆ lastPrinted()

std::string XLProperties::lastPrinted ( ) const

◆ modified()

XLDateTime XLProperties::modified ( ) const

◆ operator=() [1/2]

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

Copy assignment operator.

◆ operator=() [2/2]

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

Move assignment operator.

◆ property()

std::string XLProperties::property ( std::string_view  name) const

Get a property value as a string.

Parameters
nameThe name of the property.
Returns
The property value.

◆ revision()

std::string XLProperties::revision ( ) const

◆ setCategory()

void XLProperties::setCategory ( std::string_view  category)

◆ setContentStatus()

void XLProperties::setContentStatus ( std::string_view  status)

◆ setCreated()

void XLProperties::setCreated ( const XLDateTime date)

◆ setCreator()

void XLProperties::setCreator ( std::string_view  creator)

◆ setDescription()

void XLProperties::setDescription ( std::string_view  description)

◆ setKeywords()

void XLProperties::setKeywords ( std::string_view  keywords)

◆ setLastModifiedBy()

void XLProperties::setLastModifiedBy ( std::string_view  author)

◆ setLastPrinted()

void XLProperties::setLastPrinted ( std::string_view  date)

◆ setModified()

void XLProperties::setModified ( const XLDateTime date)

◆ setProperty() [1/3]

void XLProperties::setProperty ( std::string_view  name,
double  value 
)

Set a numeric property.

Parameters
nameThe name of the property.
valueThe double value.

◆ setProperty() [2/3]

void XLProperties::setProperty ( std::string_view  name,
int  value 
)

Set a numeric property.

Parameters
nameThe name of the property.
valueThe integer value.

◆ setProperty() [3/3]

void XLProperties::setProperty ( std::string_view  name,
std::string_view  value 
)

Set a property by name.

Parameters
nameThe name of the property (including namespace prefix, e.g., "dc:title").
valueThe value to set.

◆ setRevision()

void XLProperties::setRevision ( std::string_view  revision)

◆ setSubject()

void XLProperties::setSubject ( std::string_view  subject)

◆ setTitle()

void XLProperties::setTitle ( std::string_view  title)

◆ subject()

std::string XLProperties::subject ( ) const

◆ title()

std::string XLProperties::title ( ) const

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