#include "insetfloat.h"
#include "buffer.h"
+#include "bufferparams.h"
#include "BufferView.h"
#include "debug.h"
#include "Floating.h"
#include "gettext.h"
#include "iterators.h"
#include "LaTeXFeatures.h"
+#include "LColor.h"
#include "lyxlex.h"
#include "paragraph.h"
#include "support/std_sstream.h"
-using namespace lyx::support;
+using lyx::support::contains;
using std::endl;
+using std::string;
using std::auto_ptr;
using std::istringstream;
using std::ostream;
params_.placement = params.placement;
params_.wide = params.wide;
- wide(params_.wide, cmd.view()->buffer()->params);
+ wide(params_.wide, cmd.view()->buffer()->params());
cmd.view()->updateInset(this);
return DISPATCHED;
}
void InsetFloat::read(Buffer const & buf, LyXLex & lex)
{
params_.read(lex);
- wide(params_.wide, buf.params);
+ wide(params_.wide, buf.params());
InsetCollapsable::read(buf, lex);
}
int InsetFloat::latex(Buffer const & buf, ostream & os,
LatexRunParams const & runparams) const
{
- FloatList const & floats = buf.params.getLyXTextClass().floats();
+ FloatList const & floats = buf.params().getLyXTextClass().floats();
string const tmptype = (params_.wide ? params_.type + "*" : params_.type);
// Figure out the float placement to use.
// From lowest to highest:
// - document wide default placement
// - specific float placement
string placement;
- string const buf_placement = buf.params.float_placement;
+ string const buf_placement = buf.params().float_placement;
string const def_placement = floats.defaultPlacement(params_.type);
if (!params_.placement.empty()
&& params_.placement != def_placement) {
int InsetFloat::linuxdoc(Buffer const & buf, ostream & os) const
{
- FloatList const & floats = buf.params.getLyXTextClass().floats();
+ FloatList const & floats = buf.params().getLyXTextClass().floats();
string const tmptype = params_.type;
// Figure out the float placement to use.
// From lowest to highest:
// This is the same as latex, as linuxdoc is modeled after latex.
string placement;
- string const buf_placement = buf.params.float_placement;
+ string const buf_placement = buf.params().float_placement;
string const def_placement = floats.defaultPlacement(params_.type);
if (!params_.placement.empty()
&& params_.placement != def_placement) {
// Find a caption layout in one of the (child inset's) pars
for (; pit != end; ++pit) {
if (pit->layout()->name() == caplayout) {
- string const name = floatname(params_.type, buf.params);
+ string const name = floatname(params_.type, buf.params());
string const str =
tostr(toclist[name].size() + 1)
+ ". " + pit->asString(buf, false);
if (in.empty())
return;
- istringstream data(STRCONV(in));
+ istringstream data(in);
LyXLex lex(0,0);
lex.setStream(data);
ostringstream data;
data << name_ << ' ';
params.write(data);
- return STRCONV(data.str());
+ return data.str();
}