]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetInclude.cpp
Natbib authoryear uses (Ref1; Ref2) by default.
[lyx.git] / src / insets / InsetInclude.cpp
index c3bd9197ea233b953d1eabfe93d8a947073ec775..88153c6d2d35941ad375977036d292062b5f6756 100644 (file)
@@ -388,7 +388,8 @@ docstring InsetInclude::screenLabel() const
                        temp = listings_label_;
                        break;
                case NONE:
-                       LASSERT(false, /**/);
+                       LASSERT(false, temp = buffer().B_("Unknown"));
+                       break;
        }
 
        temp += ": ";
@@ -813,8 +814,9 @@ docstring InsetInclude::xhtml(XHTMLStream & xs, OutputParams const & rp) const
 int InsetInclude::plaintext(odocstringstream & os,
         OutputParams const & op, size_t) const
 {
-       // just write the filename if we're making a tooltip or toc entry
-       if (op.for_tooltip || op.for_toc) {
+       // 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
@@ -903,14 +905,13 @@ int InsetInclude::docbook(odocstream & os, OutputParams const & runparams) const
 
 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
@@ -965,7 +966,7 @@ void InsetInclude::collectBibKeys(InsetIterator const & /*di*/) const
 
 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) {
@@ -991,7 +992,7 @@ void InsetInclude::metrics(MetricsInfo & mi, Dimension & dim) const
 
 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) {