// check for "vnd.sun.star.job:" if (!sURL.startsWithIgnoreAsciiCase("vnd.sun.star.job:")) return;
sal_Int32 t = std::strlen("vnd.sun.star.job:"); do
{ // separate all token of "{[event=<name>],[alias=<name>],[service=<name>]}"
OUString sToken = sURL.getToken(0, JOBURL_PART_SEPARATOR, t);
OUString sPartValue;
OUString sPartArguments;
// check for "event=" if (
(JobURL::implst_split(sToken,JOBURL_EVENT_STR,JOBURL_EVENT_LEN,sPartValue,sPartArguments)) &&
(!sPartValue.isEmpty())
)
{ // set the part value
m_sEvent = sPartValue;
m_eRequest |= E_EVENT;
} else // check for "alias=" if (
(JobURL::implst_split(sToken,JOBURL_ALIAS_STR,JOBURL_ALIAS_LEN,sPartValue,sPartArguments)) &&
(!sPartValue.isEmpty())
)
{ // set the part value
m_sAlias = sPartValue;
m_eRequest |= E_ALIAS;
} else // check for "service=" if (
(JobURL::implst_split(sToken,JOBURL_SERVICE_STR,JOBURL_SERVICE_LEN,sPartValue,sPartArguments)) &&
(!sPartValue.isEmpty())
)
{ // set the part value
m_sService = sPartValue;
m_eRequest |= E_SERVICE;
}
} while(t!=-1);
}
@return<TRUE/>iftheidentifiercouldbefoundandthestringwassplit. <FALSE/>otherwise.
*/ bool JobURL::implst_split( /*IN*/ std::u16string_view sPart , /*IN*/ const char* pPartIdentifier , /*IN*/ sal_Int32 nPartLength , /*OUT*/ OUString& rPartValue , /*OUT*/ OUString& rPartArguments )
{ // first search for the given identifier bool bPartFound = o3tl::matchIgnoreAsciiCase(sPart, std::string_view(pPartIdentifier,nPartLength));
// If it exist - we can split the part and return sal_True. // Otherwise we do nothing and return sal_False. if (bPartFound)
{ // But may the part has optional arguments - separated by a "?". // Do so - we set the return value with the whole part string. // Arguments will be set to an empty string as default. // If we detect the right sign - we split the arguments and overwrite the default.
std::u16string_view sValueAndArguments = sPart.substr(nPartLength);
std::u16string_view sValue = sValueAndArguments;
OUString sArguments;
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.