#include "errorlist.h"
#include "exporter.h"
#include "format.h"
+#include "funcrequest.h"
#include "gettext.h"
#include "iterators.h"
#include "language.h"
using std::pair;
using std::stack;
using std::vector;
+using std::string;
// all these externs should eventually be removed.
int Buffer::readParagraph(LyXLex & lex, string const & token,
ParagraphList & pars, ParagraphList::iterator & pit,
- Paragraph::depth_type & depth)
+ lyx::depth_type & depth)
{
static Change current_change;
int unknown = 0;
// Handle internal paragraph parsing -- layout already processed.
void Buffer::simpleLinuxDocOnePar(ostream & os,
ParagraphList::iterator par,
- Paragraph::depth_type /*depth*/) const
+ lyx::depth_type /*depth*/) const
{
LyXLayout_ptr const & style = par->layout();
void Buffer::simpleDocBookOnePar(ostream & os,
ParagraphList::iterator par, int & desc_on,
- Paragraph::depth_type depth) const
+ lyx::depth_type depth) const
{
bool emph_flag = false;
bool Buffer::dispatch(string const & command, bool * result)
{
- // Split command string into command and argument
- string cmd;
- string line = ltrim(command);
- string const arg = trim(split(line, cmd, ' '));
-
- return dispatch(lyxaction.LookupFunc(cmd), arg, result);
+ return dispatch(lyxaction.lookupFunc(command), result);
}
-bool Buffer::dispatch(int action, string const & argument, bool * result)
+bool Buffer::dispatch(FuncRequest const & func, bool * result)
{
bool dispatched = true;
- switch (action) {
+ switch (func.action) {
case LFUN_EXPORT: {
- bool const tmp = Exporter::Export(this, argument, false);
+ bool const tmp = Exporter::Export(this, func.argument, false);
if (result)
*result = tmp;
break;