mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-04 16:42:57 +00:00
A few tweaks needed by cxx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1020 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
45a03f4f67
commit
160dc67127
22
ChangeLog
22
ChangeLog
@ -1,3 +1,25 @@
|
|||||||
|
2000-09-15 Angus Leeming <a.leeming@ic.ac.uk>
|
||||||
|
|
||||||
|
* src/frontends/kde/FormCitation.h: added some using directives.
|
||||||
|
|
||||||
|
* src/frontends/kde/FormToc.h: corrected definition of doTree.
|
||||||
|
|
||||||
|
* src/frontends/kde/GUIRunTime.C (initApplication): use lyxerr not
|
||||||
|
cerr.
|
||||||
|
|
||||||
|
* src/mathed/math_defs.h: redefine SetAlign to use string rather
|
||||||
|
than char *.
|
||||||
|
|
||||||
|
2000-09-15 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
|
* src/buffer.C (pop_tag): revert for the second time a change by
|
||||||
|
Lars, who seems to really hate having non-local loop variables :)
|
||||||
|
|
||||||
|
* src/Lsstream.h: add "using" statements.
|
||||||
|
|
||||||
|
* src/support/copy.C (copy): add a bunch of std:: qualifiers
|
||||||
|
* src/buffer.C (writeFile): ditto
|
||||||
|
|
||||||
2000-09-14 Lars Gullik Bjønnes <larsbj@lyx.org>
|
2000-09-14 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||||
|
|
||||||
* src/buffer.C (writeFile): try to fix the locale modified format
|
* src/buffer.C (writeFile): try to fix the locale modified format
|
||||||
|
@ -119,6 +119,7 @@ src/mathed/formulamacro.C
|
|||||||
src/mathed/math_forms.C
|
src/mathed/math_forms.C
|
||||||
src/mathed/math_panel.C
|
src/mathed/math_panel.C
|
||||||
src/MenuBackend.C
|
src/MenuBackend.C
|
||||||
|
src/menus.C
|
||||||
src/minibuffer.C
|
src/minibuffer.C
|
||||||
src/PaperLayout.C
|
src/PaperLayout.C
|
||||||
src/paragraph.C
|
src/paragraph.C
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
#ifdef HAVE_SSTREAM
|
#ifdef HAVE_SSTREAM
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
using std::istringstream;
|
||||||
|
using std::ostringstream;
|
||||||
#else
|
#else
|
||||||
#include "support/sstream.h"
|
#include "support/sstream.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -453,7 +453,7 @@ void LyXView::updateWindowTitle()
|
|||||||
if (view()->available()) {
|
if (view()->available()) {
|
||||||
string cur_title = buffer()->fileName();
|
string cur_title = buffer()->fileName();
|
||||||
if (!cur_title.empty()){
|
if (!cur_title.empty()){
|
||||||
title += ": " + OnlyFilename(cur_title);
|
title += ": " + MakeDisplayPath(cur_title);
|
||||||
if (!buffer()->isLyxClean())
|
if (!buffer()->isLyxClean())
|
||||||
title += _(" (Changed)");
|
title += _(" (Changed)");
|
||||||
if (buffer()->isReadonly())
|
if (buffer()->isReadonly())
|
||||||
|
14
src/buffer.C
14
src/buffer.C
@ -1268,7 +1268,7 @@ bool Buffer::writeFile(string const & fname, bool flag) const
|
|||||||
|
|
||||||
#ifdef HAVE_LOCALE
|
#ifdef HAVE_LOCALE
|
||||||
// Use the standard "C" locale for file output.
|
// Use the standard "C" locale for file output.
|
||||||
ofs.imbue(locale::classic());
|
ofs.imbue(std::locale::classic());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The top of the file should not be written by params.
|
// The top of the file should not be written by params.
|
||||||
@ -2662,16 +2662,22 @@ void Buffer::push_tag(ostream & os, string const & tag,
|
|||||||
void Buffer::pop_tag(ostream & os, string const & tag,
|
void Buffer::pop_tag(ostream & os, string const & tag,
|
||||||
int & pos, char stack[5][3])
|
int & pos, char stack[5][3])
|
||||||
{
|
{
|
||||||
|
#ifdef WITH_WARNINGS
|
||||||
#warning Use a real stack! (Lgb)
|
#warning Use a real stack! (Lgb)
|
||||||
|
#endif
|
||||||
|
// Please, Lars, do not remove the global variable. I already
|
||||||
|
// had to reintroduce it twice! (JMarc)
|
||||||
|
int j;
|
||||||
|
|
||||||
// pop all tags till specified one
|
// pop all tags till specified one
|
||||||
for (int j = pos; (j >= 0) && (strcmp(stack[j], tag.c_str())); --j)
|
for (j = pos; (j >= 0) && (strcmp(stack[j], tag.c_str())); --j)
|
||||||
os << "</" << stack[j] << ">";
|
os << "</" << stack[j] << ">";
|
||||||
|
|
||||||
// closes the tag
|
// closes the tag
|
||||||
os << "</" << tag << ">";
|
os << "</" << tag << ">";
|
||||||
|
|
||||||
// push all tags, but the specified one
|
// push all tags, but the specified one
|
||||||
for (int j = j + 1; j <= pos; ++j) {
|
for (j = j + 1; j <= pos; ++j) {
|
||||||
os << "<" << stack[j] << ">";
|
os << "<" << stack[j] << ">";
|
||||||
strcpy(stack[j-1], stack[j]);
|
strcpy(stack[j-1], stack[j]);
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ private:
|
|||||||
Connection ih_;
|
Connection ih_;
|
||||||
|
|
||||||
/// available citation keys
|
/// available citation keys
|
||||||
std::vector<pair<string, string> > keys;
|
std::vector<std::pair<string, string> > keys;
|
||||||
/// chosen citation keys
|
/// chosen citation keys
|
||||||
std::vector<string> chosenkeys;
|
std::vector<string> chosenkeys;
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ private:
|
|||||||
void showTOC(InsetCommand * const);
|
void showTOC(InsetCommand * const);
|
||||||
|
|
||||||
/// hierarchical tree
|
/// hierarchical tree
|
||||||
int FormToc::doTree(vector < Buffer::TocItem>::const_iterator & , int, int, int);
|
int doTree(vector < Buffer::TocItem>::const_iterator & , int, int, int);
|
||||||
/// update the Toc
|
/// update the Toc
|
||||||
void updateToc(void);
|
void updateToc(void);
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ int GUIRunTime::initApplication(int argc, char * argv[])
|
|||||||
// }
|
// }
|
||||||
int xforms_lib_version = fl_library_version(0, 0);
|
int xforms_lib_version = fl_library_version(0, 0);
|
||||||
if (xforms_include_version != xforms_lib_version) {
|
if (xforms_include_version != xforms_lib_version) {
|
||||||
cerr << "You are either running LyX with wrong "
|
lyxerr << "You are either running LyX with wrong "
|
||||||
"version of a dynamic XForms library\n"
|
"version of a dynamic XForms library\n"
|
||||||
"or you have build LyX with conflicting header "
|
"or you have build LyX with conflicting header "
|
||||||
"and library (different\n"
|
"and library (different\n"
|
||||||
|
@ -490,7 +490,7 @@ class MathMatrixInset: public MathParInset {
|
|||||||
///
|
///
|
||||||
void SetData(LyxArrayBase *);
|
void SetData(LyxArrayBase *);
|
||||||
///
|
///
|
||||||
void SetAlign(char, char const *);
|
void SetAlign(char, string const &);
|
||||||
///
|
///
|
||||||
char * GetAlign(char * vv) {
|
char * GetAlign(char * vv) {
|
||||||
*vv = v_align;
|
*vv = v_align;
|
||||||
|
@ -373,10 +373,10 @@ MathedInset * MathMatrixInset::Clone()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathMatrixInset::SetAlign(char vv, char const * hh)
|
void MathMatrixInset::SetAlign(char vv, string const & hh)
|
||||||
{
|
{
|
||||||
v_align = vv;
|
v_align = vv;
|
||||||
strncpy(h_align, hh, nc);
|
strncpy(h_align, hh.c_str(), nc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,9 +16,9 @@ bool lyx::copy(string const & from, string const & to)
|
|||||||
return Systemcalls().startscript(Systemcalls::System,
|
return Systemcalls().startscript(Systemcalls::System,
|
||||||
command) == 0;
|
command) == 0;
|
||||||
#else
|
#else
|
||||||
ifstream ifs(from.c_str());
|
std::ifstream ifs(from.c_str());
|
||||||
if (!ifs) return false;
|
if (!ifs) return false;
|
||||||
ofstream ofs(to.c_str(), ios::out|ios::trunc);
|
std::ofstream ofs(to.c_str(), std::ios::out|std::ios::trunc);
|
||||||
if (!ofs) return false;
|
if (!ofs) return false;
|
||||||
ofs << ifs.rdbuf();
|
ofs << ifs.rdbuf();
|
||||||
if (ofs.good()) return true;
|
if (ofs.good()) return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user