20#ifndef INCLUDED_OOX_CORE_RELATIONS_HXX
21#define INCLUDED_OOX_CORE_RELATIONS_HXX
29#include <rtl/ustring.hxx>
36#define CREATE_OFFICEDOC_RELATION_TYPE( ascii ) \
37 ( u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/" ascii )
41#define CREATE_OFFICEDOC_RELATION_TYPE_STRICT( ascii ) \
42 ( "http://purl.oclc.org/ooxml/officeDocument/relationships/" ascii )
46#define CREATE_MSOFFICE_RELATION_TYPE( ascii ) \
47 ( u"http://schemas.microsoft.com/office/2006/relationships/" ascii )
49#define CREATE_XL_CONTENT_TYPE( ascii ) \
50 ( "application/vnd.openxmlformats-officedocument.spreadsheetml." ascii "+xml" )
69 explicit Relations( OUString aFragmentPath );
71 size_t size()
const {
return maMap.size(); }
72 size_t count(
const OUString& rId )
const {
return maMap.count( rId ); }
73 ::std::map< OUString, Relation >::const_iterator
begin()
const
77 ::std::map< OUString, Relation >::const_iterator
end()
const
81 template<
class... Args>
84 maMap.emplace(std::forward<Args>(
args)...);
91 const Relation* getRelationFromRelId(
const OUString& rId )
const;
93 const Relation* getRelationFromFirstType( std::u16string_view rType )
const;
95 RelationsRef getRelationsFromTypeFromOfficeDoc( std::u16string_view rType )
const;
98 OUString getExternalTargetFromRelId(
const OUString& rRelId )
const;
100 OUString getInternalTargetFromRelId(
const OUString& rRelId )
const;
103 OUString getFragmentPathFromRelation(
const Relation& rRelation )
const;
105 OUString getFragmentPathFromRelId(
const OUString& rRelId )
const;
107 OUString getFragmentPathFromFirstType( std::u16string_view rType )
const;
108 OUString getFragmentPathFromFirstTypeFromOfficeDoc( std::u16string_view rType )
const;
111 ::std::map< OUString, Relation >
maMap;
::std::map< OUString, Relation > maMap
const OUString & getFragmentPath() const
Returns the path of the fragment this relations collection is related to.
size_t count(const OUString &rId) const
void emplace(Args &&... args)
::std::map< OUString, Relation >::const_iterator begin() const
::std::map< OUString, Relation >::const_iterator end() const
std::shared_ptr< Relations > RelationsRef