mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
read the Changelog, preparing for prerelease
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@680 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
11c1e71c05
commit
d0950aceda
20
ANNOUNCE
20
ANNOUNCE
@ -1,4 +1,4 @@
|
|||||||
Public release of LyX version 1.1.2
|
Public release of LyX version 1.1.5cvs
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
What is LyX?
|
What is LyX?
|
||||||
@ -37,7 +37,7 @@ A very incomplete feature list:
|
|||||||
- export LaTeX, ASCII, DVI, PostScript, LinuxDoc-SGML, DocBook-SGML
|
- export LaTeX, ASCII, DVI, PostScript, LinuxDoc-SGML, DocBook-SGML
|
||||||
- fair support for non-English documents and/or menus
|
- fair support for non-English documents and/or menus
|
||||||
- extensive documentation, including a tutorial
|
- extensive documentation, including a tutorial
|
||||||
- version control using RCS
|
- version control using RCS (some support for CVS)
|
||||||
|
|
||||||
How stable is LyX?
|
How stable is LyX?
|
||||||
------------------
|
------------------
|
||||||
@ -66,28 +66,20 @@ with mirrors at
|
|||||||
|
|
||||||
The source code package is available at:
|
The source code package is available at:
|
||||||
|
|
||||||
ftp://ftp.lyx.org/pub/lyx/stable/lyx-1.0.4.tar.gz
|
ftp://ftp.lyx.org/pub/lyx/stable/lyx-1.1.5.tar.gz
|
||||||
ftp://ftp.devel.lyx.org/pub/lyx/lyx-1.0.4.tar.gz
|
ftp://ftp.devel.lyx.org/pub/lyx/lyx-1.1.5.tar.gz
|
||||||
|
|
||||||
and at the mirrors listed above.
|
and at the mirrors listed above.
|
||||||
|
|
||||||
You need to have XForms version 0.81, 0.86 or 0.88 to compile your own
|
You need to have XForms version 0.88 or newer to compile your own
|
||||||
version. Version 0.88 is highly recomended. LyX should also compile
|
version. Version 0.88 is highly recomended. LyX should also compile
|
||||||
with 0.89.
|
with 0.89.
|
||||||
|
|
||||||
Ready-to-run precompiled binaries for various platforms are available at:
|
|
||||||
|
|
||||||
ftp://ftp.lyx.org/pub/lyx/bin/1.0.4/
|
|
||||||
|
|
||||||
Binaries for i386-Linux are also available at your local sunsite mirror:
|
|
||||||
|
|
||||||
ftp://sunsite.unc.edu/pub/Linux/apps/editors/lyx-1.0.4-bin.tar.gz
|
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
-------
|
-------
|
||||||
|
|
||||||
The LyX Team is composed of volunteers from around the world. Many, many
|
The LyX Team is composed of volunteers from around the world. Many, many
|
||||||
people have helped make the 1.0 release possible, including:
|
people have helped make the 1.1.x releasees possible, including:
|
||||||
|
|
||||||
Lars Gullik Bjoennes, Alejandro Aguilar Sierra, Asger Alstrup,
|
Lars Gullik Bjoennes, Alejandro Aguilar Sierra, Asger Alstrup,
|
||||||
Jean-Marc Lasgouttes, Juergen Vigna, John P. Weiss, Bernhard Iselborn,
|
Jean-Marc Lasgouttes, Juergen Vigna, John P. Weiss, Bernhard Iselborn,
|
||||||
|
41
ChangeLog
41
ChangeLog
@ -1,3 +1,27 @@
|
|||||||
|
2000-04-19 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||||
|
|
||||||
|
* ANNOUNCE:
|
||||||
|
* INSTALL:
|
||||||
|
* UPGRADING:
|
||||||
|
* NEWS: updated for prerelease of 1.1.5. Please comment and send
|
||||||
|
patches for things that should be in or should be changed.
|
||||||
|
|
||||||
|
* src/* [insetfiles]: change "usigned char fragile" to bool
|
||||||
|
fragile. There was only one point that could that be questioned
|
||||||
|
and that is commented in formulamacro.C. Grep for "CHECK".
|
||||||
|
|
||||||
|
* src/CutAndPaste.C (getBufferTextClass): unused func, removed.
|
||||||
|
(DeleteBuffer): take it out of CutAndPaste and make it static.
|
||||||
|
|
||||||
|
2000-04-17 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||||
|
|
||||||
|
* src/paragraph.C (TeXOnePar): use the new method in Spacing to
|
||||||
|
output the spacing envir commands. Also the new commands used in
|
||||||
|
the LaTeX output makes the result better.
|
||||||
|
|
||||||
|
* src/Spacing.C (writeEnvirBegin): new method
|
||||||
|
(writeEnvirEnd): new method
|
||||||
|
|
||||||
2000-04-18 Juergen Vigna <jug@sad.it>
|
2000-04-18 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
* src/CutAndPaste.C: made textclass a static member of the class
|
* src/CutAndPaste.C: made textclass a static member of the class
|
||||||
@ -29,6 +53,23 @@
|
|||||||
\end{array} if fragile
|
\end{array} if fragile
|
||||||
(MathParInset::Write): Put \protect before \\ if fragile
|
(MathParInset::Write): Put \protect before \\ if fragile
|
||||||
|
|
||||||
|
2000-04-15 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||||
|
|
||||||
|
* src/lyx_gui.C (LyXGUI): initialize the LyXColorHandler. The
|
||||||
|
initialization if the LyXColorHandler must be done after the
|
||||||
|
connections to the XServer has been established.
|
||||||
|
|
||||||
|
* src/insets/figinset.C (runqueue): change the grabing a bit. Also
|
||||||
|
get the background pixel from the lyxColorhandler so that the
|
||||||
|
figures are rendered with the correct background color.
|
||||||
|
(NextToken): removed functions.
|
||||||
|
(GetPSSizes): use ifs >> string instead of NextToken.
|
||||||
|
|
||||||
|
* src/Painter.[Ch]: the color cache moved out of this file.
|
||||||
|
|
||||||
|
* src/ColorHandler.[Ch]: new files. Holds the gc cache for color
|
||||||
|
and lines.
|
||||||
|
|
||||||
2000-04-14 Lars Gullik Bjønnes <larsbj@lyx.org>
|
2000-04-14 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||||
|
|
||||||
* src/WorkArea.C (work_area_handler): call BufferView::enterView
|
* src/WorkArea.C (work_area_handler): call BufferView::enterView
|
||||||
|
10
INSTALL
10
INSTALL
@ -34,8 +34,8 @@ You will need to have both an Xforms library and Xpm library to compile
|
|||||||
LyX. It is imperative that you have the correct versions of these
|
LyX. It is imperative that you have the correct versions of these
|
||||||
libraries, and their associated header files.
|
libraries, and their associated header files.
|
||||||
|
|
||||||
As of LyX version 1.1.1, you will need to have Xforms library and header
|
As of LyX version 1.1.5, you will need to have Xforms library and header
|
||||||
version 0.81, 0.86, or 0.88. Version 0.88 is a stable release and the
|
version 0.88 or 0.89. Version 0.88 is a stable release and the
|
||||||
recommended version. On some systems, such as linux ELF, there are shared
|
recommended version. On some systems, such as linux ELF, there are shared
|
||||||
library versions of the Xforms library, which require an installation step
|
library versions of the Xforms library, which require an installation step
|
||||||
to configure the system.
|
to configure the system.
|
||||||
@ -58,11 +58,11 @@ libXpm can be found at:
|
|||||||
(or similar locations at other sunsites like sunsite.unc.edu)
|
(or similar locations at other sunsites like sunsite.unc.edu)
|
||||||
|
|
||||||
You will also need a recent C++ compiler, where recent means that the
|
You will also need a recent C++ compiler, where recent means that the
|
||||||
compilers knows a bit about the C++ standard. Compilers that are known
|
compilers are close to C++ standard conforming. Compilers that are known
|
||||||
to compile LyX are gcc 2.8.1 and 2.95.x, the various versions of egcs
|
to compile LyX are gcc 2.8.1 and 2.95.x, the various versions of egcs
|
||||||
and Digital C++ version 6.1. Please tell us your experience with other
|
and Digital C++ version 6.1. Please tell us your experience with other
|
||||||
compilers. It is probably _not_ possible to compile LyX with gcc
|
compilers. It is _not_ possible to compile LyX with gcc
|
||||||
2.7.x, but this may change in the future.
|
2.7.x, and this is not likely to change in the future.
|
||||||
|
|
||||||
Note that, contrary to LyX 1.0.x, LyX 1.1.x makes great use of C++
|
Note that, contrary to LyX 1.0.x, LyX 1.1.x makes great use of C++
|
||||||
Standard Template Library (STL); this means that gcc users will have
|
Standard Template Library (STL); this means that gcc users will have
|
||||||
|
39
NEWS
39
NEWS
@ -1,3 +1,42 @@
|
|||||||
|
What's new in LyX version 1.1.5?
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
Lots of internal code rewritten, fixed, changed and added.
|
||||||
|
We are taking the C++ Standard Library in greater use for each day,
|
||||||
|
this will in most cases make the code clearer and easier to maintain
|
||||||
|
and expand.
|
||||||
|
We are also gearing up for the merge of the gui-indep branch, expect
|
||||||
|
this (but not the new gui's) in 1.1.6.
|
||||||
|
|
||||||
|
User-visible changes:
|
||||||
|
|
||||||
|
- Right-to-Left support for Hebrew and Arabic, this is a first attempt
|
||||||
|
only and is likely to improve in future versions.
|
||||||
|
|
||||||
|
- Removed support for XForms older than 0.88.
|
||||||
|
|
||||||
|
- Some commandline options and X resources are not supported anymore
|
||||||
|
(The color ones, and -mono -fastselection, -reverse)
|
||||||
|
|
||||||
|
- More accurate error reporting from LaTeX runs.
|
||||||
|
|
||||||
|
- Better definition for LyXList style.
|
||||||
|
|
||||||
|
- option \show_banner [true|false] added to .lyxrc commands.
|
||||||
|
|
||||||
|
- A couple of changes to the LyX format, so that files written with
|
||||||
|
1.1.5 will not be parsed correctly by older LyX versions if protected
|
||||||
|
spaces or the new per-paragraph spacing are used. Also the RtL
|
||||||
|
support is of course not supported in older versions.
|
||||||
|
|
||||||
|
- Per-paragraph spacing, currently only settable wrom the
|
||||||
|
command-line/window:
|
||||||
|
paragraph-spacing (default,single,onehalf,double,other) [float]
|
||||||
|
|
||||||
|
- .lyxrc feature: \backupdir_path that tells where the backup files
|
||||||
|
created by lyx will be stored.
|
||||||
|
|
||||||
|
|
||||||
What's new in LyX version 1.1.4?
|
What's new in LyX version 1.1.4?
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
|
10
UPGRADING
10
UPGRADING
@ -1,4 +1,4 @@
|
|||||||
How do I upgrade my existing LyX system to version 1.1.2?
|
How do I upgrade my existing LyX system to version 1.1.5?
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
|
|
||||||
If you upgrade from version 0.12.0 or 1.0.x, you shouldn't have
|
If you upgrade from version 0.12.0 or 1.0.x, you shouldn't have
|
||||||
@ -14,9 +14,9 @@ Document transfer
|
|||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
In general, you don't need to convert any documents saved with LyX
|
In general, you don't need to convert any documents saved with LyX
|
||||||
v0.10, v0.12.0 or v1.0.x to use them with LyX v1.1.2.
|
v0.10, v0.12.0 or v1.0.x to use them with LyX v1.1.5.
|
||||||
|
|
||||||
LyX v1.1.2 can read all documents saved with lyx-0.12.0 and later correctly.
|
LyX v1.1.5 can read all documents saved with lyx-0.12.0 and later correctly.
|
||||||
Documents saved with lyx-0.10.x are read correctly up to the old math
|
Documents saved with lyx-0.10.x are read correctly up to the old math
|
||||||
mode, which is not supported anymore. If you have documents with such
|
mode, which is not supported anymore. If you have documents with such
|
||||||
math formulas, you convert it using the program COLD, written by Preben
|
math formulas, you convert it using the program COLD, written by Preben
|
||||||
@ -27,5 +27,5 @@ Rhandol. COLD can be found at:
|
|||||||
|
|
||||||
or at one of LyX archive mirror sites listed in README.
|
or at one of LyX archive mirror sites listed in README.
|
||||||
|
|
||||||
Documents saved with LyX version 1.1.2 can be read correctly by
|
Documents saved with LyX version 1.1.5 can be read correctly by
|
||||||
LyX v0.12.0 and v1.0.x, except for new features.
|
LyX v0.12.0 and v1.0.x, except for new and a couple of changed features.
|
||||||
|
@ -20,12 +20,26 @@
|
|||||||
|
|
||||||
using std::pair;
|
using std::pair;
|
||||||
|
|
||||||
|
// Jürgen, note that this means that you cannot currently have a list
|
||||||
|
// of selections cut/copied. So IMHO later we should have a
|
||||||
|
// list/vector/deque that we could store
|
||||||
|
// struct selection_item {
|
||||||
|
// LyXParagraph * buf;
|
||||||
|
// LyXTextClassList::size_type textclass;
|
||||||
|
// };
|
||||||
|
// in and some method of choosing beween them (based on the first few chars
|
||||||
|
// in the selection probably.) This would be a nice feature and quite
|
||||||
|
// easy to implement. (Lgb)
|
||||||
|
|
||||||
static LyXParagraph * buf = 0;
|
static LyXParagraph * buf = 0;
|
||||||
static LyXTextClassList::size_type textclass;
|
static LyXTextClassList::size_type textclass;
|
||||||
|
|
||||||
// for now here this should be in another Cut&Paste Class!
|
// for now here this should be in another Cut&Paste Class!
|
||||||
//
|
// Jürgen, I moved this out of CutAndPaste since it does not operate on any
|
||||||
void CutAndPaste::DeleteBuffer()
|
// member of the CutAndPaste class and in addition it was private.
|
||||||
|
// Perhaps it even should take a parameter? (Lgb)
|
||||||
|
static
|
||||||
|
void DeleteBuffer()
|
||||||
{
|
{
|
||||||
if (!buf) return;
|
if (!buf) return;
|
||||||
|
|
||||||
@ -332,7 +346,7 @@ int CutAndPaste::nrOfParagraphs() const
|
|||||||
if (!buf) return 0;
|
if (!buf) return 0;
|
||||||
|
|
||||||
int n = 1;
|
int n = 1;
|
||||||
LyXParagraph *tmppar = buf;
|
LyXParagraph * tmppar = buf;
|
||||||
while(tmppar->next) {
|
while(tmppar->next) {
|
||||||
++n;
|
++n;
|
||||||
tmppar = tmppar->next;
|
tmppar = tmppar->next;
|
||||||
@ -381,12 +395,6 @@ int CutAndPaste::SwitchLayoutsBetweenClasses(LyXTextClassList::size_type c1,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LyXTextClassList::size_type CutAndPaste::getBufferTextClass() const
|
|
||||||
{
|
|
||||||
return textclass;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool CutAndPaste::checkPastePossible(LyXParagraph * par, int) const
|
bool CutAndPaste::checkPastePossible(LyXParagraph * par, int) const
|
||||||
{
|
{
|
||||||
if (!buf) return false;
|
if (!buf) return false;
|
||||||
|
@ -41,12 +41,7 @@ public:
|
|||||||
LyXTextClassList::size_type class2,
|
LyXTextClassList::size_type class2,
|
||||||
LyXParagraph * par);
|
LyXParagraph * par);
|
||||||
///
|
///
|
||||||
LyXTextClassList::size_type getBufferTextClass() const;
|
|
||||||
///
|
|
||||||
bool checkPastePossible(LyXParagraph *, int pos) const;
|
bool checkPastePossible(LyXParagraph *, int pos) const;
|
||||||
private:
|
|
||||||
///
|
|
||||||
void DeleteBuffer();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#ifdef HAVE_SSTREAM
|
#ifdef HAVE_SSTREAM
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
using std::istringstream;
|
using std::istringstream;
|
||||||
|
using std::ostringstream;
|
||||||
#else
|
#else
|
||||||
#include <strstream>
|
#include <strstream>
|
||||||
#endif
|
#endif
|
||||||
@ -74,3 +75,58 @@ void Spacing::writeFile(ostream & os, bool para) const
|
|||||||
os << cmd << spacing_string[getSpace()] << " \n";
|
os << cmd << spacing_string[getSpace()] << " \n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
string Spacing::writeEnvirBegin() const
|
||||||
|
{
|
||||||
|
switch(space) {
|
||||||
|
case Default: break; // do nothing
|
||||||
|
case Single:
|
||||||
|
return "\\begin{singlespace}";
|
||||||
|
break;
|
||||||
|
case Onehalf:
|
||||||
|
return "\\begin{onehalfspace}";
|
||||||
|
break;
|
||||||
|
case Double:
|
||||||
|
return "\\begin{doublespace}";
|
||||||
|
break;
|
||||||
|
case Other:
|
||||||
|
#ifdef HAVE_SSTREAM
|
||||||
|
ostringstream ost;
|
||||||
|
ost << "\\begin{spacing}{"
|
||||||
|
<< getValue() << "}";
|
||||||
|
return ost.str().c_str();
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
char tmp[512];
|
||||||
|
ostrstream ost(tmp, 512);
|
||||||
|
ost << "\\begin{spacing}{"
|
||||||
|
<< getValue() << "}";
|
||||||
|
return ost.str();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return string();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
string Spacing::writeEnvirEnd() const
|
||||||
|
{
|
||||||
|
switch(space) {
|
||||||
|
case Default: break; // do nothing
|
||||||
|
case Single:
|
||||||
|
return "\\end{singlespace}";
|
||||||
|
break;
|
||||||
|
case Onehalf:
|
||||||
|
return "\\end{onehalfspace}";
|
||||||
|
break;
|
||||||
|
case Double:
|
||||||
|
return "\\end{doublespace}";
|
||||||
|
break;
|
||||||
|
case Other:
|
||||||
|
return "\\end{spacing}";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return string();
|
||||||
|
}
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
|
|
||||||
|
#include "LString.h"
|
||||||
|
|
||||||
///
|
///
|
||||||
class Spacing {
|
class Spacing {
|
||||||
public:
|
public:
|
||||||
@ -47,6 +49,10 @@ public:
|
|||||||
///
|
///
|
||||||
void writeFile(std::ostream &, bool para = false) const;
|
void writeFile(std::ostream &, bool para = false) const;
|
||||||
///
|
///
|
||||||
|
string writeEnvirBegin() const;
|
||||||
|
///
|
||||||
|
string writeEnvirEnd() const;
|
||||||
|
///
|
||||||
friend bool operator==(Spacing const & a, Spacing const & b) {
|
friend bool operator==(Spacing const & a, Spacing const & b) {
|
||||||
if (a.space == b.space && a.getValue() == b.getValue())
|
if (a.space == b.space && a.getValue() == b.getValue())
|
||||||
return true;
|
return true;
|
||||||
|
14
src/buffer.C
14
src/buffer.C
@ -1428,11 +1428,11 @@ void Buffer::writeFileAscii(string const & fname, int linelen)
|
|||||||
#if 1
|
#if 1
|
||||||
#ifdef HAVE_SSTREAM
|
#ifdef HAVE_SSTREAM
|
||||||
std::ostringstream ost;
|
std::ostringstream ost;
|
||||||
inset->Latex(ost, -1, free_spc);
|
inset->Latex(ost, true, free_spc);
|
||||||
h += ost.str().length();
|
h += ost.str().length();
|
||||||
#else
|
#else
|
||||||
ostrstream ost;
|
ostrstream ost;
|
||||||
inset->Latex(ost, -1, free_spc);
|
inset->Latex(ost, true, free_spc);
|
||||||
ost << '\0';
|
ost << '\0';
|
||||||
char * tmp = ost.str();
|
char * tmp = ost.str();
|
||||||
string tstr(tmp);
|
string tstr(tmp);
|
||||||
@ -1445,7 +1445,7 @@ void Buffer::writeFileAscii(string const & fname, int linelen)
|
|||||||
WriteFSAlert(_("Error: Cannot open temporary file:"), fname1);
|
WriteFSAlert(_("Error: Cannot open temporary file:"), fname1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
inset->Latex(fs, -1, free_spc);
|
inset->Latex(fs, true, free_spc);
|
||||||
h += fs.tellp() - 1;
|
h += fs.tellp() - 1;
|
||||||
::remove(fname1.c_str());
|
::remove(fname1.c_str());
|
||||||
#endif
|
#endif
|
||||||
@ -1530,7 +1530,7 @@ void Buffer::writeFileAscii(string const & fname, int linelen)
|
|||||||
case LyXParagraph::META_INSET:
|
case LyXParagraph::META_INSET:
|
||||||
if ((inset = par->GetInset(i))) {
|
if ((inset = par->GetInset(i))) {
|
||||||
fpos = ofs.tellp();
|
fpos = ofs.tellp();
|
||||||
inset->Latex(ofs, -1, free_spc);
|
inset->Latex(ofs, true, free_spc);
|
||||||
currlinelen += (ofs.tellp() - fpos);
|
currlinelen += (ofs.tellp() - fpos);
|
||||||
actpos += (ofs.tellp() - fpos) - 1;
|
actpos += (ofs.tellp() - fpos) - 1;
|
||||||
}
|
}
|
||||||
@ -3538,7 +3538,7 @@ void Buffer::RoffAsciiTable(ostream & os, LyXParagraph * par)
|
|||||||
#if 1
|
#if 1
|
||||||
#ifdef HAVE_SSTREAM
|
#ifdef HAVE_SSTREAM
|
||||||
stringstresm ss(ios::in | ios::out);
|
stringstresm ss(ios::in | ios::out);
|
||||||
inset->Latex(ss, -1);
|
inset->Latex(ss, true);
|
||||||
ss.seekp(0);
|
ss.seekp(0);
|
||||||
ss.get(c);
|
ss.get(c);
|
||||||
while (!ss) {
|
while (!ss) {
|
||||||
@ -3550,7 +3550,7 @@ void Buffer::RoffAsciiTable(ostream & os, LyXParagraph * par)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
strstream ss;
|
strstream ss;
|
||||||
inset->Latex(ss, -1);
|
inset->Latex(ss, true);
|
||||||
ss.seekp(0);
|
ss.seekp(0);
|
||||||
ss.get(c);
|
ss.get(c);
|
||||||
while (!ss) {
|
while (!ss) {
|
||||||
@ -3571,7 +3571,7 @@ void Buffer::RoffAsciiTable(ostream & os, LyXParagraph * par)
|
|||||||
remove(fname1.c_str());
|
remove(fname1.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
inset->Latex(fs, -1);
|
inset->Latex(fs, true);
|
||||||
fs.seekp(0);
|
fs.seekp(0);
|
||||||
fs.get(c);
|
fs.get(c);
|
||||||
while(!fs) {
|
while(!fs) {
|
||||||
|
@ -1142,7 +1142,7 @@ void InsetFig::Read(LyXLex & lex)
|
|||||||
|
|
||||||
|
|
||||||
int InsetFig::Latex(ostream & os,
|
int InsetFig::Latex(ostream & os,
|
||||||
signed char /* fragile*/, bool /* fs*/) const
|
bool /* fragile*/, bool /* fs*/) const
|
||||||
{
|
{
|
||||||
Regenerate();
|
Regenerate();
|
||||||
if (!cmd.empty()) os << cmd << " ";
|
if (!cmd.empty()) os << cmd << " ";
|
||||||
|
@ -37,7 +37,7 @@ public:
|
|||||||
///
|
///
|
||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
///
|
///
|
||||||
int Latex(std::ostream &, signed char fragile, bool free_space) const;
|
int Latex(std::ostream &, bool fragile, bool free_space) const;
|
||||||
///
|
///
|
||||||
int Linuxdoc(std::ostream &) const;
|
int Linuxdoc(std::ostream &) const;
|
||||||
///
|
///
|
||||||
|
@ -323,7 +323,7 @@ string InsetBibtex::getScreenLabel() const
|
|||||||
|
|
||||||
|
|
||||||
int InsetBibtex::Latex(ostream & os,
|
int InsetBibtex::Latex(ostream & os,
|
||||||
signed char /*fragile*/, bool/*fs*/) const
|
bool /*fragile*/, bool/*fs*/) const
|
||||||
{
|
{
|
||||||
// this looks like an horrible hack and it is :) The problem
|
// this looks like an horrible hack and it is :) The problem
|
||||||
// is that owner is not initialized correctly when the bib
|
// is that owner is not initialized correctly when the bib
|
||||||
|
@ -133,7 +133,7 @@ public:
|
|||||||
///
|
///
|
||||||
void Edit(BufferView *, int x, int y, unsigned int button);
|
void Edit(BufferView *, int x, int y, unsigned int button);
|
||||||
///
|
///
|
||||||
int Latex(std::ostream &, signed char, bool) const;
|
int Latex(std::ostream &, bool fragile, bool freespace) const;
|
||||||
///
|
///
|
||||||
string getKeys(char delim);
|
string getKeys(char delim);
|
||||||
///
|
///
|
||||||
|
@ -197,7 +197,7 @@ void InsetCommand::Read(LyXLex & lex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetCommand::Latex(ostream & os, signed char /*fragile*/, bool/*fs*/) const
|
int InsetCommand::Latex(ostream & os, bool /*fragile*/, bool/*fs*/) const
|
||||||
{
|
{
|
||||||
os << getCommand();
|
os << getCommand();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -49,7 +49,7 @@ public:
|
|||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
///
|
///
|
||||||
virtual int Latex(std::ostream &,
|
virtual int Latex(std::ostream &,
|
||||||
signed char fragile, bool free_spc) const;
|
bool fragile, bool free_spc) const;
|
||||||
///
|
///
|
||||||
virtual int Linuxdoc(std::ostream &) const;
|
virtual int Linuxdoc(std::ostream &) const;
|
||||||
///
|
///
|
||||||
|
@ -105,7 +105,7 @@ void InsetError::Read(LyXLex &)
|
|||||||
|
|
||||||
|
|
||||||
int InsetError::Latex(ostream &,
|
int InsetError::Latex(ostream &,
|
||||||
signed char /*fragile*/, bool /*fs*/) const
|
bool /*fragile*/, bool /*fs*/) const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public:
|
|||||||
///
|
///
|
||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
///
|
///
|
||||||
int Latex(std::ostream &, signed char fragile, bool free_spc) const;
|
int Latex(std::ostream &, bool fragile, bool free_spc) const;
|
||||||
///
|
///
|
||||||
int Linuxdoc(std::ostream &) const;
|
int Linuxdoc(std::ostream &) const;
|
||||||
///
|
///
|
||||||
|
@ -52,7 +52,7 @@ char const * InsetFoot::EditMessage() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetFoot::Latex(ostream & os, signed char fragile, bool fp) const
|
int InsetFoot::Latex(ostream & os, bool fragile, bool fp) const
|
||||||
{
|
{
|
||||||
if (fragile)
|
if (fragile)
|
||||||
os << "\\footnote{"; // was footnotemark but that won't work
|
os << "\\footnote{"; // was footnotemark but that won't work
|
||||||
|
@ -37,7 +37,7 @@ public:
|
|||||||
///
|
///
|
||||||
Inset::Code LyxCode() const { return Inset::FOOT_CODE; }
|
Inset::Code LyxCode() const { return Inset::FOOT_CODE; }
|
||||||
///
|
///
|
||||||
int Latex(std::ostream &, signed char, bool fp) const;
|
int Latex(std::ostream &, bool fragile, bool fp) const;
|
||||||
///
|
///
|
||||||
void Write(std::ostream &) const;
|
void Write(std::ostream &) const;
|
||||||
///
|
///
|
||||||
|
@ -192,7 +192,7 @@ void InsetGraphics::Read(LyXLex & /*lex*/)
|
|||||||
|
|
||||||
|
|
||||||
int InsetGraphics::Latex(ostream & os,
|
int InsetGraphics::Latex(ostream & os,
|
||||||
signed char /*fragile*/, bool/*fs*/) const
|
bool /*fragile*/, bool/*fs*/) const
|
||||||
{
|
{
|
||||||
// MISSING: We have to decide how to do the order of the options
|
// MISSING: We have to decide how to do the order of the options
|
||||||
// that is depentant of order, like witdth, height, andlge. Should
|
// that is depentant of order, like witdth, height, andlge. Should
|
||||||
|
@ -46,10 +46,10 @@ public:
|
|||||||
///
|
///
|
||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
/** returns the number of rows (\n's) of generated tex code.
|
/** returns the number of rows (\n's) of generated tex code.
|
||||||
fragile != 0 means, that the inset should take care about
|
fragile == true means, that the inset should take care about
|
||||||
fragile commands by adding a \protect before.
|
fragile commands by adding a \protect before.
|
||||||
*/
|
*/
|
||||||
int Latex(std::ostream &, signed char fragile, bool free_spc) const;
|
int Latex(std::ostream &, bool fragile, bool free_spc) const;
|
||||||
///
|
///
|
||||||
int Linuxdoc(std::ostream &) const;
|
int Linuxdoc(std::ostream &) const;
|
||||||
///
|
///
|
||||||
|
@ -333,7 +333,7 @@ bool InsetInclude::loadIfNeeded() const
|
|||||||
|
|
||||||
|
|
||||||
int InsetInclude::Latex(ostream & os,
|
int InsetInclude::Latex(ostream & os,
|
||||||
signed char /*fragile*/, bool /*fs*/) const
|
bool /*fragile*/, bool /*fs*/) const
|
||||||
{
|
{
|
||||||
// Do nothing if no file name has been specified
|
// Do nothing if no file name has been specified
|
||||||
if (contents.empty())
|
if (contents.empty())
|
||||||
|
@ -58,7 +58,7 @@ public:
|
|||||||
///
|
///
|
||||||
void Read(LyXLex &);
|
void Read(LyXLex &);
|
||||||
///
|
///
|
||||||
int Latex(std::ostream &, signed char fragile, bool free_spc) const;
|
int Latex(std::ostream &, bool fragile, bool free_spc) const;
|
||||||
///
|
///
|
||||||
void Validate(LaTeXFeatures &) const;
|
void Validate(LaTeXFeatures &) const;
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ void InsetInfo::Read(LyXLex & lex)
|
|||||||
|
|
||||||
|
|
||||||
int InsetInfo::Latex(ostream &,
|
int InsetInfo::Latex(ostream &,
|
||||||
signed char /*fragile*/, bool /*free_spc*/) const
|
bool /*fragile*/, bool /*free_spc*/) const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ public:
|
|||||||
///
|
///
|
||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
///
|
///
|
||||||
int Latex(std::ostream &, signed char fragile, bool free_spc) const;
|
int Latex(std::ostream &, bool fragile, bool free_spc) const;
|
||||||
///
|
///
|
||||||
int Linuxdoc(std::ostream &) const;
|
int Linuxdoc(std::ostream &) const;
|
||||||
///
|
///
|
||||||
|
@ -47,7 +47,7 @@ string InsetLabel::getLabel(int) const
|
|||||||
|
|
||||||
|
|
||||||
int InsetLabel::Latex(ostream & os,
|
int InsetLabel::Latex(ostream & os,
|
||||||
signed char /*fragile*/, bool /*fs*/) const
|
bool /*fragile*/, bool /*fs*/) const
|
||||||
{
|
{
|
||||||
os << escape(getCommand());
|
os << escape(getCommand());
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -40,7 +40,7 @@ public:
|
|||||||
///
|
///
|
||||||
EDITABLE Editable() const { return NOT_EDITABLE; }
|
EDITABLE Editable() const { return NOT_EDITABLE; }
|
||||||
///
|
///
|
||||||
int Latex(std::ostream &, signed char fragile, bool free_spc) const;
|
int Latex(std::ostream &, bool fragile, bool free_spc) const;
|
||||||
///
|
///
|
||||||
int Linuxdoc(std::ostream &) const;
|
int Linuxdoc(std::ostream &) const;
|
||||||
///
|
///
|
||||||
|
@ -620,7 +620,7 @@ void InsetLatexAccent::Read(LyXLex & lex)
|
|||||||
|
|
||||||
|
|
||||||
int InsetLatexAccent::Latex(ostream & os,
|
int InsetLatexAccent::Latex(ostream & os,
|
||||||
signed char /*fragile*/, bool/*fs*/) const
|
bool /*fragile*/, bool/*fs*/) const
|
||||||
{
|
{
|
||||||
os << contents;
|
os << contents;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -54,7 +54,7 @@ public:
|
|||||||
///
|
///
|
||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
///
|
///
|
||||||
int Latex(std::ostream &, signed char fragile, bool free_spc) const;
|
int Latex(std::ostream &, bool fragile, bool free_spc) const;
|
||||||
///
|
///
|
||||||
int Linuxdoc(std::ostream &) const;
|
int Linuxdoc(std::ostream &) const;
|
||||||
///
|
///
|
||||||
|
@ -52,7 +52,7 @@ void InsetParent::Edit(BufferView * bv, int, int, unsigned int)
|
|||||||
|
|
||||||
// LaTeX must just ignore this command
|
// LaTeX must just ignore this command
|
||||||
int InsetParent::Latex(ostream & os,
|
int InsetParent::Latex(ostream & os,
|
||||||
signed char fragile, bool free_spc) const
|
bool fragile, bool free_spc) const
|
||||||
{
|
{
|
||||||
os << "%%#{lyx}";
|
os << "%%#{lyx}";
|
||||||
InsetCommand::Latex(os, fragile, free_spc);
|
InsetCommand::Latex(os, fragile, free_spc);
|
||||||
|
@ -33,7 +33,7 @@ public:
|
|||||||
explicit
|
explicit
|
||||||
InsetParent(string const & fn, Buffer * owner = 0);
|
InsetParent(string const & fn, Buffer * owner = 0);
|
||||||
///
|
///
|
||||||
int Latex(std::ostream &, signed char fragile, bool free_spc) const;
|
int Latex(std::ostream &, bool fragile, bool free_spc) const;
|
||||||
///
|
///
|
||||||
Inset * Clone() const { return new InsetParent(getContents()); }
|
Inset * Clone() const { return new InsetParent(getContents()); }
|
||||||
///
|
///
|
||||||
|
@ -224,7 +224,7 @@ void InsetQuotes::Read(LyXLex & lex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetQuotes::Latex(ostream & os, signed char /*fragile*/, bool) const
|
int InsetQuotes::Latex(ostream & os, bool /*fragile*/, bool) const
|
||||||
{
|
{
|
||||||
string doclang =
|
string doclang =
|
||||||
current_view->buffer()->GetLanguage();
|
current_view->buffer()->GetLanguage();
|
||||||
|
@ -86,7 +86,7 @@ public:
|
|||||||
///
|
///
|
||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
///
|
///
|
||||||
int Latex(std::ostream &, signed char fragile, bool free_spc) const;
|
int Latex(std::ostream &, bool fragile, bool free_spc) const;
|
||||||
///
|
///
|
||||||
int Linuxdoc(std::ostream &) const;
|
int Linuxdoc(std::ostream &) const;
|
||||||
///
|
///
|
||||||
|
@ -70,7 +70,7 @@ string InsetRef::getScreenLabel() const
|
|||||||
|
|
||||||
|
|
||||||
int InsetRef::Latex(ostream & os,
|
int InsetRef::Latex(ostream & os,
|
||||||
signed char /*fragile*/, bool /*fs*/) const
|
bool /*fragile*/, bool /*fs*/) const
|
||||||
{
|
{
|
||||||
if(getOptions().empty())
|
if(getOptions().empty())
|
||||||
os << escape(getCommand());
|
os << escape(getCommand());
|
||||||
|
@ -61,7 +61,7 @@ public:
|
|||||||
///
|
///
|
||||||
void gotoLabel();
|
void gotoLabel();
|
||||||
///
|
///
|
||||||
int Latex(std::ostream &, signed char fragile, bool free_spc) const;
|
int Latex(std::ostream &, bool fragile, bool free_spc) const;
|
||||||
///
|
///
|
||||||
int Linuxdoc(std::ostream &) const;
|
int Linuxdoc(std::ostream &) const;
|
||||||
///
|
///
|
||||||
|
@ -177,7 +177,7 @@ void InsetSpecialChar::Read(LyXLex & lex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetSpecialChar::Latex(ostream & os, signed char /*fragile*/,
|
int InsetSpecialChar::Latex(ostream & os, bool /*fragile*/,
|
||||||
bool free_space) const
|
bool free_space) const
|
||||||
{
|
{
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
|
@ -56,7 +56,7 @@ public:
|
|||||||
/// Will not be used when lyxf3
|
/// Will not be used when lyxf3
|
||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
///
|
///
|
||||||
int Latex(std::ostream &, signed char fragile, bool free_spc) const;
|
int Latex(std::ostream &, bool fragile, bool free_spc) const;
|
||||||
///
|
///
|
||||||
int Linuxdoc(std::ostream &) const;
|
int Linuxdoc(std::ostream &) const;
|
||||||
///
|
///
|
||||||
|
@ -718,7 +718,7 @@ InsetText::LocalDispatch(BufferView * bv,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetText::Latex(ostream & os, signed char /*fragile*/, bool) const
|
int InsetText::Latex(ostream & os, bool /*fragile*/, bool) const
|
||||||
{
|
{
|
||||||
TexRow texrow;
|
TexRow texrow;
|
||||||
int ret = par->SimpleTeXOnePar(os, texrow);
|
int ret = par->SimpleTeXOnePar(os, texrow);
|
||||||
|
@ -78,7 +78,7 @@ public:
|
|||||||
///
|
///
|
||||||
UpdatableInset::RESULT LocalDispatch(BufferView *, int, string const &);
|
UpdatableInset::RESULT LocalDispatch(BufferView *, int, string const &);
|
||||||
///
|
///
|
||||||
int Latex(std::ostream &, signed char, bool free_spc) const;
|
int Latex(std::ostream &, bool fragile, bool free_spc) const;
|
||||||
///
|
///
|
||||||
int Linuxdoc(std::ostream &) const { return 0; }
|
int Linuxdoc(std::ostream &) const { return 0; }
|
||||||
///
|
///
|
||||||
|
@ -174,7 +174,7 @@ string InsetUrl::getScreenLabel() const
|
|||||||
|
|
||||||
|
|
||||||
int InsetUrl::Latex(ostream & os,
|
int InsetUrl::Latex(ostream & os,
|
||||||
signed char fragile, bool /*free_spc*/) const
|
bool fragile, bool /*free_spc*/) const
|
||||||
{
|
{
|
||||||
if (!getOptions().empty())
|
if (!getOptions().empty())
|
||||||
os << getOptions() + ' ';
|
os << getOptions() + ' ';
|
||||||
|
@ -72,7 +72,7 @@ public:
|
|||||||
///
|
///
|
||||||
void gotoLabel();
|
void gotoLabel();
|
||||||
///
|
///
|
||||||
int Latex(std::ostream &, signed char fragile, bool free_spc) const;
|
int Latex(std::ostream &, bool fragile, bool free_spc) const;
|
||||||
///
|
///
|
||||||
int Linuxdoc(std::ostream &) const;
|
int Linuxdoc(std::ostream &) const;
|
||||||
///
|
///
|
||||||
|
@ -129,12 +129,12 @@ public:
|
|||||||
///
|
///
|
||||||
virtual void Read(LyXLex & lex) = 0;
|
virtual void Read(LyXLex & lex) = 0;
|
||||||
/** returns the number of rows (\n's) of generated tex code.
|
/** returns the number of rows (\n's) of generated tex code.
|
||||||
fragile != 0 means, that the inset should take care about
|
fragile == true means, that the inset should take care about
|
||||||
fragile commands by adding a \protect before.
|
fragile commands by adding a \protect before.
|
||||||
If the free_spc (freespacing) variable is set, then this inset
|
If the free_spc (freespacing) variable is set, then this inset
|
||||||
is in a free-spacing paragraph.
|
is in a free-spacing paragraph.
|
||||||
*/
|
*/
|
||||||
virtual int Latex(std::ostream &, signed char fragile,
|
virtual int Latex(std::ostream &, bool fragile,
|
||||||
bool free_spc) const = 0;
|
bool free_spc) const = 0;
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -1117,9 +1117,8 @@ string LyXFunc::Dispatch(int ac,
|
|||||||
|
|
||||||
// Pretend we got the name instead.
|
// Pretend we got the name instead.
|
||||||
Dispatch(int(LFUN_LAYOUT),
|
Dispatch(int(LFUN_LAYOUT),
|
||||||
textclasslist.NameOfLayout(owner->view()->
|
textclasslist.NameOfLayout(owner->view()
|
||||||
text->bparams->
|
->buffer()->params.textclass,
|
||||||
textclass,
|
|
||||||
sel).c_str());
|
sel).c_str());
|
||||||
return string();
|
return string();
|
||||||
}
|
}
|
||||||
@ -1132,7 +1131,7 @@ string LyXFunc::Dispatch(int ac,
|
|||||||
// Derive layout number from given argument (string)
|
// Derive layout number from given argument (string)
|
||||||
// and current buffer's textclass (number). */
|
// and current buffer's textclass (number). */
|
||||||
LyXTextClassList::ClassList::size_type tclass =
|
LyXTextClassList::ClassList::size_type tclass =
|
||||||
owner->view()->text->bparams->textclass;
|
owner->view()->buffer()->params.textclass;
|
||||||
pair <bool, LyXTextClass::size_type> layout =
|
pair <bool, LyXTextClass::size_type> layout =
|
||||||
textclasslist.NumberOfLayout(tclass, argument);
|
textclasslist.NumberOfLayout(tclass, argument);
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ public:
|
|||||||
~LyXText();
|
~LyXText();
|
||||||
|
|
||||||
/// points to Buffer.params
|
/// points to Buffer.params
|
||||||
BufferParams * bparams;
|
//BufferParams * bparams;
|
||||||
/// points to Buffer
|
/// points to Buffer
|
||||||
Buffer * buffer;
|
Buffer * buffer;
|
||||||
///
|
///
|
||||||
|
@ -308,16 +308,16 @@ Inset * InsetFormula::Clone() const
|
|||||||
void InsetFormula::Write(ostream & os) const
|
void InsetFormula::Write(ostream & os) const
|
||||||
{
|
{
|
||||||
os << "Formula ";
|
os << "Formula ";
|
||||||
Latex(os, 0, 0);
|
Latex(os, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetFormula::Latex(ostream & os, signed char fragile, bool) const
|
int InsetFormula::Latex(ostream & os, bool fragile, bool) const
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
//#warning Alejandro, the number of lines is not returned in this case
|
//#warning Alejandro, the number of lines is not returned in this case
|
||||||
// This problem will disapear at 0.13.
|
// This problem will disapear at 0.13.
|
||||||
if (fragile < 0)
|
if (fragile) // this is where fragile != 0 was used (Lgb)
|
||||||
par->Write(os, fragile);
|
par->Write(os, fragile);
|
||||||
else
|
else
|
||||||
mathed_write(par, os, &ret, fragile, label.c_str());
|
mathed_write(par, os, &ret, fragile, label.c_str());
|
||||||
|
@ -52,7 +52,7 @@ public:
|
|||||||
///
|
///
|
||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
///
|
///
|
||||||
int Latex(std::ostream &, signed char fragile, bool free_spc) const;
|
int Latex(std::ostream &, bool fragile, bool free_spc) const;
|
||||||
///
|
///
|
||||||
int Linuxdoc(std::ostream &) const;
|
int Linuxdoc(std::ostream &) const;
|
||||||
///
|
///
|
||||||
|
@ -69,14 +69,18 @@ Inset * InsetFormulaMacro::Clone() const
|
|||||||
void InsetFormulaMacro::Write(ostream & os) const
|
void InsetFormulaMacro::Write(ostream & os) const
|
||||||
{
|
{
|
||||||
os << "FormulaMacro ";
|
os << "FormulaMacro ";
|
||||||
tmacro->WriteDef(os, 0);
|
tmacro->WriteDef(os, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetFormulaMacro::Latex(ostream & os, signed char /*fragile*/,
|
int InsetFormulaMacro::Latex(ostream & os, bool /*fragile*/,
|
||||||
bool /*free_spacing*/) const
|
bool /*free_spacing*/) const
|
||||||
{
|
{
|
||||||
tmacro->WriteDef(os, 1);
|
tmacro->WriteDef(os, true); // or false?
|
||||||
|
// CHECK
|
||||||
|
// This is the only place where a '1' is used rather that '-1' or '0'
|
||||||
|
// for value of fragile. What is the reason behind it and does it make
|
||||||
|
// a difference? (Lgb)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ public:
|
|||||||
///
|
///
|
||||||
void Write(std::ostream & os) const;
|
void Write(std::ostream & os) const;
|
||||||
///
|
///
|
||||||
int Latex(std::ostream & os, signed char fragile, bool free_spc) const;
|
int Latex(std::ostream & os, bool fragile, bool free_spc) const;
|
||||||
///
|
///
|
||||||
int Linuxdoc(std::ostream &) const;
|
int Linuxdoc(std::ostream &) const;
|
||||||
///
|
///
|
||||||
|
@ -231,7 +231,7 @@ class MathedInset {
|
|||||||
virtual void draw(Painter &, int x, int baseline) = 0;
|
virtual void draw(Painter &, int x, int baseline) = 0;
|
||||||
|
|
||||||
/// Write LaTeX and Lyx code
|
/// Write LaTeX and Lyx code
|
||||||
virtual void Write(std::ostream &, signed char fragile) = 0;
|
virtual void Write(std::ostream &, bool fragile) = 0;
|
||||||
|
|
||||||
/// Reproduces itself
|
/// Reproduces itself
|
||||||
virtual MathedInset * Clone() = 0;
|
virtual MathedInset * Clone() = 0;
|
||||||
@ -329,7 +329,7 @@ class MathParInset: public MathedInset {
|
|||||||
virtual void draw(Painter &, int x, int baseline);
|
virtual void draw(Painter &, int x, int baseline);
|
||||||
|
|
||||||
/// Write LaTeX code
|
/// Write LaTeX code
|
||||||
virtual void Write(std::ostream &, signed char fragile);
|
virtual void Write(std::ostream &, bool fragile);
|
||||||
|
|
||||||
///
|
///
|
||||||
virtual void Metrics();
|
virtual void Metrics();
|
||||||
@ -488,7 +488,7 @@ class MathMatrixInset: public MathParInset {
|
|||||||
///
|
///
|
||||||
void draw(Painter &, int, int);
|
void draw(Painter &, int, int);
|
||||||
///
|
///
|
||||||
void Write(std::ostream &, signed char fragile);
|
void Write(std::ostream &, bool fragile);
|
||||||
///
|
///
|
||||||
void Metrics();
|
void Metrics();
|
||||||
///
|
///
|
||||||
@ -535,7 +535,7 @@ class MathMatrixInset: public MathParInset {
|
|||||||
LyxArrayBase * mathed_parse(unsigned flags, LyxArrayBase * data,
|
LyxArrayBase * mathed_parse(unsigned flags, LyxArrayBase * data,
|
||||||
MathParInset ** mt);
|
MathParInset ** mt);
|
||||||
///
|
///
|
||||||
void mathed_write(MathParInset *, std::ostream &, int *, signed char fragile,
|
void mathed_write(MathParInset *, std::ostream &, int *, bool fragile,
|
||||||
char const * label = 0);
|
char const * label = 0);
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -46,7 +46,7 @@ public:
|
|||||||
///
|
///
|
||||||
void draw(Painter &, int, int);
|
void draw(Painter &, int, int);
|
||||||
///
|
///
|
||||||
void Write(std::ostream &, signed char fragile);
|
void Write(std::ostream &, bool fragile);
|
||||||
///
|
///
|
||||||
void Metrics();
|
void Metrics();
|
||||||
///
|
///
|
||||||
@ -75,7 +75,7 @@ public:
|
|||||||
///
|
///
|
||||||
void draw(Painter &, int, int);
|
void draw(Painter &, int, int);
|
||||||
///
|
///
|
||||||
void Write(std::ostream &, signed char fragile);
|
void Write(std::ostream &, bool fragile);
|
||||||
///
|
///
|
||||||
void Metrics();
|
void Metrics();
|
||||||
///
|
///
|
||||||
@ -105,7 +105,7 @@ public:
|
|||||||
///
|
///
|
||||||
void draw(Painter &, int, int);
|
void draw(Painter &, int, int);
|
||||||
///
|
///
|
||||||
void Write(std::ostream &, signed char fragile);
|
void Write(std::ostream &, bool fragile);
|
||||||
///
|
///
|
||||||
void Metrics();
|
void Metrics();
|
||||||
protected:
|
protected:
|
||||||
@ -124,7 +124,7 @@ public:
|
|||||||
///
|
///
|
||||||
void draw(Painter &, int, int);
|
void draw(Painter &, int, int);
|
||||||
///
|
///
|
||||||
void Write(std::ostream &, signed char fragile);
|
void Write(std::ostream &, bool fragile);
|
||||||
///
|
///
|
||||||
inline void Metrics();
|
inline void Metrics();
|
||||||
///
|
///
|
||||||
@ -147,7 +147,7 @@ public:
|
|||||||
///
|
///
|
||||||
void draw(Painter &, int, int);
|
void draw(Painter &, int, int);
|
||||||
///
|
///
|
||||||
void Write(std::ostream &, signed char fragile);
|
void Write(std::ostream &, bool fragile);
|
||||||
///
|
///
|
||||||
void Metrics();
|
void Metrics();
|
||||||
///
|
///
|
||||||
@ -174,7 +174,7 @@ public:
|
|||||||
///
|
///
|
||||||
void draw(Painter &, int x, int baseline);
|
void draw(Painter &, int x, int baseline);
|
||||||
///
|
///
|
||||||
void Write(std::ostream &, signed char fragile);
|
void Write(std::ostream &, bool fragile);
|
||||||
///
|
///
|
||||||
void Metrics();
|
void Metrics();
|
||||||
///
|
///
|
||||||
@ -197,7 +197,7 @@ public:
|
|||||||
///
|
///
|
||||||
void draw(Painter &, int x, int baseline);
|
void draw(Painter &, int x, int baseline);
|
||||||
///
|
///
|
||||||
void Write(std::ostream &, signed char fragile);
|
void Write(std::ostream &, bool fragile);
|
||||||
///
|
///
|
||||||
void Metrics();
|
void Metrics();
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ public:
|
|||||||
///
|
///
|
||||||
void draw(Painter &, int, int);
|
void draw(Painter &, int, int);
|
||||||
///
|
///
|
||||||
void Write(std::ostream &, signed char fragile);
|
void Write(std::ostream &, bool fragile);
|
||||||
///
|
///
|
||||||
void Metrics();
|
void Metrics();
|
||||||
protected:
|
protected:
|
||||||
@ -264,7 +264,7 @@ public:
|
|||||||
///
|
///
|
||||||
void draw(Painter &, int, int);
|
void draw(Painter &, int, int);
|
||||||
///
|
///
|
||||||
void Write(std::ostream &, signed char fragile);
|
void Write(std::ostream &, bool fragile);
|
||||||
///
|
///
|
||||||
void Metrics();
|
void Metrics();
|
||||||
///
|
///
|
||||||
@ -297,7 +297,7 @@ bool MathFuncInset::GetLimits() const
|
|||||||
|
|
||||||
|
|
||||||
inline
|
inline
|
||||||
void MathFuncInset::Write(std::ostream & os, signed char /* fragile */)
|
void MathFuncInset::Write(std::ostream & os, bool /* fragile */)
|
||||||
{
|
{
|
||||||
os << "\\" << name << ' ';
|
os << "\\" << name << ' ';
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ void MathMacro::SetFocus(int x, int y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathMacro::Write(ostream & os, signed char fragile)
|
void MathMacro::Write(ostream & os, bool fragile)
|
||||||
{
|
{
|
||||||
if (tmplate->flags & MMF_Exp) {
|
if (tmplate->flags & MMF_Exp) {
|
||||||
lyxerr[Debug::MATHED] << "Expand " << tmplate->flags
|
lyxerr[Debug::MATHED] << "Expand " << tmplate->flags
|
||||||
@ -261,7 +261,7 @@ void MathMacroArgument::Metrics()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathMacroArgument::Write(ostream & os, signed char fragile)
|
void MathMacroArgument::Write(ostream & os, bool fragile)
|
||||||
{
|
{
|
||||||
if (expnd_mode) {
|
if (expnd_mode) {
|
||||||
MathParInset::Write(os, fragile);
|
MathParInset::Write(os, fragile);
|
||||||
@ -375,7 +375,7 @@ void MathMacroTemplate::update(MathMacro * macro)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathMacroTemplate::WriteDef(ostream & os, signed char fragile)
|
void MathMacroTemplate::WriteDef(ostream & os, bool fragile)
|
||||||
{
|
{
|
||||||
os << "\n\\newcommand{\\" << name << "}";
|
os << "\n\\newcommand{\\" << name << "}";
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ public:
|
|||||||
///
|
///
|
||||||
MathedInset * Clone();
|
MathedInset * Clone();
|
||||||
///
|
///
|
||||||
void Write(std::ostream &, signed char fragile);
|
void Write(std::ostream &, bool fragile);
|
||||||
///
|
///
|
||||||
bool setArgumentIdx(int);
|
bool setArgumentIdx(int);
|
||||||
///
|
///
|
||||||
@ -118,7 +118,7 @@ public:
|
|||||||
///
|
///
|
||||||
void draw(Painter &, int x, int baseline);
|
void draw(Painter &, int x, int baseline);
|
||||||
///
|
///
|
||||||
void Write(std::ostream &, signed char fragile);
|
void Write(std::ostream &, bool fragile);
|
||||||
///
|
///
|
||||||
void setNumber(int n) { number = n; }
|
void setNumber(int n) { number = n; }
|
||||||
/// Is expanded or not
|
/// Is expanded or not
|
||||||
@ -146,7 +146,7 @@ public:
|
|||||||
///
|
///
|
||||||
void Metrics();
|
void Metrics();
|
||||||
///
|
///
|
||||||
void WriteDef(std::ostream &, signed char fragile);
|
void WriteDef(std::ostream &, bool fragile);
|
||||||
/// useful for special insets
|
/// useful for special insets
|
||||||
void setTCode(MathedTextCodes t) { tcode = t; }
|
void setTCode(MathedTextCodes t) { tcode = t; }
|
||||||
///
|
///
|
||||||
|
@ -137,7 +137,7 @@ void MathRootInset::SetFocus(int x, int)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathRootInset::Write(ostream & os, signed char fragile)
|
void MathRootInset::Write(ostream & os, bool fragile)
|
||||||
{
|
{
|
||||||
os << '\\' << name << '[';
|
os << '\\' << name << '[';
|
||||||
uroot->Write(os, fragile);
|
uroot->Write(os, fragile);
|
||||||
|
@ -40,7 +40,7 @@ class MathRootInset: public MathSqrtInset {
|
|||||||
///
|
///
|
||||||
void draw(Painter &, int x, int baseline);
|
void draw(Painter &, int x, int baseline);
|
||||||
///
|
///
|
||||||
void Write(std::ostream &, signed char fragile);
|
void Write(std::ostream &, bool fragile);
|
||||||
///
|
///
|
||||||
void Metrics();
|
void Metrics();
|
||||||
///
|
///
|
||||||
|
@ -45,7 +45,7 @@ char const * math_font_name[] = {
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MathSpaceInset::Write(ostream & os, signed char /* fragile */)
|
MathSpaceInset::Write(ostream & os, bool /* fragile */)
|
||||||
{
|
{
|
||||||
if (space >= 0 && space < 6) {
|
if (space >= 0 && space < 6) {
|
||||||
os << '\\' << latex_mathspace[space] << ' ';
|
os << '\\' << latex_mathspace[space] << ' ';
|
||||||
@ -54,13 +54,13 @@ MathSpaceInset::Write(ostream & os, signed char /* fragile */)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MathDotsInset::Write(ostream & os, signed char /* fragile */)
|
MathDotsInset::Write(ostream & os, bool /* fragile */)
|
||||||
{
|
{
|
||||||
os << '\\' << name << ' ';
|
os << '\\' << name << ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathSqrtInset::Write(ostream & os, signed char fragile)
|
void MathSqrtInset::Write(ostream & os, bool fragile)
|
||||||
{
|
{
|
||||||
os << '\\' << name << '{';
|
os << '\\' << name << '{';
|
||||||
MathParInset::Write(os, fragile);
|
MathParInset::Write(os, fragile);
|
||||||
@ -68,7 +68,7 @@ void MathSqrtInset::Write(ostream & os, signed char fragile)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathDelimInset::Write(ostream & os, signed char fragile)
|
void MathDelimInset::Write(ostream & os, bool fragile)
|
||||||
{
|
{
|
||||||
latexkeys * l = (left != '|') ? lm_get_key_by_id(left, LM_TK_SYM): 0;
|
latexkeys * l = (left != '|') ? lm_get_key_by_id(left, LM_TK_SYM): 0;
|
||||||
latexkeys * r = (right != '|') ? lm_get_key_by_id(right, LM_TK_SYM): 0;
|
latexkeys * r = (right != '|') ? lm_get_key_by_id(right, LM_TK_SYM): 0;
|
||||||
@ -96,7 +96,7 @@ void MathDelimInset::Write(ostream & os, signed char fragile)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathDecorationInset::Write(ostream & os, signed char fragile)
|
void MathDecorationInset::Write(ostream & os, bool fragile)
|
||||||
{
|
{
|
||||||
latexkeys * l = lm_get_key_by_id(deco, LM_TK_WIDE);
|
latexkeys * l = lm_get_key_by_id(deco, LM_TK_WIDE);
|
||||||
os << '\\' << l->name << '{';
|
os << '\\' << l->name << '{';
|
||||||
@ -105,7 +105,7 @@ void MathDecorationInset::Write(ostream & os, signed char fragile)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathAccentInset::Write(ostream & os, signed char fragile)
|
void MathAccentInset::Write(ostream & os, bool fragile)
|
||||||
{
|
{
|
||||||
latexkeys * l = lm_get_key_by_id(code, LM_TK_ACCENT);
|
latexkeys * l = lm_get_key_by_id(code, LM_TK_ACCENT);
|
||||||
os << '\\' << l->name;
|
os << '\\' << l->name;
|
||||||
@ -139,7 +139,7 @@ void MathAccentInset::Write(ostream & os, signed char fragile)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathBigopInset::Write(ostream & os, signed char /* fragile */)
|
void MathBigopInset::Write(ostream & os, bool /* fragile */)
|
||||||
{
|
{
|
||||||
bool limp = GetLimits();
|
bool limp = GetLimits();
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ void MathBigopInset::Write(ostream & os, signed char /* fragile */)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathFracInset::Write(ostream & os, signed char fragile)
|
void MathFracInset::Write(ostream & os, bool fragile)
|
||||||
{
|
{
|
||||||
os << '\\' << name << '{';
|
os << '\\' << name << '{';
|
||||||
MathParInset::Write(os, fragile);
|
MathParInset::Write(os, fragile);
|
||||||
@ -167,7 +167,7 @@ void MathFracInset::Write(ostream & os, signed char fragile)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathParInset::Write(ostream & os, signed char fragile)
|
void MathParInset::Write(ostream & os, bool fragile)
|
||||||
{
|
{
|
||||||
if (!array) return;
|
if (!array) return;
|
||||||
int brace = 0;
|
int brace = 0;
|
||||||
@ -288,7 +288,7 @@ void MathParInset::Write(ostream & os, signed char fragile)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathMatrixInset::Write(ostream & os, signed char fragile)
|
void MathMatrixInset::Write(ostream & os, bool fragile)
|
||||||
{
|
{
|
||||||
if (GetType() == LM_OT_MATRIX){
|
if (GetType() == LM_OT_MATRIX){
|
||||||
if (fragile)
|
if (fragile)
|
||||||
@ -320,7 +320,7 @@ void MathMatrixInset::Write(ostream & os, signed char fragile)
|
|||||||
|
|
||||||
|
|
||||||
void mathed_write(MathParInset * p, ostream & os, int * newlines,
|
void mathed_write(MathParInset * p, ostream & os, int * newlines,
|
||||||
signed char fragile, char const * label)
|
bool fragile, char const * label)
|
||||||
{
|
{
|
||||||
number_of_newlines = 0;
|
number_of_newlines = 0;
|
||||||
short mathed_env = p->GetType();
|
short mathed_env = p->GetType();
|
||||||
|
@ -1980,8 +1980,7 @@ LyXParagraph * LyXParagraph::TeXOnePar(ostream & os, TexRow & texrow,
|
|||||||
|
|
||||||
if (!spacing.isDefault()
|
if (!spacing.isDefault()
|
||||||
&& (!Previous() || !Previous()->HasSameLayout(this))) {
|
&& (!Previous() || !Previous()->HasSameLayout(this))) {
|
||||||
os << "\\begin{spacing}{"
|
os << spacing.writeEnvirBegin() << "\n";
|
||||||
<< spacing.getValue() << "}\n";
|
|
||||||
texrow.newline();
|
texrow.newline();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2163,7 +2162,7 @@ LyXParagraph * LyXParagraph::TeXOnePar(ostream & os, TexRow & texrow,
|
|||||||
|
|
||||||
if (!spacing.isDefault()
|
if (!spacing.isDefault()
|
||||||
&& (!par || !par->HasSameLayout(this))) {
|
&& (!par || !par->HasSameLayout(this))) {
|
||||||
os << "\\end{spacing}\n";
|
os << spacing.writeEnvirEnd() << "\n";
|
||||||
texrow.newline();
|
texrow.newline();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3405,7 +3404,7 @@ bool LyXParagraph::RoffContTableRows(ostream & os,
|
|||||||
#if 1
|
#if 1
|
||||||
#ifdef HAVE_SSTREAM
|
#ifdef HAVE_SSTREAM
|
||||||
stringstream ss(ios::in | ios::out);
|
stringstream ss(ios::in | ios::out);
|
||||||
inset->Latex(ss, -1);
|
inset->Latex(ss, true);
|
||||||
ss.seekp(0);
|
ss.seekp(0);
|
||||||
ss.get(c);
|
ss.get(c);
|
||||||
while (!ss) {
|
while (!ss) {
|
||||||
@ -3417,7 +3416,7 @@ bool LyXParagraph::RoffContTableRows(ostream & os,
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
strstream ss;
|
strstream ss;
|
||||||
inset->Latex(ss, -1);
|
inset->Latex(ss, true);
|
||||||
ss.seekp(0);
|
ss.seekp(0);
|
||||||
ss.get(c);
|
ss.get(c);
|
||||||
while (!ss) {
|
while (!ss) {
|
||||||
@ -3438,7 +3437,7 @@ bool LyXParagraph::RoffContTableRows(ostream & os,
|
|||||||
fname2);
|
fname2);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
inset->Latex(fs, -1);
|
inset->Latex(fs, true);
|
||||||
fs.seekp(0);
|
fs.seekp(0);
|
||||||
fs.get(c);
|
fs.get(c);
|
||||||
while (!fs) {
|
while (!fs) {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "lyxrow.h"
|
#include "lyxrow.h"
|
||||||
#include "Painter.h"
|
#include "Painter.h"
|
||||||
#include "WorkArea.h"
|
#include "WorkArea.h"
|
||||||
#include "bufferparams.h"
|
#include "buffer.h"
|
||||||
#include "font.h"
|
#include "font.h"
|
||||||
|
|
||||||
using std::max;
|
using std::max;
|
||||||
@ -190,9 +190,9 @@ void LyXScreen::ShowCursor()
|
|||||||
if (!cursor_visible) {
|
if (!cursor_visible) {
|
||||||
Cursor_Shape shape = BAR_SHAPE;
|
Cursor_Shape shape = BAR_SHAPE;
|
||||||
if (text->real_current_font.language() !=
|
if (text->real_current_font.language() !=
|
||||||
text->bparams->language_info
|
text->buffer->params.language_info
|
||||||
|| text->real_current_font.isVisibleRightToLeft()
|
|| text->real_current_font.isVisibleRightToLeft()
|
||||||
!= text->bparams->language_info->RightToLeft)
|
!= text->buffer->params.language_info->RightToLeft)
|
||||||
shape = (text->real_current_font.isVisibleRightToLeft())
|
shape = (text->real_current_font.isVisibleRightToLeft())
|
||||||
? REVERSED_L_SHAPE : L_SHAPE;
|
? REVERSED_L_SHAPE : L_SHAPE;
|
||||||
ShowManualCursor(text->cursor.x, text->cursor.y,
|
ShowManualCursor(text->cursor.x, text->cursor.y,
|
||||||
|
122
src/text.C
122
src/text.C
@ -565,8 +565,9 @@ void LyXText::draw(Row const * row,
|
|||||||
// exactly the label-width.
|
// exactly the label-width.
|
||||||
int LyXText::LeftMargin(Row const * row) const
|
int LyXText::LeftMargin(Row const * row) const
|
||||||
{
|
{
|
||||||
LyXLayout const & layout = textclasslist.Style(bparams->textclass,
|
LyXLayout const & layout =
|
||||||
row->par->GetLayout());
|
textclasslist.Style(buffer->params.textclass,
|
||||||
|
row->par->GetLayout());
|
||||||
|
|
||||||
string parindent = layout.parindent;
|
string parindent = layout.parindent;
|
||||||
|
|
||||||
@ -578,10 +579,10 @@ int LyXText::LeftMargin(Row const * row) const
|
|||||||
int x = LYX_PAPER_MARGIN;
|
int x = LYX_PAPER_MARGIN;
|
||||||
|
|
||||||
x += lyxfont::signedWidth(textclasslist
|
x += lyxfont::signedWidth(textclasslist
|
||||||
.TextClass(bparams->textclass)
|
.TextClass(buffer->params.textclass)
|
||||||
.leftmargin(),
|
.leftmargin(),
|
||||||
textclasslist
|
textclasslist
|
||||||
.TextClass(bparams->textclass)
|
.TextClass(buffer->params.textclass)
|
||||||
.defaultfont());
|
.defaultfont());
|
||||||
|
|
||||||
if (row->par->footnoteflag == LyXParagraph::OPEN_FOOTNOTE) {
|
if (row->par->footnoteflag == LyXParagraph::OPEN_FOOTNOTE) {
|
||||||
@ -601,7 +602,7 @@ int LyXText::LeftMargin(Row const * row) const
|
|||||||
LyXParagraph * newpar = row->par
|
LyXParagraph * newpar = row->par
|
||||||
->DepthHook(row->par->GetDepth());
|
->DepthHook(row->par->GetDepth());
|
||||||
if (newpar &&
|
if (newpar &&
|
||||||
textclasslist.Style(bparams->textclass,
|
textclasslist.Style(buffer->params.textclass,
|
||||||
newpar->GetLayout())
|
newpar->GetLayout())
|
||||||
.nextnoindent)
|
.nextnoindent)
|
||||||
parindent.clear();
|
parindent.clear();
|
||||||
@ -617,7 +618,7 @@ int LyXText::LeftMargin(Row const * row) const
|
|||||||
// check wether it is a sufficent paragraph
|
// check wether it is a sufficent paragraph
|
||||||
if (newpar && newpar->footnoteflag == row->par->footnoteflag
|
if (newpar && newpar->footnoteflag == row->par->footnoteflag
|
||||||
&& textclasslist
|
&& textclasslist
|
||||||
.Style(bparams->textclass,
|
.Style(buffer->params.textclass,
|
||||||
newpar->GetLayout()).isEnvironment()) {
|
newpar->GetLayout()).isEnvironment()) {
|
||||||
Row dummyrow;
|
Row dummyrow;
|
||||||
dummyrow.par = newpar;
|
dummyrow.par = newpar;
|
||||||
@ -636,7 +637,7 @@ int LyXText::LeftMargin(Row const * row) const
|
|||||||
parindent.clear();
|
parindent.clear();
|
||||||
else
|
else
|
||||||
parindent = textclasslist
|
parindent = textclasslist
|
||||||
.Style(bparams->textclass,
|
.Style(buffer->params.textclass,
|
||||||
newpar->GetLayout()).parindent;
|
newpar->GetLayout()).parindent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -648,7 +649,7 @@ int LyXText::LeftMargin(Row const * row) const
|
|||||||
if (!layout.leftmargin.empty()) {
|
if (!layout.leftmargin.empty()) {
|
||||||
x += lyxfont::signedWidth(layout.leftmargin,
|
x += lyxfont::signedWidth(layout.leftmargin,
|
||||||
textclasslist
|
textclasslist
|
||||||
.TextClass(bparams->
|
.TextClass(buffer->params.
|
||||||
textclass)
|
textclass)
|
||||||
.defaultfont());
|
.defaultfont());
|
||||||
}
|
}
|
||||||
@ -670,7 +671,7 @@ int LyXText::LeftMargin(Row const * row) const
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MARGIN_STATIC:
|
case MARGIN_STATIC:
|
||||||
x += lyxfont::signedWidth(layout.leftmargin, textclasslist.TextClass(bparams->textclass).defaultfont()) * 4
|
x += lyxfont::signedWidth(layout.leftmargin, textclasslist.TextClass(buffer->params.textclass).defaultfont()) * 4
|
||||||
/ (row->par->GetDepth() + 4);
|
/ (row->par->GetDepth() + 4);
|
||||||
break;
|
break;
|
||||||
case MARGIN_FIRST_DYNAMIC:
|
case MARGIN_FIRST_DYNAMIC:
|
||||||
@ -718,7 +719,7 @@ int LyXText::LeftMargin(Row const * row) const
|
|||||||
|
|
||||||
x += lyxfont::signedWidth(layout.leftmargin,
|
x += lyxfont::signedWidth(layout.leftmargin,
|
||||||
textclasslist
|
textclasslist
|
||||||
.TextClass(bparams->textclass)
|
.TextClass(buffer->params.textclass)
|
||||||
.defaultfont());
|
.defaultfont());
|
||||||
x += minfill;
|
x += minfill;
|
||||||
}
|
}
|
||||||
@ -758,19 +759,19 @@ int LyXText::LeftMargin(Row const * row) const
|
|||||||
&& align == LYX_ALIGN_BLOCK
|
&& align == LYX_ALIGN_BLOCK
|
||||||
&& !row->par->noindent
|
&& !row->par->noindent
|
||||||
&& (row->par->layout ||
|
&& (row->par->layout ||
|
||||||
bparams->paragraph_separation ==
|
buffer->params.paragraph_separation ==
|
||||||
BufferParams::PARSEP_INDENT))
|
BufferParams::PARSEP_INDENT))
|
||||||
x += lyxfont::signedWidth(parindent,
|
x += lyxfont::signedWidth(parindent,
|
||||||
textclasslist
|
textclasslist
|
||||||
.TextClass(bparams
|
.TextClass(buffer->params
|
||||||
->textclass)
|
.textclass)
|
||||||
.defaultfont());
|
.defaultfont());
|
||||||
else if (layout.labeltype == LABEL_BIBLIO) {
|
else if (layout.labeltype == LABEL_BIBLIO) {
|
||||||
// ale970405 Right width for bibitems
|
// ale970405 Right width for bibitems
|
||||||
x += bibitemMaxWidth(owner_->painter(),
|
x += bibitemMaxWidth(owner_->painter(),
|
||||||
textclasslist
|
textclasslist
|
||||||
.TextClass(bparams
|
.TextClass(buffer->params
|
||||||
->textclass)
|
.textclass)
|
||||||
.defaultfont());
|
.defaultfont());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -781,15 +782,15 @@ int LyXText::LeftMargin(Row const * row) const
|
|||||||
int LyXText::RightMargin(Row const * row) const
|
int LyXText::RightMargin(Row const * row) const
|
||||||
{
|
{
|
||||||
LyXLayout const & layout =
|
LyXLayout const & layout =
|
||||||
textclasslist.Style(bparams->textclass,
|
textclasslist.Style(buffer->params.textclass,
|
||||||
row->par->GetLayout());
|
row->par->GetLayout());
|
||||||
|
|
||||||
int x = LYX_PAPER_MARGIN
|
int x = LYX_PAPER_MARGIN
|
||||||
+ lyxfont::signedWidth(textclasslist
|
+ lyxfont::signedWidth(textclasslist
|
||||||
.TextClass(bparams->textclass)
|
.TextClass(buffer->params.textclass)
|
||||||
.rightmargin(),
|
.rightmargin(),
|
||||||
textclasslist
|
textclasslist
|
||||||
.TextClass(bparams->textclass)
|
.TextClass(buffer->params.textclass)
|
||||||
.defaultfont());
|
.defaultfont());
|
||||||
|
|
||||||
if (row->par->footnoteflag == LyXParagraph::OPEN_FOOTNOTE) {
|
if (row->par->footnoteflag == LyXParagraph::OPEN_FOOTNOTE) {
|
||||||
@ -815,7 +816,7 @@ int LyXText::RightMargin(Row const * row) const
|
|||||||
|
|
||||||
// check wether it is a sufficent paragraph
|
// check wether it is a sufficent paragraph
|
||||||
if (newpar && newpar->footnoteflag == row->par->footnoteflag
|
if (newpar && newpar->footnoteflag == row->par->footnoteflag
|
||||||
&& textclasslist.Style(bparams->textclass,
|
&& textclasslist.Style(buffer->params.textclass,
|
||||||
newpar->GetLayout())
|
newpar->GetLayout())
|
||||||
.isEnvironment()) {
|
.isEnvironment()) {
|
||||||
Row dummyrow;
|
Row dummyrow;
|
||||||
@ -832,7 +833,7 @@ int LyXText::RightMargin(Row const * row) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//lyxerr << "rightmargin: " << layout->rightmargin << endl;
|
//lyxerr << "rightmargin: " << layout->rightmargin << endl;
|
||||||
x += lyxfont::signedWidth(layout.rightmargin, textclasslist.TextClass(bparams->textclass).defaultfont()) * 4
|
x += lyxfont::signedWidth(layout.rightmargin, textclasslist.TextClass(buffer->params.textclass).defaultfont()) * 4
|
||||||
/ (row->par->GetDepth() + 4);
|
/ (row->par->GetDepth() + 4);
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
@ -840,7 +841,7 @@ int LyXText::RightMargin(Row const * row) const
|
|||||||
|
|
||||||
int LyXText::LabelEnd (Row const * row) const
|
int LyXText::LabelEnd (Row const * row) const
|
||||||
{
|
{
|
||||||
if (textclasslist.Style(bparams->textclass,
|
if (textclasslist.Style(buffer->params.textclass,
|
||||||
row->par->GetLayout()).margintype
|
row->par->GetLayout()).margintype
|
||||||
== MARGIN_MANUAL) {
|
== MARGIN_MANUAL) {
|
||||||
Row tmprow;
|
Row tmprow;
|
||||||
@ -935,7 +936,7 @@ LyXText::NextBreakPoint(Row const * row, int width) const
|
|||||||
|
|
||||||
LyXParagraph::size_type main_body = BeginningOfMainBody(par);
|
LyXParagraph::size_type main_body = BeginningOfMainBody(par);
|
||||||
LyXLayout const & layout =
|
LyXLayout const & layout =
|
||||||
textclasslist.Style(bparams->textclass, par->GetLayout());
|
textclasslist.Style(buffer->params.textclass, par->GetLayout());
|
||||||
LyXParagraph::size_type i = pos;
|
LyXParagraph::size_type i = pos;
|
||||||
|
|
||||||
if (layout.margintype == MARGIN_RIGHT_ADDRESS_BOX) {
|
if (layout.margintype == MARGIN_RIGHT_ADDRESS_BOX) {
|
||||||
@ -1053,7 +1054,7 @@ int LyXText::Fill(Row const * row, int paper_width) const
|
|||||||
/* table stuff -- end*/
|
/* table stuff -- end*/
|
||||||
|
|
||||||
// special handling of the right address boxes
|
// special handling of the right address boxes
|
||||||
if (textclasslist.Style(bparams->textclass,
|
if (textclasslist.Style(buffer->params.textclass,
|
||||||
row->par->GetLayout()).margintype
|
row->par->GetLayout()).margintype
|
||||||
== MARGIN_RIGHT_ADDRESS_BOX) {
|
== MARGIN_RIGHT_ADDRESS_BOX) {
|
||||||
int tmpfill = row->fill;
|
int tmpfill = row->fill;
|
||||||
@ -1063,7 +1064,7 @@ int LyXText::Fill(Row const * row, int paper_width) const
|
|||||||
} else
|
} else
|
||||||
w = LeftMargin(row);
|
w = LeftMargin(row);
|
||||||
|
|
||||||
LyXLayout const & layout = textclasslist.Style(bparams->textclass,
|
LyXLayout const & layout = textclasslist.Style(buffer->params.textclass,
|
||||||
row->par->GetLayout());
|
row->par->GetLayout());
|
||||||
LyXParagraph::size_type main_body =
|
LyXParagraph::size_type main_body =
|
||||||
BeginningOfMainBody(row->par);
|
BeginningOfMainBody(row->par);
|
||||||
@ -1213,7 +1214,7 @@ bool LyXText::HfillExpansion(Row const * row_ptr,
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
// in some labels it does not count
|
// in some labels it does not count
|
||||||
if (textclasslist.Style(bparams->textclass,
|
if (textclasslist.Style(buffer->params.textclass,
|
||||||
row_ptr->par->GetLayout()).margintype
|
row_ptr->par->GetLayout()).margintype
|
||||||
!= MARGIN_MANUAL
|
!= MARGIN_MANUAL
|
||||||
&& pos < BeginningOfMainBody(row_ptr->par))
|
&& pos < BeginningOfMainBody(row_ptr->par))
|
||||||
@ -1257,7 +1258,7 @@ void LyXText::SetHeightOfRow(Row * row_ptr) const
|
|||||||
LyXParagraph * par = row_ptr->par->LastPhysicalPar();
|
LyXParagraph * par = row_ptr->par->LastPhysicalPar();
|
||||||
LyXParagraph * firstpar = row_ptr->par->FirstPhysicalPar();
|
LyXParagraph * firstpar = row_ptr->par->FirstPhysicalPar();
|
||||||
|
|
||||||
LyXLayout const & layout = textclasslist.Style(bparams->textclass,
|
LyXLayout const & layout = textclasslist.Style(buffer->params.textclass,
|
||||||
firstpar->GetLayout());
|
firstpar->GetLayout());
|
||||||
|
|
||||||
LyXFont font = GetFont(par, par->Last() - 1);
|
LyXFont font = GetFont(par, par->Last() - 1);
|
||||||
@ -1271,7 +1272,7 @@ void LyXText::SetHeightOfRow(Row * row_ptr) const
|
|||||||
if (!row_ptr->par->spacing.isDefault()) {
|
if (!row_ptr->par->spacing.isDefault()) {
|
||||||
spacing_val = row_ptr->par->spacing.getValue();
|
spacing_val = row_ptr->par->spacing.getValue();
|
||||||
} else {
|
} else {
|
||||||
spacing_val = bparams->spacing.getValue();
|
spacing_val = buffer->params.spacing.getValue();
|
||||||
}
|
}
|
||||||
//lyxerr << "spacing_val = " << spacing_val << endl;
|
//lyxerr << "spacing_val = " << spacing_val << endl;
|
||||||
|
|
||||||
@ -1337,17 +1338,17 @@ void LyXText::SetHeightOfRow(Row * row_ptr) const
|
|||||||
&& row_ptr->par == firstpar) {
|
&& row_ptr->par == firstpar) {
|
||||||
|
|
||||||
/* some parksips VERY EASY IMPLEMENTATION */
|
/* some parksips VERY EASY IMPLEMENTATION */
|
||||||
if (bparams->paragraph_separation == BufferParams::PARSEP_SKIP) {
|
if (buffer->params.paragraph_separation == BufferParams::PARSEP_SKIP) {
|
||||||
if (layout.isParagraph()
|
if (layout.isParagraph()
|
||||||
&& firstpar->GetDepth() == 0
|
&& firstpar->GetDepth() == 0
|
||||||
&& firstpar->Previous())
|
&& firstpar->Previous())
|
||||||
maxasc += bparams->getDefSkip().inPixels(owner_);
|
maxasc += buffer->params.getDefSkip().inPixels(owner_);
|
||||||
else if (firstpar->Previous()
|
else if (firstpar->Previous()
|
||||||
&& textclasslist.Style(bparams->textclass,
|
&& textclasslist.Style(buffer->params.textclass,
|
||||||
firstpar->Previous()->GetLayout()).isParagraph()
|
firstpar->Previous()->GetLayout()).isParagraph()
|
||||||
&& firstpar->Previous()->GetDepth() == 0)
|
&& firstpar->Previous()->GetDepth() == 0)
|
||||||
// is it right to use defskip here too? (AS)
|
// is it right to use defskip here too? (AS)
|
||||||
maxasc += bparams->getDefSkip().inPixels(owner_);
|
maxasc += buffer->params.getDefSkip().inPixels(owner_);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* the paper margins */
|
/* the paper margins */
|
||||||
@ -1370,12 +1371,12 @@ void LyXText::SetHeightOfRow(Row * row_ptr) const
|
|||||||
/* this is special code for the chapter, since the label of this
|
/* this is special code for the chapter, since the label of this
|
||||||
* layout is printed in an extra row */
|
* layout is printed in an extra row */
|
||||||
if (layout.labeltype == LABEL_COUNTER_CHAPTER
|
if (layout.labeltype == LABEL_COUNTER_CHAPTER
|
||||||
&& bparams->secnumdepth>= 0) {
|
&& buffer->params.secnumdepth >= 0) {
|
||||||
float spacing_val = 1.0;
|
float spacing_val = 1.0;
|
||||||
if (!row_ptr->par->spacing.isDefault()) {
|
if (!row_ptr->par->spacing.isDefault()) {
|
||||||
spacing_val = row_ptr->par->spacing.getValue();
|
spacing_val = row_ptr->par->spacing.getValue();
|
||||||
} else {
|
} else {
|
||||||
spacing_val = bparams->spacing.getValue();
|
spacing_val = buffer->params.spacing.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
labeladdon = int(lyxfont::maxDescent(labelfont) *
|
labeladdon = int(lyxfont::maxDescent(labelfont) *
|
||||||
@ -1396,7 +1397,7 @@ void LyXText::SetHeightOfRow(Row * row_ptr) const
|
|||||||
if (!row_ptr->par->spacing.isDefault()) {
|
if (!row_ptr->par->spacing.isDefault()) {
|
||||||
spacing_val = row_ptr->par->spacing.getValue();
|
spacing_val = row_ptr->par->spacing.getValue();
|
||||||
} else {
|
} else {
|
||||||
spacing_val = bparams->spacing.getValue();
|
spacing_val = buffer->params.spacing.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
labeladdon = int(
|
labeladdon = int(
|
||||||
@ -1427,7 +1428,7 @@ void LyXText::SetHeightOfRow(Row * row_ptr) const
|
|||||||
tmptop = layout.topsep;
|
tmptop = layout.topsep;
|
||||||
|
|
||||||
if (row_ptr->previous->par->GetDepth() >= row_ptr->par->GetDepth())
|
if (row_ptr->previous->par->GetDepth() >= row_ptr->par->GetDepth())
|
||||||
tmptop-= textclasslist.Style(bparams->textclass, row_ptr->previous->par->GetLayout()).bottomsep;
|
tmptop-= textclasslist.Style(buffer->params.textclass, row_ptr->previous->par->GetLayout()).bottomsep;
|
||||||
|
|
||||||
if (tmptop > 0)
|
if (tmptop > 0)
|
||||||
layoutasc = (tmptop * DefaultHeight());
|
layoutasc = (tmptop * DefaultHeight());
|
||||||
@ -1441,7 +1442,7 @@ void LyXText::SetHeightOfRow(Row * row_ptr) const
|
|||||||
|
|
||||||
prev = row_ptr->par->DepthHook(row_ptr->par->GetDepth()-1);
|
prev = row_ptr->par->DepthHook(row_ptr->par->GetDepth()-1);
|
||||||
if (prev) {
|
if (prev) {
|
||||||
maxasc += int(textclasslist.Style(bparams->textclass,
|
maxasc += int(textclasslist.Style(buffer->params.textclass,
|
||||||
prev->GetLayout()).parsep * DefaultHeight());
|
prev->GetLayout()).parsep * DefaultHeight());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1487,12 +1488,12 @@ void LyXText::SetHeightOfRow(Row * row_ptr) const
|
|||||||
float unusual = 0;
|
float unusual = 0;
|
||||||
|
|
||||||
if (comparepar->GetDepth() > nextpar->GetDepth()) {
|
if (comparepar->GetDepth() > nextpar->GetDepth()) {
|
||||||
usual = (textclasslist.Style(bparams->textclass, comparepar->GetLayout()).bottomsep * DefaultHeight());
|
usual = (textclasslist.Style(buffer->params.textclass, comparepar->GetLayout()).bottomsep * DefaultHeight());
|
||||||
comparepar = comparepar->DepthHook(nextpar->GetDepth());
|
comparepar = comparepar->DepthHook(nextpar->GetDepth());
|
||||||
if (comparepar->GetLayout()!= nextpar->GetLayout()
|
if (comparepar->GetLayout()!= nextpar->GetLayout()
|
||||||
|| nextpar->GetLabelWidthString() !=
|
|| nextpar->GetLabelWidthString() !=
|
||||||
comparepar->GetLabelWidthString())
|
comparepar->GetLabelWidthString())
|
||||||
unusual = (textclasslist.Style(bparams->textclass, comparepar->GetLayout()).bottomsep * DefaultHeight());
|
unusual = (textclasslist.Style(buffer->params.textclass, comparepar->GetLayout()).bottomsep * DefaultHeight());
|
||||||
|
|
||||||
if (unusual > usual)
|
if (unusual > usual)
|
||||||
layoutdesc = unusual;
|
layoutdesc = unusual;
|
||||||
@ -1504,7 +1505,7 @@ void LyXText::SetHeightOfRow(Row * row_ptr) const
|
|||||||
if (comparepar->GetLayout()!= nextpar->GetLayout()
|
if (comparepar->GetLayout()!= nextpar->GetLayout()
|
||||||
|| nextpar->GetLabelWidthString() !=
|
|| nextpar->GetLabelWidthString() !=
|
||||||
comparepar->GetLabelWidthString())
|
comparepar->GetLabelWidthString())
|
||||||
layoutdesc = int(textclasslist.Style(bparams->textclass, comparepar->GetLayout()).bottomsep * DefaultHeight());
|
layoutdesc = int(textclasslist.Style(buffer->params.textclass, comparepar->GetLayout()).bottomsep * DefaultHeight());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1654,7 +1655,7 @@ void LyXText::BreakAgainOneRow(Row * row)
|
|||||||
|
|
||||||
void LyXText::BreakParagraph(char keep_layout)
|
void LyXText::BreakParagraph(char keep_layout)
|
||||||
{
|
{
|
||||||
LyXLayout const & layout = textclasslist.Style(bparams->textclass,
|
LyXLayout const & layout = textclasslist.Style(buffer->params.textclass,
|
||||||
cursor.par->GetLayout());
|
cursor.par->GetLayout());
|
||||||
|
|
||||||
/* table stuff -- begin */
|
/* table stuff -- begin */
|
||||||
@ -2548,7 +2549,7 @@ void LyXText::InsertChar(char c)
|
|||||||
* disable the double-space checking */
|
* disable the double-space checking */
|
||||||
|
|
||||||
bool freeSpacing =
|
bool freeSpacing =
|
||||||
textclasslist.Style(bparams->textclass,
|
textclasslist.Style(buffer->params.textclass,
|
||||||
cursor.row->par->GetLayout()).free_spacing;
|
cursor.row->par->GetLayout()).free_spacing;
|
||||||
|
|
||||||
/* table stuff -- begin*/
|
/* table stuff -- begin*/
|
||||||
@ -2761,7 +2762,7 @@ void LyXText::InsertChar(char c)
|
|||||||
RedoHeightOfParagraph(cursor);
|
RedoHeightOfParagraph(cursor);
|
||||||
} else {
|
} else {
|
||||||
/* now the special right address boxes */
|
/* now the special right address boxes */
|
||||||
if (textclasslist.Style(bparams->textclass,
|
if (textclasslist.Style(buffer->params.textclass,
|
||||||
cursor.par->GetLayout()).margintype
|
cursor.par->GetLayout()).margintype
|
||||||
== MARGIN_RIGHT_ADDRESS_BOX) {
|
== MARGIN_RIGHT_ADDRESS_BOX) {
|
||||||
RedoDrawingOfParagraph(cursor);
|
RedoDrawingOfParagraph(cursor);
|
||||||
@ -2812,9 +2813,9 @@ void LyXText::PrepareToPrint(Row * row, float & x,
|
|||||||
x = LeftMargin(row);
|
x = LeftMargin(row);
|
||||||
|
|
||||||
/* is there a manual margin with a manual label */
|
/* is there a manual margin with a manual label */
|
||||||
if (textclasslist.Style(bparams->textclass,
|
if (textclasslist.Style(buffer->params.textclass,
|
||||||
row->par->GetLayout()).margintype == MARGIN_MANUAL
|
row->par->GetLayout()).margintype == MARGIN_MANUAL
|
||||||
&& textclasslist.Style(bparams->textclass,
|
&& textclasslist.Style(buffer->params.textclass,
|
||||||
row->par->GetLayout()).labeltype == LABEL_MANUAL) {
|
row->par->GetLayout()).labeltype == LABEL_MANUAL) {
|
||||||
|
|
||||||
nlh = NumberOfLabelHfills(row) + 1; /* one more since labels
|
nlh = NumberOfLabelHfills(row) + 1; /* one more since labels
|
||||||
@ -2842,7 +2843,7 @@ void LyXText::PrepareToPrint(Row * row, float & x,
|
|||||||
* set x how you need it */
|
* set x how you need it */
|
||||||
int align;
|
int align;
|
||||||
if (row->par->FirstPhysicalPar()->align == LYX_ALIGN_LAYOUT)
|
if (row->par->FirstPhysicalPar()->align == LYX_ALIGN_LAYOUT)
|
||||||
align = textclasslist.Style(bparams->textclass, row->par->GetLayout()).align;
|
align = textclasslist.Style(buffer->params.textclass, row->par->GetLayout()).align;
|
||||||
else
|
else
|
||||||
align = row->par->FirstPhysicalPar()->align;
|
align = row->par->FirstPhysicalPar()->align;
|
||||||
|
|
||||||
@ -2885,7 +2886,7 @@ void LyXText::PrepareToPrint(Row * row, float & x,
|
|||||||
if (main_body > 0 &&
|
if (main_body > 0 &&
|
||||||
(main_body-1 > last ||
|
(main_body-1 > last ||
|
||||||
!row->par->IsLineSeparator(main_body-1))) {
|
!row->par->IsLineSeparator(main_body-1))) {
|
||||||
LyXLayout const & layout = textclasslist.Style(bparams->textclass,
|
LyXLayout const & layout = textclasslist.Style(buffer->params.textclass,
|
||||||
row->par->GetLayout());
|
row->par->GetLayout());
|
||||||
x += lyxfont::width(layout.labelsep,
|
x += lyxfont::width(layout.labelsep,
|
||||||
GetFont(row->par, -2));
|
GetFont(row->par, -2));
|
||||||
@ -3112,7 +3113,7 @@ char * LyXText::SelectNextWord(float & value)
|
|||||||
&& (cursor.par->IsLetter(cursor.pos))
|
&& (cursor.par->IsLetter(cursor.pos))
|
||||||
|| (cursor.par->GetChar(cursor.pos) == LyXParagraph::META_INSET
|
|| (cursor.par->GetChar(cursor.pos) == LyXParagraph::META_INSET
|
||||||
&& cursor.par->GetInset(cursor.pos) != 0
|
&& cursor.par->GetInset(cursor.pos) != 0
|
||||||
&& cursor.par->GetInset(cursor.pos)->Latex(latex, 0, false) == 0
|
&& cursor.par->GetInset(cursor.pos)->Latex(latex, false, false) == 0
|
||||||
#ifdef HAVE_SSTREAM
|
#ifdef HAVE_SSTREAM
|
||||||
&& latex.str() == "\\-"
|
&& latex.str() == "\\-"
|
||||||
#else
|
#else
|
||||||
@ -3160,7 +3161,7 @@ void LyXText::SelectSelectedWord()
|
|||||||
&& (cursor.par->IsLetter(cursor.pos)
|
&& (cursor.par->IsLetter(cursor.pos)
|
||||||
|| (cursor.par->GetChar(cursor.pos) == LyXParagraph::META_INSET
|
|| (cursor.par->GetChar(cursor.pos) == LyXParagraph::META_INSET
|
||||||
&& cursor.par->GetInset(cursor.pos) != 0
|
&& cursor.par->GetInset(cursor.pos) != 0
|
||||||
&& cursor.par->GetInset(cursor.pos)->Latex(latex, 0, false) == 0
|
&& cursor.par->GetInset(cursor.pos)->Latex(latex, false, false) == 0
|
||||||
#ifdef HAVE_SSTREAM
|
#ifdef HAVE_SSTREAM
|
||||||
&& latex.str() == "\\-"
|
&& latex.str() == "\\-"
|
||||||
#else
|
#else
|
||||||
@ -3266,7 +3267,6 @@ void LyXText::ChangeWordCase(LyXText::TextCase action)
|
|||||||
LyXParagraph::size_type tmppos =
|
LyXParagraph::size_type tmppos =
|
||||||
cursor.par->PositionInParFromPos(cursor.pos);
|
cursor.par->PositionInParFromPos(cursor.pos);
|
||||||
while (tmppos < tmppar->size()) {
|
while (tmppos < tmppar->size()) {
|
||||||
//unsigned char c = tmppar->text[tmppos];
|
|
||||||
unsigned char c = tmppar->GetChar(tmppos);
|
unsigned char c = tmppar->GetChar(tmppos);
|
||||||
if (IsKommaChar(c) || IsLineSeparatorChar(c))
|
if (IsKommaChar(c) || IsLineSeparatorChar(c))
|
||||||
break;
|
break;
|
||||||
@ -3663,7 +3663,7 @@ void LyXText::Backspace()
|
|||||||
RedoHeightOfParagraph(cursor);
|
RedoHeightOfParagraph(cursor);
|
||||||
} else {
|
} else {
|
||||||
// now the special right address boxes
|
// now the special right address boxes
|
||||||
if (textclasslist.Style(bparams->textclass,
|
if (textclasslist.Style(buffer->params.textclass,
|
||||||
cursor.par->GetLayout()).margintype == MARGIN_RIGHT_ADDRESS_BOX) {
|
cursor.par->GetLayout()).margintype == MARGIN_RIGHT_ADDRESS_BOX) {
|
||||||
RedoDrawingOfParagraph(cursor);
|
RedoDrawingOfParagraph(cursor);
|
||||||
}
|
}
|
||||||
@ -3789,7 +3789,7 @@ void LyXText::GetVisibleRow(int offset, Row * row_ptr, long y)
|
|||||||
float old_tmpx = tmpx;
|
float old_tmpx = tmpx;
|
||||||
if (main_body > 0 && pos == main_body-1) {
|
if (main_body > 0 && pos == main_body-1) {
|
||||||
tmpx += fill_label_hfill +
|
tmpx += fill_label_hfill +
|
||||||
lyxfont::width(textclasslist.Style(bparams->textclass,
|
lyxfont::width(textclasslist.Style(buffer->params.textclass,
|
||||||
row_ptr->par->GetLayout()).labelsep,
|
row_ptr->par->GetLayout()).labelsep,
|
||||||
GetFont(row_ptr->par, -2));
|
GetFont(row_ptr->par, -2));
|
||||||
if (row_ptr->par->IsLineSeparator(main_body-1))
|
if (row_ptr->par->IsLineSeparator(main_body-1))
|
||||||
@ -3936,7 +3936,7 @@ void LyXText::GetVisibleRow(int offset, Row * row_ptr, long y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
LyXLayout const & layout =
|
LyXLayout const & layout =
|
||||||
textclasslist.Style(bparams->textclass,
|
textclasslist.Style(buffer->params.textclass,
|
||||||
row_ptr->par->GetLayout());
|
row_ptr->par->GetLayout());
|
||||||
firstpar = row_ptr->par->FirstPhysicalPar();
|
firstpar = row_ptr->par->FirstPhysicalPar();
|
||||||
|
|
||||||
@ -4006,17 +4006,17 @@ void LyXText::GetVisibleRow(int offset, Row * row_ptr, long y)
|
|||||||
|
|
||||||
/* think about the parskip */
|
/* think about the parskip */
|
||||||
/* some parskips VERY EASY IMPLEMENTATION */
|
/* some parskips VERY EASY IMPLEMENTATION */
|
||||||
if (bparams->paragraph_separation == BufferParams::PARSEP_SKIP) {
|
if (buffer->params.paragraph_separation == BufferParams::PARSEP_SKIP) {
|
||||||
if (layout.latextype == LATEX_PARAGRAPH
|
if (layout.latextype == LATEX_PARAGRAPH
|
||||||
&& firstpar->GetDepth() == 0
|
&& firstpar->GetDepth() == 0
|
||||||
&& firstpar->Previous())
|
&& firstpar->Previous())
|
||||||
y_top += bparams->getDefSkip().inPixels(owner_);
|
y_top += buffer->params.getDefSkip().inPixels(owner_);
|
||||||
else if (firstpar->Previous()
|
else if (firstpar->Previous()
|
||||||
&& textclasslist.Style(bparams->textclass,
|
&& textclasslist.Style(buffer->params.textclass,
|
||||||
firstpar->Previous()->GetLayout()).latextype == LATEX_PARAGRAPH
|
firstpar->Previous()->GetLayout()).latextype == LATEX_PARAGRAPH
|
||||||
&& firstpar->Previous()->GetDepth() == 0)
|
&& firstpar->Previous()->GetDepth() == 0)
|
||||||
// is it right to use defskip here, too? (AS)
|
// is it right to use defskip here, too? (AS)
|
||||||
y_top += bparams->getDefSkip().inPixels(owner_);
|
y_top += buffer->params.getDefSkip().inPixels(owner_);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (row_ptr->par->line_top) { /* draw a top line */
|
if (row_ptr->par->line_top) { /* draw a top line */
|
||||||
@ -4042,14 +4042,14 @@ void LyXText::GetVisibleRow(int offset, Row * row_ptr, long y)
|
|||||||
string tmpstring = row_ptr->par->GetLabelstring();
|
string tmpstring = row_ptr->par->GetLabelstring();
|
||||||
|
|
||||||
if (layout.labeltype == LABEL_COUNTER_CHAPTER) {
|
if (layout.labeltype == LABEL_COUNTER_CHAPTER) {
|
||||||
if (bparams->secnumdepth >= 0){
|
if (buffer->params.secnumdepth >= 0) {
|
||||||
/* this is special code for the chapter layout. This is printed in
|
/* this is special code for the chapter layout. This is printed in
|
||||||
* an extra row and has a pagebreak at the top. */
|
* an extra row and has a pagebreak at the top. */
|
||||||
float spacing_val = 1.0;
|
float spacing_val = 1.0;
|
||||||
if (!row_ptr->par->spacing.isDefault()) {
|
if (!row_ptr->par->spacing.isDefault()) {
|
||||||
spacing_val = row_ptr->par->spacing.getValue();
|
spacing_val = row_ptr->par->spacing.getValue();
|
||||||
} else {
|
} else {
|
||||||
spacing_val = bparams->spacing.getValue();
|
spacing_val = buffer->params.spacing.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
maxdesc = int(lyxfont::maxDescent(font) * layout.spacing.getValue() * spacing_val)
|
maxdesc = int(lyxfont::maxDescent(font) * layout.spacing.getValue() * spacing_val)
|
||||||
@ -4092,7 +4092,7 @@ void LyXText::GetVisibleRow(int offset, Row * row_ptr, long y)
|
|||||||
if (!row_ptr->par->spacing.isDefault()) {
|
if (!row_ptr->par->spacing.isDefault()) {
|
||||||
spacing_val = row_ptr->par->spacing.getValue();
|
spacing_val = row_ptr->par->spacing.getValue();
|
||||||
} else {
|
} else {
|
||||||
spacing_val = bparams->spacing.getValue();
|
spacing_val = buffer->params.spacing.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
maxdesc = int(lyxfont::maxDescent(font) * layout.spacing.getValue() * spacing_val
|
maxdesc = int(lyxfont::maxDescent(font) * layout.spacing.getValue() * spacing_val
|
||||||
@ -4510,7 +4510,7 @@ int LyXText::GetColumnNearX(Row * row, int & x) const
|
|||||||
LyXParagraph::size_type vc = row->pos;
|
LyXParagraph::size_type vc = row->pos;
|
||||||
LyXParagraph::size_type last = RowLastPrintable(row);
|
LyXParagraph::size_type last = RowLastPrintable(row);
|
||||||
LyXParagraph::size_type c = 0;
|
LyXParagraph::size_type c = 0;
|
||||||
LyXLayout const & layout = textclasslist.Style(bparams->textclass,
|
LyXLayout const & layout = textclasslist.Style(buffer->params.textclass,
|
||||||
row->par->GetLayout());
|
row->par->GetLayout());
|
||||||
/* table stuff -- begin */
|
/* table stuff -- begin */
|
||||||
if (row->par->table) {
|
if (row->par->table) {
|
||||||
@ -4720,7 +4720,7 @@ void LyXText::InsertFootnoteEnvironment(LyXParagraph::footnote_kind kind)
|
|||||||
|| kind == LyXParagraph::WIDE_FIG
|
|| kind == LyXParagraph::WIDE_FIG
|
||||||
|| kind == LyXParagraph::ALGORITHM) {
|
|| kind == LyXParagraph::ALGORITHM) {
|
||||||
pair<bool, LyXTextClass::size_type> lres =
|
pair<bool, LyXTextClass::size_type> lres =
|
||||||
textclasslist.NumberOfLayout(bparams->textclass,
|
textclasslist.NumberOfLayout(buffer->params.textclass,
|
||||||
"Caption");
|
"Caption");
|
||||||
LyXTextClass::size_type lay;
|
LyXTextClass::size_type lay;
|
||||||
if (lres.first) {
|
if (lres.first) {
|
||||||
|
92
src/text2.C
92
src/text2.C
@ -55,7 +55,7 @@ LyXText::LyXText(BufferView * bv, int pw, Buffer * p)
|
|||||||
currentrow = 0;
|
currentrow = 0;
|
||||||
currentrow_y = 0;
|
currentrow_y = 0;
|
||||||
paperwidth = pw;
|
paperwidth = pw;
|
||||||
bparams = &p->params;
|
//bparams = &p->params;
|
||||||
buffer = p;
|
buffer = p;
|
||||||
number_of_rows = 0;
|
number_of_rows = 0;
|
||||||
refresh_y = 0;
|
refresh_y = 0;
|
||||||
@ -120,7 +120,8 @@ LyXFont LyXText::GetFont(LyXParagraph * par,
|
|||||||
LyXParagraph::size_type pos) const
|
LyXParagraph::size_type pos) const
|
||||||
{
|
{
|
||||||
LyXLayout const & layout =
|
LyXLayout const & layout =
|
||||||
textclasslist.Style(bparams->textclass, par->GetLayout());
|
textclasslist.Style(buffer->params.textclass,
|
||||||
|
par->GetLayout());
|
||||||
|
|
||||||
char par_depth = par->GetDepth();
|
char par_depth = par->GetDepth();
|
||||||
// We specialize the 95% common case:
|
// We specialize the 95% common case:
|
||||||
@ -174,13 +175,13 @@ LyXFont LyXText::GetFont(LyXParagraph * par,
|
|||||||
par = par->DepthHook(par_depth - 1);
|
par = par->DepthHook(par_depth - 1);
|
||||||
if (par) {
|
if (par) {
|
||||||
tmpfont.realize(textclasslist.
|
tmpfont.realize(textclasslist.
|
||||||
Style(bparams->textclass,
|
Style(buffer->params.textclass,
|
||||||
par->GetLayout()).font);
|
par->GetLayout()).font);
|
||||||
par_depth = par->GetDepth();
|
par_depth = par->GetDepth();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpfont.realize(textclasslist.TextClass(bparams->textclass).defaultfont());
|
tmpfont.realize(textclasslist.TextClass(buffer->params.textclass).defaultfont());
|
||||||
|
|
||||||
// Cosmetic improvement: If this is an open footnote, make the font
|
// Cosmetic improvement: If this is an open footnote, make the font
|
||||||
// smaller.
|
// smaller.
|
||||||
@ -204,8 +205,9 @@ void LyXText::SetCharFont(LyXParagraph * par,
|
|||||||
font = par->GetInset(pos)->ConvertFont(font);
|
font = par->GetInset(pos)->ConvertFont(font);
|
||||||
}
|
}
|
||||||
|
|
||||||
LyXLayout const & layout = textclasslist.Style(bparams->textclass,
|
LyXLayout const & layout =
|
||||||
par->GetLayout());
|
textclasslist.Style(buffer->params.textclass,
|
||||||
|
par->GetLayout());
|
||||||
|
|
||||||
// Get concrete layout font to reduce against
|
// Get concrete layout font to reduce against
|
||||||
LyXFont layoutfont;
|
LyXFont layoutfont;
|
||||||
@ -222,12 +224,12 @@ void LyXText::SetCharFont(LyXParagraph * par,
|
|||||||
tp = tp->DepthHook(tp->GetDepth()-1);
|
tp = tp->DepthHook(tp->GetDepth()-1);
|
||||||
if (tp)
|
if (tp)
|
||||||
layoutfont.realize(textclasslist.
|
layoutfont.realize(textclasslist.
|
||||||
Style(bparams->textclass,
|
Style(buffer->params.textclass,
|
||||||
tp->GetLayout()).font);
|
tp->GetLayout()).font);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
layoutfont.realize(textclasslist.TextClass(bparams->textclass).defaultfont());
|
layoutfont.realize(textclasslist.TextClass(buffer->params.textclass).defaultfont());
|
||||||
|
|
||||||
if (par->footnoteflag == LyXParagraph::OPEN_FOOTNOTE
|
if (par->footnoteflag == LyXParagraph::OPEN_FOOTNOTE
|
||||||
&& par->footnotekind == LyXParagraph::FOOTNOTE) {
|
&& par->footnotekind == LyXParagraph::FOOTNOTE) {
|
||||||
@ -448,7 +450,8 @@ void LyXText::MakeFontEntriesLayoutSpecific(LyXParagraph * par)
|
|||||||
{
|
{
|
||||||
|
|
||||||
LyXLayout const & layout =
|
LyXLayout const & layout =
|
||||||
textclasslist.Style(bparams->textclass, par->GetLayout());
|
textclasslist.Style(buffer->params.textclass,
|
||||||
|
par->GetLayout());
|
||||||
|
|
||||||
LyXFont layoutfont, tmpfont;
|
LyXFont layoutfont, tmpfont;
|
||||||
for (LyXParagraph::size_type pos = 0;
|
for (LyXParagraph::size_type pos = 0;
|
||||||
@ -501,7 +504,7 @@ void LyXText::SetLayout(LyXTextClass::size_type layout)
|
|||||||
cursor = sel_start_cursor;
|
cursor = sel_start_cursor;
|
||||||
|
|
||||||
LyXLayout const & lyxlayout =
|
LyXLayout const & lyxlayout =
|
||||||
textclasslist.Style(bparams->textclass, layout);
|
textclasslist.Style(buffer->params.textclass, layout);
|
||||||
|
|
||||||
while (cursor.par != sel_end_cursor.par) {
|
while (cursor.par != sel_end_cursor.par) {
|
||||||
if (cursor.par->footnoteflag ==
|
if (cursor.par->footnoteflag ==
|
||||||
@ -596,7 +599,7 @@ void LyXText::IncDepth()
|
|||||||
// NOTE: you can't change the depth of a bibliography entry
|
// NOTE: you can't change the depth of a bibliography entry
|
||||||
if (cursor.par->footnoteflag ==
|
if (cursor.par->footnoteflag ==
|
||||||
sel_start_cursor.par->footnoteflag
|
sel_start_cursor.par->footnoteflag
|
||||||
&& textclasslist.Style(bparams->textclass,
|
&& textclasslist.Style(buffer->params.textclass,
|
||||||
cursor.par->GetLayout()
|
cursor.par->GetLayout()
|
||||||
).labeltype != LABEL_BIBLIO) {
|
).labeltype != LABEL_BIBLIO) {
|
||||||
LyXParagraph * prev =
|
LyXParagraph * prev =
|
||||||
@ -604,7 +607,7 @@ void LyXText::IncDepth()
|
|||||||
if (prev
|
if (prev
|
||||||
&& (prev->GetDepth() - cursor.par->GetDepth() > 0
|
&& (prev->GetDepth() - cursor.par->GetDepth() > 0
|
||||||
|| (prev->GetDepth() == cursor.par->GetDepth()
|
|| (prev->GetDepth() == cursor.par->GetDepth()
|
||||||
&& textclasslist.Style(bparams->textclass,
|
&& textclasslist.Style(buffer->params.textclass,
|
||||||
prev->GetLayout()).isEnvironment()))) {
|
prev->GetLayout()).isEnvironment()))) {
|
||||||
cursor.par->FirstPhysicalPar()->depth++;
|
cursor.par->FirstPhysicalPar()->depth++;
|
||||||
anything_changed = true;
|
anything_changed = true;
|
||||||
@ -712,7 +715,9 @@ void LyXText::SetFont(LyXFont const & font, bool toggleall)
|
|||||||
else
|
else
|
||||||
layoutfont = GetFont(cursor.par, -1);
|
layoutfont = GetFont(cursor.par, -1);
|
||||||
// Update current font
|
// Update current font
|
||||||
real_current_font.update(font, bparams->language_info, toggleall);
|
real_current_font.update(font,
|
||||||
|
buffer->params.language_info,
|
||||||
|
toggleall);
|
||||||
|
|
||||||
// Reduce to implicit settings
|
// Reduce to implicit settings
|
||||||
current_font = real_current_font;
|
current_font = real_current_font;
|
||||||
@ -741,7 +746,9 @@ void LyXText::SetFont(LyXFont const & font, bool toggleall)
|
|||||||
// an open footnote should behave
|
// an open footnote should behave
|
||||||
// like a closed one
|
// like a closed one
|
||||||
LyXFont newfont = GetFont(cursor.par, cursor.pos);
|
LyXFont newfont = GetFont(cursor.par, cursor.pos);
|
||||||
newfont.update(font, bparams->language_info, toggleall);
|
newfont.update(font,
|
||||||
|
buffer->params.language_info,
|
||||||
|
toggleall);
|
||||||
SetCharFont(cursor.par, cursor.pos, newfont);
|
SetCharFont(cursor.par, cursor.pos, newfont);
|
||||||
cursor.pos++;
|
cursor.pos++;
|
||||||
} else {
|
} else {
|
||||||
@ -1099,7 +1106,7 @@ void LyXText::ToggleFree(LyXFont const & font, bool toggleall)
|
|||||||
|
|
||||||
LyXParagraph::size_type LyXText::BeginningOfMainBody(LyXParagraph * par) const
|
LyXParagraph::size_type LyXText::BeginningOfMainBody(LyXParagraph * par) const
|
||||||
{
|
{
|
||||||
if (textclasslist.Style(bparams->textclass,
|
if (textclasslist.Style(buffer->params.textclass,
|
||||||
par->GetLayout()).labeltype != LABEL_MANUAL)
|
par->GetLayout()).labeltype != LABEL_MANUAL)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
@ -1146,7 +1153,7 @@ void LyXText::MeltFootnoteEnvironment()
|
|||||||
tmppar->footnoteflag = LyXParagraph::NO_FOOTNOTE;
|
tmppar->footnoteflag = LyXParagraph::NO_FOOTNOTE;
|
||||||
|
|
||||||
/* remember the captions and empty paragraphs */
|
/* remember the captions and empty paragraphs */
|
||||||
if ((textclasslist.Style(bparams->textclass,
|
if ((textclasslist.Style(buffer->params.textclass,
|
||||||
tmppar->GetLayout())
|
tmppar->GetLayout())
|
||||||
.labeltype == LABEL_SENSITIVE)
|
.labeltype == LABEL_SENSITIVE)
|
||||||
|| !tmppar->Last())
|
|| !tmppar->Last())
|
||||||
@ -1260,13 +1267,13 @@ void LyXText::SetParagraph(bool line_top, bool line_bottom,
|
|||||||
// does the layout allow the new alignment?
|
// does the layout allow the new alignment?
|
||||||
if (align == LYX_ALIGN_LAYOUT)
|
if (align == LYX_ALIGN_LAYOUT)
|
||||||
align = textclasslist
|
align = textclasslist
|
||||||
.Style(bparams->textclass,
|
.Style(buffer->params.textclass,
|
||||||
cursor.par->GetLayout()).align;
|
cursor.par->GetLayout()).align;
|
||||||
if (align & textclasslist
|
if (align & textclasslist
|
||||||
.Style(bparams->textclass,
|
.Style(buffer->params.textclass,
|
||||||
cursor.par->GetLayout()).alignpossible) {
|
cursor.par->GetLayout()).alignpossible) {
|
||||||
if (align == textclasslist
|
if (align == textclasslist
|
||||||
.Style(bparams->textclass,
|
.Style(buffer->params.textclass,
|
||||||
cursor.par->GetLayout()).align)
|
cursor.par->GetLayout()).align)
|
||||||
cursor.par->align = LYX_ALIGN_LAYOUT;
|
cursor.par->align = LYX_ALIGN_LAYOUT;
|
||||||
else
|
else
|
||||||
@ -1403,11 +1410,12 @@ void LyXText::SetCounter(LyXParagraph * par) const
|
|||||||
// this is only relevant for the beginning of paragraph
|
// this is only relevant for the beginning of paragraph
|
||||||
par = par->FirstPhysicalPar();
|
par = par->FirstPhysicalPar();
|
||||||
|
|
||||||
LyXLayout const & layout = textclasslist.Style(bparams->textclass,
|
LyXLayout const & layout =
|
||||||
par->GetLayout());
|
textclasslist.Style(buffer->params.textclass,
|
||||||
|
par->GetLayout());
|
||||||
|
|
||||||
LyXTextClass const & textclass =
|
LyXTextClass const & textclass =
|
||||||
textclasslist.TextClass(bparams->textclass);
|
textclasslist.TextClass(buffer->params.textclass);
|
||||||
|
|
||||||
/* copy the prev-counters to this one, unless this is the start of a
|
/* copy the prev-counters to this one, unless this is the start of a
|
||||||
footnote or of a bibliography or the very first paragraph */
|
footnote or of a bibliography or the very first paragraph */
|
||||||
@ -1415,7 +1423,7 @@ void LyXText::SetCounter(LyXParagraph * par) const
|
|||||||
&& !(par->Previous()->footnoteflag == LyXParagraph::NO_FOOTNOTE
|
&& !(par->Previous()->footnoteflag == LyXParagraph::NO_FOOTNOTE
|
||||||
&& par->footnoteflag == LyXParagraph::OPEN_FOOTNOTE
|
&& par->footnoteflag == LyXParagraph::OPEN_FOOTNOTE
|
||||||
&& par->footnotekind == LyXParagraph::FOOTNOTE)
|
&& par->footnotekind == LyXParagraph::FOOTNOTE)
|
||||||
&& !(textclasslist.Style(bparams->textclass,
|
&& !(textclasslist.Style(buffer->params.textclass,
|
||||||
par->Previous()->GetLayout()
|
par->Previous()->GetLayout()
|
||||||
).labeltype != LABEL_BIBLIO
|
).labeltype != LABEL_BIBLIO
|
||||||
&& layout.labeltype == LABEL_BIBLIO)) {
|
&& layout.labeltype == LABEL_BIBLIO)) {
|
||||||
@ -1450,7 +1458,7 @@ void LyXText::SetCounter(LyXParagraph * par) const
|
|||||||
&& par->Previous()
|
&& par->Previous()
|
||||||
&& par->Previous()->footnoteflag != LyXParagraph::OPEN_FOOTNOTE
|
&& par->Previous()->footnoteflag != LyXParagraph::OPEN_FOOTNOTE
|
||||||
&& (par->PreviousBeforeFootnote()
|
&& (par->PreviousBeforeFootnote()
|
||||||
&& textclasslist.Style(bparams->textclass,
|
&& textclasslist.Style(buffer->params.textclass,
|
||||||
par->PreviousBeforeFootnote()->GetLayout()
|
par->PreviousBeforeFootnote()->GetLayout()
|
||||||
).labeltype >= LABEL_COUNTER_ENUMI)) {
|
).labeltype >= LABEL_COUNTER_ENUMI)) {
|
||||||
// Any itemize or enumerate environment in a marginnote
|
// Any itemize or enumerate environment in a marginnote
|
||||||
@ -1472,7 +1480,7 @@ void LyXText::SetCounter(LyXParagraph * par) const
|
|||||||
*/
|
*/
|
||||||
if (par->Previous()
|
if (par->Previous()
|
||||||
&& par->Previous()->GetDepth() < par->GetDepth()
|
&& par->Previous()->GetDepth() < par->GetDepth()
|
||||||
&& textclasslist.Style(bparams->textclass,
|
&& textclasslist.Style(buffer->params.textclass,
|
||||||
par->Previous()->GetLayout()
|
par->Previous()->GetLayout()
|
||||||
).labeltype == LABEL_COUNTER_ENUMI
|
).labeltype == LABEL_COUNTER_ENUMI
|
||||||
&& par->enumdepth < 3
|
&& par->enumdepth < 3
|
||||||
@ -1516,7 +1524,7 @@ void LyXText::SetCounter(LyXParagraph * par) const
|
|||||||
if (layout.labeltype >= LABEL_FIRST_COUNTER) {
|
if (layout.labeltype >= LABEL_FIRST_COUNTER) {
|
||||||
|
|
||||||
int i = layout.labeltype - LABEL_FIRST_COUNTER;
|
int i = layout.labeltype - LABEL_FIRST_COUNTER;
|
||||||
if (i >= 0 && i<= bparams->secnumdepth) {
|
if (i >= 0 && i<= buffer->params.secnumdepth) {
|
||||||
par->incCounter(i); // increment the counter
|
par->incCounter(i); // increment the counter
|
||||||
|
|
||||||
// Is there a label? Useful for Chapter layout
|
// Is there a label? Useful for Chapter layout
|
||||||
@ -1805,9 +1813,11 @@ void LyXText::UpdateCounters(Row * row) const
|
|||||||
/* now check for the headline layouts. remember that they
|
/* now check for the headline layouts. remember that they
|
||||||
* have a dynamic left margin */
|
* have a dynamic left margin */
|
||||||
if (!par->IsDummy()
|
if (!par->IsDummy()
|
||||||
&& ( textclasslist.Style(bparams->textclass, par->layout).margintype == MARGIN_DYNAMIC
|
&& ( textclasslist.Style(buffer->params.textclass,
|
||||||
|| textclasslist.Style(bparams->textclass, par->layout).labeltype == LABEL_SENSITIVE)
|
par->layout).margintype == MARGIN_DYNAMIC
|
||||||
){
|
|| textclasslist.Style(buffer->params.textclass,
|
||||||
|
par->layout).labeltype == LABEL_SENSITIVE)
|
||||||
|
) {
|
||||||
|
|
||||||
/* Rebreak the paragraph */
|
/* Rebreak the paragraph */
|
||||||
RemoveParagraph(row);
|
RemoveParagraph(row);
|
||||||
@ -1940,7 +1950,7 @@ void LyXText::CutSelection(bool doclear)
|
|||||||
DeleteSimpleCutBuffer();
|
DeleteSimpleCutBuffer();
|
||||||
|
|
||||||
// set the textclass
|
// set the textclass
|
||||||
simple_cut_buffer_textclass = bparams->textclass;
|
simple_cut_buffer_textclass = buffer->params.textclass;
|
||||||
|
|
||||||
#ifdef WITH_WARNINGS
|
#ifdef WITH_WARNINGS
|
||||||
#warning Asger: Make cut more intelligent here.
|
#warning Asger: Make cut more intelligent here.
|
||||||
@ -2201,13 +2211,13 @@ void LyXText::CutSelection(bool doclear)
|
|||||||
endpar = sel_start_cursor.par;
|
endpar = sel_start_cursor.par;
|
||||||
cap.cutSelection(sel_start_cursor.par, &endpar,
|
cap.cutSelection(sel_start_cursor.par, &endpar,
|
||||||
sel_start_cursor.pos, sel_end_cursor.pos,
|
sel_start_cursor.pos, sel_end_cursor.pos,
|
||||||
bparams->textclass, doclear);
|
buffer->params.textclass, doclear);
|
||||||
} else {
|
} else {
|
||||||
endpar = sel_end_cursor.par;
|
endpar = sel_end_cursor.par;
|
||||||
|
|
||||||
cap.cutSelection(sel_start_cursor.par, &endpar,
|
cap.cutSelection(sel_start_cursor.par, &endpar,
|
||||||
sel_start_cursor.pos, sel_end_cursor.pos,
|
sel_start_cursor.pos, sel_end_cursor.pos,
|
||||||
bparams->textclass, doclear);
|
buffer->params.textclass, doclear);
|
||||||
cursor.par = sel_end_cursor.par = endpar;
|
cursor.par = sel_end_cursor.par = endpar;
|
||||||
cursor.pos = sel_end_cursor.pos;
|
cursor.pos = sel_end_cursor.pos;
|
||||||
}
|
}
|
||||||
@ -2270,7 +2280,7 @@ void LyXText::CopySelection()
|
|||||||
DeleteSimpleCutBuffer();
|
DeleteSimpleCutBuffer();
|
||||||
|
|
||||||
// set the textclass
|
// set the textclass
|
||||||
simple_cut_buffer_textclass = bparams->textclass;
|
simple_cut_buffer_textclass = buffer->params->textclass;
|
||||||
|
|
||||||
#ifdef FIX_DOUBLE_SPACE
|
#ifdef FIX_DOUBLE_SPACE
|
||||||
// copy behind a space if there is one
|
// copy behind a space if there is one
|
||||||
@ -2386,7 +2396,7 @@ void LyXText::CopySelection()
|
|||||||
|
|
||||||
cap.copySelection(sel_start_cursor.par, sel_end_cursor.par,
|
cap.copySelection(sel_start_cursor.par, sel_end_cursor.par,
|
||||||
sel_start_cursor.pos, sel_end_cursor.pos,
|
sel_start_cursor.pos, sel_end_cursor.pos,
|
||||||
bparams->textclass);
|
buffer->params.textclass);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2540,7 +2550,7 @@ void LyXText::PasteSelection()
|
|||||||
|
|
||||||
// make sure there is no class difference
|
// make sure there is no class difference
|
||||||
cap.SwitchLayoutsBetweenClasses(simple_cut_buffer_textclass,
|
cap.SwitchLayoutsBetweenClasses(simple_cut_buffer_textclass,
|
||||||
bparams->textclass,
|
buffer->params->textclass,
|
||||||
simple_cut_buffer);
|
simple_cut_buffer);
|
||||||
|
|
||||||
// make the simple_cut_buffer exactly the same layout than
|
// make the simple_cut_buffer exactly the same layout than
|
||||||
@ -2676,7 +2686,7 @@ void LyXText::PasteSelection()
|
|||||||
LyXParagraph *actpar = cursor.par;
|
LyXParagraph *actpar = cursor.par;
|
||||||
int endpos = cursor.pos;
|
int endpos = cursor.pos;
|
||||||
|
|
||||||
cap.pasteSelection(&actpar, &endpar, endpos, bparams->textclass);
|
cap.pasteSelection(&actpar, &endpar, endpos, buffer->params.textclass);
|
||||||
|
|
||||||
RedoParagraphs(cursor, endpar);
|
RedoParagraphs(cursor, endpar);
|
||||||
|
|
||||||
@ -2815,7 +2825,7 @@ void LyXText::InsertStringA(string const & str)
|
|||||||
SetCursorParUndo();
|
SetCursorParUndo();
|
||||||
|
|
||||||
bool flag =
|
bool flag =
|
||||||
textclasslist.Style(bparams->textclass,
|
textclasslist.Style(buffer->params.textclass,
|
||||||
cursor.par->GetLayout()).isEnvironment();
|
cursor.par->GetLayout()).isEnvironment();
|
||||||
// only to be sure, should not be neccessary
|
// only to be sure, should not be neccessary
|
||||||
ClearSelection();
|
ClearSelection();
|
||||||
@ -3076,7 +3086,7 @@ void LyXText::CheckParagraph(LyXParagraph * par,
|
|||||||
status = LyXText::NEED_MORE_REFRESH;
|
status = LyXText::NEED_MORE_REFRESH;
|
||||||
|
|
||||||
// check the special right address boxes
|
// check the special right address boxes
|
||||||
if (textclasslist.Style(bparams->textclass,
|
if (textclasslist.Style(buffer->params.textclass,
|
||||||
par->GetLayout()).margintype
|
par->GetLayout()).margintype
|
||||||
== MARGIN_RIGHT_ADDRESS_BOX) {
|
== MARGIN_RIGHT_ADDRESS_BOX) {
|
||||||
tmpcursor.par = par;
|
tmpcursor.par = par;
|
||||||
@ -3250,7 +3260,7 @@ void LyXText::SetCursorIntern(LyXParagraph * par,
|
|||||||
if (main_body > 0 && pos == main_body-1) {
|
if (main_body > 0 && pos == main_body-1) {
|
||||||
x += fill_label_hfill +
|
x += fill_label_hfill +
|
||||||
lyxfont::width(textclasslist
|
lyxfont::width(textclasslist
|
||||||
.Style(bparams->textclass,
|
.Style(buffer->params.textclass,
|
||||||
row->par->GetLayout())
|
row->par->GetLayout())
|
||||||
.labelsep,
|
.labelsep,
|
||||||
GetFont(row->par, -2));
|
GetFont(row->par, -2));
|
||||||
@ -3445,7 +3455,7 @@ void LyXText::DeleteEmptyParagraphMechanism(LyXCursor const & old_cursor) const
|
|||||||
if (selection) return;
|
if (selection) return;
|
||||||
|
|
||||||
// We allow all kinds of "mumbo-jumbo" when freespacing.
|
// We allow all kinds of "mumbo-jumbo" when freespacing.
|
||||||
if (textclasslist.Style(bparams->textclass,
|
if (textclasslist.Style(buffer->params.textclass,
|
||||||
old_cursor.par->GetLayout()).free_spacing)
|
old_cursor.par->GetLayout()).free_spacing)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -3496,7 +3506,7 @@ void LyXText::DeleteEmptyParagraphMechanism(LyXCursor const & old_cursor) const
|
|||||||
#endif
|
#endif
|
||||||
#if 1
|
#if 1
|
||||||
// Do not delete empty paragraphs with keepempty set.
|
// Do not delete empty paragraphs with keepempty set.
|
||||||
if ((textclasslist.Style(bparams->textclass,
|
if ((textclasslist.Style(buffer->params.textclass,
|
||||||
old_cursor.par->GetLayout())).keepempty)
|
old_cursor.par->GetLayout())).keepempty)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user