#include "insetbranch.h"
#include "buffer.h"
+#include "bufferparams.h"
#include "BufferView.h"
#include "funcrequest.h"
#include "gettext.h"
#include "lyxlex.h"
+#include "paragraph.h"
-#include "Lsstream.h"
+#include "support/std_sstream.h"
using std::auto_ptr;
+using std::istringstream;
using std::ostream;
+using std::ostringstream;
void InsetBranch::init()
params_.branch = label;
// Hack: stash the list of all allowable branch labels from this
// buffer into inset's parm list as a "stowaway":
- params_.branchlist = bp.branchlist;
+ params_.branchlist = bp.branchlist();
init();
}
case LFUN_INSET_EDIT:
if (cmd.button() != mouse_button::button3)
return InsetCollapsable::localDispatch(cmd);
-
+
return UNDISPATCHED;
case LFUN_INSET_DIALOG_UPDATE:
InsetBranchMailer("branch", *this).updateDialog(bv);
int InsetBranch::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
{
- string const branch_sel = buf.params.branchlist.allSelected();
+ string const branch_sel = buf.params().branchlist().allSelected();
if (branch_sel.find(params_.branch, 0) != string::npos)
return inset.latex(buf, os, runparams);
return 0;
int InsetBranch::docbook(Buffer const & buf, std::ostream & os, bool mixcont) const
{
// untested - MV
- string const branch_sel = buf.params.branchlist.allSelected();
+ string const branch_sel = buf.params().branchlist().allSelected();
if (branch_sel.find(params_.branch, 0) != string::npos)
return inset.docbook(buf, os, mixcont);
return 0;
int InsetBranch::ascii(Buffer const & buf, std::ostream & os, int ll) const
{
- string const branch_sel = buf.params.branchlist.allSelected();
+ string const branch_sel = buf.params().branchlist().allSelected();
if (branch_sel.find(params_.branch, 0) != string::npos) {
return inset.ascii(buf, os, ll);
}
string const InsetBranchMailer::inset2string(Buffer const & buf) const
{
InsetBranchParams params = inset_.params();
- params.branchlist = buf.params.branchlist;
+ params.branchlist = buf.params().branchlist();
inset_.setParams(params);
return params2string(name_, params);
}
string const InsetBranchMailer::params2string(string const & name,
- InsetBranchParams const & params)
+ InsetBranchParams const & params)
{
ostringstream data;
data << name << ' ';