mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Resolve virtual function name clashes:
* Rename InsetMinipage's width and height functions as pageWidth and pageHeight, respectivelyi as they are functionally distinct from the InsetCollapsable's methods of the same name. * Change the "bool const &" parameters of UpdateableInset::searchForward and searchBackward to "bool". Ditto with other classes, so all are now consistent. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3375 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d5fefbb6d8
commit
de3b5aab16
@ -1,3 +1,9 @@
|
||||
2002-01-14 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* buffer.C (parseSingleLyXformat2Token): changes associated with the
|
||||
change of InsetMinipage::width to InsetMinipage::pageWidth to avoid the
|
||||
name clash with InsetCollapsable's width function.
|
||||
|
||||
2002-01-14 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* lastfiles.C: include <iterator>
|
||||
|
12
src/buffer.C
12
src/buffer.C
@ -1278,10 +1278,10 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
|
||||
}
|
||||
InsetMinipage * mini = new InsetMinipage;
|
||||
mini->pos(static_cast<InsetMinipage::Position>(par->params().pextraAlignment()));
|
||||
mini->width(par->params().pextraWidth());
|
||||
mini->pageWidth(par->params().pextraWidth());
|
||||
if (!par->params().pextraWidthp().empty()) {
|
||||
lyxerr << "WP:" << mini->width() << endl;
|
||||
mini->width(tostr(par->params().pextraWidthp())+"%");
|
||||
lyxerr << "WP:" << mini->pageWidth() << endl;
|
||||
mini->pageWidth(tostr(par->params().pextraWidthp())+"%");
|
||||
}
|
||||
Paragraph * op = mini->firstParagraph();
|
||||
mini->inset.paragraph(par);
|
||||
@ -1359,10 +1359,10 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
|
||||
|
||||
InsetMinipage * mini = new InsetMinipage;
|
||||
mini->pos(static_cast<InsetMinipage::Position>(minipar->params().pextraAlignment()));
|
||||
mini->width(minipar->params().pextraWidth());
|
||||
mini->pageWidth(minipar->params().pextraWidth());
|
||||
if (!par->params().pextraWidthp().empty()) {
|
||||
lyxerr << "WP:" << mini->width() << endl;
|
||||
mini->width(tostr(par->params().pextraWidthp())+"%");
|
||||
lyxerr << "WP:" << mini->pageWidth() << endl;
|
||||
mini->pageWidth(tostr(par->params().pextraWidthp())+"%");
|
||||
}
|
||||
mini->inset.paragraph(minipar);
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
2002-01-14 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* FormMinipage.C (apply, update): MinipageParams::width renamed
|
||||
as MinipageParams::pageWidth. InsetMinipage::width renamed
|
||||
as InsetMinipage::pageWidth.
|
||||
|
||||
2002-01-13 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* ButtonController.h (refreshReadOnly): use explicit typename
|
||||
|
@ -44,7 +44,7 @@ ControlMinipage::ControlMinipage(LyXView & lv, Dialogs & d)
|
||||
|
||||
void ControlMinipage::applyParamsToInset()
|
||||
{
|
||||
inset()->width(params().width);
|
||||
inset()->pageWidth(params().pageWidth);
|
||||
inset()->pos(params().pos);
|
||||
|
||||
lv_.view()->updateInset(inset(), true);
|
||||
@ -67,13 +67,13 @@ MinipageParams::MinipageParams()
|
||||
{}
|
||||
|
||||
MinipageParams::MinipageParams(InsetMinipage const & inset)
|
||||
: width(inset.width()), pos(inset.pos())
|
||||
: pageWidth(inset.pageWidth()), pos(inset.pos())
|
||||
{}
|
||||
|
||||
|
||||
bool operator==(MinipageParams const & p1, MinipageParams const & p2)
|
||||
{
|
||||
return (p1.width == p2.width && p1.pos == p2.pos);
|
||||
return (p1.pageWidth == p2.pageWidth && p1.pos == p2.pos);
|
||||
}
|
||||
|
||||
|
||||
|
@ -34,7 +34,7 @@ struct MinipageParams {
|
||||
///
|
||||
MinipageParams(InsetMinipage const &);
|
||||
///
|
||||
string width;
|
||||
string pageWidth;
|
||||
///
|
||||
InsetMinipage::Position pos;
|
||||
};
|
||||
|
@ -1,3 +1,8 @@
|
||||
2002-01-14 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* QMinipage.C (apply, update_contents): MinipageParams::width renamed
|
||||
as MinipageParams::pageWidth.
|
||||
|
||||
2002-01-04 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* QParagraph.C: add needed include
|
||||
|
@ -59,7 +59,7 @@ void QMinipage::apply()
|
||||
|
||||
LyXLength len(value, unit);
|
||||
|
||||
controller().params().width = len.asString();
|
||||
controller().params().pageWidth = len.asString();
|
||||
|
||||
switch (dialog_->valignCO->currentItem()) {
|
||||
case 0:
|
||||
@ -87,7 +87,7 @@ namespace {
|
||||
|
||||
void QMinipage::update_contents()
|
||||
{
|
||||
LyXLength len(controller().params().width.c_str());
|
||||
LyXLength len(controller().params().pageWidth.c_str());
|
||||
dialog_->widthED->setText(numtostr(len.value()).c_str());
|
||||
dialog_->unitsLC->setCurrentItem(len.unit());
|
||||
lyxerr << "width " << numtostr(len.value()).c_str() << " units " << len.unit() << std::endl;
|
||||
|
@ -1,3 +1,8 @@
|
||||
2002-01-14 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* FormMinipage.C (apply, update): MinipageParams::width renamed
|
||||
as MinipageParams::pageWidth.
|
||||
|
||||
2002-01-14 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* FormMathsMatrix.C (input): use lyx::count rather than std::count.
|
||||
|
@ -61,7 +61,7 @@ void FormMinipage::apply()
|
||||
string const units = fl_get_choice_text(dialog_->choice_width_units);
|
||||
double const val = strToDbl(fl_get_input(dialog_->input_width));
|
||||
|
||||
controller().params().width =
|
||||
controller().params().pageWidth =
|
||||
tostr(val) + frontStrip(strip(subst(units,"%%","%")));
|
||||
|
||||
if (fl_get_button(dialog_->radio_top))
|
||||
@ -75,7 +75,7 @@ void FormMinipage::apply()
|
||||
|
||||
void FormMinipage::update()
|
||||
{
|
||||
LyXLength len(controller().params().width);
|
||||
LyXLength len(controller().params().pageWidth);
|
||||
fl_set_input(dialog_->input_width, tostr(len.value()).c_str());
|
||||
fl_set_choice(dialog_->choice_width_units, len.unit() + 1);
|
||||
|
||||
|
@ -1,3 +1,14 @@
|
||||
2002-01-14 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* inset.[Ch]:
|
||||
* insetcollapsable.[Ch]:
|
||||
* insettabular.[Ch] (searchForward, searchBackward): change the
|
||||
bool const & params to bool.
|
||||
|
||||
* insetminipage.[Ch] (width, height): renamed as pageWidth, pageHeight
|
||||
to avoid the name clash with InsetCollapsable's methods of the same
|
||||
names but different functionality.
|
||||
|
||||
2002-01-14 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* insettext.C (ascii): use lyx::count rather than countChar.
|
||||
|
@ -373,7 +373,7 @@ string const UpdatableInset::selectNextWordToSpellcheck(BufferView *bv,
|
||||
|
||||
|
||||
bool UpdatableInset::searchForward(BufferView * bv, string const &,
|
||||
bool const &, bool const &)
|
||||
bool, bool)
|
||||
{
|
||||
// we have to unlock ourself in this function by default!
|
||||
bv->unlockInset(const_cast<UpdatableInset *>(this));
|
||||
@ -382,7 +382,7 @@ bool UpdatableInset::searchForward(BufferView * bv, string const &,
|
||||
|
||||
|
||||
bool UpdatableInset::searchBackward(BufferView * bv, string const &,
|
||||
bool const &, bool const &)
|
||||
bool, bool)
|
||||
{
|
||||
// we have to unlock ourself in this function by default!
|
||||
bv->unlockInset(const_cast<UpdatableInset *>(this));
|
||||
|
@ -517,10 +517,10 @@ public:
|
||||
// needed for search/replace functionality
|
||||
///
|
||||
virtual bool searchForward(BufferView *, string const &,
|
||||
bool const & = true, bool const & = false);
|
||||
bool = true, bool = false);
|
||||
///
|
||||
virtual bool searchBackward(BufferView *, string const &,
|
||||
bool const & = true, bool const & = false);
|
||||
bool = true, bool = false);
|
||||
|
||||
protected:
|
||||
///
|
||||
|
@ -646,7 +646,7 @@ void InsetCollapsable::setLabel(string const & l) const
|
||||
|
||||
|
||||
bool InsetCollapsable::searchForward(BufferView * bv, string const & str,
|
||||
bool const & cs, bool const & mw)
|
||||
bool cs, bool mw)
|
||||
{
|
||||
bool found = inset.searchForward(bv, str, cs, mw);
|
||||
if (first_after_edit && !found)
|
||||
@ -657,7 +657,7 @@ bool InsetCollapsable::searchForward(BufferView * bv, string const & str,
|
||||
|
||||
|
||||
bool InsetCollapsable::searchBackward(BufferView * bv, string const & str,
|
||||
bool const & cs, bool const & mw)
|
||||
bool cs, bool mw)
|
||||
{
|
||||
bool found = inset.searchBackward(bv, str, cs, mw);
|
||||
if (first_after_edit && !found)
|
||||
|
@ -188,9 +188,9 @@ public:
|
||||
}
|
||||
///
|
||||
bool searchForward(BufferView * bv, string const & str,
|
||||
bool const & cs = true, bool const & mw = false);
|
||||
bool = true, bool = false);
|
||||
bool searchBackward(BufferView * bv, string const & str,
|
||||
bool const & cs = true, bool const & mw = false);
|
||||
bool = true, bool = false);
|
||||
|
||||
protected:
|
||||
///
|
||||
|
@ -286,13 +286,13 @@ void InsetMinipage::innerPos(InsetMinipage::InnerPosition ip)
|
||||
}
|
||||
|
||||
|
||||
string const & InsetMinipage::height() const
|
||||
string const & InsetMinipage::pageHeight() const
|
||||
{
|
||||
return height_;
|
||||
}
|
||||
|
||||
|
||||
void InsetMinipage::height(string const & ll)
|
||||
void InsetMinipage::pageHeight(string const & ll)
|
||||
{
|
||||
if (height_ != ll) {
|
||||
height_ = ll;
|
||||
@ -301,13 +301,13 @@ void InsetMinipage::height(string const & ll)
|
||||
}
|
||||
|
||||
|
||||
string const & InsetMinipage::width() const
|
||||
string const & InsetMinipage::pageWidth() const
|
||||
{
|
||||
return width_;
|
||||
}
|
||||
|
||||
|
||||
void InsetMinipage::width(string const & ll)
|
||||
void InsetMinipage::pageWidth(string const & ll)
|
||||
{
|
||||
if (ll != width_) {
|
||||
width_ = ll;
|
||||
|
@ -71,13 +71,13 @@ public:
|
||||
///
|
||||
void innerPos(InnerPosition);
|
||||
///
|
||||
string const & height() const;
|
||||
string const & pageHeight() const;
|
||||
///
|
||||
void height(string const &);
|
||||
void pageHeight(string const &);
|
||||
///
|
||||
string const & width() const;
|
||||
string const & pageWidth() const;
|
||||
///
|
||||
void width(string const &);
|
||||
void pageWidth(string const &);
|
||||
///
|
||||
SigC::Signal0<void> hideDialog;
|
||||
///
|
||||
|
@ -2657,7 +2657,7 @@ void InsetTabular::toggleSelection(BufferView * bv, bool kill_selection)
|
||||
|
||||
|
||||
bool InsetTabular::searchForward(BufferView * bv, string const & str,
|
||||
bool const & cs, bool const & mw)
|
||||
bool cs, bool mw)
|
||||
{
|
||||
nodraw(true);
|
||||
if (the_locking_inset) {
|
||||
@ -2685,7 +2685,7 @@ bool InsetTabular::searchForward(BufferView * bv, string const & str,
|
||||
|
||||
|
||||
bool InsetTabular::searchBackward(BufferView * bv, string const & str,
|
||||
bool const & cs, bool const & mw)
|
||||
bool cs, bool mw)
|
||||
{
|
||||
nodraw(true);
|
||||
if (the_locking_inset) {
|
||||
|
@ -218,9 +218,9 @@ public:
|
||||
void toggleSelection(BufferView *, bool kill_selection);
|
||||
///
|
||||
bool searchForward(BufferView *, string const &,
|
||||
bool const & = true, bool const & = false);
|
||||
bool = true, bool = false);
|
||||
bool searchBackward(BufferView *, string const &,
|
||||
bool const & = true, bool const & = false);
|
||||
bool = true, bool = false);
|
||||
|
||||
// this should return true if we have a "normal" cell, otherwise true.
|
||||
// "normal" means without width set!
|
||||
|
@ -1,3 +1,8 @@
|
||||
2002-01-14 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* formulabase.[Ch] (searchForward, searchBackward): change the
|
||||
bool const & params to bool.
|
||||
|
||||
2002-01-14 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* math_mathmlstream.C (operator<<): use lyx::count rather than
|
||||
|
@ -726,7 +726,7 @@ int InsetFormulaBase::xhigh() const
|
||||
|
||||
|
||||
bool InsetFormulaBase::searchForward(BufferView * bv, string const & str,
|
||||
bool const &, bool const &)
|
||||
bool, bool)
|
||||
{
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning pretty ugly
|
||||
@ -773,7 +773,7 @@ bool InsetFormulaBase::searchForward(BufferView * bv, string const & str,
|
||||
|
||||
|
||||
bool InsetFormulaBase::searchBackward(BufferView * bv, string const & what,
|
||||
bool const & a, bool const & b)
|
||||
bool a, bool b)
|
||||
{
|
||||
lyxerr << "searching backward not implemented in mathed" << endl;
|
||||
return searchForward(bv, what, a, b);
|
||||
|
@ -104,10 +104,10 @@ public:
|
||||
|
||||
///
|
||||
virtual bool searchForward(BufferView *, string const &,
|
||||
bool const & = true, bool const & = false);
|
||||
bool = true, bool = false);
|
||||
///
|
||||
virtual bool searchBackward(BufferView *, string const &,
|
||||
bool const & = true, bool const & = false);
|
||||
bool = true, bool = false);
|
||||
///
|
||||
virtual bool isTextInset() const { return true; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user