29 #include <unordered_map> 31 #include <xlnt/xlnt_config.hpp> 32 #include <xlnt/packaging/relationship.hpp> 33 #include <xlnt/utils/path.hpp> 53 std::vector<path> parts()
const;
65 bool has_relationship(
const path &source,
const std::string &rel_id)
const;
77 class relationship relationship(const path &source,
const std::string &rel_id)
const;
82 std::vector<xlnt::relationship> relationships(
const path &source)
const;
87 std::vector<xlnt::relationship> relationships(
const path &source,
relationship_type type)
const;
93 path canonicalize(
const std::vector<xlnt::relationship> &rels)
const;
103 std::string register_relationship(
const class relationship &rel);
111 std::unordered_map<std::string, std::string> unregister_relationship(
const uri &source,
const std::string &rel_id);
118 std::string content_type(
const path &part)
const;
125 bool has_default_type(
const std::string &extension)
const;
130 std::vector<std::string> extensions_with_default_types()
const;
135 std::string default_type(
const std::string &extension)
const;
140 void register_default_type(
const std::string &extension,
const std::string &type);
145 void unregister_default_type(
const std::string &extension);
153 bool has_override_type(
const path &part)
const;
159 std::string override_type(
const path &part)
const;
164 std::vector<path> parts_with_overriden_types()
const;
169 void register_override_type(
const path &part,
const std::string &type);
174 void unregister_override_type(
const path &part);
182 std::string next_relationship_id(
const path &part)
const;
187 std::unordered_map<std::string, std::string> default_content_types_;
192 std::unordered_map<path, std::string> override_content_types_;
197 std::unordered_map<path, std::unordered_map<std::string, xlnt::relationship>> relationships_;
Represents an association between a source Package or part, and a target object which can be a part o...
Definition: relationship.hpp:103
Enumerates the possible types a cell can be determined by it's current value.
Definition: cell.hpp:37
Encapsulates a uniform resource identifier (URI) as described by RFC 3986.
Definition: uri.hpp:38
bool operator==(std::nullptr_t, const cell &cell)
Returns true if this cell is uninitialized.
Encapsulates a path that points to location in a filesystem.
Definition: path.hpp:38
relationship_type
All package relationships must be one of these defined types.
Definition: relationship.hpp:54
target_mode
Specifies whether the target of a relationship is inside or outside the Package.
Definition: relationship.hpp:39
The manifest keeps track of all files in the OOXML package and their type and relationships.
Definition: manifest.hpp:41