diff --git a/src/Bidi.C b/src/Bidi.C index 6899c0ab73..e29b62087d 100644 --- a/src/Bidi.C +++ b/src/Bidi.C @@ -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; diff --git a/src/ChangeLog b/src/ChangeLog index dc5ac72434..f938d5bc3d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-11-02 Angus Leeming + + * Bidi.C: + * lyxtextclass.C: trivial fixes to some MSVS warnings. + 2005-10-28 Jean-Marc Lasgouttes * text3.C (getStatus): re-enable disabled code. (bug 2081) diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 25c8842271..b1a99d4071 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,7 @@ +2005-11-02 Angus Leeming + + * helper_funcs.C: trivial fix to a MSVS warning. + 2005-10-05 Jean-Marc Lasgouttes * ControlSpellchecker.C (nextWord): do not return empty word diff --git a/src/frontends/controllers/helper_funcs.C b/src/frontends/controllers/helper_funcs.C index 582d88820f..ddf9ce9dff 100644 --- a/src/frontends/controllers/helper_funcs.C +++ b/src/frontends/controllers/helper_funcs.C @@ -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 const & dir1, - pair const & dir2) + string const & title, + pair const & dir1, + pair const & dir2) { string lastPath("."); if (!pathname.empty()) @@ -145,9 +143,10 @@ string const browseDir(string const & pathname, vector const getLatexUnits() { vector 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; } diff --git a/src/graphics/ChangeLog b/src/graphics/ChangeLog index b447202ac8..c732bd3502 100644 --- a/src/graphics/ChangeLog +++ b/src/graphics/ChangeLog @@ -1,3 +1,7 @@ +2005-11-02 Angus Leeming + + * GraphicsCacheItem.C: trivial fix to a MSVS warning. + 2005-06-12 Angus Leeming * PreviewLoader.C (startLoading): quote the name of the LaTeX file diff --git a/src/graphics/GraphicsCacheItem.C b/src/graphics/GraphicsCacheItem.C index 0133bd6a06..1d031d8a71 100644 --- a/src/graphics/GraphicsCacheItem.C +++ b/src/graphics/GraphicsCacheItem.C @@ -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); diff --git a/src/lyxtextclass.C b/src/lyxtextclass.C index 1fde276e79..ffcf474176 100644 --- a/src/lyxtextclass.C +++ b/src/lyxtextclass.C @@ -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(new LyXLayout(lay)) ); diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 6f8aa85be9..2eaf13c8fa 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,7 @@ +2005-11-02 Angus Leeming + + * math_nestinset.C: trivial fix to a MSVS warning. + 2005-11-02 Martin Vermeer * math_kerninset.[Ch]: fix 2074: kern width wrong diff --git a/src/mathed/math_nestinset.C b/src/mathed/math_nestinset.C index 5f401c1758..ec23d10bdc 100644 --- a/src/mathed/math_nestinset.C +++ b/src/mathed/math_nestinset.C @@ -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); diff --git a/src/support/ChangeLog b/src/support/ChangeLog index 4cf9cc87d1..f5c011a649 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,7 @@ +2005-11-02 Angus Leeming + + * path.C: trivial fix to a MSVS warning. + 2005-10-12 Jean-Marc Lasgouttes * package.C.in (get_default_user_support_dir): do not play tricks diff --git a/src/support/path.C b/src/support/path.C index b7db0a299a..71ab4b6b87 100644 --- a/src/support/path.C +++ b/src/support/path.C @@ -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; }