xlnt - community edition
Public Member Functions | Friends | List of all members
xlnt::hyperlink Class Reference

Describes a hyperlink pointing from a cell to another cell or a URL. More...

#include <hyperlink.hpp>

Public Member Functions

bool external () const
 
class relationship relationship () const
 Returns the relationship of this hyperlink. If this hyperlink does not have a relationship because it is internal (external() returns false), an xlnt::invalid_attribute exception will be thrown. More...
 
std::string url () const
 Returns the URL (external target) of this hyperlink. If this hyperlink does not have a URL because it is internal (external() returns false), an xlnt::invalid_attribute exception will be thrown. More...
 
std::string target_range () const
 Returns the target range (internal target) of this hyperlink. If this hyperlink does not have a target range because it is external (external() returns true), an xlnt::invalid_attribute exception will be thrown. More...
 
bool has_display () const
 Returns whether this hyperlink has a displayed text. More...
 
void display (const std::string &value)
 Sets the displayed text of this hyperlink. More...
 
void clear_display ()
 Clears the displayed text of this hyperlink (has_display() will return false afterwards). More...
 
const std::string & display () const
 Returns the displayed text of this hyperlink. Assumes that this hyperlink has a displayed text (please call has_display() to check). If this hyperlink does not have a displayed text, an empty string will be returned. More...
 
bool has_tooltip () const
 Returns true if this hyperlink has a tooltip. More...
 
void tooltip (const std::string &value)
 Sets the tooltip of this hyperlink. More...
 
void clear_tooltip ()
 Clears the tooltip of this hyperlink (has_tooltip() will return false afterwards). More...
 
const std::string & tooltip () const
 Returns the tooltip of this hyperlink. Assumes that this hyperlink has a tooltip (please call has_tooltip() to check). If this hyperlink does not have a tooltip, an empty string will be returned. More...
 
bool has_location () const
 Returns whether this hyperlink has a location. More...
 
void location (const std::string &value)
 Sets the location of this hyperlink. More...
 
void clear_location ()
 Clears the location of this hyperlink (has_location() will return false afterwards). More...
 
const std::string & location () const
 Returns the location of this hyperlink. Assumes that this hyperlink has a location (please call has_location() to check). If this hyperlink does not have a location, an empty string will be returned. More...
 

Friends

class cell
 

Detailed Description

Describes a hyperlink pointing from a cell to another cell or a URL.

Member Function Documentation

◆ clear_display()

void xlnt::hyperlink::clear_display ( )

Clears the displayed text of this hyperlink (has_display() will return false afterwards).

◆ clear_location()

void xlnt::hyperlink::clear_location ( )

Clears the location of this hyperlink (has_location() will return false afterwards).

◆ clear_tooltip()

void xlnt::hyperlink::clear_tooltip ( )

Clears the tooltip of this hyperlink (has_tooltip() will return false afterwards).

◆ display() [1/2]

void xlnt::hyperlink::display ( const std::string &  value)

Sets the displayed text of this hyperlink.

◆ display() [2/2]

const std::string& xlnt::hyperlink::display ( ) const

Returns the displayed text of this hyperlink. Assumes that this hyperlink has a displayed text (please call has_display() to check). If this hyperlink does not have a displayed text, an empty string will be returned.

◆ has_display()

bool xlnt::hyperlink::has_display ( ) const

Returns whether this hyperlink has a displayed text.

◆ has_location()

bool xlnt::hyperlink::has_location ( ) const

Returns whether this hyperlink has a location.

◆ has_tooltip()

bool xlnt::hyperlink::has_tooltip ( ) const

Returns true if this hyperlink has a tooltip.

◆ location() [1/2]

void xlnt::hyperlink::location ( const std::string &  value)

Sets the location of this hyperlink.

◆ location() [2/2]

const std::string& xlnt::hyperlink::location ( ) const

Returns the location of this hyperlink. Assumes that this hyperlink has a location (please call has_location() to check). If this hyperlink does not have a location, an empty string will be returned.

◆ relationship()

class relationship xlnt::hyperlink::relationship ( ) const

Returns the relationship of this hyperlink. If this hyperlink does not have a relationship because it is internal (external() returns false), an xlnt::invalid_attribute exception will be thrown.

◆ target_range()

std::string xlnt::hyperlink::target_range ( ) const

Returns the target range (internal target) of this hyperlink. If this hyperlink does not have a target range because it is external (external() returns true), an xlnt::invalid_attribute exception will be thrown.

◆ tooltip() [1/2]

void xlnt::hyperlink::tooltip ( const std::string &  value)

Sets the tooltip of this hyperlink.

◆ tooltip() [2/2]

const std::string& xlnt::hyperlink::tooltip ( ) const

Returns the tooltip of this hyperlink. Assumes that this hyperlink has a tooltip (please call has_tooltip() to check). If this hyperlink does not have a tooltip, an empty string will be returned.

◆ url()

std::string xlnt::hyperlink::url ( ) const

Returns the URL (external target) of this hyperlink. If this hyperlink does not have a URL because it is internal (external() returns false), an xlnt::invalid_attribute exception will be thrown.


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