#include "LyXFunc.h"
#include "BranchList.h"
-#include "Buffer.h"
#include "buffer_funcs.h"
+#include "Buffer.h"
#include "BufferList.h"
#include "BufferParams.h"
#include "BufferView.h"
-#include "bufferview_funcs.h"
+#include "callback.h"
+#include "Color.h"
#include "Cursor.h"
#include "CutAndPaste.h"
#include "debug.h"
#include "Intl.h"
#include "KeyMap.h"
#include "Language.h"
-#include "Color.h"
-#include "Session.h"
-#include "LyX.h"
-#include "callback.h"
+#include "Lexer.h"
#include "LyXAction.h"
#include "lyxfind.h"
-#include "Lexer.h"
+#include "LyX.h"
#include "LyXRC.h"
-#include "Row.h"
-#include "Server.h"
-#include "TextClassList.h"
#include "LyXVC.h"
#include "Paragraph.h"
-#include "ParIterator.h"
#include "ParagraphParameters.h"
+#include "ParIterator.h"
+#include "Row.h"
+#include "Server.h"
+#include "Session.h"
+#include "TextClassList.h"
+#include "ToolbarBackend.h"
#include "Undo.h"
#include "insets/InsetBox.h"
namespace lyx {
-using bv_funcs::freefont2string;
-
using frontend::LyXView;
using support::absolutePath;
namespace {
-bool getLocalStatus(Cursor cursor,
- FuncRequest const & cmd, FuncStatus & status)
+bool getLocalStatus(Cursor cursor, FuncRequest const & cmd, FuncStatus & status)
{
// Try to fix cursor in case it is broken.
cursor.fixIfBroken();
case LFUN_BUFFER_WRITE_AS:
case LFUN_BUFFER_UPDATE:
case LFUN_BUFFER_VIEW:
+ case LFUN_MASTER_BUFFER_UPDATE:
+ case LFUN_MASTER_BUFFER_VIEW:
case LFUN_BUFFER_IMPORT:
case LFUN_BUFFER_AUTO_SAVE:
case LFUN_RECONFIGURE:
Exporter::preview(lyx_view_->buffer(), argument);
break;
+ case LFUN_MASTER_BUFFER_UPDATE:
+ BOOST_ASSERT(lyx_view_ && lyx_view_->buffer() && lyx_view_->buffer()->getMasterBuffer());
+ Exporter::Export(lyx_view_->buffer()->getMasterBuffer(), argument, true);
+ break;
+
+ case LFUN_MASTER_BUFFER_VIEW:
+ BOOST_ASSERT(lyx_view_ && lyx_view_->buffer() && lyx_view_->buffer()->getMasterBuffer());
+ Exporter::preview(lyx_view_->buffer()->getMasterBuffer(), argument);
+ break;
+
case LFUN_BUILD_PROGRAM:
BOOST_ASSERT(lyx_view_ && lyx_view_->buffer());
Exporter::Export(lyx_view_->buffer(), "program", true);
case LFUN_RECONFIGURE:
BOOST_ASSERT(lyx_view_);
- reconfigure(*lyx_view_);
+ // argument is any additional parameter to the configure.py command
+ reconfigure(*lyx_view_, argument);
break;
case LFUN_HELP_OPEN: {
InsetBranchParams p;
data = InsetBranchMailer::params2string(p);
} else if (name == "citation") {
- InsetCommandParams p("cite");
+ InsetCommandParams p("citation");
data = InsetCommandMailer::params2string(name, p);
} else if (name == "ert") {
data = InsetERTMailer::params2string(InsetCollapsable::Open);
arg = token(argument, '|', 0);
opt1 = token(argument, '|', 1);
}
- InsetCommandParams icp("cite");
+ InsetCommandParams icp("citation");
icp["key"] = from_utf8(arg);
if (!opt1.empty())
icp["before"] = from_utf8(opt1);