]> git.lyx.org Git - features.git/commitdiff
Trivial fixes to some warnings thrown up by MSVS.Net 2003.
authorAngus Leeming <leeming@lyx.org>
Wed, 2 Nov 2005 20:11:36 +0000 (20:11 +0000)
committerAngus Leeming <leeming@lyx.org>
Wed, 2 Nov 2005 20:11:36 +0000 (20:11 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10585 a592a061-630c-0410-9148-cb99ea01b6c8

src/Bidi.C
src/ChangeLog
src/frontends/controllers/ChangeLog
src/frontends/controllers/helper_funcs.C
src/graphics/ChangeLog
src/graphics/GraphicsCacheItem.C
src/lyxtextclass.C
src/mathed/ChangeLog
src/mathed/math_nestinset.C
src/support/ChangeLog
src/support/path.C

index 6899c0ab73786aa6a5b2e5dcca6af4b87ef77cc8..e29b62087d0783aea1a4d9a7fa6b5f3f44f7eb47 100644 (file)
@@ -138,7 +138,7 @@ void Bidi::computeTables(Paragraph const & par,
                        log2vis_list_[lpos - start_] = rtl ? 1 : -1;
                } else if (lev < new_level) {
                        log2vis_list_[lpos - start_] = rtl ? -1 : 1;
-                       if (new_level > rtl_par)
+                       if (new_level > 0 && !rtl_par)
                                same_direction_ = false;
                } else
                        log2vis_list_[lpos - start_] = new_rtl ? -1 : 1;
index dc5ac7243487c683add76b64b71feeb3205f2b05..f938d5bc3d1b58f8c24460954aa8368326dc422f 100644 (file)
@@ -1,3 +1,8 @@
+2005-11-02  Angus Leeming  <leeming@lyx.org>
+
+       * Bidi.C:
+       * lyxtextclass.C: trivial fixes to some MSVS warnings.
+
 2005-10-28  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * text3.C (getStatus): re-enable disabled code. (bug 2081)
index 25c8842271c3eb79206343811804bfd1025cb1eb..b1a99d4071b68f388dcaa68ea8c5e47ddc4e4fed 100644 (file)
@@ -1,3 +1,7 @@
+2005-11-02  Angus Leeming  <leeming@lyx.org>
+
+       * helper_funcs.C: trivial fix to a MSVS warning.
+
 2005-10-05  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * ControlSpellchecker.C (nextWord): do not return empty word
index 582d88820f943ef6deb217cb2f74c1d81401d1f2..ddf9ce9dff8bbcbe7c4ec2c5978a708dcbad2e9f 100644 (file)
@@ -15,6 +15,7 @@
 #include "helper_funcs.h"
 
 #include "gettext.h"
+#include "lyxlength.h"
 
 #include "frontends/FileDialog.h"
 
@@ -26,9 +27,6 @@ using std::pair;
 using std::vector;
 using std::string;
 
-// sorry this is just a temporary hack we should include vspace.h! (Jug)
-extern const char * stringFromUnit(int);
-
 namespace lyx {
 
 using support::AddName;
@@ -106,7 +104,7 @@ string const browseLibFile(string const & dir,
                                       AddName(package().user_support(), dir));
 
        string const result = browseFile(LibFileSearch(dir, name, ext), title,
-                                  filters, false, dir1, dir2);
+                                        filters, false, dir1, dir2);
 
        // remove the extension if it is the default one
        string noextresult;
@@ -125,9 +123,9 @@ string const browseLibFile(string const & dir,
 
 
 string const browseDir(string const & pathname,
-                       string const & title,
-                       pair<string,string> const & dir1,
-                       pair<string,string> const & dir2)
+                      string const & title,
+                      pair<string,string> const & dir1,
+                      pair<string,string> const & dir2)
 {
        string lastPath(".");
        if (!pathname.empty())
@@ -145,9 +143,10 @@ string const browseDir(string const & pathname,
 vector<string> const getLatexUnits()
 {
        vector<string> units;
-       char const * str;
-       for (int i = 0; (str = stringFromUnit(i)); ++i)
-           units.push_back(str);
+       int i = 0;
+       char const * str = stringFromUnit(i);
+       for (; str != 0; ++i, str = stringFromUnit(i))
+               units.push_back(str);
 
        return units;
 }
index b447202ac88a6ee9ac81da6e7f16d058d4c22857..c732bd3502ddb5606204b30c364e0f1e3d977487 100644 (file)
@@ -1,3 +1,7 @@
+2005-11-02  Angus Leeming  <leeming@lyx.org>
+
+       * GraphicsCacheItem.C: trivial fix to a MSVS warning.
+
 2005-06-12  Angus Leeming  <leeming@lyx.org>
 
        * PreviewLoader.C (startLoading): quote the name of the LaTeX file
index 0133bd6a06ffa73d532d1eb747cf86fa226ee440..1d031d8a71da2fb03db753a8bde33f09c8da7111 100644 (file)
@@ -384,7 +384,8 @@ void CacheItem::Impl::convertToDisplayFormat()
 
        // Make a local copy in case we unzip it
        string filename;
-       if ((zipped_ = zippedFile(filename_))) {
+       zipped_ = zippedFile(filename_);
+       if (zipped_) {
                unzipped_filename_ = tempName(string(), filename_);
                if (unzipped_filename_.empty()) {
                        setStatus(ErrorConverting);
index 1fde276e7942597c5e36c62a64543080724195ab..ffcf4741761976e09c2dbf8b44588daeeaa886f6 100644 (file)
@@ -284,7 +284,8 @@ bool LyXTextClass::Read(string const & filename, bool merge)
                                        lay.setName(name);
                                        if (le == TC_ENVIRONMENT)
                                                lay.is_environment = true;
-                                       if (!(error = do_readStyle(lexrc, lay)))
+                                       error = do_readStyle(lexrc, lay);
+                                       if (!error)
                                                layoutlist_.push_back(
                                                        boost::shared_ptr<LyXLayout>(new LyXLayout(lay))
                                                        );
index 6f8aa85be9a180d1244334b243e9327ef66867db..2eaf13c8fa92a606b485d93d4aee24458521899c 100644 (file)
@@ -1,3 +1,7 @@
+2005-11-02  Angus Leeming  <leeming@lyx.org>
+
+       * math_nestinset.C: trivial fix to a MSVS warning.
+
 2005-11-02  Martin Vermeer  <martin.vermeer@hut.fi>
 
        * math_kerninset.[Ch]: fix 2074: kern width wrong
index 5f401c1758998491a12d6820d02ddb551b38659e..ec23d10bdc00723890090c249e6410aa51cae730 100644 (file)
@@ -875,7 +875,7 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
                // math macros are nest insets and may have 0 cells.
                // handleNest would crash in this case.
                if (ar.size() == 1 && (ar[0].nucleus()->asNestInset()) &&
-                   ar[0].nucleus()->nargs() > cell) {
+                   ar[0].nucleus()->nargs() > MathInset::idx_type(cell)) {
                        cur.handleNest(ar[0], cell);
                } else
                        cur.niceInsert(cmd.argument);
index 4cf9cc87d1f0ebc753840b896742f17c4329326c..f5c011a6494410e83f3e3587e2c6a9657a81e63d 100644 (file)
@@ -1,3 +1,7 @@
+2005-11-02  Angus Leeming  <leeming@lyx.org>
+
+       * path.C: trivial fix to a MSVS warning.
+
 2005-10-12  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * package.C.in (get_default_user_support_dir): do not play tricks
index b7db0a299af77e212bb6d395b74ae8a0495d6cab..71ab4b6b87acdb8cba67f2f120d43e34f25862d7 100644 (file)
@@ -29,8 +29,9 @@ Path::Path(string const & path)
        if (!path.empty()) {
                pushedDir_ = getcwd();
 
-               if (pushedDir_.empty() || chdir(path))
-                       /* FIXME: throw */;
+               if (pushedDir_.empty() || chdir(path)) {
+                       /* FIXME: throw */
+               }
        } else {
                popped_ = true;
        }