fix some compiler warnings

stick to LyX naming convention


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8120 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-11-21 17:31:46 +00:00
parent 6ff15cc813
commit e506fc5915
4 changed files with 30 additions and 23 deletions

View File

@ -408,7 +408,7 @@ void InsetERT::edit(BufferView * bv, bool left)
} else {
InsetCollapsable::edit(bv, left);
}
set_latex_font(bv);
setLatexFont(bv);
updateStatus();
}
@ -419,7 +419,7 @@ InsetERT::priv_dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos)
BufferView * bv = cmd.view();
if (inset.paragraphs.begin()->empty())
set_latex_font(bv);
setLatexFont(bv);
switch (cmd.action) {
@ -455,7 +455,7 @@ InsetERT::priv_dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos)
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:
@ -464,7 +464,7 @@ InsetERT::priv_dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos)
}
string const InsetERT::get_new_label() const
string const InsetERT::getNewLabel() const
{
string la;
pos_type const max_length = 15;
@ -490,7 +490,7 @@ string const InsetERT::get_new_label() const
void InsetERT::setButtonLabel() const
{
setLabel(status_ == Collapsed ? get_new_label() : _("ERT"));
setLabel(status_ == Collapsed ? getNewLabel() : _("ERT"));
}
@ -526,7 +526,7 @@ void InsetERT::draw(PainterInfo & pi, int x, int y) const
}
void InsetERT::set_latex_font(BufferView * /*bv*/)
void InsetERT::setLatexFont(BufferView * /*bv*/)
{
#ifdef SET_HARD_FONT
LyXFont font(LyXFont::ALL_INHERIT, latex_language);

View File

@ -57,7 +57,9 @@ public:
///
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);
@ -102,9 +104,7 @@ public:
///
void getDrawFont(LyXFont &) const;
///
bool forceDefaultParagraphs(InsetOld const *) const {
return true;
}
bool forceDefaultParagraphs(InsetOld const *) const { return true; }
protected:
///
virtual
@ -124,11 +124,11 @@ private:
///
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;
///

View File

@ -116,16 +116,16 @@ int closeTag(ostream & os, Paragraph::depth_type depth,
}
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;

View File

@ -453,9 +453,6 @@ string const VSpace::asLyXCommand() const
string const VSpace::asLatexCommand(BufferParams const & params) const
{
switch (kind_) {
case NONE:
return string();
case DEFSKIP:
return params.getDefSkip().asLatexCommand(params);
@ -474,6 +471,13 @@ string const VSpace::asLatexCommand(BufferParams const & params) const
case LENGTH:
return keep_ ? "\\vspace*{" + len_.asLatexString() + '}'
: "\\vspace{" + len_.asLatexString() + '}';
case NONE:
return string();
default:
BOOST_ASSERT(false);
return string();
}
}
@ -486,10 +490,6 @@ int VSpace::inPixels(BufferView const & bv) const
switch (kind_) {
case NONE:
// value for this is already set
return 0;
case DEFSKIP:
return bv.buffer()->params().getDefSkip().inPixels(bv);
@ -510,5 +510,12 @@ int VSpace::inPixels(BufferView const & bv) const
case LENGTH:
return len_.len().inPixels(bv.workWidth());
case NONE:
return 0;
default:
BOOST_ASSERT(false);
return 0;
}
}