#include "LyXRC.h"
#include "MetricsInfo.h"
#include "OutputParams.h"
-#include "Paragraph.h"
-#include "paragraph_funcs.h"
#include "frontends/FontMetrics.h"
#include "frontends/Painter.h"
using std::endl;
using std::string;
-using std::auto_ptr;
using std::ostream;
InsetQuotes::InsetQuotes(string const & str)
{
parseString(str);
- setInsetName(from_utf8("InsetQuotes"));
}
InsetQuotes::InsetQuotes(quote_language l, quote_side s, quote_times t)
: language_(l), side_(s), times_(t)
{
- setInsetName(from_utf8("InsetQuotes"));
}
: language_(params.quotes_language), times_(params.quotes_times)
{
getPosition(c);
- setInsetName(from_utf8("InsetQuotes"));
}
: language_(l), times_(t)
{
getPosition(c);
- setInsetName(from_utf8("InsetQuotes"));
}
#endif
else
retdisp = lyx::from_ascii(disp);
-
+
// in french, spaces are added inside double quotes
if (times_ == DoubleQ && prefixIs(loclang->code(), "fr")) {
if (side_ == LeftQ)
}
-bool InsetQuotes::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetQuotes::metrics(MetricsInfo & mi, Dimension & dim) const
{
- LyXFont & font = mi.base.font;
+ Font & font = mi.base.font;
frontend::FontMetrics const & fm =
theFontMetrics(font);
dim.asc = fm.maxAscent();
else
dim.wid += fm.width(',');
}
- bool const changed = dim_ != dim;
- dim_ = dim;
- return changed;
}
#if 0
-LyXFont const InsetQuotes::convertFont(LyXFont const & f) const
+Font const InsetQuotes::convertFont(Font const & f) const
{
#if 1
return f;
#else
- LyXFont font(f);
+ Font font(f);
return font;
#endif
}
} else {
pi.pain.text(x, y, text, pi.base.font);
}
- setPosCache(pi, x, y);
}
int InsetQuotes::latex(Buffer const &, odocstream & os,
- OutputParams const & runparams) const
+ OutputParams const & runparams) const
{
const int quoteind = quote_index[side_][language_];
string qstr;
int InsetQuotes::plaintext(Buffer const & buf, odocstream & os,
- OutputParams const &) const
+ OutputParams const &) const
{
docstring const str = dispString(buf.params().language);
os << str;
int InsetQuotes::docbook(Buffer const &, odocstream & os,
- OutputParams const &) const
+ OutputParams const &) const
{
if (times_ == DoubleQ) {
if (side_ == LeftQ)
}
-auto_ptr<InsetBase> InsetQuotes::doClone() const
+Inset * InsetQuotes::clone() const
{
- return auto_ptr<InsetBase>(new InsetQuotes(language_, side_, times_));
+ return new InsetQuotes(language_, side_, times_);
}
-InsetBase::Code InsetQuotes::lyxCode() const
+Inset::Code InsetQuotes::lyxCode() const
{
- return InsetBase::QUOTE_CODE;
+ return Inset::QUOTE_CODE;
}