]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetExternal.cpp
Links between citations and bibliography entries were broken in XHTML
[lyx.git] / src / insets / InsetExternal.cpp
index 77d1b2f7bfd4073a94310707fca82312fafd2a40..6c38e1f3a6607af54c0f9b9ae6ee51d47a2202e5 100644 (file)
@@ -392,7 +392,7 @@ InsetExternal::~InsetExternal()
 }
 
 
-bool InsetExternal::setMouseHover(BufferView const * bv, bool mouse_hover)
+bool InsetExternal::setMouseHover(BufferView const * bv, bool mouse_hover) const
 {
        mouse_hover_[bv] = mouse_hover;
        return true;
@@ -691,9 +691,13 @@ void InsetExternal::latex(otexstream & os, OutputParams const & runparams) const
 }
 
 
-int InsetExternal::plaintext(odocstream & os,
-                            OutputParams const & runparams) const
+int InsetExternal::plaintext(odocstringstream & os,
+                            OutputParams const & runparams, size_t) const
 {
+       // this is too slow for constant use
+       if (runparams.for_tooltip)
+               return 0;
+
        os << '\n'; // output external material on a new line
        external::writeExternal(params_, "Ascii", buffer(), os,
                                *(runparams.exportdata), false,
@@ -752,6 +756,9 @@ void InsetExternal::validate(LaTeXFeatures & features) const
        case OutputParams::TEXT:
                format = "text";
                break;
+       case OutputParams::LYX:
+               format = "lyx";
+               break;
        }
        external::Template::Formats::const_iterator cit =
                et.formats.find(format);
@@ -767,7 +774,7 @@ void InsetExternal::validate(LaTeXFeatures & features) const
                        return;
        }
 
-       // FIXME: We don't need that always
+       // FIXME: We don't need that always, see InsetGraphics
        features.require("lyxdot");
 
        vector<string>::const_iterator it  = cit->second.requirements.begin();
@@ -802,9 +809,9 @@ void InsetExternal::addPreview(DocIterator const & /*inset_pos*/,
 }
 
 
-docstring InsetExternal::contextMenuName() const
+string InsetExternal::contextMenuName() const
 {
-       return from_ascii("context-external");
+       return "context-external";
 }