temp = listings_label_;
break;
case NONE:
- LASSERT(false, /**/);
+ LASSERT(false, temp = buffer().B_("Unknown"));
+ break;
}
temp += ": ";
int InsetInclude::plaintext(odocstringstream & os,
OutputParams const & op, size_t) const
{
- // don't write the file just because we're making a tooltip or toc entry!!
- if (op.for_tooltip || op.for_toc || isVerbatim(params()) || isListings(params())) {
- os << '[' << screenLabel() << '\n';
- // FIXME: We don't know the encoding of the file, default to UTF-8.
- os << includedFileName(buffer(), params()).fileContents("UTF-8");
- os << "\n]";
+ // just write the filename if we're making a tooltip or toc entry,
+ // or are generating this for advanced search
+ if (op.for_tooltip || op.for_toc || op.for_search) {
+ os << '[' << screenLabel() << '\n'
+ << getParam("filename") << "\n]";
+ return PLAINTEXT_NEWLINE + 1; // one char on a separate line
+ }
+
+ if (isVerbatim(params()) || isListings(params())) {
+ os << '[' << screenLabel() << '\n'
+ // FIXME: We don't know the encoding of the file, default to UTF-8.
+ << includedFileName(buffer(), params()).fileContents("UTF-8")
+ << "\n]";
return PLAINTEXT_NEWLINE + 1; // one char on a separate line
}
void InsetInclude::validate(LaTeXFeatures & features) const
{
- string incfile = to_utf8(params()["filename"]);
- string writefile;
-
- LASSERT(&buffer() == &features.buffer(), /**/);
+ LATTEST(&buffer() == &features.buffer());
+ string incfile = to_utf8(params()["filename"]);
string const included_file =
includedFileName(buffer(), params()).absFileName();
+ string writefile;
if (isLyXFileName(included_file))
writefile = changeExtension(included_file, ".sgml");
else
void InsetInclude::metrics(MetricsInfo & mi, Dimension & dim) const
{
- LASSERT(mi.base.bv, /**/);
+ LBUFERR(mi.base.bv);
bool use_preview = false;
if (RenderPreview::status() != LyXRC::PREVIEW_OFF) {
void InsetInclude::draw(PainterInfo & pi, int x, int y) const
{
- LASSERT(pi.base.bv, /**/);
+ LBUFERR(pi.base.bv);
bool use_preview = false;
if (RenderPreview::status() != LyXRC::PREVIEW_OFF) {