Trivial fixes to some warnings thrown up by MSVS.Net 2003.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10585 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2005-11-02 20:11:36 +00:00
parent b954c5ddf8
commit d9f29afe1c
11 changed files with 39 additions and 16 deletions

View 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;

View 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)

View 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

View 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;
@ -145,8 +143,9 @@ string const browseDir(string const & pathname,
vector<string> const getLatexUnits()
{
vector<string> units;
char const * str;
for (int i = 0; (str = stringFromUnit(i)); ++i)
int i = 0;
char const * str = stringFromUnit(i);
for (; str != 0; ++i, str = stringFromUnit(i))
units.push_back(str);
return units;

View 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

View 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);

View 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))
);

View 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

View 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);

View 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

View 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;
}