mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-19 14:30:32 +00:00
Small bugfixes and some sun CC 5.0 portability tweaks (see ChangeLog)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@388 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
681f7f3107
commit
56368d8c03
30
ChangeLog
30
ChangeLog
@ -1,3 +1,33 @@
|
||||
1999-12-20 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* src/mathed/math_draw.C (Draw, Metrics): fix a bug where a prime
|
||||
and a subscript would give bad display (patch from Dekel Tsur
|
||||
<dekel@math.tau.ac.il>).
|
||||
|
||||
* src/insets/insetlatexaccent.h: make sure ACCENT_TYPES is public.
|
||||
|
||||
* src/spellchecker.C (create_ispell_pipe): use a const_cast to
|
||||
please sun CC.
|
||||
|
||||
* src/chset.h: add a few 'using' directives
|
||||
|
||||
* src/lyxfunc.C (Dispatch): check that LFUN_UNKNOWN_ACTION is not
|
||||
triggered when no buffer is active
|
||||
|
||||
* src/layout.C: removed `break' after `return' in switch(), since
|
||||
it is unreachable.
|
||||
|
||||
* src/lyx_main.C (init): make sure LyX can be ran in place even
|
||||
when libtool has done its magic with shared libraries. Fix the
|
||||
test for the case when the system directory has not been found.
|
||||
|
||||
* src/lyx_cb.C (MenuMakeLaTeX): make sure to keep the full path
|
||||
name for the latex file.
|
||||
(MenuMakeHTML): ditto
|
||||
|
||||
* src/buffer.h: add an optional boolean argument, which is passed
|
||||
to ChangeExtension.
|
||||
|
||||
1999-12-20 Allan Rae <rae@lyx.org>
|
||||
|
||||
* lib/templates/IEEEtran.lyx: small correction and update.
|
||||
|
416
po/lyx.pot
416
po/lyx.pot
File diff suppressed because it is too large
Load Diff
@ -236,8 +236,10 @@ public:
|
||||
string const & fileName() const { return filename; }
|
||||
|
||||
/// A transformed version of the file name, adequate for LaTeX
|
||||
string getLatexName() const {
|
||||
return ChangeExtension(MakeLatexName(filename), ".tex", true);
|
||||
/* The path is stripped if no_path is true (default) */
|
||||
string getLatexName(bool no_path = true) const {
|
||||
return ChangeExtension(MakeLatexName(filename),
|
||||
".tex", no_path);
|
||||
}
|
||||
|
||||
/// Change name of buffer. Updates "read-only" flag.
|
||||
|
@ -7,6 +7,12 @@
|
||||
#endif
|
||||
|
||||
#include <map>
|
||||
using std::map;
|
||||
|
||||
#include <utility>
|
||||
using std::pair;
|
||||
using std::make_pair; // may also be put in chset.C
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
using std::map;
|
||||
|
@ -72,7 +72,6 @@ public:
|
||||
Inset::Code LyxCode()const;
|
||||
///
|
||||
inline bool CanDisplay();
|
||||
private:
|
||||
/// all the accent types
|
||||
enum ACCENT_TYPES{
|
||||
///
|
||||
@ -118,7 +117,7 @@ private:
|
||||
///
|
||||
LSLASH
|
||||
};
|
||||
|
||||
private:
|
||||
friend ostream & operator<<(ostream &, ACCENT_TYPES);
|
||||
/// Check if we know the modifier and can display it ok on screen.
|
||||
void checkContents();
|
||||
|
14
src/layout.C
14
src/layout.C
@ -408,7 +408,7 @@ void LyXLayout::readAlign(LyXLex & lexrc)
|
||||
switch (le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
lexrc.printError("Unknown alignment `$$Token'");
|
||||
return; break;
|
||||
return;
|
||||
default: break;
|
||||
};
|
||||
switch(static_cast<AlignTags>(le)) {
|
||||
@ -515,7 +515,7 @@ void LyXLayout::readLabelType(LyXLex & lexrc)
|
||||
switch (le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
lexrc.printError("Unknown labeltype tag `$$Token'");
|
||||
return; break;
|
||||
return;
|
||||
default: break;
|
||||
}
|
||||
switch (static_cast<LabelTypeTags>(le)) {
|
||||
@ -599,7 +599,7 @@ void LyXLayout::readMargin(LyXLex & lexrc)
|
||||
switch(le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
lexrc.printError("Unknown margin type tag `$$Token'");
|
||||
return; break;
|
||||
return;
|
||||
default: break;
|
||||
}
|
||||
switch(static_cast<MarginTags>(le)) {
|
||||
@ -647,7 +647,7 @@ void LyXLayout::readLatexType(LyXLex & lexrc)
|
||||
switch (le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
lexrc.printError("Unknown latextype tag `$$Token'");
|
||||
return; break;
|
||||
return;
|
||||
default: break;
|
||||
}
|
||||
switch (static_cast<LatexTypeTags>(le)) {
|
||||
@ -693,7 +693,7 @@ void LyXLayout::readSpacing(LyXLex & lexrc)
|
||||
switch(le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
lexrc.printError("Unknown spacing token `$$Token'");
|
||||
return; break;
|
||||
return;
|
||||
default: break;
|
||||
}
|
||||
switch(static_cast<SpacingTags>(le)) {
|
||||
@ -995,7 +995,7 @@ void LyXTextClass::readOutputType(LyXLex & lexrc)
|
||||
switch(le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
lexrc.printError("Unknown output type `$$Token'");
|
||||
return; break;
|
||||
return;
|
||||
default: break;
|
||||
}
|
||||
switch(static_cast<OutputTypeTags>(le)) {
|
||||
@ -1050,7 +1050,7 @@ void LyXTextClass::readMaxCounter(LyXLex & lexrc)
|
||||
switch(le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
lexrc.printError("Unknown MaxCounter tag `$$Token'");
|
||||
return; break;
|
||||
return;
|
||||
default: break;
|
||||
}
|
||||
switch (static_cast<MaxCounterTags>(le)) {
|
||||
|
@ -822,7 +822,7 @@ void MenuMakeLaTeX(Buffer * buffer)
|
||||
return;
|
||||
|
||||
// Get LaTeX-Filename
|
||||
string s = buffer->getLatexName();
|
||||
string s = buffer->getLatexName(false);
|
||||
|
||||
FileInfo fi(s);
|
||||
if (fi.readable() &&
|
||||
@ -968,7 +968,7 @@ void MenuMakeHTML(Buffer * buffer)
|
||||
// latex, but the html file name can be
|
||||
// anything.
|
||||
string result = ChangeExtension(file, ".html", false);
|
||||
string infile = buffer->getLatexName();
|
||||
string infile = buffer->getLatexName(false);
|
||||
string tmp = lyxrc->html_command;
|
||||
tmp = subst(tmp, "$$FName", infile);
|
||||
tmp = subst(tmp, "$$OutName", result);
|
||||
|
@ -160,19 +160,25 @@ void LyX::init(int */*argc*/, char **argv)
|
||||
string binpath = subst(argv[0], '\\', '/');
|
||||
string binname = OnlyFilename(argv[0]);
|
||||
// Sorry for system specific code. (SMiyata)
|
||||
if (suffixIs(binname, ".exe")) binname.erase(binname.length()-4, string::npos);
|
||||
if (suffixIs(binname, ".exe"))
|
||||
binname.erase(binname.length()-4, string::npos);
|
||||
|
||||
binpath = ExpandPath(binpath); // This expands ./ and ~/
|
||||
|
||||
if (!AbsolutePath(binpath)) {
|
||||
string binsearchpath = GetEnvPath("PATH");
|
||||
binsearchpath += ";."; // This will make "src/lyx" work always :-)
|
||||
// This will make "src/lyx" work always :-)
|
||||
binsearchpath += ";.";
|
||||
binpath = FileOpenSearch(binsearchpath, argv[0]);
|
||||
}
|
||||
|
||||
fullbinpath = binpath;
|
||||
binpath = MakeAbsPath(OnlyPath(binpath));
|
||||
|
||||
// In case we are running in place and compiled with shared libraries
|
||||
if (suffixIs(binpath, "/.libs/"))
|
||||
binpath.erase(binpath.length()-6, string::npos);
|
||||
|
||||
if (binpath.empty()) {
|
||||
lyxerr << _("Warning: could not determine path of binary.")
|
||||
<< "\n"
|
||||
@ -275,7 +281,7 @@ void LyX::init(int */*argc*/, char **argv)
|
||||
}
|
||||
|
||||
// Warn the user if we couldn't find "chkconfig.ltx"
|
||||
if (system_lyxdir.empty()) {
|
||||
if (system_lyxdir == "./") {
|
||||
lyxerr <<_("LyX Warning! Couldn't determine system directory.")
|
||||
<<_("Try the '-sysdir' command line parameter or")
|
||||
<<_("set the environment variable LYX_DIR_11x to the "
|
||||
|
@ -2368,6 +2368,12 @@ string LyXFunc::Dispatch(int ac,
|
||||
|
||||
case LFUN_UNKNOWN_ACTION:
|
||||
{
|
||||
if(!owner->buffer()) {
|
||||
LyXBell();
|
||||
setErrorMessage(N_("No document open"));
|
||||
break;
|
||||
}
|
||||
|
||||
if (owner->buffer()->isReadonly()) {
|
||||
LyXBell();
|
||||
setErrorMessage(N_("Document is read only"));
|
||||
|
@ -77,7 +77,7 @@ MathParInset::Draw(int x, int y)
|
||||
if (cx >= ' ') {
|
||||
byte *s = data.GetString(ls);
|
||||
drawStr(data.FCode(), size, x, y, s, ls);
|
||||
mathed_char_height(data.FCode(), size, s[ls-1], asc, des);
|
||||
mathed_char_height(LM_TC_CONST, size, 'y', asc, des);
|
||||
limits = false;
|
||||
} else {
|
||||
if (cx == 0) break;
|
||||
@ -168,6 +168,7 @@ MathParInset::Metrics()
|
||||
if (asc > ascent) ascent = asc;
|
||||
if (des > descent) descent = des;
|
||||
limits = false;
|
||||
mathed_char_height(LM_TC_CONST, size, 'y', asc, des);
|
||||
} else
|
||||
if (MathIsInset(cx)) {
|
||||
MathedInset *p = data.GetInset();
|
||||
|
@ -337,7 +337,7 @@ void create_ispell_pipe(string const & lang)
|
||||
|
||||
argv[argc++] = 0;
|
||||
|
||||
execvp("ispell", static_cast<char * const *>(argv));
|
||||
execvp("ispell", const_cast<char * const *>(argv));
|
||||
|
||||
// free the memory used by string::copy in the
|
||||
// setup of argv
|
||||
|
Loading…
Reference in New Issue
Block a user