/** A helper class for ToxTextGenerator. *Itcollectsinformationaboutencounteredlinktokensandallowsaccessinaprocessedform.
*/ class ToxLinkProcessor { public:
ToxLinkProcessor() {} virtual ~ToxLinkProcessor() {}
/** Close a link which has been found during processing. * *@internal *Ifyouclosemorelinksthanwereopened,thenthemethodwillbehave *asifastartlinkwasopenedatposition0withthecharacterstyle *STR_POOLCHR_TOXJUMP.
*/ void
CloseLink(sal_Int32 endPosition, const OUString& url, const OUString& sText, bool bRelative);
/** Insert the found links as attributes to a text node */ void
InsertLinkAttributes(SwTextNode& node);
private: /** Obtain the pool id which belongs to a character style. * *@internal *Thismethodisoverriddenintheunittests.Youshouldnotoverrideityourself.
*/ virtual sal_uInt16
ObtainPoolId(const UIName& characterStyle) const;
/** Information about a started link */ struct StartedLink {
StartedLink(sal_Int32 startPosition, UIName characterStyle) :
mStartPosition(startPosition), mCharacterStyle(std::move(characterStyle)) {
}
sal_Int32 mStartPosition;
UIName mCharacterStyle;
};
/** A link that has been encountered while parsing a tox. *Alinkisclosedifithasbothastartandanendtoken.
*/ struct ClosedLink {
ClosedLink(const OUString& url, sal_Int32 startPosition, sal_Int32 endPosition)
: mINetFormat(url, OUString())
, mStartTextPos(startPosition)
, mEndTextPos(endPosition)
{
}
SwFormatINetFormat mINetFormat;
sal_Int32 mStartTextPos;
sal_Int32 mEndTextPos;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.