// Feed the destination text to a stream. for (int i = 0; i < aObjdata.getLength(); ++i)
{ char ch = aObjdata[i]; if (ch != 0x0d && ch != 0x0a)
{
b = b << 4;
sal_Int8 parsed = o3tl::convertToHex<sal_Int8>(ch); if (parsed == -1) returnfalse;
b += parsed;
count--; if (!count)
{
aStream.WriteChar(b);
count = 2;
b = 0;
}
}
}
/// Covers sw/source/filter/html/wrthtml.cxx and related fixes. class HtmlExportTest : public SwModelTestBase, public HtmlTestTools
{ public:
HtmlExportTest()
: SwModelTestBase(u"/sw/qa/extras/htmlexport/data/"_ustr, u"HTML (StarWriter)"_ustr)
{
}
/// Wraps an RTF fragment into a complete RTF file, so an RTF parser can handle it. staticvoid wrapRtfFragment(const OUString& rURL, SvMemoryStream& rStream)
{
SvFileStream aRtfStream(rURL, StreamMode::READ);
rStream.WriteOString("{\\rtf1");
rStream.WriteStream(aRtfStream);
rStream.WriteOString("}");
rStream.Seek(0);
}
};
/// HTML export of the sw doc model tests. class SwHtmlDomExportTest : public SwModelTestBase, public HtmlTestTools
{ public:
SwHtmlDomExportTest()
: SwModelTestBase(u"/sw/qa/extras/htmlexport/data/"_ustr)
{
}
OUString GetObjectPath(const OUString& ext); /// Get the .ole path, assuming maTempFile is an XHTML export result.
OUString GetOlePath() { return GetObjectPath(u".ole"_ustr); }
OUString GetPngPath() { return GetObjectPath(u".png"_ustr); } /// Parse the ole1 data out of an RTF fragment URL. void ParseOle1FromRtfUrl(const OUString& rRtfUrl, SvMemoryStream& rOle1); /// Export using the C++ HTML export filter, with xhtmlns=reqif-xhtml. void ExportToReqif(); /// Import using the C++ HTML import filter, with xhtmlns=reqif-xhtml. void ImportFromReqif(const OUString& rUrl); /// Export using the C++ HTML export filter void ExportToHTML();
};
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.