11#ifndef OPENXLSX_XLCONTENTTYPES_HPP
12#define OPENXLSX_XLCONTENTTYPES_HPP
16# pragma warning(disable : 4251)
17# pragma warning(disable : 4275)
22#include <gsl/pointers>
29#include "OpenXLSX-Exports.hpp"
100 std::string
path()
const;
103 std::unique_ptr<XMLNode> m_contentNode;
133 bool hasDefault(std::string_view extension)
const;
147 void addDefault(std::string_view extension, std::string_view contentType);
Definition XLContentTypes.hpp:80
XLContentItem(XLContentItem &&other) noexcept
XLContentItem & operator=(const XLContentItem &other)
Definition XLContentTypes.cpp:145
XLContentItem()
Definition XLContentTypes.cpp:137
XLContentType type() const
Definition XLContentTypes.cpp:153
friend class XLContentTypes
Definition XLContentTypes.hpp:81
XLContentItem & operator=(XLContentItem &&other) noexcept
std::string path() const
Definition XLContentTypes.cpp:155
XLContentTypes & operator=(XLContentTypes &&other) noexcept
~XLContentTypes()=default
void addDefault(std::string_view extension, std::string_view contentType)
Add a new default extension key/value pair to the data store.
Definition XLContentTypes.cpp:186
std::vector< XLContentItem > getContentItems()
Definition XLContentTypes.cpp:277
void deleteDefault(std::string_view extension)
Delete a default extension from the content types.
Definition XLContentTypes.cpp:265
void deleteOverride(std::string_view path)
Definition XLContentTypes.cpp:257
bool hasDefault(std::string_view extension) const
Check if a default extension exists.
Definition XLContentTypes.cpp:169
XLContentItem contentItem(std::string_view path)
Definition XLContentTypes.cpp:274
XLContentTypes(XLContentTypes &&other) noexcept
bool hasOverride(std::string_view path) const
Check if an override exists.
Definition XLContentTypes.cpp:172
void addOverride(std::string_view path, XLContentType type)
Add a new override key/getValue pair to the data store.
Definition XLContentTypes.cpp:209
XLContentTypes(const XLContentTypes &other)
void updateOverride(std::string_view path, XLContentType type)
Update an existing override key/getValue pair or add if it does not exist.
Definition XLContentTypes.cpp:237
XLContentTypes & operator=(const XLContentTypes &other)
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
std::string XLContentTypeToString(XLContentType type)
utility function: determine the name of an XLContentType value
XLContentType
Definition XLContentTypes.hpp:38
@ Workbook
Definition XLContentTypes.hpp:39
@ Slicer
Definition XLContentTypes.hpp:64
@ Chart
Definition XLContentTypes.hpp:49
@ ControlProperties
Definition XLContentTypes.hpp:52
@ CoreProperties
Definition XLContentTypes.hpp:55
@ SharedStrings
Definition XLContentTypes.hpp:47
@ ChartColorStyle
Definition XLContentTypes.hpp:51
@ Styles
Definition XLContentTypes.hpp:46
@ Table
Definition XLContentTypes.hpp:59
@ Worksheet
Definition XLContentTypes.hpp:42
@ ExternalLink
Definition XLContentTypes.hpp:44
@ VBAProject
Definition XLContentTypes.hpp:54
@ PivotCacheDefinition
Definition XLContentTypes.hpp:66
@ Drawing
Definition XLContentTypes.hpp:48
@ PivotCacheRecords
Definition XLContentTypes.hpp:67
@ PivotTable
Definition XLContentTypes.hpp:63
@ CalculationChain
Definition XLContentTypes.hpp:53
@ Hyperlink
Definition XLContentTypes.hpp:61
@ Comments
Definition XLContentTypes.hpp:58
@ Unknown
Definition XLContentTypes.hpp:62
@ SlicerCache
Definition XLContentTypes.hpp:65
@ ExtendedProperties
Definition XLContentTypes.hpp:56
@ Persons
Definition XLContentTypes.hpp:69
@ WorkbookMacroEnabled
Definition XLContentTypes.hpp:41
@ ChartStyle
Definition XLContentTypes.hpp:50
@ Theme
Definition XLContentTypes.hpp:45
@ CustomProperties
Definition XLContentTypes.hpp:57
@ Relationships
Definition XLContentTypes.hpp:40
@ Chartsheet
Definition XLContentTypes.hpp:43
@ VMLDrawing
Definition XLContentTypes.hpp:60
@ ThreadedComments
Definition XLContentTypes.hpp:68
OpenXLSX_xml_node XMLNode
Definition XLXmlParser.hpp:64