LibreOffice Module sw (master) 1
|
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, bool bRelative) |
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::optional< StartedLink > | m_oStartedLink |
Friends | |
class | ::ToxLinkProcessorTest |
A helper class for ToxTextGenerator.
It collects information about encountered link tokens and allows access in a processed form.
Definition at line 30 of file ToxLinkProcessor.hxx.
|
inline |
Definition at line 32 of file ToxLinkProcessor.hxx.
|
inlinevirtual |
Definition at line 33 of file ToxLinkProcessor.hxx.
void sw::ToxLinkProcessor::CloseLink | ( | sal_Int32 | endPosition, |
const OUString & | url, | ||
bool | bRelative | ||
) |
Close a link which has been found during processing.
Definition at line 27 of file ToxLinkProcessor.cxx.
References m_ClosedLinks, m_oStartedLink, ObtainPoolId(), and SAL_INFO.
void sw::ToxLinkProcessor::InsertLinkAttributes | ( | SwTextNode & | node | ) |
Insert the found links as attributes to a text node.
Definition at line 79 of file ToxLinkProcessor.cxx.
References SwTextNode::InsertItem(), and m_ClosedLinks.
|
privatevirtual |
Obtain the pool id which belongs to a character style.
Definition at line 67 of file ToxLinkProcessor.cxx.
References ChrFmt, and SwStyleNameMapper::GetPoolIdFromUIName().
Referenced by CloseLink().
void sw::ToxLinkProcessor::StartNewLink | ( | sal_Int32 | startPosition, |
const OUString & | characterStyle | ||
) |
Definition at line 21 of file ToxLinkProcessor.cxx.
References m_oStartedLink, and SAL_INFO_IF.
|
friend |
Definition at line 89 of file ToxLinkProcessor.hxx.
|
private |
Definition at line 85 of file ToxLinkProcessor.hxx.
Referenced by CloseLink(), and InsertLinkAttributes().
|
private |
Definition at line 87 of file ToxLinkProcessor.hxx.
Referenced by CloseLink(), and StartNewLink().