]> git.lyx.org Git - features.git/commitdiff
fix compiler warnings (bug 1927)
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 20 Sep 2005 08:31:37 +0000 (08:31 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 20 Sep 2005 08:31:37 +0000 (08:31 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10465 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/cursor.C
src/frontends/qt2/ChangeLog
src/frontends/qt2/QGraphics.C
src/lyxrc.C
src/lyxtext.h
src/mathed/ChangeLog
src/mathed/math_nestinset.C
src/paragraph_pimpl.C
src/text2.C

index 37647aac68fbd88db3eda606e8145f04ee6d7723..b768cd4c8891b252f40480b60b2399ebb8815891 100644 (file)
@@ -2,6 +2,15 @@
 
        * rowpainter.C (paintText): fix RtL space width display bug (2029)
 
+2005-09-19  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * text2.C (setCursor): remove the unused 'boundary' parameter for
+       the CursorSlice version; adapt the LCursor version.
+
+       * lyxrc.C (write): 
+       * paragraph_pimpl.C (markErased): 
+       * cursor.C (bruteFind2, bruteFond3): fix warnings.
+
 2005-09-19  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * rowpainter.C (paintFirst): use a 'labeladdon' for TOP_* labels,
index 5440d88c8d8a0e3c46193c9f1fbcb331f76cec3e..9af38d2fe61ea7d4d4ebe549a6d5ae3e349f7dcf 100644 (file)
@@ -94,7 +94,7 @@ namespace {
                it.top().pos() = 0;
                DocIterator et = c;
                et.top().pos() = et.top().asMathInset()->cell(et.top().idx()).size();
-               for (int i = 0; ; ++i) {
+               for (size_t i = 0; ; ++i) {
                        int xo;
                        int yo;
                        it.inset().cursorPos(it.top(), c.boundary() && ((i+1) == it.depth()), xo, yo);
@@ -170,7 +170,7 @@ namespace {
 
 // FIXME: bit more work needed to get 'from' and 'to' right.
                pit_type from = cur.bottom().pit();
-               pit_type to = cur.bottom().pit();
+               //pit_type to = cur.bottom().pit();
                //lyxerr << "Pit start: " << from << endl;
 
                //lyxerr << "bruteFind3: x: " << x << " y: " << y
index 4ef87ef7e5f7bfe21db095297228bce46612120b..9fdea5ea0c0c4337b144fd18dedb34682abf1eed 100644 (file)
@@ -1,3 +1,7 @@
+2005-09-19  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * QGraphics.C (update_contents): fix compiler warning.
+
 2005-09-15  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * QCitationDialog.C (find): correct start iterator when searching
index 4f6730c3c7282fd9e3f38be20247a13bc5e978b9..4fb844d397d3f6c7ef2f7990aabd9f1851ef81e1 100644 (file)
@@ -156,19 +156,12 @@ void QGraphics::update_contents()
        // set the right default unit
        LyXLength::UNIT unitDefault = LyXLength::CM;
        switch (lyxrc.default_papersize) {
-               case PAPER_DEFAULT: break;
-
                case PAPER_USLETTER:
                case PAPER_USLEGAL:
                case PAPER_USEXECUTIVE:
                        unitDefault = LyXLength::IN;
                        break;
-
-               case PAPER_A3:
-               case PAPER_A4:
-               case PAPER_A5:
-               case PAPER_B5:
-                       unitDefault = LyXLength::CM;
+               default:
                        break;
        }
 
index 89b7b5191519b92996b12814001ec5ee416c6f3a..100b22b5fe62a251a1fa20c923d1d31485490e58 100644 (file)
@@ -1311,7 +1311,10 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const
                                os << "a5"; break;
                        case PAPER_B5:
                                os << "b5"; break;
-                       case PAPER_DEFAULT: break;
+                       case PAPER_DEFAULT: 
+                       case PAPER_CUSTOM: 
+                       case PAPER_B3:
+                       case PAPER_B4: break;
                        }
                        os << "\"\n";
                }
index 67825e9d0853ab0b9c32abbd38cd1504cfc073a5..52f9b6b34b292b945551576f8049c539693cf2d0 100644 (file)
@@ -165,8 +165,7 @@ public:
        bool setCursor(LCursor & cur, pit_type par, pos_type pos,
                       bool setfont = true, bool boundary = false);
        ///
-       void setCursor(CursorSlice &, pit_type par,
-                      pos_type pos, bool boundary = false);
+       void setCursor(CursorSlice &, pit_type par, pos_type pos);
        ///
        void setCursorIntern(LCursor & cur, pit_type par,
                 pos_type pos, bool setfont = true, bool boundary = false);
index 99baa30da65ee397ff98f1f47060648a0e72eb0b..b36190c46a7617c30f698568a05c9d19cd649d89 100644 (file)
@@ -1,3 +1,7 @@
+2005-09-19  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * math_nestinset.C (cursorPos): parameter `boundary' is unused.
+
 2005-09-15  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * math_nestinset.C (doDispatch): use cur.normalize() to prevent crash
index e957b05021b100e62de31785cb355b9aa006aaae..e9bb5ae5149cda7f04b397f67343d2261b03d021 100644 (file)
@@ -88,7 +88,7 @@ MathArray const & MathNestInset::cell(idx_type i) const
 }
 
 
-void MathNestInset::cursorPos(CursorSlice const & sl, bool boundary,
+void MathNestInset::cursorPos(CursorSlice const & sl, bool /*boundary*/,
        int & x, int & y) const
 {
 // FIXME: This is a hack. Ideally, the coord cache should not store
index f5ca835b382f127c39cdfa44f05c90c5cb53e955..9547fc9838bf2883a664d2d1137a77585e9d4850 100644 (file)
@@ -172,8 +172,6 @@ void Paragraph::Pimpl::markErased(bool erased)
        if (erased) {
                erase(0, size());
        } else {
-               pos_type i = 0;
-
                for (pos_type i = 0; i < size(); ++i) {
                        changes_->set(Change::UNCHANGED, i);
                        if (owner_->isInset(i))
index e8001c7c7bd1dfdead898756c8b05a440739ffed..3bdf3978e852237e131947c3390997abacce6b03 100644 (file)
@@ -667,8 +667,7 @@ bool LyXText::setCursor(LCursor & cur, pit_type par, pos_type pos,
 }
 
 
-void LyXText::setCursor(CursorSlice & cur, pit_type par,
-       pos_type pos, bool boundary)
+void LyXText::setCursor(CursorSlice & cur, pit_type par, pos_type pos)
 {
        BOOST_ASSERT(par != int(paragraphs().size()));
        cur.pit() = par;
@@ -696,7 +695,7 @@ void LyXText::setCursorIntern(LCursor & cur,
        pit_type par, pos_type pos, bool setfont, bool boundary)
 {
        cur.boundary(boundary);
-       setCursor(cur.top(), par, pos, boundary);
+       setCursor(cur.top(), par, pos);
        cur.setTargetX();
        if (setfont)
                setCurrentFont(cur);