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 (OUString aFragmentPath)
 
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

◆ Relations()

oox::core::Relations::Relations ( OUString  aFragmentPath)
explicit

Definition at line 59 of file relations.cxx.

Member Function Documentation

◆ begin()

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

Definition at line 73 of file relations.hxx.

◆ count()

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

Definition at line 72 of file relations.hxx.

◆ emplace()

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

Definition at line 82 of file relations.hxx.

References args.

◆ end()

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

Definition at line 77 of file relations.hxx.

◆ getExternalTargetFromRelId()

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

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

Definition at line 88 of file relations.cxx.

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

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

◆ getFragmentPath()

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.

◆ getFragmentPathFromFirstType()

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 139 of file relations.cxx.

References getFragmentPathFromRelation(), and getRelationFromFirstType().

◆ getFragmentPathFromFirstTypeFromOfficeDoc()

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

Definition at line 145 of file relations.cxx.

References getFragmentPathFromRelation(), and getRelationFromFirstType().

◆ getFragmentPathFromRelation()

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

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

Definition at line 100 of file relations.cxx.

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

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

◆ getFragmentPathFromRelId()

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

Returns the full fragment path for the passed relation identifier.

Definition at line 133 of file relations.cxx.

References getFragmentPathFromRelation(), and getRelationFromRelId().

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

◆ getInternalTargetFromRelId()

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

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

Definition at line 94 of file relations.cxx.

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

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

◆ getRelationFromFirstType()

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

Returns the first relation with the passed type.

Definition at line 70 of file relations.cxx.

References maMap.

Referenced by getFragmentPathFromFirstType(), and getFragmentPathFromFirstTypeFromOfficeDoc().

◆ getRelationFromRelId()

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

Returns the relation with the passed relation identifier.

Definition at line 64 of file relations.cxx.

References maMap.

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

◆ getRelationsFromTypeFromOfficeDoc()

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

Finds all relations associated with the passed type.

Definition at line 78 of file relations.cxx.

References maFragmentPath, and maMap.

◆ size()

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

Definition at line 71 of file relations.hxx.

Member Data Documentation

◆ maFragmentPath

OUString oox::core::Relations::maFragmentPath
private

◆ maMap

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

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