]> git.lyx.org Git - features.git/commitdiff
Resolve virtual function name clashes:
authorAngus Leeming <leeming@lyx.org>
Mon, 14 Jan 2002 16:10:29 +0000 (16:10 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 14 Jan 2002 16:10:29 +0000 (16:10 +0000)
* 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

21 files changed:
src/ChangeLog
src/buffer.C
src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlMinipage.C
src/frontends/controllers/ControlMinipage.h
src/frontends/qt2/ChangeLog
src/frontends/qt2/QMinipage.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormMinipage.C
src/insets/ChangeLog
src/insets/inset.C
src/insets/inset.h
src/insets/insetcollapsable.C
src/insets/insetcollapsable.h
src/insets/insetminipage.C
src/insets/insetminipage.h
src/insets/insettabular.C
src/insets/insettabular.h
src/mathed/ChangeLog
src/mathed/formulabase.C
src/mathed/formulabase.h

index 219b4944eff03ba1447f83d306c98451ae1c8a7c..b833b62286e7aa19790b7d864b631077d2362353 100644 (file)
@@ -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>
index 0cc738b0ae648a42778cb1968563c57b2aa8007e..19a4e42294d5623758712d156801824020358bff 100644 (file)
@@ -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);
                        
index 12bb358c336b3174782724ff43e9390261aa6bb4..7d1567eb56e2274a6492a45a76f1b960e32bf198 100644 (file)
@@ -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
index 4071ae975f0b302637b3a835a49235cc084d5d41..0f4b8d016f880940baae0cb30e9de4348932ac69 100644 (file)
@@ -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);
 }
 
 
index 08c1b3bc5d08ad60cdde3ed68077b1887b4d952f..b0edc466f1804513d3b2e14f5e0e37d928c4ecff 100644 (file)
@@ -34,7 +34,7 @@ struct MinipageParams {
        ///
        MinipageParams(InsetMinipage const &);
        ///
-       string width;
+       string pageWidth;
        ///
        InsetMinipage::Position pos;
 };
index effc2092389a0a328eaa5a1d7e73b83ded409647..ae87c2281695364501d278951fad347581c6a42b 100644 (file)
@@ -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
index 070a7fc43939bf5c5b067d80cfa065182aeeddde..69229dc75c1bdb978c0755f5f207147cedcb26f0 100644 (file)
@@ -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;
index b7f169fecbad4de221f013614952c1ac85eb3e91..5cf3580c6586178aea291aeea5df1c9b5d82f949 100644 (file)
@@ -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.
index bcda679ca78a23ec50f37a7fb4aa45cf22d54afc..5ca5c4a34793513207d3d809b4a9099da6efb41e 100644 (file)
@@ -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);
 
index 40b585801acc71a1c8855f1b1ce736b3d4f6964e..af64bcd229d42c5bf4e75f0d9a9b2e01d705f8f7 100644 (file)
@@ -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.
index 9673978b3d866601ea4a6cef5cf079f8b803fc08..edf512538109cdd55b2161cfd79f5c46d2e37432 100644 (file)
@@ -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));
index 77f58f7b32485a73a7c41107688073a0b9296ece..ada2ea67cc3e6d6af2650e79c065fdc5e90276f0 100644 (file)
@@ -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:
        ///
index 7a04702f9e425426c8a38c37a8f017be0f1762c3..d05f943ba2b0cb38be9fc61640b08856d81d5047 100644 (file)
@@ -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)
index 4d1a94fcbb460dd3d6623e6cb8533f57d2847b6a..2880a32027d68186e0189bd50894f561504e5307 100644 (file)
@@ -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:
        ///
index 71487a4905cf2d3a539a7bd95397d107d6afa4af..8ab1df6a96523380ef40a5c186c113ea59a148e2 100644 (file)
@@ -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;
index 4b1797d804c7b32789d984a7ef1692a31b378a9b..8f07025fb493bfddaedbf73d3d090ae1f5ce3f99 100644 (file)
@@ -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;
        ///
index a7286e6c8d9250c22c1e1ed196ffe8f658daa5b0..222ae6dc8a891dbfb348228d64b63e88b24a540b 100644 (file)
@@ -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) {
index c0f97e46b20061867856e4f9ee8f575a02a697cd..1d358d53d468c297091d8e1f2ecdf827ed708a08 100644 (file)
@@ -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!
index 04899f1f09e3defc586daf4ad61b806e99a2c81a..5645f7a11d726819b6b62a57a0b9b899e5913928 100644 (file)
@@ -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
index 13e92157c053988393acd3033b7fcbdf1d93492c..484a3049e03dee47215cb57637bd2184532c3dca 100644 (file)
@@ -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);
index 54e255495608269b31acca090f821ff2fe196b19..96dca1c1b4a404c7ee00b80b95a1d52b037fdb0a 100644 (file)
@@ -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; }