LibreOffice Module sw (master)  1
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
sw::ToxLinkProcessor Class Reference

A helper class for ToxTextGenerator. More...

#include <ToxLinkProcessor.hxx>

Classes

struct  ClosedLink
 A link that has been encountered while parsing a tox. More...
 
struct  StartedLink
 Information about a started link. More...
 

Public Member Functions

 ToxLinkProcessor ()
 
virtual ~ToxLinkProcessor ()
 
void StartNewLink (sal_Int32 startPosition, const OUString &characterStyle)
 
void CloseLink (sal_Int32 endPosition, const OUString &url)
 Close a link which has been found during processing. More...
 
void InsertLinkAttributes (SwTextNode &node)
 Insert the found links as attributes to a text node. More...
 

Private Member Functions

virtual sal_uInt16 ObtainPoolId (const OUString &characterStyle) const
 Obtain the pool id which belongs to a character style. More...
 

Private Attributes

std::vector< std::unique_ptr< ClosedLink > > m_ClosedLinks
 
std::unique_ptr< StartedLinkm_pStartedLink
 

Friends

class ::ToxLinkProcessorTest
 

Detailed Description

A helper class for ToxTextGenerator.

It collects information about encountered link tokens and allows access in a processed form.

Definition at line 28 of file ToxLinkProcessor.hxx.

Constructor & Destructor Documentation

sw::ToxLinkProcessor::ToxLinkProcessor ( )
inline

Definition at line 30 of file ToxLinkProcessor.hxx.

virtual sw::ToxLinkProcessor::~ToxLinkProcessor ( )
inlinevirtual

Definition at line 31 of file ToxLinkProcessor.hxx.

Member Function Documentation

void sw::ToxLinkProcessor::CloseLink ( sal_Int32  endPosition,
const OUString &  url 
)

Close a link which has been found during processing.

Definition at line 30 of file ToxLinkProcessor.cxx.

References m_ClosedLinks, m_pStartedLink, ObtainPoolId(), and SAL_INFO.

void sw::ToxLinkProcessor::InsertLinkAttributes ( SwTextNode node)

Insert the found links as attributes to a text node.

Definition at line 67 of file ToxLinkProcessor.cxx.

References SwTextNode::InsertItem(), and m_ClosedLinks.

sal_uInt16 sw::ToxLinkProcessor::ObtainPoolId ( const OUString &  characterStyle) const
privatevirtual

Obtain the pool id which belongs to a character style.

Definition at line 55 of file ToxLinkProcessor.cxx.

References ChrFmt, SwStyleNameMapper::GetPoolIdFromUIName(), and USHRT_MAX.

Referenced by CloseLink().

void sw::ToxLinkProcessor::StartNewLink ( sal_Int32  startPosition,
const OUString &  characterStyle 
)

Definition at line 22 of file ToxLinkProcessor.cxx.

References m_pStartedLink, and SAL_INFO_IF.

Friends And Related Function Documentation

friend class ::ToxLinkProcessorTest
friend

Definition at line 87 of file ToxLinkProcessor.hxx.

Member Data Documentation

std::vector<std::unique_ptr<ClosedLink> > sw::ToxLinkProcessor::m_ClosedLinks
private

Definition at line 83 of file ToxLinkProcessor.hxx.

Referenced by CloseLink(), and InsertLinkAttributes().

std::unique_ptr<StartedLink> sw::ToxLinkProcessor::m_pStartedLink
private

Definition at line 85 of file ToxLinkProcessor.hxx.

Referenced by CloseLink(), and StartNewLink().


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