11#ifndef OPENXLSX_XLPROPERTIES_HPP
12#define OPENXLSX_XLPROPERTIES_HPP
16# pragma warning(disable : 4251)
17# pragma warning(disable : 4275)
26#include "OpenXLSX-Exports.hpp"
41 void createFromTemplate();
85 void setProperty(std::string_view name, std::string_view value);
99 void setProperty(std::string_view name,
double value);
106 std::string
property(std::string_view name)
const;
115 std::string
title()
const;
162 void createFromTemplate(
XMLDocument const& workbookXml);
218 void alignWorksheets(
const std::vector<std::string>& workbookSheetNames);
237 void setSheetName(std::string_view oldTitle, std::string_view newTitle);
264 void setProperty(std::string_view name, std::string_view value);
271 std::string
property(std::string_view name)
const;
308 void createFromTemplate();
352 void setProperty(std::string_view name, std::string_view value);
359 void setProperty(std::string_view name,
const char* value);
366 void setProperty(std::string_view name,
int value);
373 void setProperty(std::string_view name,
double value);
380 void setProperty(std::string_view name,
bool value);
394 std::string
property(std::string_view name)
const;
XLAppProperties & operator=(XLAppProperties &&other) noexcept=default
Move assignment operator.
void prependSheetName(std::string_view sheetName)
Prepend a sheet name.
Definition XLProperties.cpp:584
~XLAppProperties()
Destructor.
XLAppProperties(const XLAppProperties &other)=default
Copy constructor.
void setProperty(std::string_view name, std::string_view value)
Set a generic property in app.xml.
Definition XLProperties.cpp:539
XLAppProperties & operator=(const XLAppProperties &other)=default
Copy assignment operator.
void setSheetName(std::string_view oldTitle, std::string_view newTitle)
Update a sheet name in TitlesOfParts.
Definition XLProperties.cpp:448
void addSheetName(std::string_view title)
Add a sheet name to TitlesOfParts.
Definition XLProperties.cpp:420
void deleteSheetName(std::string_view title)
Delete a sheet name from TitlesOfParts.
Definition XLProperties.cpp:431
void addHeadingPair(std::string_view name, int value)
Add a HeadingPair (e.g., "Worksheets").
Definition XLProperties.cpp:464
void insertSheetName(std::string_view sheetName, unsigned int index)
Insert a sheet name at a specific index.
Definition XLProperties.cpp:595
std::string property(std::string_view name) const
Get a property value from app.xml.
Definition XLProperties.cpp:551
void alignWorksheets(const std::vector< std::string > &workbookSheetNames)
Align the sheet names in TitlesOfParts with the actual workbook sheet names.
Definition XLProperties.cpp:393
void deleteProperty(std::string_view name)
Delete a property from app.xml.
Definition XLProperties.cpp:562
XLAppProperties()=default
Default constructor.
XLAppProperties(XLAppProperties &&other) noexcept=default
Move constructor.
void deleteHeadingPair(std::string_view name)
Delete a HeadingPair.
Definition XLProperties.cpp:500
void appendSheetName(std::string_view sheetName)
Append a sheet name.
Definition XLProperties.cpp:573
void incrementSheetCount(int16_t increment)
Increment or decrement the worksheet count in HeadingPairs and TitlesOfParts.
Definition XLProperties.cpp:378
void setHeadingPair(std::string_view name, int newValue)
Update a HeadingPair value.
Definition XLProperties.cpp:525
XLCustomProperties(XLCustomProperties &&other) noexcept=default
Move constructor.
XLCustomProperties & operator=(const XLCustomProperties &other)=default
Copy assignment operator.
XLCustomProperties()=default
Default constructor.
std::string property(std::string_view name) const
Get a custom property value as a string.
Definition XLProperties.cpp:752
void setProperty(std::string_view name, std::string_view value)
Set a string custom property (vt:lpwstr).
Definition XLProperties.cpp:697
XLCustomProperties & operator=(XLCustomProperties &&other) noexcept=default
Move assignment operator.
~XLCustomProperties()
Destructor.
XLCustomProperties(const XLCustomProperties &other)=default
Copy constructor.
void deleteProperty(std::string_view name)
Delete a custom property.
Definition XLProperties.cpp:767
Manages date and time values according to the Excel 1900 date system.
Definition XLDateTime.hpp:40
std::string creator() const
Definition XLProperties.cpp:247
std::string contentStatus() const
Definition XLProperties.cpp:296
XLDateTime created() const
Definition XLProperties.cpp:265
void setTitle(std::string_view title)
Definition XLProperties.cpp:242
XLDateTime modified() const
Definition XLProperties.cpp:279
XLProperties(XLProperties &&other) noexcept=default
Move constructor.
XLProperties & operator=(const XLProperties &other)=default
Copy assignment operator.
void setCreated(const XLDateTime &date)
Definition XLProperties.cpp:271
XLProperties & operator=(XLProperties &&other) noexcept=default
Move assignment operator.
std::string revision() const
Definition XLProperties.cpp:259
void setProperty(std::string_view name, std::string_view value)
Set a property by name.
Definition XLProperties.cpp:199
XLProperties(const XLProperties &other)=default
Copy constructor.
std::string lastPrinted() const
Definition XLProperties.cpp:262
std::string lastModifiedBy() const
Definition XLProperties.cpp:256
std::string keywords() const
Definition XLProperties.cpp:250
void setCreator(std::string_view creator)
Definition XLProperties.cpp:248
XLProperties()=default
Default constructor.
std::string property(std::string_view name) const
Get a property value as a string.
Definition XLProperties.cpp:221
void setKeywords(std::string_view keywords)
Definition XLProperties.cpp:251
void setModified(const XLDateTime &date)
Definition XLProperties.cpp:285
void setLastModifiedBy(std::string_view author)
Definition XLProperties.cpp:257
std::string title() const
Definition XLProperties.cpp:241
std::string subject() const
Definition XLProperties.cpp:244
void setLastPrinted(std::string_view date)
Definition XLProperties.cpp:263
void setDescription(std::string_view description)
Definition XLProperties.cpp:254
std::string description() const
Definition XLProperties.cpp:253
~XLProperties()
Destructor.
void deleteProperty(std::string_view name)
Delete a property.
Definition XLProperties.cpp:233
void setSubject(std::string_view subject)
Definition XLProperties.cpp:245
void setContentStatus(std::string_view status)
Definition XLProperties.cpp:297
void setCategory(std::string_view category)
Definition XLProperties.cpp:294
void setRevision(std::string_view revision)
Definition XLProperties.cpp:260
std::string category() const
Definition XLProperties.cpp:293
The XLXmlData class encapsulates the properties and behaviour of the .xml files in an ....
Definition XLXmlData.hpp:79
std::string xmlData(XLXmlSavingDeclaration savingDeclaration=XLXmlSavingDeclaration{}) const
Method for getting the XML data represented by the object.
Definition XLXmlFile.cpp:49
XLXmlFile()=default
Default constructor.
Definition IXLCellProvider.hpp:24
OpenXLSX_xml_document XMLDocument
Definition XLXmlParser.hpp:65