mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
some using changes small changes in lyxfont and some other things, read the Changelog
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@632 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6265fd5bdf
commit
85798535a1
20
ChangeLog
20
ChangeLog
@ -1,3 +1,23 @@
|
||||
2000-03-24 Dekel Tsur <dekel@math.tau.ac.il>
|
||||
|
||||
* src/paragraph.C (AutoDeleteInsets) Fixed a bug (wrong positions
|
||||
were erased)
|
||||
|
||||
2000-03-22 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
* src/main.C: added a runtime check that verifies that the xforms
|
||||
header used when building LyX and the library used when running
|
||||
LyX match. Exit with a message if they don't match. This is a
|
||||
version number check only.
|
||||
|
||||
* src/buffer.C (save): Don't allocate memory on the heap for
|
||||
struct utimbuf times.
|
||||
|
||||
* *: some using changes, use iosfwd instead of the real headers.
|
||||
|
||||
* src/lyxfont.C use char const * instead of string for the static
|
||||
strings. Rewrite some functions to use sstream.
|
||||
|
||||
2000-03-28 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* src/text.C (Backspace): hopefully fix the dreaded backaspace
|
||||
|
@ -16,10 +16,6 @@ there are three major tasks to be done:
|
||||
a lot, it could be per-view. However all the special
|
||||
code in it needs to be (re)moved. Also a lot of the
|
||||
functionality needs to be relocated.
|
||||
o Switch to LaTeX as fileformat
|
||||
Will ease move from latex to LyX a lot.
|
||||
Also will let people work both in (ex) emacs
|
||||
and LyX on the same files.
|
||||
o GUI independence.
|
||||
Should be a compile time switch what gui (toolkit)
|
||||
you wish to use. We are going to support Xforms first,
|
||||
@ -79,9 +75,6 @@ Some other things related to structure and services in the code:
|
||||
the processes can take place.
|
||||
o pass an inforeceiver around in the object structure.
|
||||
(this instead of passing minibuffers, and lyxerrors.)
|
||||
o remove code that is never used, or close to never used.
|
||||
Support for reverse video, fast selection and mono
|
||||
video comes to mind.
|
||||
|
||||
================
|
||||
|
||||
@ -135,8 +128,26 @@ to make it into 0.14:
|
||||
o the "LyX-Code" environment should be removed. Add a verbatim
|
||||
environment instead.
|
||||
o tabbing support
|
||||
This would be a special inset that is line based (no
|
||||
breaking of lines), where tabstops can be set and used.
|
||||
|
||||
o picture support
|
||||
A special insets with some basic drawing
|
||||
capabilities.
|
||||
|
||||
o better graphics support
|
||||
I have begun doing something about this. There are
|
||||
several things here that need to be dont. We have alreay
|
||||
decided to use graphicx.sty instead of graphics.sty. This
|
||||
makes several things easier. There is also some work in
|
||||
progress to separate the inset and the creation of the Xpm
|
||||
(Ximages) completely. I imagin this as the InsetGraphics
|
||||
asking a GraphicsCache for a graphics with certain
|
||||
parameters set and get a handle to the finished
|
||||
transformation of the graphics. Hopefully this should make
|
||||
it quite easy for LyX to support several/many graphics
|
||||
formats, both on screen and on hard copy.
|
||||
|
||||
o rotating and scaling of text
|
||||
o PSTricks (we should be able to support some of this package)
|
||||
o better reference support
|
||||
@ -204,6 +215,7 @@ to make it into 0.14:
|
||||
- make it indepentent of the GUI
|
||||
- prob: concurrency (locks)
|
||||
o other packages to support:
|
||||
- listings.sty
|
||||
- keyval (we should not use it directly, but know how
|
||||
to parse options for it.)
|
||||
- here.sty
|
||||
|
@ -12,10 +12,11 @@
|
||||
#define BACK_STACK_H
|
||||
|
||||
#include <stack>
|
||||
using std::stack;
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
using std::stack;
|
||||
|
||||
// Created by Alejandro Aguilar Sierra, 970806
|
||||
|
||||
/** Utility to get back from a reference or from a child document.
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <algorithm>
|
||||
using std::for_each;
|
||||
|
||||
#include <cstdlib>
|
||||
#include <csignal>
|
||||
@ -49,7 +48,9 @@ using std::for_each;
|
||||
#include "lyxrow.h"
|
||||
#include "WorkArea.h"
|
||||
|
||||
using std::for_each;
|
||||
using std::find_if;
|
||||
using std::endl;
|
||||
|
||||
extern BufferList bufferlist;
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
|
||||
extern BufferList bufferlist;
|
||||
|
||||
using std::endl;
|
||||
using std::ifstream;
|
||||
|
||||
// Inserts a file into current document
|
||||
|
@ -21,9 +21,11 @@
|
||||
#include "support/lyxlib.h"
|
||||
#include "support/filetools.h"
|
||||
#include <fstream>
|
||||
|
||||
using std::make_pair;
|
||||
using std::ofstream;
|
||||
using std::ifstream;
|
||||
using std::endl;
|
||||
|
||||
void DepTable::insert(string const & fi,
|
||||
bool upd,
|
||||
|
@ -17,13 +17,14 @@
|
||||
|
||||
#include "LString.h"
|
||||
#include <map>
|
||||
using std::map;
|
||||
using std::pair;
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
using std::map;
|
||||
using std::pair;
|
||||
|
||||
///
|
||||
class DepTable {
|
||||
public:
|
||||
@ -53,7 +54,8 @@ public:
|
||||
void remove_files_with_extension(string const &);
|
||||
private:
|
||||
///
|
||||
typedef map<string, pair<unsigned long, unsigned long> > DepList;
|
||||
typedef map<string,
|
||||
pair<unsigned long, unsigned long> > DepList;
|
||||
///
|
||||
DepList deplist;
|
||||
};
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "lyxrc.h" // lyxrc.use_scalable_fonts
|
||||
#include "support/lstrings.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
/// Load font close to this size
|
||||
string FontInfo::getFontname(int size)
|
||||
|
@ -26,6 +26,8 @@
|
||||
#include "LyXView.h"
|
||||
#include "minibuffer.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
extern BufferView * current_view;
|
||||
|
||||
// Initialize font loader
|
||||
|
@ -16,11 +16,11 @@
|
||||
#endif
|
||||
|
||||
#include <map>
|
||||
using std::map;
|
||||
using std::less;
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
using std::map;
|
||||
|
||||
/**
|
||||
This is a stateless class.
|
||||
|
||||
@ -196,7 +196,8 @@ private:
|
||||
string const & lyx);
|
||||
|
||||
///
|
||||
typedef map<LColor::color, information, less<LColor::color> > InfoTab;
|
||||
//typedef map<LColor::color, information, less<LColor::color> > InfoTab;
|
||||
typedef map<LColor::color, information> InfoTab;
|
||||
|
||||
InfoTab infotab;
|
||||
};
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "gettext.h"
|
||||
|
||||
using std::ifstream;
|
||||
using std::endl;
|
||||
|
||||
// TODO: in no particular order
|
||||
// - get rid of the extern BufferList and the call to
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "LString.h"
|
||||
#include "DepTable.h"
|
||||
#include <vector>
|
||||
|
||||
using std::vector;
|
||||
|
||||
class MiniBuffer;
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "bufferparams.h"
|
||||
#include "layout.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
LaTeXFeatures::LaTeXFeatures(int n)
|
||||
: layout(n, false)
|
||||
|
@ -19,11 +19,12 @@
|
||||
|
||||
#include <vector>
|
||||
#include <set>
|
||||
using std::vector;
|
||||
using std::set;
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
using std::vector;
|
||||
using std::set;
|
||||
|
||||
class BufferParams;
|
||||
class LyXTextClass;
|
||||
struct Language;
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "gettext.h"
|
||||
|
||||
using std::ifstream;
|
||||
using std::endl;
|
||||
|
||||
extern BufferList bufferlist;
|
||||
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include "gettext.h"
|
||||
#include "support/lstrings.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
/*
|
||||
NAMING RULES FOR USER-COMMANDS
|
||||
Here's the set of rules to apply when a new command name is introduced:
|
||||
|
@ -7,12 +7,12 @@
|
||||
#endif
|
||||
|
||||
#include <map>
|
||||
using std::map;
|
||||
using std::less;
|
||||
|
||||
#include "commandtags.h"
|
||||
#include "LString.h"
|
||||
|
||||
using std::map;
|
||||
|
||||
/** This class encapsulates LyX action and user command operations.
|
||||
*/
|
||||
class LyXAction {
|
||||
@ -31,15 +31,20 @@ private:
|
||||
};
|
||||
public:
|
||||
///
|
||||
typedef map<string, kb_action, less<string> > func_map;
|
||||
typedef map<string, kb_action> func_map;
|
||||
//typedef map<string, kb_action, less<string> > func_map;
|
||||
///
|
||||
typedef map<kb_action, func_info, less<kb_action> > info_map;
|
||||
typedef map<kb_action, func_info> info_map;
|
||||
//typedef map<kb_action, func_info, less<kb_action> > info_map;
|
||||
///
|
||||
typedef map<unsigned int, pseudo_func, less<unsigned int> > pseudo_map;
|
||||
typedef map<unsigned int, pseudo_func> pseudo_map;
|
||||
//typedef map<unsigned int, pseudo_func, less<unsigned int> > pseudo_map;
|
||||
///
|
||||
typedef map<string, unsigned int, less<string> > arg_item;
|
||||
typedef map<string, unsigned int> arg_item;
|
||||
//typedef map<string, unsigned int, less<string> > arg_item;
|
||||
///
|
||||
typedef map<kb_action, arg_item, less<kb_action> > arg_map;
|
||||
typedef map<kb_action, arg_item> arg_map;
|
||||
//typedef map<kb_action, arg_item, less<kb_action> > arg_map;
|
||||
|
||||
///
|
||||
enum func_attrib {
|
||||
|
@ -33,6 +33,8 @@
|
||||
#include "layout.h"
|
||||
#include "lyxtext.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
extern FD_form_document * fd_form_document;
|
||||
|
||||
extern void AutoSave();
|
||||
|
@ -29,6 +29,8 @@
|
||||
#include "support/lstrings.h"
|
||||
#include "WorkArea.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
Painter::Painter(WorkArea & wa)
|
||||
: PainterBase(wa)
|
||||
{
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "PainterBase.h"
|
||||
#include "LColor.h"
|
||||
|
||||
//using std::less;
|
||||
using std::map;
|
||||
|
||||
class LyXFont;
|
||||
class WorkArea;
|
||||
@ -131,7 +131,8 @@ protected:
|
||||
/// Caching of ordinary color GCs
|
||||
GC colorGCcache[LColor::ignore + 1];
|
||||
/// Caching of GCs used for lines
|
||||
typedef map<int, GC, less<int> > LineGCCache;
|
||||
//typedef map<int, GC, less<int> > LineGCCache;
|
||||
typedef map<int, GC> LineGCCache;
|
||||
///
|
||||
LineGCCache lineGCcache;
|
||||
};
|
||||
|
@ -1,6 +1,15 @@
|
||||
#include <config.h>
|
||||
|
||||
|
||||
#ifdef HAVE_SSTREAM
|
||||
#include <sstream>
|
||||
using std::istringstream;
|
||||
#else
|
||||
#include <strstream>
|
||||
#endif
|
||||
|
||||
#include "Spacing.h"
|
||||
|
||||
using std::ios;
|
||||
|
||||
/// how can I put this inside of Spacing (class)
|
||||
@ -8,6 +17,45 @@ static
|
||||
char const * spacing_string[] = {"single", "onehalf", "double", "other"};
|
||||
|
||||
|
||||
float Spacing::getValue() const
|
||||
{
|
||||
switch(space) {
|
||||
case Single: return 1.0;
|
||||
case Onehalf: return 1.25;
|
||||
case Double: return 1.667;
|
||||
case Other: return value;
|
||||
}
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
|
||||
void Spacing::set(Spacing::Space sp, float val)
|
||||
{
|
||||
space = sp;
|
||||
if (sp == Other) {
|
||||
switch(int(val * 1000 + 0.5)) {
|
||||
case 1000: space = Single; break;
|
||||
case 1250: space = Onehalf; break;
|
||||
case 1667: space = Double; break;
|
||||
default: value = val; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Spacing::set(Spacing::Space sp, char const * val)
|
||||
{
|
||||
float fval;
|
||||
#ifdef HAVE_SSTREAM
|
||||
istringstream istr(val);
|
||||
#else
|
||||
istrstream istr(val);
|
||||
#endif
|
||||
istr >> fval;
|
||||
set(sp, fval);
|
||||
}
|
||||
|
||||
|
||||
void Spacing::writeFile(ostream & os) const
|
||||
{
|
||||
if (getSpace() == Spacing::Other) {
|
||||
|
@ -12,14 +12,9 @@
|
||||
#ifndef SPACING_H
|
||||
#define SPACING_H
|
||||
|
||||
#ifdef HAVE_SSTREAM
|
||||
#include <sstream>
|
||||
using std::istringstream;
|
||||
#else
|
||||
#include <strstream>
|
||||
#endif
|
||||
#include <iosfwd>
|
||||
|
||||
#include "support/LOstream.h"
|
||||
using std::ostream;
|
||||
|
||||
///
|
||||
class Spacing {
|
||||
@ -41,42 +36,13 @@ public:
|
||||
value = getValue();
|
||||
}
|
||||
///
|
||||
float getValue() const {
|
||||
switch(space) {
|
||||
case Single: return 1.0;
|
||||
case Onehalf: return 1.25;
|
||||
case Double: return 1.667;
|
||||
case Other: return value;
|
||||
}
|
||||
return 1.0;
|
||||
}
|
||||
float getValue() const;
|
||||
///
|
||||
Spacing::Space getSpace() const {
|
||||
return space;
|
||||
}
|
||||
Spacing::Space getSpace() const { return space; }
|
||||
///
|
||||
void set(Spacing::Space sp, float val = 1.0) {
|
||||
space = sp;
|
||||
if (sp == Other) {
|
||||
switch(int(val * 1000 + 0.5)) {
|
||||
case 1000: space = Single; break;
|
||||
case 1250: space = Onehalf; break;
|
||||
case 1667: space = Double; break;
|
||||
default: value = val; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
void set(Spacing::Space sp, float val = 1.0);
|
||||
///
|
||||
void set(Spacing::Space sp, char const * val) {
|
||||
float fval;
|
||||
#ifdef HAVE_SSTREAM
|
||||
istringstream istr(val);
|
||||
#else
|
||||
istrstream istr(val);
|
||||
#endif
|
||||
istr >> fval;
|
||||
set(sp, fval);
|
||||
}
|
||||
void set(Spacing::Space sp, char const * val) ;
|
||||
///
|
||||
void writeFile(ostream &) const;
|
||||
///
|
||||
@ -91,5 +57,4 @@ private:
|
||||
///
|
||||
float value;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -25,6 +25,7 @@
|
||||
using std::for_each;
|
||||
using std::remove_if;
|
||||
using std::find_if;
|
||||
using std::endl;
|
||||
|
||||
extern BufferList bufferlist;
|
||||
|
||||
|
@ -18,10 +18,14 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
#include "LString.h"
|
||||
#include "support/LOstream.h"
|
||||
#include "lyxtext.h"
|
||||
|
||||
using std::ostream;
|
||||
using std::vector;
|
||||
|
||||
class Buffer;
|
||||
|
||||
// This is only the very first implemetation and use of the TextCache,
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include "LyXAction.h"
|
||||
#include "toolbar.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
extern LyXAction lyxaction;
|
||||
|
||||
|
||||
|
@ -7,9 +7,10 @@
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
using std::vector;
|
||||
|
||||
class LyXLex;
|
||||
|
||||
using std::vector;
|
||||
|
||||
///
|
||||
class ToolbarDefaults {
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include "support/lstrings.h"
|
||||
#include "BufferView.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
FL_OBJECT * figinset_canvas;
|
||||
|
||||
// need to make the c++ compiler fint the correct version of abs.
|
||||
|
@ -17,11 +17,12 @@
|
||||
#endif
|
||||
|
||||
#include <utility>
|
||||
using std::pair;
|
||||
|
||||
#include FORMS_H_LOCATION
|
||||
#include "Painter.h"
|
||||
|
||||
using std::pair;
|
||||
|
||||
class BufferView;
|
||||
|
||||
class WorkArea {
|
||||
|
12
src/buffer.C
12
src/buffer.C
@ -92,6 +92,8 @@ using std::setw;
|
||||
#include "gettext.h"
|
||||
#include "language.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
// Uncomment this line to enable a workaround for the weird behaviour
|
||||
// of the cursor between a displayed inset and last character
|
||||
// at the upper line. (Alejandro 20.9.96)
|
||||
@ -1133,10 +1135,10 @@ bool Buffer::save() const
|
||||
FileInfo finfo(fileName());
|
||||
if (finfo.exist()) {
|
||||
mode_t fmode = finfo.getMode();
|
||||
struct utimbuf * times = new struct utimbuf;
|
||||
struct utimbuf times = {
|
||||
finfo.getAccessTime(),
|
||||
finfo.getModificationTime() };
|
||||
|
||||
times->actime = finfo.getAccessTime();
|
||||
times->modtime = finfo.getModificationTime();
|
||||
ifstream ifs(fileName().c_str());
|
||||
ofstream ofs(s.c_str(), ios::out|ios::trunc);
|
||||
if (ifs && ofs) {
|
||||
@ -1145,14 +1147,13 @@ bool Buffer::save() const
|
||||
ofs.close();
|
||||
::chmod(s.c_str(), fmode);
|
||||
|
||||
if (::utime(s.c_str(), times)) {
|
||||
if (::utime(s.c_str(), ×)) {
|
||||
lyxerr << "utime error." << endl;
|
||||
}
|
||||
} else {
|
||||
lyxerr << "LyX was not able to make "
|
||||
"backupcopy. Beware." << endl;
|
||||
}
|
||||
delete times;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2529,6 +2530,7 @@ void Buffer::push_tag(ostream & os, char const * tag,
|
||||
os << "<" << stack[i] << ">";
|
||||
}
|
||||
|
||||
|
||||
void Buffer::pop_tag(ostream & os, char const * tag,
|
||||
int & pos, char stack[5][3])
|
||||
{
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "support/filetools.h"
|
||||
#include "lyx_gui_misc.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
class LyXRC;
|
||||
class TeXErrors;
|
||||
|
@ -39,6 +39,7 @@
|
||||
extern BufferView * current_view; // called too many times in this file...
|
||||
|
||||
using std::find;
|
||||
using std::endl;
|
||||
|
||||
//
|
||||
// Class BufferStorage
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include "buffer.h"
|
||||
#include "debug.h"
|
||||
|
||||
using std::vector;
|
||||
|
||||
/** A class to hold all the buffers in a structure
|
||||
The point of this class is to hide from bufferlist what kind
|
||||
of structure the buffers are stored in. Should be no concern for
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "lyxrc.h"
|
||||
#include "language.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
BufferParams::BufferParams()
|
||||
{
|
||||
|
@ -25,6 +25,8 @@
|
||||
#include "layout.h"
|
||||
#include "support/block.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
/**
|
||||
This class contains all the parameters for this a buffer uses. Some
|
||||
work needs to be done on this class to make it nice. Now everything
|
||||
|
@ -5,7 +5,6 @@
|
||||
#endif
|
||||
|
||||
#include <fstream>
|
||||
using std::ifstream;
|
||||
|
||||
#include "chset.h"
|
||||
#include "support/filetools.h"
|
||||
@ -13,7 +12,9 @@ using std::ifstream;
|
||||
#include "support/LSubstring.h"
|
||||
#include "debug.h"
|
||||
|
||||
using std::ifstream;
|
||||
using std::make_pair;
|
||||
using std::endl;
|
||||
|
||||
bool CharacterSet::loadFile(string const & fname)
|
||||
{
|
||||
|
@ -9,11 +9,11 @@
|
||||
#include <map>
|
||||
#include <utility>
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
using std::map;
|
||||
using std::pair;
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
///
|
||||
class CharacterSet {
|
||||
public:
|
||||
|
@ -40,6 +40,8 @@
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
// These are C wrappers around static members of Combox, used as
|
||||
// callbacks for xforms.
|
||||
extern "C" void C_Combox_input_cb(FL_OBJECT *ob, long);
|
||||
|
@ -12,6 +12,8 @@
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
/** These are all the lyxfunctions (as enums).
|
||||
*/
|
||||
enum kb_action {
|
||||
|
@ -15,7 +15,9 @@
|
||||
#include "debug.h"
|
||||
|
||||
#include <iomanip>
|
||||
|
||||
using std::setw;
|
||||
using std::endl;
|
||||
|
||||
struct error_item {
|
||||
Debug::type level;
|
||||
|
@ -3,10 +3,13 @@
|
||||
#ifndef LYXDEBUG_H
|
||||
#define LYXDEBUG_H
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
#include "LString.h"
|
||||
#include "support/LOstream.h"
|
||||
#include "support/lstrings.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
/** Ideally this should have been a namespace, but since we try to be
|
||||
compilable on older C++ compilators too, we use a struct instead.
|
||||
This is all the different debug levels that we have.
|
||||
|
@ -24,7 +24,6 @@
|
||||
|
||||
using std::vector;
|
||||
|
||||
|
||||
/// LyXDirEntry internal structure definition
|
||||
class LyXDirEntry
|
||||
{
|
||||
|
@ -49,6 +49,7 @@ using std::list;
|
||||
using std::vector;
|
||||
using std::find;
|
||||
using std::flush;
|
||||
using std::endl;
|
||||
|
||||
#include "figinset.h"
|
||||
#include "lyx.h"
|
||||
@ -1141,7 +1142,8 @@ void InsetFig::Read(LyXLex & lex)
|
||||
}
|
||||
|
||||
|
||||
int InsetFig::Latex(ostream & os, signed char /* fragile*/, bool /* fs*/) const
|
||||
int InsetFig::Latex(ostream & os,
|
||||
signed char /* fragile*/, bool /* fs*/) const
|
||||
{
|
||||
Regenerate();
|
||||
if (!cmd.empty()) os << cmd << " ";
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "insets/lyxinset.h"
|
||||
/* the rest is figure stuff */
|
||||
|
||||
using std::ostream;
|
||||
|
||||
struct Figref;
|
||||
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include "support/lstrings.h"
|
||||
#include "Painter.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
/* Insets default methods */
|
||||
|
||||
bool Inset::Deletable() const
|
||||
|
@ -21,6 +21,8 @@ using std::ifstream;
|
||||
#include "lyxtext.h"
|
||||
#include "support/filetools.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
extern BufferView * current_view;
|
||||
|
||||
FD_citation_form * citation_form = 0;
|
||||
@ -319,7 +321,8 @@ string InsetBibtex::getScreenLabel() const
|
||||
}
|
||||
|
||||
|
||||
int InsetBibtex::Latex(ostream & os, signed char /*fragile*/, bool/*fs*/) const
|
||||
int InsetBibtex::Latex(ostream & os,
|
||||
signed char /*fragile*/, bool/*fs*/) const
|
||||
{
|
||||
// this looks like an horrible hack and it is :) The problem
|
||||
// is that owner is not initialized correctly when the bib
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#include "insetcommand.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
class Buffer;
|
||||
|
||||
/** Used to insert citations
|
||||
|
@ -18,6 +18,9 @@
|
||||
#include "debug.h"
|
||||
#include "Painter.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
|
||||
InsetCommand::InsetCommand()
|
||||
{
|
||||
}
|
||||
@ -32,7 +35,6 @@ InsetCommand::InsetCommand(string const & cmd, string const & arg,
|
||||
|
||||
int InsetCommand::ascent(Painter & pain, LyXFont const &) const
|
||||
{
|
||||
#if 1
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.decSize();
|
||||
|
||||
@ -48,17 +50,11 @@ int InsetCommand::ascent(Painter & pain, LyXFont const &) const
|
||||
false, width, ascent, descent);
|
||||
}
|
||||
return ascent;
|
||||
#else
|
||||
LyXFont f = font;
|
||||
f.decSize();
|
||||
return f.maxAscent() + 3;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int InsetCommand::descent(Painter & pain, LyXFont const &) const
|
||||
{
|
||||
#if 1
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.decSize();
|
||||
|
||||
@ -74,17 +70,11 @@ int InsetCommand::descent(Painter & pain, LyXFont const &) const
|
||||
false, width, ascent, descent);
|
||||
}
|
||||
return descent;
|
||||
#else
|
||||
LyXFont f = font;
|
||||
f.decSize();
|
||||
return f.maxDescent() + 3;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int InsetCommand::width(Painter & pain, LyXFont const &) const
|
||||
{
|
||||
#if 1
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.decSize();
|
||||
|
||||
@ -100,12 +90,6 @@ int InsetCommand::width(Painter & pain, LyXFont const &) const
|
||||
false, width, ascent, descent);
|
||||
}
|
||||
return width+4;
|
||||
#else
|
||||
LyXFont f = font;
|
||||
f.decSize();
|
||||
string s = getScreenLabel();
|
||||
return 10 + f.stringWidth(s);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -113,7 +97,6 @@ void InsetCommand::draw(Painter & pain, LyXFont const &,
|
||||
int baseline, float & x) const
|
||||
{
|
||||
// Draw it as a box with the LaTeX text
|
||||
#if 1
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.setColor(LColor::command).decSize();
|
||||
|
||||
@ -128,38 +111,7 @@ void InsetCommand::draw(Painter & pain, LyXFont const &,
|
||||
true, width);
|
||||
}
|
||||
|
||||
x += width + 4;
|
||||
#else
|
||||
|
||||
x += 3;
|
||||
|
||||
pain.fillRectangle(int(x), baseline - ascent(pain, font) + 1,
|
||||
width(pain, font) - 6,
|
||||
ascent(pain, font) + descent(pain, font) - 2,
|
||||
LColor::insetbg);
|
||||
// Tell whether this slows down the drawing (ale)
|
||||
// lets draw editable and non-editable insets differently
|
||||
if (Editable()) {
|
||||
int y = baseline - ascent(pain, font) + 1;
|
||||
int w = width(pain, font) - 6;
|
||||
int h = ascent(pain, font) + descent(pain, font) - 2;
|
||||
pain.rectangle(int(x), y, w, h, LColor::insetframe);
|
||||
} else {
|
||||
|
||||
pain.rectangle(int(x), baseline - ascent(pain, font) + 1,
|
||||
width(pain, font) - 6,
|
||||
ascent(pain, font) + descent(pain, font) - 2,
|
||||
LColor::insetframe);
|
||||
}
|
||||
string s = getScreenLabel();
|
||||
LyXFont f(font);
|
||||
f.decSize();
|
||||
f.setColor(LColor::none);
|
||||
f.setLatex(LyXFont::OFF);
|
||||
pain.text(int(x + 2), baseline, s, f);
|
||||
|
||||
x += width(pain, font) - 3;
|
||||
#endif
|
||||
x += width;
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include "lyxinset.h"
|
||||
#include "LString.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
// Created by Alejandro 970222
|
||||
/** Used to insert a LaTeX command automatically
|
||||
*
|
||||
|
@ -101,7 +101,8 @@ void InsetError::Read(LyXLex &)
|
||||
}
|
||||
|
||||
|
||||
int InsetError::Latex(ostream &, signed char /*fragile*/, bool /*fs*/) const
|
||||
int InsetError::Latex(ostream &,
|
||||
signed char /*fragile*/, bool /*fs*/) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include "LString.h"
|
||||
#include "gettext.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
/** Used for error messages from LaTeX runs.
|
||||
|
||||
The edit-operation opens a
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
#include "insetcollapsable.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
class Painter;
|
||||
|
||||
/** A colapsable text inset
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "insetcollapsable.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
class Painter;
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include "support/FileInfo.h"
|
||||
#include "support/filetools.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
extern string system_lyxdir;
|
||||
extern string user_lyxdir;
|
||||
extern string system_tempdir;
|
||||
@ -188,7 +190,8 @@ void InsetGraphics::Read(LyXLex & /*lex*/)
|
||||
}
|
||||
|
||||
|
||||
int InsetGraphics::Latex(ostream & os, signed char /*fragile*/, bool/*fs*/) const
|
||||
int InsetGraphics::Latex(ostream & os,
|
||||
signed char /*fragile*/, bool/*fs*/) const
|
||||
{
|
||||
// MISSING: We have to decide how to do the order of the options
|
||||
// that is depentant of order, like witdth, height, andlge. Should
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include "vspace.h"
|
||||
#include "insets/BoundingBox.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
struct FD_Graphics;
|
||||
|
||||
///
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include "layout.h"
|
||||
#include "lyxfunc.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
extern BufferView * current_view;
|
||||
|
||||
extern BufferList bufferlist;
|
||||
@ -315,7 +317,8 @@ bool InsetInclude::loadIfNeeded() const
|
||||
}
|
||||
|
||||
|
||||
int InsetInclude::Latex(ostream & os, signed char /*fragile*/, bool /*fs*/) const
|
||||
int InsetInclude::Latex(ostream & os,
|
||||
signed char /*fragile*/, bool /*fs*/) const
|
||||
{
|
||||
// Do nothing if no file name has been specified
|
||||
if (contents.empty())
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include "buffer.h"
|
||||
#include "support/filetools.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
struct LaTeXFeatures;
|
||||
|
||||
// Created by AAS 970521
|
||||
|
@ -25,6 +25,8 @@
|
||||
#include "support/lstrings.h"
|
||||
#include "Painter.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
/* Info, used for the Info boxes */
|
||||
|
||||
extern BufferView * current_view;
|
||||
@ -126,7 +128,8 @@ void InsetInfo::Read(LyXLex & lex)
|
||||
}
|
||||
|
||||
|
||||
int InsetInfo::Latex(ostream &, signed char /*fragile*/, bool /*free_spc*/) const
|
||||
int InsetInfo::Latex(ostream &,
|
||||
signed char /*fragile*/, bool /*free_spc*/) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include FORMS_H_LOCATION
|
||||
#include "LString.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
/** Info. Handles the note insets.
|
||||
|
||||
This class handles the note insets. The edit operation bringes up
|
||||
|
@ -43,7 +43,8 @@ string InsetLabel::getLabel(int) const
|
||||
}
|
||||
|
||||
|
||||
int InsetLabel::Latex(ostream & os, signed char /*fragile*/, bool /*fs*/) const
|
||||
int InsetLabel::Latex(ostream & os,
|
||||
signed char /*fragile*/, bool /*fs*/) const
|
||||
{
|
||||
os << escape(getCommand());
|
||||
return 0;
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include "insetcommand.h"
|
||||
#include "LString.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
///
|
||||
class InsetLabel : public InsetCommand {
|
||||
public:
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "support/lstrings.h"
|
||||
#include "Painter.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
/* LatexAccent. Proper handling of accented characters */
|
||||
/* This part is done by Ivan Schreter, schreter@ccsun.tuke.sk */
|
||||
@ -744,7 +745,8 @@ void InsetLatexAccent::Read(LyXLex & lex)
|
||||
}
|
||||
|
||||
|
||||
int InsetLatexAccent::Latex(ostream & os, signed char /*fragile*/, bool/*fs*/) const
|
||||
int InsetLatexAccent::Latex(ostream & os,
|
||||
signed char /*fragile*/, bool/*fs*/) const
|
||||
{
|
||||
os << contents;
|
||||
return 0;
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include "LString.h"
|
||||
#include "lyxlex.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
/** Insertion of accents
|
||||
|
||||
Proper handling of accented characters.
|
||||
|
@ -43,7 +43,8 @@ void InsetParent::Edit(BufferView * bv, int, int, unsigned int)
|
||||
|
||||
|
||||
// LaTeX must just ignore this command
|
||||
int InsetParent::Latex(ostream & os, signed char fragile, bool free_spc) const
|
||||
int InsetParent::Latex(ostream & os,
|
||||
signed char fragile, bool free_spc) const
|
||||
{
|
||||
os << "%%#{lyx}";
|
||||
InsetCommand::Latex(os, fragile, free_spc);
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include "insetcommand.h"
|
||||
#include "gettext.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
class Buffer;
|
||||
|
||||
/** Reference to the parent document.
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include "support/lstrings.h"
|
||||
#include "Painter.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
// Quotes. Used for the various quotes. German, English, French,
|
||||
// Danish, Polish, all either double or single.
|
||||
|
||||
@ -95,7 +97,6 @@ InsetQuotes::InsetQuotes(char c, BufferParams const & params)
|
||||
|
||||
void InsetQuotes::ParseString(string const & s)
|
||||
{
|
||||
int i;
|
||||
string str(s);
|
||||
if (str.length() != 3) {
|
||||
lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
|
||||
@ -103,6 +104,8 @@ void InsetQuotes::ParseString(string const & s)
|
||||
str = "eld";
|
||||
}
|
||||
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 6; ++i) {
|
||||
if (str[0] == language_char[i]) {
|
||||
language = InsetQuotes::quote_language(i);
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#include "lyxinset.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
class BufferParams;
|
||||
|
||||
struct LaTeXFeatures;
|
||||
|
@ -67,7 +67,8 @@ string InsetRef::getScreenLabel() const
|
||||
}
|
||||
|
||||
|
||||
int InsetRef::Latex(ostream & os, signed char /*fragile*/, bool /*fs*/) const
|
||||
int InsetRef::Latex(ostream & os,
|
||||
signed char /*fragile*/, bool /*fs*/) const
|
||||
{
|
||||
if(getOptions().empty())
|
||||
os << escape(getCommand());
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include "insetcommand.h"
|
||||
#include "buffer.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
struct LaTeXFeatures;
|
||||
|
||||
/** The reference inset
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include "lyxinset.h"
|
||||
#include "LString.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
struct LaTeXFeatures;
|
||||
|
||||
/// Used to insert special chars
|
||||
|
@ -23,6 +23,9 @@
|
||||
#include "LString.h"
|
||||
//#include "buffer.h"
|
||||
|
||||
using std::ostream;
|
||||
using std::vector;
|
||||
|
||||
class Painter;
|
||||
class BufferView;
|
||||
class Buffer;
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include "insetcommand.h"
|
||||
#include "gettext.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
class Buffer;
|
||||
|
||||
/** Used to insert table of contents
|
||||
|
@ -166,7 +166,8 @@ string InsetUrl::getScreenLabel() const
|
||||
}
|
||||
|
||||
|
||||
int InsetUrl::Latex(ostream & os, signed char fragile, bool /*free_spc*/) const
|
||||
int InsetUrl::Latex(ostream & os,
|
||||
signed char fragile, bool /*free_spc*/) const
|
||||
{
|
||||
if (!getOptions().empty())
|
||||
os << getOptions() + ' ';
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include "buffer.h"
|
||||
#include "form_url.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
struct LaTeXFeatures;
|
||||
|
||||
/** The url inset
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include "lyxfont.h"
|
||||
#include "lyxlex.h"
|
||||
|
||||
using std::ostream;
|
||||
|
||||
class Painter;
|
||||
class Buffer;
|
||||
class BufferView;
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "support/lstrings.h"
|
||||
#include "language.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
// a wrapper around the callback static member.
|
||||
extern "C" void C_Intl_DispatchCallback(FL_OBJECT * ob, long code);
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include "kbsequence.h"
|
||||
#include "debug.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
// The only modifiers that we handle. We want to throw away things
|
||||
// like NumLock.
|
||||
enum { ModsMask = ShiftMask | ControlMask | Mod1Mask };
|
||||
|
@ -14,10 +14,11 @@
|
||||
#endif
|
||||
|
||||
#include <list>
|
||||
using std::list;
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
using std::list;
|
||||
|
||||
class kb_sequence;
|
||||
|
||||
/// Defines key maps and actions for key sequences
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include "kbmap.h"
|
||||
#include "debug.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
// The only modifiers that we handle. We want to throw away things
|
||||
// like NumLock.
|
||||
enum { ModsMask = ShiftMask | ControlMask | Mod1Mask };
|
||||
|
@ -17,17 +17,18 @@
|
||||
|
||||
#include <fstream>
|
||||
#include <algorithm>
|
||||
using std::ifstream;
|
||||
using std::ofstream;
|
||||
using std::copy;
|
||||
using std::ostream_iterator;
|
||||
|
||||
using std::find;
|
||||
|
||||
#include "support/FileInfo.h"
|
||||
#include "lastfiles.h"
|
||||
#include "debug.h"
|
||||
|
||||
using std::ifstream;
|
||||
using std::ofstream;
|
||||
using std::copy;
|
||||
using std::ostream_iterator;
|
||||
using std::find;
|
||||
using std::endl;
|
||||
|
||||
LastFiles::LastFiles(string const & filename, bool st, unsigned int num)
|
||||
: dostat(st)
|
||||
{
|
||||
|
@ -17,10 +17,10 @@
|
||||
#endif
|
||||
|
||||
#include <deque>
|
||||
using std::deque;
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
using std::deque;
|
||||
|
||||
/** The latest documents loaded
|
||||
This class takes care of the last .lyx files used by the LyX user. It
|
||||
|
@ -15,8 +15,6 @@
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
using std::make_pair;
|
||||
using std::sort;
|
||||
|
||||
#include "layout.h"
|
||||
#include "lyxlex.h"
|
||||
@ -26,6 +24,9 @@ using std::sort;
|
||||
#include "gettext.h"
|
||||
#include "support/LAssert.h"
|
||||
|
||||
using std::make_pair;
|
||||
using std::sort;
|
||||
using std::endl;
|
||||
|
||||
// Global variable: textclass table.
|
||||
LyXTextClassList textclasslist;
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include "Spacing.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
using std::ostream;
|
||||
using std::vector;
|
||||
using std::pair;
|
||||
|
||||
|
34
src/lyx_cb.C
34
src/lyx_cb.C
@ -13,10 +13,6 @@
|
||||
#include <fstream>
|
||||
#include <algorithm>
|
||||
|
||||
using std::ifstream;
|
||||
using std::copy;
|
||||
using std::back_inserter;
|
||||
|
||||
#include "LString.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "lyx_main.h"
|
||||
@ -58,6 +54,14 @@ using std::back_inserter;
|
||||
#include "layout.h"
|
||||
#include "language.h"
|
||||
|
||||
using std::ifstream;
|
||||
using std::copy;
|
||||
using std::back_inserter;
|
||||
using std::endl;
|
||||
using std::cout;
|
||||
using std::ios;
|
||||
using std::istream_iterator;
|
||||
|
||||
extern Combox * combo_language;
|
||||
extern BufferList bufferlist;
|
||||
extern void show_symbols_form();
|
||||
@ -176,13 +180,15 @@ void MenuReload(Buffer * buf);
|
||||
void MenuLayoutSave();
|
||||
|
||||
|
||||
void ShowMessage(Buffer * buf, string const & msg1,
|
||||
string const & msg2 = string(), string const & msg3 = string(), int delay=6)
|
||||
void ShowMessage(Buffer * buf,
|
||||
string const & msg1,
|
||||
string const & msg2 = string(),
|
||||
string const & msg3 = string(), int delay = 6)
|
||||
{
|
||||
if (lyxrc.use_gui) {
|
||||
buf->getUser()->owner()->getMiniBuffer()->Set(msg1, msg2, msg3, delay);
|
||||
}
|
||||
else {
|
||||
buf->getUser()->owner()->getMiniBuffer()->Set(msg1, msg2,
|
||||
msg3, delay);
|
||||
} else {
|
||||
// can somebody think of something more clever? cerr?
|
||||
cout << msg1 << msg2 << msg3 << endl;
|
||||
}
|
||||
@ -521,8 +527,8 @@ bool RunScript(Buffer * buffer, bool wait,
|
||||
// substitute the real file name otherwise the filename is
|
||||
// simply appended. rokrau 1/12/00
|
||||
cmd = command;
|
||||
std::string::size_type i;
|
||||
if ( (i=command.find("$$FName")) != std::string::npos)
|
||||
string::size_type i;
|
||||
if ( (i=command.find("$$FName")) != string::npos)
|
||||
{
|
||||
cmd.replace(i,7,QuoteName(name));
|
||||
}
|
||||
@ -1220,9 +1226,9 @@ void InsertAsciiFile(BufferView * bv, string const & f, bool asParagraph)
|
||||
return;
|
||||
}
|
||||
|
||||
ifs.unsetf(std::ios::skipws);
|
||||
std::istream_iterator<char> ii(ifs);
|
||||
std::istream_iterator<char> end;
|
||||
ifs.unsetf(ios::skipws);
|
||||
istream_iterator<char> ii(ifs);
|
||||
istream_iterator<char> end;
|
||||
//string tmpstr(ii, end); // yet a reason for using std::string
|
||||
// alternate approach to get the file into a string:
|
||||
string tmpstr;
|
||||
|
@ -44,6 +44,8 @@
|
||||
#include "banner.xpm"
|
||||
#endif
|
||||
|
||||
using std::endl;
|
||||
|
||||
FD_form_title * fd_form_title;
|
||||
FD_form_paragraph * fd_form_paragraph;
|
||||
FD_form_paragraph_extra * fd_form_paragraph_extra;
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include FORMS_H_LOCATION
|
||||
#include "LString.h"
|
||||
#include <utility> /* needed for pair<> definition */
|
||||
|
||||
using std::pair;
|
||||
|
||||
/// Prevents LyX from being killed when the close box is pressed in a popup.
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "gettext.h"
|
||||
#include "kbmap.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
extern void LoadLyXFile(string const &);
|
||||
|
||||
string system_lyxdir;
|
||||
|
@ -12,6 +12,8 @@
|
||||
#include "support/syscall.h"
|
||||
#include "gettext.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
bool sendfax(string const &fname, string const &sendcmd);
|
||||
|
126
src/lyxfont.C
126
src/lyxfont.C
@ -25,6 +25,7 @@
|
||||
#include "FontLoader.h"
|
||||
#include "support/lstrings.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
// The global fontloader
|
||||
FontLoader fontloader;
|
||||
@ -33,65 +34,77 @@ FontLoader fontloader;
|
||||
// Names for the GUI
|
||||
//
|
||||
|
||||
string const GUIFamilyNames[6] =
|
||||
static
|
||||
char const * GUIFamilyNames[6] =
|
||||
{ N_("Roman"), N_("Sans serif"), N_("Typewriter"), N_("Symbol"), N_("Inherit"),
|
||||
N_("Ignore") };
|
||||
|
||||
string const GUISeriesNames[4] =
|
||||
static
|
||||
char const * GUISeriesNames[4] =
|
||||
{ N_("Medium"), N_("Bold"), N_("Inherit"), N_("Ignore") };
|
||||
|
||||
string const GUIShapeNames[6] =
|
||||
static
|
||||
char const * GUIShapeNames[6] =
|
||||
{ N_("Upright"), N_("Italic"), N_("Slanted"), N_("Smallcaps"), N_("Inherit"),
|
||||
N_("Ignore") };
|
||||
|
||||
string const GUISizeNames[14] =
|
||||
static
|
||||
char const * GUISizeNames[14] =
|
||||
{ N_("Tiny"), N_("Smallest"), N_("Smaller"), N_("Small"), N_("Normal"), N_("Large"),
|
||||
N_("Larger"), N_("Largest"), N_("Huge"), N_("Huger"), N_("Increase"), N_("Decrease"),
|
||||
N_("Inherit"), N_("Ignore") };
|
||||
|
||||
string const lGUISizeNames[15] =
|
||||
{ N_("tiny"), N_("smallest"), N_("smaller"), N_("small"), N_("normal"), N_("large"),
|
||||
N_("larger"), N_("largest"), N_("huge"), N_("huger"), N_("increase"), N_("decrease"),
|
||||
N_("inherit"), N_("ignore"), string() };
|
||||
|
||||
string const GUIMiscNames[5] =
|
||||
//char const * lGUISizeNames[15] =
|
||||
//{ N_("tiny"), N_("smallest"), N_("smaller"), N_("small"), N_("normal"), N_("large"),
|
||||
// N_("larger"), N_("largest"), N_("huge"), N_("huger"), N_("increase"), N_("decrease"),
|
||||
// N_("inherit"), N_("ignore"), string() };
|
||||
static
|
||||
char const * GUIMiscNames[5] =
|
||||
{ N_("Off"), N_("On"), N_("Toggle"), N_("Inherit"), N_("Ignore") };
|
||||
|
||||
|
||||
//
|
||||
// Strings used to read and write .lyx format files
|
||||
//
|
||||
string const LyXFamilyNames[6] =
|
||||
static
|
||||
char const * LyXFamilyNames[6] =
|
||||
{ "roman", "sans", "typewriter", "symbol", "default", "error" };
|
||||
|
||||
string const LyXSeriesNames[4] =
|
||||
static
|
||||
char const * LyXSeriesNames[4] =
|
||||
{ "medium", "bold", "default", "error" };
|
||||
|
||||
string const LyXShapeNames[6] =
|
||||
static
|
||||
char const * LyXShapeNames[6] =
|
||||
{ "up", "italic", "slanted", "smallcaps", "default", "error" };
|
||||
|
||||
string const LyXSizeNames[14] =
|
||||
static
|
||||
char const * LyXSizeNames[14] =
|
||||
{ "tiny", "scriptsize", "footnotesize", "small", "normal", "large",
|
||||
"larger", "largest", "huge", "giant",
|
||||
"increase-error", "decrease-error", "default", "error" };
|
||||
|
||||
string const LyXMiscNames[12] =
|
||||
static
|
||||
char const * LyXMiscNames[5] =
|
||||
{ "off", "on", "toggle", "default", "error" };
|
||||
|
||||
//
|
||||
// Strings used to write LaTeX files
|
||||
//
|
||||
|
||||
string const LaTeXFamilyNames[6] =
|
||||
static
|
||||
char const * LaTeXFamilyNames[6] =
|
||||
{ "textrm", "textsf", "texttt", "error1", "error2", "error3" };
|
||||
|
||||
string const LaTeXSeriesNames[4] =
|
||||
static
|
||||
char const * LaTeXSeriesNames[4] =
|
||||
{ "textmd", "textbf", "error4", "error5" };
|
||||
|
||||
string const LaTeXShapeNames[6] =
|
||||
static
|
||||
char const * LaTeXShapeNames[6] =
|
||||
{ "textup", "textit", "textsl", "textsc", "error6", "error7" };
|
||||
|
||||
string const LaTeXSizeNames[14] =
|
||||
static
|
||||
char const * LaTeXSizeNames[14] =
|
||||
{ "tiny", "scriptsize", "footnotesize", "small", "normalsize", "large",
|
||||
"Large", "LARGE", "huge", "Huge", "error8", "error9", "error10", "error11" };
|
||||
|
||||
@ -356,30 +369,47 @@ bool LyXFont::resolved() const
|
||||
/// Build GUI description of font state
|
||||
string LyXFont::stateText() const
|
||||
{
|
||||
string buf;
|
||||
#ifdef HAVE_SSTREAM
|
||||
ostringstream ost;
|
||||
#else
|
||||
char str[1024];
|
||||
ostrstream ost(str, 1024);
|
||||
#endif
|
||||
if (family() != INHERIT_FAMILY)
|
||||
buf += string(_(GUIFamilyNames[family()].c_str())) + ", ";
|
||||
ost << _(GUIFamilyNames[family()]) << ", ";
|
||||
if (series() != INHERIT_SERIES)
|
||||
buf += string(_(GUISeriesNames[series()].c_str())) + ", ";
|
||||
ost << _(GUISeriesNames[series()]) << ", ";
|
||||
if (shape() != INHERIT_SHAPE)
|
||||
buf += string(_(GUIShapeNames[shape()].c_str())) + ", ";
|
||||
ost << _(GUIShapeNames[shape()]) << ", ";
|
||||
if (size() != INHERIT_SIZE)
|
||||
buf += string(_(GUISizeNames[size()].c_str())) + ", ";
|
||||
ost << _(GUISizeNames[size()]) << ", ";
|
||||
if (color() != LColor::inherit)
|
||||
buf += lcolor.getGUIName(color()) + ", ";
|
||||
ost << lcolor.getGUIName(color()) << ", ";
|
||||
if (emph() != INHERIT)
|
||||
buf += string(_("Emphasis ")) + _(GUIMiscNames[emph()].c_str()) + ", ";
|
||||
ost << _("Emphasis ")
|
||||
<< _(GUIMiscNames[emph()]) << ", ";
|
||||
if (underbar() != INHERIT)
|
||||
buf += string(_("Underline ")) + _(GUIMiscNames[underbar()].c_str()) + ", ";
|
||||
ost << _("Underline ")
|
||||
<< _(GUIMiscNames[underbar()]) << ", ";
|
||||
if (noun() != INHERIT)
|
||||
buf += string(_("Noun ")) + _(GUIMiscNames[noun()].c_str()) + ", ";
|
||||
ost << _("Noun ") << _(GUIMiscNames[noun()]) << ", ";
|
||||
if (latex() != INHERIT)
|
||||
buf += string(_("Latex ")) + _(GUIMiscNames[latex()].c_str()) + ", ";
|
||||
if (buf.empty())
|
||||
buf = _("Default");
|
||||
ost << _("Latex ") << _(GUIMiscNames[latex()]) << ", ";
|
||||
//if (buf.empty())
|
||||
// ost << _("Default");
|
||||
unsigned int opos = ost.tellp();
|
||||
lyxerr << "Opos: " << opos << endl;
|
||||
if (opos == 0)
|
||||
ost << _("Default") << ", ";
|
||||
ost << _("Language: ") << _(language()->display.c_str());
|
||||
#ifdef HAVE_SSTREAM
|
||||
string buf(ost.str().c_str());
|
||||
#else
|
||||
ost << '\0';
|
||||
string buf(ost.str());
|
||||
#endif
|
||||
buf = strip(buf, ' ');
|
||||
buf = strip(buf, ',');
|
||||
buf += " " + string(_("Language: ")) + _(language()->display.c_str());
|
||||
return buf;
|
||||
}
|
||||
|
||||
@ -618,7 +648,7 @@ void LyXFont::lyxWriteChanges(LyXFont const & orgfont, ostream & os) const
|
||||
}
|
||||
if (orgfont.language() != language()) {
|
||||
if (language())
|
||||
os << "\\lang " << language()->lang << endl;
|
||||
os << "\\lang " << language()->lang << "\n";
|
||||
else
|
||||
os << "\\lang unknown\n";
|
||||
}
|
||||
@ -661,21 +691,21 @@ int LyXFont::latexWriteStartChanges(ostream & os, LyXFont const & base,
|
||||
os << '\\'
|
||||
<< LaTeXFamilyNames[f.family()]
|
||||
<< '{';
|
||||
count += LaTeXFamilyNames[f.family()].length() + 2;
|
||||
count += strlen(LaTeXFamilyNames[f.family()]) + 2;
|
||||
env = true; //We have opened a new environment
|
||||
}
|
||||
if (f.series() != INHERIT_SERIES) {
|
||||
os << '\\'
|
||||
<< LaTeXSeriesNames[f.series()]
|
||||
<< '{';
|
||||
count += LaTeXSeriesNames[f.series()].length() + 2;
|
||||
count += strlen(LaTeXSeriesNames[f.series()]) + 2;
|
||||
env = true; //We have opened a new environment
|
||||
}
|
||||
if (f.shape() != INHERIT_SHAPE) {
|
||||
os << '\\'
|
||||
<< LaTeXShapeNames[f.shape()]
|
||||
<< '{';
|
||||
count += LaTeXShapeNames[f.shape()].length() + 2;
|
||||
count += strlen(LaTeXShapeNames[f.shape()]) + 2;
|
||||
env = true; //We have opened a new environment
|
||||
}
|
||||
if (f.color() != LColor::inherit) {
|
||||
@ -710,7 +740,7 @@ int LyXFont::latexWriteStartChanges(ostream & os, LyXFont const & base,
|
||||
os << '\\'
|
||||
<< LaTeXSizeNames[f.size()]
|
||||
<< ' ';
|
||||
count += LaTeXSizeNames[f.size()].length() + 2;
|
||||
count += strlen(LaTeXSizeNames[f.size()]) + 2;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
@ -943,14 +973,7 @@ int LyXFont::drawText(char const * s, int n, Pixmap,
|
||||
int, int x) const
|
||||
{
|
||||
if (realShape() != LyXFont::SMALLCAPS_SHAPE) {
|
||||
/* XDrawString(fl_display,
|
||||
pm,
|
||||
getGC(),
|
||||
x, baseline,
|
||||
s, n);
|
||||
XFlush(fl_display); */
|
||||
return XTextWidth(getXFontstruct(), s, n);
|
||||
|
||||
} else {
|
||||
// emulate smallcaps since X doesn't support this
|
||||
char c;
|
||||
@ -963,22 +986,10 @@ int LyXFont::drawText(char const * s, int n, Pixmap,
|
||||
c = s[i];
|
||||
if (islower(static_cast<unsigned char>(c))){
|
||||
c = toupper(c);
|
||||
/* XDrawString(fl_display,
|
||||
pm,
|
||||
smallfont.getGC(),
|
||||
x, baseline,
|
||||
&c, 1); */
|
||||
x += XTextWidth(smallfont.getXFontstruct(),
|
||||
&c, 1);
|
||||
//XFlush(fl_display);
|
||||
} else {
|
||||
/* XDrawString(fl_display,
|
||||
pm,
|
||||
getGC(),
|
||||
x, baseline,
|
||||
&c, 1);*/
|
||||
x += XTextWidth(getXFontstruct(), &c, 1);
|
||||
//XFlush(fl_display);
|
||||
}
|
||||
}
|
||||
return x - sx;
|
||||
@ -999,6 +1010,7 @@ bool LyXFont::equalExceptLatex(LyXFont const & f) const
|
||||
return f1 == f;
|
||||
}
|
||||
|
||||
|
||||
ostream & operator<<(ostream & o, LyXFont::FONT_MISC_STATE fms)
|
||||
{
|
||||
return o << int(fms);
|
||||
|
@ -16,6 +16,8 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
#include FORMS_H_LOCATION
|
||||
#include "LString.h"
|
||||
#include "debug.h"
|
||||
@ -35,6 +37,7 @@
|
||||
#undef OFF
|
||||
#endif
|
||||
|
||||
using std::ostream;
|
||||
|
||||
class LyXLex;
|
||||
|
||||
|
@ -69,6 +69,8 @@
|
||||
#include "WorkArea.h"
|
||||
#include "lyxfr1.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
extern bool cursor_follows_scrollbar;
|
||||
|
||||
extern void InsertAsciiFile(BufferView *, string const &, bool);
|
||||
|
@ -21,6 +21,7 @@
|
||||
using std::ios;
|
||||
using std::lower_bound;
|
||||
using std::sort;
|
||||
using std::endl;
|
||||
|
||||
|
||||
// namespace {
|
||||
|
@ -11,14 +11,15 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include <iosfwd>
|
||||
#include <fstream>
|
||||
using std::filebuf;
|
||||
|
||||
#include "support/LIstream.h"
|
||||
#include "support/LOstream.h"
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
using std::ostream;
|
||||
using std::istream;
|
||||
using std::filebuf;
|
||||
|
||||
///
|
||||
struct keyword_item {
|
||||
///
|
||||
|
@ -24,6 +24,8 @@
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
static XIM xim;
|
||||
static XIC xic;
|
||||
XComposeStatus compose_status= {0, 0};
|
||||
|
@ -27,14 +27,16 @@
|
||||
#include "direction.h"
|
||||
#include "language.h"
|
||||
|
||||
using std::ostream;
|
||||
using std::list;
|
||||
using std::vector;
|
||||
|
||||
class BufferParams;
|
||||
class LyXBuffer;
|
||||
class TexRow;
|
||||
struct LaTeXFeatures;
|
||||
class InsetBibKey;
|
||||
|
||||
using std::list;
|
||||
|
||||
/// A LyXParagraph holds all text, attributes and insets in a text paragraph
|
||||
class LyXParagraph {
|
||||
public:
|
||||
@ -181,8 +183,8 @@ public:
|
||||
|| dhook->GetDepth() != GetDepth());
|
||||
}
|
||||
|
||||
/// Check if the current paragraph is the last paragraph in a
|
||||
/// proof environment
|
||||
/** Check if the current paragraph is the last paragraph in a
|
||||
proof environment */
|
||||
int GetEndLabel() const;
|
||||
|
||||
private:
|
||||
@ -500,8 +502,8 @@ public:
|
||||
///
|
||||
bool linuxDocConvertChar(char c, string & sgml_string);
|
||||
///
|
||||
void DocBookContTableRows(ostream &, string & extra, int & desc_on,
|
||||
size_type i,
|
||||
void DocBookContTableRows(ostream &, string & extra,
|
||||
int & desc_on, size_type i,
|
||||
int current_cell_number, int & column);
|
||||
///
|
||||
void SimpleDocBookOneTablePar(ostream &, string & extra,
|
||||
|
@ -18,10 +18,6 @@
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
|
||||
using std::ofstream;
|
||||
using std::cout;
|
||||
using std::ios;
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
#include "lyxrc.h"
|
||||
@ -35,6 +31,11 @@ using std::ios;
|
||||
#include "support/filetools.h"
|
||||
#include "lyxtext.h"
|
||||
|
||||
using std::ofstream;
|
||||
using std::cout;
|
||||
using std::ios;
|
||||
using std::endl;
|
||||
|
||||
// this is crappy... why are those colors command line arguments and
|
||||
// not in lyxrc?? (Matthias)
|
||||
// Because nobody put them there. (Asger)
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "ToolbarDefaults.h"
|
||||
#include "bufferparams.h"
|
||||
|
||||
using std::ostream;
|
||||
using std::map;
|
||||
|
||||
/// This contains the runtime configuration of LyX
|
||||
|
@ -66,6 +66,8 @@
|
||||
#include "os2_errortable.h"
|
||||
#endif
|
||||
|
||||
using std::endl;
|
||||
|
||||
// provide an empty mkfifo() if we do not have one. This disables the
|
||||
// lyxserver.
|
||||
#ifndef HAVE_MKFIFO
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include "lyxparagraph.h"
|
||||
#include "layout.h"
|
||||
|
||||
using std::vector;
|
||||
|
||||
class Buffer;
|
||||
class BufferParams;
|
||||
class Row;
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "lyxfunc.h"
|
||||
#include "LyXView.h"
|
||||
|
||||
using std::endl;
|
||||
|
||||
LyXVC::LyXVC()
|
||||
{
|
||||
@ -100,7 +101,8 @@ void LyXVC::registrer()
|
||||
}
|
||||
|
||||
lyxerr[Debug::LYXVC] << "LyXVC: registrer" << endl;
|
||||
pair<bool, string> tmp = askForText(_("LyX VC: Initial description"),
|
||||
pair<bool, string> tmp =
|
||||
askForText(_("LyX VC: Initial description"),
|
||||
_("(no initial description)"));
|
||||
if (!tmp.first || tmp.second.empty()) {
|
||||
// should we insist on checking tmp.second.empty()?
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user