#include "InsetText.h"
-#include "insets/InsetOptArg.h"
+#include "insets/InsetArgument.h"
#include "buffer_funcs.h"
#include "Buffer.h"
#include "support/bind.h"
#include "support/lassert.h"
+#include <algorithm>
+
+
using namespace std;
using namespace lyx::support;
}
OutputParams rp = runparams;
if (il.isPassThru())
- rp.verbatim = true;
+ rp.pass_thru = true;
if (il.isNeedProtect())
rp.moving_arg = true;
TexRow texrow;
latexParagraphs(buffer(), text_, os, texrow, rp);
rows += texrow.rows();
+ runparams.encoding = rp.encoding;
if (!il.latexname().empty()) {
if (il.latextype() == InsetLayout::COMMAND) {
//lyxerr << (void*)&inset << " code: " << inset.lyxCode() << std::endl;
inset.addToToc(dit);
switch (inset.lyxCode()) {
- case OPTARG_CODE: {
+ case ARG_CODE: {
if (!tocstring.empty())
break;
dit.pos() = 0;
Paragraph const & insetpar =
- *static_cast<InsetOptArg&>(inset).paragraphs().begin();
+ *static_cast<InsetArgument&>(inset).paragraphs().begin();
if (!par.labelString().empty())
tocstring = par.labelString() + ' ';
tocstring += insetpar.asString(AS_STR_INSETS);
// insert this into the table of contents
if (tocstring.empty())
tocstring = par.asString(AS_STR_LABEL | AS_STR_INSETS);
- toc.push_back(TocItem(dit, toclevel - min_toclevel, tocstring));
+ toc.push_back(TocItem(dit, toclevel - min_toclevel,
+ tocstring, tocstring));
}
// And now the list of changes.
}
+docstring InsetText::toolTipText() const
+{
+ OutputParams rp(&buffer().params().encoding());
+ odocstringstream ods;
+ // do not remove InsetText::, otherwise there
+ // will be no tooltip text for InsetNotes
+ InsetText::plaintext(ods, rp);
+ docstring const content_tip = ods.str();
+ return support::wrapParas(content_tip, 4);
+}
+
+
InsetCaption const * InsetText::getCaptionInset() const
{
ParagraphList::const_iterator pit = paragraphs().begin();