LibreOffice Module oox (master)  1
Public Member Functions | Private Attributes | List of all members
oox::core::Relations Class Reference

#include <relations.hxx>

Public Member Functions

 Relations (const OUString &rFragmentPath)
 
size_t size () const
 
size_t count (const OUString &rId) const
 
::std::map< OUString, Relation >::const_iterator begin () const
 
::std::map< OUString, Relation >::const_iterator end () const
 
template<class... Args>
void emplace (Args &&...args)
 
const OUString & getFragmentPath () const
 Returns the path of the fragment this relations collection is related to. More...
 
const RelationgetRelationFromRelId (const OUString &rId) const
 Returns the relation with the passed relation identifier. More...
 
const RelationgetRelationFromFirstType (std::u16string_view rType) const
 Returns the first relation with the passed type. More...
 
RelationsRef getRelationsFromTypeFromOfficeDoc (std::u16string_view rType) const
 Finds all relations associated with the passed type. More...
 
OUString getExternalTargetFromRelId (const OUString &rRelId) const
 Returns the external target of the relation with the passed relation identifier. More...
 
OUString getInternalTargetFromRelId (const OUString &rRelId) const
 Returns the internal target of the relation with the passed relation identifier. More...
 
OUString getFragmentPathFromRelation (const Relation &rRelation) const
 Returns the full fragment path for the target of the passed relation. More...
 
OUString getFragmentPathFromRelId (const OUString &rRelId) const
 Returns the full fragment path for the passed relation identifier. More...
 
OUString getFragmentPathFromFirstType (std::u16string_view rType) const
 Returns the full fragment path for the first relation of the passed type. More...
 
OUString getFragmentPathFromFirstTypeFromOfficeDoc (std::u16string_view rType) const
 

Private Attributes

::std::map< OUString, RelationmaMap
 
OUString maFragmentPath
 

Detailed Description

Definition at line 66 of file relations.hxx.

Constructor & Destructor Documentation

oox::core::Relations::Relations ( const OUString &  rFragmentPath)
explicit

Definition at line 55 of file relations.cxx.

Member Function Documentation

::std::map< OUString, Relation >::const_iterator oox::core::Relations::begin ( ) const
inline

Definition at line 73 of file relations.hxx.

size_t oox::core::Relations::count ( const OUString &  rId) const
inline

Definition at line 72 of file relations.hxx.

template<class... Args>
void oox::core::Relations::emplace ( Args &&...  args)
inline

Definition at line 82 of file relations.hxx.

References args.

::std::map< OUString, Relation >::const_iterator oox::core::Relations::end ( ) const
inline

Definition at line 77 of file relations.hxx.

OUString oox::core::Relations::getExternalTargetFromRelId ( const OUString &  rRelId) const

Returns the external target of the relation with the passed relation identifier.

Definition at line 85 of file relations.cxx.

References getRelationFromRelId(), oox::core::Relation::maTarget, and oox::core::Relation::mbExternal.

Referenced by oox::drawingml::HyperLinkContext::HyperLinkContext().

const OUString& oox::core::Relations::getFragmentPath ( ) const
inline

Returns the path of the fragment this relations collection is related to.

Definition at line 88 of file relations.hxx.

OUString oox::core::Relations::getFragmentPathFromFirstType ( std::u16string_view  rType) const

Returns the full fragment path for the first relation of the passed type.

Definition at line 136 of file relations.cxx.

References getFragmentPathFromRelation(), and getRelationFromFirstType().

OUString oox::core::Relations::getFragmentPathFromFirstTypeFromOfficeDoc ( std::u16string_view  rType) const

Definition at line 142 of file relations.cxx.

References getFragmentPathFromRelation(), and getRelationFromFirstType().

OUString oox::core::Relations::getFragmentPathFromRelation ( const Relation rRelation) const

Returns the full fragment path for the target of the passed relation.

Definition at line 97 of file relations.cxx.

References maFragmentPath, oox::core::Relation::maTarget, and oox::core::Relation::mbExternal.

Referenced by getFragmentPathFromFirstType(), getFragmentPathFromFirstTypeFromOfficeDoc(), and getFragmentPathFromRelId().

OUString oox::core::Relations::getFragmentPathFromRelId ( const OUString &  rRelId) const

Returns the full fragment path for the passed relation identifier.

Definition at line 130 of file relations.cxx.

References getFragmentPathFromRelation(), and getRelationFromRelId().

Referenced by oox::drawingml::getEmbeddedWAVAudioFile(), oox::drawingml::loadDiagram(), and oox::drawingml::GraphicShapeContext::onCreateContext().

OUString oox::core::Relations::getInternalTargetFromRelId ( const OUString &  rRelId) const

Returns the internal target of the relation with the passed relation identifier.

Definition at line 91 of file relations.cxx.

References getRelationFromRelId(), oox::core::Relation::maTarget, and oox::core::Relation::mbExternal.

Referenced by oox::drawingml::HyperLinkContext::HyperLinkContext().

const Relation * oox::core::Relations::getRelationFromFirstType ( std::u16string_view  rType) const

Returns the first relation with the passed type.

Definition at line 67 of file relations.cxx.

References maMap.

Referenced by getFragmentPathFromFirstType(), and getFragmentPathFromFirstTypeFromOfficeDoc().

const Relation * oox::core::Relations::getRelationFromRelId ( const OUString &  rId) const

Returns the relation with the passed relation identifier.

Definition at line 61 of file relations.cxx.

References maMap.

Referenced by getExternalTargetFromRelId(), getFragmentPathFromRelId(), getInternalTargetFromRelId(), and oox::drawingml::OleObjectGraphicDataContext::onCreateContext().

RelationsRef oox::core::Relations::getRelationsFromTypeFromOfficeDoc ( std::u16string_view  rType) const

Finds all relations associated with the passed type.

Definition at line 75 of file relations.cxx.

References maFragmentPath, and maMap.

size_t oox::core::Relations::size ( ) const
inline

Definition at line 71 of file relations.hxx.

Member Data Documentation

OUString oox::core::Relations::maFragmentPath
private
::std::map< OUString, Relation > oox::core::Relations::maMap
private

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