} else {
InsetCollapsable::edit(bv, left);
}
- set_latex_font(bv);
+ setLatexFont(bv);
updateStatus();
}
BufferView * bv = cmd.view();
if (inset.paragraphs.begin()->empty())
- set_latex_font(bv);
+ setLatexFont(bv);
switch (cmd.action) {
case LFUN_DELETE_SKIP:
case LFUN_DELETE_LINE_FORWARD:
case LFUN_CUT:
- set_latex_font(bv);
+ setLatexFont(bv);
return InsetCollapsable::priv_dispatch(cmd, idx, pos);
default:
}
-string const InsetERT::get_new_label() const
+string const InsetERT::getNewLabel() const
{
string la;
pos_type const max_length = 15;
void InsetERT::setButtonLabel() const
{
- setLabel(status_ == Collapsed ? get_new_label() : _("ERT"));
+ setLabel(status_ == Collapsed ? getNewLabel() : _("ERT"));
}
}
-void InsetERT::set_latex_font(BufferView * /*bv*/)
+void InsetERT::setLatexFont(BufferView * /*bv*/)
{
#ifdef SET_HARD_FONT
LyXFont font(LyXFont::ALL_INHERIT, latex_language);
///
bool insertInset(BufferView *, InsetOld *);
///
- bool insetAllowed(InsetOld::Code code) const { return code == InsetOld::NEWLINE_CODE; }
+ bool insetAllowed(InsetOld::Code code) const {
+ return code == InsetOld::NEWLINE_CODE;
+ }
///
void setFont(BufferView *, LyXFont const &,
bool toggleall = false, bool selectall = false);
///
void getDrawFont(LyXFont &) const;
///
- bool forceDefaultParagraphs(InsetOld const *) const {
- return true;
- }
+ bool forceDefaultParagraphs(InsetOld const *) const { return true; }
protected:
///
virtual
///
void init();
///
- std::string const get_new_label() const;
+ std::string const getNewLabel() const;
///
void setButtonLabel() const;
///
- void set_latex_font(BufferView *);
+ void setLatexFont(BufferView *);
/// update status on button
void updateStatus(bool = false) const;
///
}
-unsigned int closeEnvTags(ostream & ofs, bool mixcont,
+unsigned int closeEnvTags(ostream & os, bool mixcont,
string const & environment_inner_depth,
lyx::depth_type total_depth)
{
- unsigned int lines;
+ unsigned int lines = 0;
if (environment_inner_depth != "!-- --") {
string item_name= "listitem";
- lines += closeTag(ofs, total_depth, mixcont, item_name);
+ lines += closeTag(os, total_depth, mixcont, item_name);
if (environment_inner_depth == "varlistentry")
- lines += closeTag(ofs, total_depth, mixcont,
+ lines += closeTag(os, total_depth, mixcont,
environment_inner_depth);
}
return lines;
string const VSpace::asLatexCommand(BufferParams const & params) const
{
switch (kind_) {
- case NONE:
- return string();
-
case DEFSKIP:
return params.getDefSkip().asLatexCommand(params);
case LENGTH:
return keep_ ? "\\vspace*{" + len_.asLatexString() + '}'
: "\\vspace{" + len_.asLatexString() + '}';
+
+ case NONE:
+ return string();
+
+ default:
+ BOOST_ASSERT(false);
+ return string();
}
}
switch (kind_) {
- case NONE:
- // value for this is already set
- return 0;
-
case DEFSKIP:
return bv.buffer()->params().getDefSkip().inPixels(bv);
case LENGTH:
return len_.len().inPixels(bv.workWidth());
+
+ case NONE:
+ return 0;
+
+ default:
+ BOOST_ASSERT(false);
+ return 0;
}
}