diff --git a/src/ChangeLog b/src/ChangeLog index 219b4944ef..b833b62286 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2002-01-14 Angus Leeming + + * 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 * lastfiles.C: include diff --git a/src/buffer.C b/src/buffer.C index 0cc738b0ae..19a4e42294 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -1278,10 +1278,10 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par, } InsetMinipage * mini = new InsetMinipage; mini->pos(static_cast(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(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); diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 12bb358c33..7d1567eb56 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,9 @@ +2002-01-14 Angus Leeming + + * FormMinipage.C (apply, update): MinipageParams::width renamed + as MinipageParams::pageWidth. InsetMinipage::width renamed + as InsetMinipage::pageWidth. + 2002-01-13 Lars Gullik Bjønnes * ButtonController.h (refreshReadOnly): use explicit typename diff --git a/src/frontends/controllers/ControlMinipage.C b/src/frontends/controllers/ControlMinipage.C index 4071ae975f..0f4b8d016f 100644 --- a/src/frontends/controllers/ControlMinipage.C +++ b/src/frontends/controllers/ControlMinipage.C @@ -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); } diff --git a/src/frontends/controllers/ControlMinipage.h b/src/frontends/controllers/ControlMinipage.h index 08c1b3bc5d..b0edc466f1 100644 --- a/src/frontends/controllers/ControlMinipage.h +++ b/src/frontends/controllers/ControlMinipage.h @@ -34,7 +34,7 @@ struct MinipageParams { /// MinipageParams(InsetMinipage const &); /// - string width; + string pageWidth; /// InsetMinipage::Position pos; }; diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index effc209238..ae87c22816 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,8 @@ +2002-01-14 Angus Leeming + + * QMinipage.C (apply, update_contents): MinipageParams::width renamed + as MinipageParams::pageWidth. + 2002-01-04 John Levon * QParagraph.C: add needed include diff --git a/src/frontends/qt2/QMinipage.C b/src/frontends/qt2/QMinipage.C index 070a7fc439..69229dc75c 100644 --- a/src/frontends/qt2/QMinipage.C +++ b/src/frontends/qt2/QMinipage.C @@ -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; diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index b7f169fecb..5cf3580c65 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2002-01-14 Angus Leeming + + * FormMinipage.C (apply, update): MinipageParams::width renamed + as MinipageParams::pageWidth. + 2002-01-14 Angus Leeming * FormMathsMatrix.C (input): use lyx::count rather than std::count. diff --git a/src/frontends/xforms/FormMinipage.C b/src/frontends/xforms/FormMinipage.C index bcda679ca7..5ca5c4a347 100644 --- a/src/frontends/xforms/FormMinipage.C +++ b/src/frontends/xforms/FormMinipage.C @@ -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); diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 40b585801a..af64bcd229 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,14 @@ +2002-01-14 Angus Leeming + + * 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 * insettext.C (ascii): use lyx::count rather than countChar. diff --git a/src/insets/inset.C b/src/insets/inset.C index 9673978b3d..edf5125381 100644 --- a/src/insets/inset.C +++ b/src/insets/inset.C @@ -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(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(this)); diff --git a/src/insets/inset.h b/src/insets/inset.h index 77f58f7b32..ada2ea67cc 100644 --- a/src/insets/inset.h +++ b/src/insets/inset.h @@ -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: /// diff --git a/src/insets/insetcollapsable.C b/src/insets/insetcollapsable.C index 7a04702f9e..d05f943ba2 100644 --- a/src/insets/insetcollapsable.C +++ b/src/insets/insetcollapsable.C @@ -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) diff --git a/src/insets/insetcollapsable.h b/src/insets/insetcollapsable.h index 4d1a94fcbb..2880a32027 100644 --- a/src/insets/insetcollapsable.h +++ b/src/insets/insetcollapsable.h @@ -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: /// diff --git a/src/insets/insetminipage.C b/src/insets/insetminipage.C index 71487a4905..8ab1df6a96 100644 --- a/src/insets/insetminipage.C +++ b/src/insets/insetminipage.C @@ -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; diff --git a/src/insets/insetminipage.h b/src/insets/insetminipage.h index 4b1797d804..8f07025fb4 100644 --- a/src/insets/insetminipage.h +++ b/src/insets/insetminipage.h @@ -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 hideDialog; /// diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index a7286e6c8d..222ae6dc8a 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -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) { diff --git a/src/insets/insettabular.h b/src/insets/insettabular.h index c0f97e46b2..1d358d53d4 100644 --- a/src/insets/insettabular.h +++ b/src/insets/insettabular.h @@ -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! diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 04899f1f09..5645f7a11d 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,8 @@ +2002-01-14 Angus Leeming + + * formulabase.[Ch] (searchForward, searchBackward): change the + bool const & params to bool. + 2002-01-14 Angus Leeming * math_mathmlstream.C (operator<<): use lyx::count rather than diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index 13e92157c0..484a3049e0 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -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); diff --git a/src/mathed/formulabase.h b/src/mathed/formulabase.h index 54e2554956..96dca1c1b4 100644 --- a/src/mathed/formulabase.h +++ b/src/mathed/formulabase.h @@ -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; }