#include "undo_funcs.h"
#include "WordLangTuple.h"
#include "paragraph_funcs.h"
+#include "sgml.h"
#include "frontends/Alert.h"
#include "frontends/Dialogs.h"
inset_y = ciy(bv) + drawTextYOffset;
cmd1.x = cmd.x - inset_x;
cmd1.y = cmd.x - inset_y;
- ret = inset->localDispatch(cmd1);
+// note that we should do ret = inset->localDispatch(cmd1)
+// and fix this instead (Alfredo);
+ ret = true;
inset->edit(bv, cmd1.x, cmd1.y, cmd.button());
}
updateLocal(bv, CURSOR_PAR, false);
for (; depth > p->params().depth(); --depth) {
if (environment_inner[depth] != "!-- --") {
item_name = "listitem";
- lines += buf->sgmlCloseTag(os, command_depth + depth, mixcont, item_name);
+ lines += sgml::closeTag(os, command_depth + depth, mixcont, item_name);
if (environment_inner[depth] == "varlistentry")
- lines += buf->sgmlCloseTag(os, depth+command_depth, mixcont, environment_inner[depth]);
+ lines += sgml::closeTag(os, depth+command_depth, mixcont, environment_inner[depth]);
}
- lines += buf->sgmlCloseTag(os, depth + command_depth, mixcont, environment_stack[depth]);
+ lines += sgml::closeTag(os, depth + command_depth, mixcont, environment_stack[depth]);
environment_stack[depth].erase();
environment_inner[depth].erase();
}
&& !environment_stack[depth].empty()) {
if (environment_inner[depth] != "!-- --") {
item_name= "listitem";
- lines += buf->sgmlCloseTag(os, command_depth+depth, mixcont, item_name);
+ lines += sgml::closeTag(os, command_depth+depth, mixcont, item_name);
if (environment_inner[depth] == "varlistentry")
- lines += buf->sgmlCloseTag(os, depth + command_depth, mixcont, environment_inner[depth]);
+ lines += sgml::closeTag(os, depth + command_depth, mixcont, environment_inner[depth]);
}
- lines += buf->sgmlCloseTag(os, depth + command_depth, mixcont, environment_stack[depth]);
+ lines += sgml::closeTag(os, depth + command_depth, mixcont, environment_stack[depth]);
environment_stack[depth].erase();
environment_inner[depth].erase();
// Write opening SGML tags.
switch (style->latextype) {
case LATEX_PARAGRAPH:
- lines += buf->sgmlOpenTag(os, depth + command_depth, mixcont, style->latexname());
+ lines += sgml::openTag(os, depth + command_depth, mixcont, style->latexname());
break;
case LATEX_COMMAND:
}
environment_stack[depth] = style->latexname();
environment_inner[depth] = "!-- --";
- lines += buf->sgmlOpenTag(os, depth + command_depth, mixcont, environment_stack[depth]);
+ lines += sgml::openTag(os, depth + command_depth, mixcont, environment_stack[depth]);
} else {
if (environment_inner[depth] != "!-- --") {
item_name= "listitem";
- lines += buf->sgmlCloseTag(os, command_depth + depth, mixcont, item_name);
+ lines += sgml::closeTag(os, command_depth + depth, mixcont, item_name);
if (environment_inner[depth] == "varlistentry")
- lines += buf->sgmlCloseTag(os, depth + command_depth, mixcont, environment_inner[depth]);
+ lines += sgml::closeTag(os, depth + command_depth, mixcont, environment_inner[depth]);
}
}
if (style->latexparam() == "CDATA")
os << "<![CDATA[";
else
- lines += buf->sgmlOpenTag(os, depth + command_depth, mixcont, style->latexparam());
+ lines += sgml::openTag(os, depth + command_depth, mixcont, style->latexparam());
}
break;
}
desc_on = (style->labeltype == LABEL_MANUAL);
- environment_inner[depth] = desc_on?"varlistentry":"listitem";
- lines += buf->sgmlOpenTag(os, depth + 1 + command_depth, mixcont, environment_inner[depth]);
+ environment_inner[depth] = desc_on ? "varlistentry" : "listitem";
+ lines += sgml::openTag(os, depth + 1 + command_depth, mixcont, environment_inner[depth]);
- item_name = desc_on?"term":"para";
- lines += buf->sgmlOpenTag(os, depth + 1 + command_depth, mixcont, item_name);
+ item_name = desc_on ? "term" : "para";
+ lines += sgml::openTag(os, depth + 1 + command_depth, mixcont, item_name);
break;
default:
- lines += buf->sgmlOpenTag(os, depth + command_depth, mixcont, style->latexname());
+ lines += sgml::openTag(os, depth + command_depth, mixcont, style->latexname());
break;
}
if (style->latexparam() == "CDATA")
os << "]]>";
else
- lines += buf->sgmlCloseTag(os, depth + command_depth, mixcont, style->latexparam());
+ lines += sgml::closeTag(os, depth + command_depth, mixcont, style->latexparam());
}
break;
case LATEX_ITEM_ENVIRONMENT:
if (desc_on == 1) break;
end_tag= "para";
- lines += buf->sgmlCloseTag(os, depth + 1 + command_depth, mixcont, end_tag);
+ lines += sgml::closeTag(os, depth + 1 + command_depth, mixcont, end_tag);
break;
case LATEX_PARAGRAPH:
- lines += buf->sgmlCloseTag(os, depth + command_depth, mixcont, style->latexname());
+ lines += sgml::closeTag(os, depth + command_depth, mixcont, style->latexname());
break;
default:
- lines += buf->sgmlCloseTag(os, depth + command_depth, mixcont, style->latexname());
+ lines += sgml::closeTag(os, depth + command_depth, mixcont, style->latexname());
break;
}
}
if (!environment_stack[depth].empty()) {
if (environment_inner[depth] != "!-- --") {
item_name = "listitem";
- lines += buf->sgmlCloseTag(os, command_depth + depth, mixcont, item_name);
+ lines += sgml::closeTag(os, command_depth + depth, mixcont, item_name);
if (environment_inner[depth] == "varlistentry")
- lines += buf->sgmlCloseTag(os, depth + command_depth, mixcont, environment_inner[depth]);
+ lines += sgml::closeTag(os, depth + command_depth, mixcont, environment_inner[depth]);
}
- lines += buf->sgmlCloseTag(os, depth + command_depth, mixcont, environment_stack[depth]);
+ lines += sgml::closeTag(os, depth + command_depth, mixcont, environment_stack[depth]);
}
}
llt->selection.end.pos() + paragraphs.begin()->size());
}
}
- pasteParagraph(bparams, &*paragraphs.begin());
+ mergeParagraph(bparams, &*paragraphs.begin());
}
reinitLyXText();
}
// paste it!
lastbuffer->next(buf);
buf->previous(lastbuffer);
- pasteParagraph(bparams, lastbuffer);
+ mergeParagraph(bparams, lastbuffer);
reinitLyXText();
}