mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 22:06:15 +00:00
the fstream/iostream changes and some small other things
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@354 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2a7aef61f0
commit
75c5c8c9e5
20
ChangeLog
20
ChangeLog
@ -1,3 +1,23 @@
|
|||||||
|
1999-12-07 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||||
|
|
||||||
|
* src/support/lyxstring.C: added a lot of inline for no good
|
||||||
|
reason
|
||||||
|
|
||||||
|
* src/lyxfont.[Ch]: removed latexWriteStartChanges, and
|
||||||
|
latexWriteEndChanges, they were not used.
|
||||||
|
|
||||||
|
* src/layout.h (operator<<): output operator for PageSides
|
||||||
|
|
||||||
|
* src/mathed/math_iter.C (my_memcpy): slightly changed.
|
||||||
|
|
||||||
|
* some example files: loaded in LyX 1.0.4 and saved again to update
|
||||||
|
certain constructs (table format)
|
||||||
|
|
||||||
|
* a lot of files: did the change to use fstream/iostream for all
|
||||||
|
writing of files. Done with a close look at Andre Poenitz's patch.
|
||||||
|
|
||||||
|
* some files: whitespace changes.
|
||||||
|
|
||||||
1999-12-06 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
1999-12-06 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
* src/mathed/math_iter.C (my_memcpy): new function. Since the
|
* src/mathed/math_iter.C (my_memcpy): new function. Since the
|
||||||
|
14
acinclude.m4
14
acinclude.m4
@ -184,16 +184,22 @@ dnl Check the version of g++
|
|||||||
elif test $ac_cv_prog_cxx_g = yes; then
|
elif test $ac_cv_prog_cxx_g = yes; then
|
||||||
case $gxx_version in
|
case $gxx_version in
|
||||||
2.7*) CXXFLAGS="$lyx_opt";;
|
2.7*) CXXFLAGS="$lyx_opt";;
|
||||||
2.95.*) CXXFLAGS="-g $lyx_opt -fno-exceptions -fno-rtti -fpermissive";;
|
2.95.*) CXXFLAGS="-g $lyx_opt";;
|
||||||
*) CXXFLAGS="-g $lyx_opt -fno-exceptions -fno-rtti";;
|
*) CXXFLAGS="-g $lyx_opt -fno-exceptions -fno-rtti";;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
CXXFLAGS="$lyx_opt"
|
CXXFLAGS="$lyx_opt"
|
||||||
fi
|
fi
|
||||||
if test x$with_warnings = xyes ; then
|
if test x$with_warnings = xyes ; then
|
||||||
CXXFLAGS="$CXXFLAGS -ansi -Wall"
|
case $gxx_version in
|
||||||
|
2.95.*) CXXFLAGS="$CXXFLAGS -Wall";;
|
||||||
|
*) CXXFLAGS="$CXXFLAGS -ansi -Wall";;
|
||||||
|
esac
|
||||||
if test $lyx_devel_version = yes ; then
|
if test $lyx_devel_version = yes ; then
|
||||||
CXXFLAGS="$CXXFLAGS -pedantic"
|
case $gxx_version in
|
||||||
|
2.95.*) ;;
|
||||||
|
*) CXXFLAGS="$CXXFLAGS -pedantic";;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@ -284,7 +290,7 @@ dnl supports modern STL streams
|
|||||||
AC_DEFUN(LYX_CXX_STL_MODERN_STREAMS,[
|
AC_DEFUN(LYX_CXX_STL_MODERN_STREAMS,[
|
||||||
AC_CACHE_CHECK(for modern STL streams,lyx_cv_modern_streams,
|
AC_CACHE_CHECK(for modern STL streams,lyx_cv_modern_streams,
|
||||||
[AC_TRY_COMPILE([
|
[AC_TRY_COMPILE([
|
||||||
#include <fstream>
|
#include <iostream>
|
||||||
],[
|
],[
|
||||||
std::streambuf * test = std::cerr.rdbuf();
|
std::streambuf * test = std::cerr.rdbuf();
|
||||||
test->pubsync();
|
test->pubsync();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#This file was created by <lasgoutt> Mon Apr 20 15:52:03 1998
|
#This file was created by <larsbj> Sun Dec 5 17:44:19 1999
|
||||||
#LyX 0.12 (C) 1995-1998 Matthias Ettrich and the LyX Team
|
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
|
||||||
\lyxformat 2.15
|
\lyxformat 2.15
|
||||||
\textclass foils
|
\textclass foils
|
||||||
\begin_preamble
|
\begin_preamble
|
||||||
@ -317,23 +317,23 @@ Tables and Figures
|
|||||||
hrule height 3pt
|
hrule height 3pt
|
||||||
\layout Standard
|
\layout Standard
|
||||||
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
||||||
multicol4
|
multicol5
|
||||||
3 3 0 0 -1 -1 -1 -1
|
3 3 0 0 -1 -1 -1 -1
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
|
|
||||||
Column1
|
Column1
|
||||||
\newline
|
\newline
|
||||||
@ -370,23 +370,23 @@ Both tables and figures are supported in Foils however floats don't float
|
|||||||
\begin_float tab
|
\begin_float tab
|
||||||
\layout Standard
|
\layout Standard
|
||||||
\align center \LyXTable
|
\align center \LyXTable
|
||||||
multicol4
|
multicol5
|
||||||
3 3 0 0 -1 -1 -1 -1
|
3 3 0 0 -1 -1 -1 -1
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
|
|
||||||
Row1
|
Row1
|
||||||
\newline
|
\newline
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#This file was created by <rae> Sat Oct 4 03:17:47 1997
|
#This file was created by <larsbj> Sun Dec 5 17:45:53 1999
|
||||||
#LyX 0.11 (C) 1995-1997 Matthias Ettrich and the LyX Team
|
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
|
||||||
\lyxformat 2.15
|
\lyxformat 2.15
|
||||||
\textclass article
|
\textclass article
|
||||||
\begin_preamble
|
\begin_preamble
|
||||||
@ -14,6 +14,7 @@
|
|||||||
\papersize Default
|
\papersize Default
|
||||||
\paperpackage a4
|
\paperpackage a4
|
||||||
\use_geometry 0
|
\use_geometry 0
|
||||||
|
\use_amsmath 0
|
||||||
\paperorientation portrait
|
\paperorientation portrait
|
||||||
\secnumdepth 3
|
\secnumdepth 3
|
||||||
\tocdepth 3
|
\tocdepth 3
|
||||||
@ -42,7 +43,7 @@
|
|||||||
\end_bullet
|
\end_bullet
|
||||||
|
|
||||||
\layout Section*
|
\layout Section*
|
||||||
\cursor 0
|
|
||||||
Introduction
|
Introduction
|
||||||
\layout Standard
|
\layout Standard
|
||||||
|
|
||||||
@ -106,11 +107,7 @@ ayout->
|
|||||||
\bar under
|
\bar under
|
||||||
D
|
D
|
||||||
\bar default
|
\bar default
|
||||||
ocument
|
ocument\SpecialChar \ldots{}
|
||||||
\begin_inset LatexCommand \ldots
|
|
||||||
|
|
||||||
\end_inset
|
|
||||||
|
|
||||||
menu and select the
|
menu and select the
|
||||||
\begin_inset Quotes eld
|
\begin_inset Quotes eld
|
||||||
\end_inset
|
\end_inset
|
||||||
@ -134,7 +131,7 @@ The following tables are those used to generate the bullet panels in the
|
|||||||
Standard
|
Standard
|
||||||
\layout Standard
|
\layout Standard
|
||||||
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
||||||
multicol4
|
multicol5
|
||||||
6 6 0 0 -1 -1 -1 -1
|
6 6 0 0 -1 -1 -1 -1
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
@ -142,48 +139,48 @@ multicol4
|
|||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
2 1 0
|
2 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 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 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
|
|
||||||
|
|
||||||
\latex latex
|
\latex latex
|
||||||
@ -501,7 +498,7 @@ succ
|
|||||||
Maths (AMS-symbols)
|
Maths (AMS-symbols)
|
||||||
\layout Standard
|
\layout Standard
|
||||||
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
||||||
multicol4
|
multicol5
|
||||||
6 6 0 0 -1 -1 -1 -1
|
6 6 0 0 -1 -1 -1 -1
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
@ -509,48 +506,48 @@ multicol4
|
|||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 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 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
|
|
||||||
|
|
||||||
\latex latex
|
\latex latex
|
||||||
@ -846,7 +843,7 @@ blacksquare
|
|||||||
Ding 1 (PSNFSS Fonts - Zapf Dingbats and Symbols)
|
Ding 1 (PSNFSS Fonts - Zapf Dingbats and Symbols)
|
||||||
\layout Standard
|
\layout Standard
|
||||||
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
||||||
multicol4
|
multicol5
|
||||||
6 6 0 0 -1 -1 -1 -1
|
6 6 0 0 -1 -1 -1 -1
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
@ -854,48 +851,48 @@ multicol4
|
|||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 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 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
|
|
||||||
|
|
||||||
\latex latex
|
\latex latex
|
||||||
@ -1123,7 +1120,7 @@ ding{227}
|
|||||||
Ding 2
|
Ding 2
|
||||||
\layout Standard
|
\layout Standard
|
||||||
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
||||||
multicol4
|
multicol5
|
||||||
6 6 0 0 -1 -1 -1 -1
|
6 6 0 0 -1 -1 -1 -1
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
@ -1131,48 +1128,48 @@ multicol4
|
|||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 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 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
|
|
||||||
|
|
||||||
\latex latex
|
\latex latex
|
||||||
@ -1328,7 +1325,7 @@ ding{170}
|
|||||||
Ding 3
|
Ding 3
|
||||||
\layout Standard
|
\layout Standard
|
||||||
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
||||||
multicol4
|
multicol5
|
||||||
6 6 0 0 -1 -1 -1 -1
|
6 6 0 0 -1 -1 -1 -1
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
@ -1336,48 +1333,48 @@ multicol4
|
|||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0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0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
|
|
||||||
|
|
||||||
\latex latex
|
\latex latex
|
||||||
@ -1533,7 +1530,7 @@ ding{97}
|
|||||||
Ding 4
|
Ding 4
|
||||||
\layout Standard
|
\layout Standard
|
||||||
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
||||||
multicol4
|
multicol5
|
||||||
6 6 0 0 -1 -1 -1 -1
|
6 6 0 0 -1 -1 -1 -1
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
@ -1541,48 +1538,48 @@ multicol4
|
|||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1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1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
0 8 1 1 0 0 0
|
0 8 1 1 0 0 0 "" ""
|
||||||
|
|
||||||
|
|
||||||
\latex latex
|
\latex latex
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#This file was created by <larsbj> Fri Sep 12 18:47:36 1997
|
#This file was created by <larsbj> Sun Dec 5 17:46:35 1999
|
||||||
#LyX 0.11 (C) 1995-1997 Matthias Ettrich and the LyX Team
|
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
|
||||||
\lyxformat 2.15
|
\lyxformat 2.15
|
||||||
\textclass article
|
\textclass article
|
||||||
\language default
|
\language default
|
||||||
@ -11,6 +11,7 @@
|
|||||||
\papersize letterpaper
|
\papersize letterpaper
|
||||||
\paperpackage a4
|
\paperpackage a4
|
||||||
\use_geometry 0
|
\use_geometry 0
|
||||||
|
\use_amsmath 0
|
||||||
\paperorientation portrait
|
\paperorientation portrait
|
||||||
\secnumdepth 3
|
\secnumdepth 3
|
||||||
\tocdepth 3
|
\tocdepth 3
|
||||||
@ -53,7 +54,6 @@ Or a
|
|||||||
|
|
||||||
\begin_inset Formula
|
\begin_inset Formula
|
||||||
\begin{equation}
|
\begin{equation}
|
||||||
\label{}
|
|
||||||
x=y^{2}-3
|
x=y^{2}-3
|
||||||
\end{equation}
|
\end{equation}
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ It's possible to label more than one line.
|
|||||||
|
|
||||||
) using their corresponding labels.
|
) using their corresponding labels.
|
||||||
\layout Standard
|
\layout Standard
|
||||||
\cursor 0
|
|
||||||
|
|
||||||
\begin_inset Formula
|
\begin_inset Formula
|
||||||
\begin{eqnarray}
|
\begin{eqnarray}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#This file was created by <ale> Wed Oct 29 15:21:35 1997
|
#This file was created by <larsbj> Sun Dec 5 17:47:02 1999
|
||||||
#LyX 0.11 (C) 1995-1997 Matthias Ettrich and the LyX Team
|
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
|
||||||
\lyxformat 2.15
|
\lyxformat 2.15
|
||||||
\textclass article
|
\textclass article
|
||||||
\language default
|
\language default
|
||||||
@ -11,6 +11,7 @@
|
|||||||
\papersize Default
|
\papersize Default
|
||||||
\paperpackage a4
|
\paperpackage a4
|
||||||
\use_geometry 0
|
\use_geometry 0
|
||||||
|
\use_amsmath 0
|
||||||
\paperorientation portrait
|
\paperorientation portrait
|
||||||
\secnumdepth 3
|
\secnumdepth 3
|
||||||
\tocdepth 3
|
\tocdepth 3
|
||||||
@ -235,7 +236,7 @@ mouse: As usual, click on the desired argument box.
|
|||||||
Currently the user can only define command macros, but internally it's possible
|
Currently the user can only define command macros, but internally it's possible
|
||||||
to define also environment macros.
|
to define also environment macros.
|
||||||
\layout Standard
|
\layout Standard
|
||||||
\cursor 358
|
|
||||||
There are several predefined macros, mainly to allow AMS-LaTeX users to
|
There are several predefined macros, mainly to allow AMS-LaTeX users to
|
||||||
use AMS macros in a WYSIWYM way, like
|
use AMS macros in a WYSIWYM way, like
|
||||||
\family typewriter
|
\family typewriter
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#This file was created by <jug> Mon Jan 12 12:28:05 1998
|
#This file was created by <larsbj> Sun Dec 5 17:47:25 1999
|
||||||
#LyX 0.12 (C) 1995-1997 Matthias Ettrich and the LyX Team
|
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
|
||||||
\lyxformat 2.15
|
\lyxformat 2.15
|
||||||
\textclass article
|
\textclass article
|
||||||
\language default
|
\language default
|
||||||
@ -44,43 +44,43 @@ by J
|
|||||||
\layout Standard
|
\layout Standard
|
||||||
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \pextra_type 2 \pextra_alignment 0 \pextra_widthp 45
|
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \pextra_type 2 \pextra_alignment 0 \pextra_widthp 45
|
||||||
\LyXTable
|
\LyXTable
|
||||||
multicol4
|
multicol5
|
||||||
5 5 0 0 -1 -1 -1 -1
|
5 5 0 0 -1 -1 -1 -1
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
|
|
||||||
1
|
1
|
||||||
\newline
|
\newline
|
||||||
@ -134,43 +134,43 @@ p
|
|||||||
\layout Standard
|
\layout Standard
|
||||||
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \pextra_type 2 \pextra_alignment 0 \pextra_hfill 1 \pextra_start_minipage 1 \pextra_widthp 45
|
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \pextra_type 2 \pextra_alignment 0 \pextra_hfill 1 \pextra_start_minipage 1 \pextra_widthp 45
|
||||||
\LyXTable
|
\LyXTable
|
||||||
multicol4
|
multicol5
|
||||||
5 5 0 0 -1 -1 -1 -1
|
5 5 0 0 -1 -1 -1 -1
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
|
|
||||||
1
|
1
|
||||||
\newline
|
\newline
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#This file was created by <larsbj> Fri Jan 9 14:59:14 1998
|
#This file was created by <larsbj> Sun Dec 5 17:47:42 1999
|
||||||
#LyX 0.12 (C) 1995-1998 Matthias Ettrich and the LyX Team
|
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
|
||||||
\lyxformat 2.15
|
\lyxformat 2.15
|
||||||
\textclass article
|
\textclass article
|
||||||
\begin_preamble
|
\begin_preamble
|
||||||
@ -51,7 +51,7 @@ longtable -
|
|||||||
How to use the longtable special options
|
How to use the longtable special options
|
||||||
\layout Standard
|
\layout Standard
|
||||||
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
||||||
multicol4
|
multicol5
|
||||||
98 3 1 0 3 1 4 4
|
98 3 1 0 3 1 4 4
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
@ -151,303 +151,303 @@ multicol4
|
|||||||
0 1 0 0
|
0 1 0 0
|
||||||
0 1 0 0
|
0 1 0 0
|
||||||
0 1 0 0
|
0 1 0 0
|
||||||
2 1 0 5cm
|
2 1 0 "5cm" ""
|
||||||
2 0 0
|
2 0 0 "" ""
|
||||||
4 1 1
|
4 1 1 "" ""
|
||||||
1 8 1 1 0 0 0
|
1 8 1 1 0 0 0 "" ""
|
||||||
2 8 1 1 0 0 0
|
2 8 1 1 0 0 0 "" ""
|
||||||
2 8 1 1 0 0 0
|
2 8 1 1 0 0 0 "" ""
|
||||||
1 8 0 1 0 0 0
|
1 8 0 1 0 0 0 "" ""
|
||||||
2 8 1 1 0 0 0
|
2 8 1 1 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
|
0 2 0 1 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 2 0 1 0 0 0
|
0 2 0 1 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 2 0 1 0 0 0
|
0 2 0 1 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 2 0 1 0 0 0
|
0 2 0 1 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 2 0 1 0 0 0
|
0 2 0 1 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
|
|
||||||
|
|
||||||
\series bold
|
\series bold
|
||||||
@ -1389,37 +1389,37 @@ multirow
|
|||||||
command.
|
command.
|
||||||
\layout Standard
|
\layout Standard
|
||||||
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
||||||
multicol4
|
multicol5
|
||||||
5 4 1 0 -1 -1 -1 -1
|
5 4 1 0 -1 -1 -1 -1
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
1 8 0 0 0 0 0
|
1 8 0 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
1 8 0 0 0 0 0
|
1 8 0 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
1 8 0 0 0 0 0
|
1 8 0 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
1 8 0 0 0 0 0
|
1 8 0 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
1 8 0 1 0 0 0
|
1 8 0 1 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
1 8 0 1 0 0 0
|
1 8 0 1 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
|
|
||||||
a
|
a
|
||||||
\newline
|
\newline
|
||||||
@ -1508,7 +1508,7 @@ centering
|
|||||||
\layout Standard
|
\layout Standard
|
||||||
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \pextra_type 2 \pextra_alignment 0 \pextra_widthp 25
|
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \pextra_type 2 \pextra_alignment 0 \pextra_widthp 25
|
||||||
\LyXTable
|
\LyXTable
|
||||||
multicol4
|
multicol5
|
||||||
6 4 0 0 -1 -1 -1 -1
|
6 4 0 0 -1 -1 -1 -1
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
@ -1516,34 +1516,34 @@ multicol4
|
|||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 1 0 0
|
0 8 1 0 1 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 1 0 0
|
0 8 1 0 1 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
|
|
||||||
a
|
a
|
||||||
\newline
|
\newline
|
||||||
@ -1635,7 +1635,7 @@ Table-Layout-Menu
|
|||||||
and footnotes will be displayed at the bottom of the page.
|
and footnotes will be displayed at the bottom of the page.
|
||||||
\layout Standard
|
\layout Standard
|
||||||
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
||||||
multicol4
|
multicol5
|
||||||
6 4 1 0 -1 -1 -1 -1
|
6 4 1 0 -1 -1 -1 -1
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
@ -1643,34 +1643,34 @@ multicol4
|
|||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 1 0 0
|
0 8 1 0 1 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 1 0 0
|
0 8 1 0 1 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
|
|
||||||
a
|
a
|
||||||
\newline
|
\newline
|
||||||
@ -1751,32 +1751,32 @@ This is a heavy way to do it but just to demonstrate that it works, here
|
|||||||
Use this method in minipages to get footnotes at the bottom of the page.
|
Use this method in minipages to get footnotes at the bottom of the page.
|
||||||
\layout Standard
|
\layout Standard
|
||||||
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
|
||||||
multicol4
|
multicol5
|
||||||
4 4 0 0 -1 -1 -1 -1
|
4 4 0 0 -1 -1 -1 -1
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 0 0 0
|
1 0 0 0
|
||||||
1 1 0 0
|
1 1 0 0
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 0
|
8 1 0 "" ""
|
||||||
8 1 1
|
8 1 1 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 0 0 0
|
0 8 1 0 0 0 0 "" ""
|
||||||
0 8 1 0 1 0 0
|
0 8 1 0 1 0 0 "" ""
|
||||||
|
|
||||||
a
|
a
|
||||||
\newline
|
\newline
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#This file was created by <lasgoutt> Tue Mar 3 17:28:33 1998
|
#This file was created by <larsbj> Sun Dec 5 17:48:49 1999
|
||||||
#LyX 0.12 (C) 1995-1998 Matthias Ettrich and the LyX Team
|
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
|
||||||
\lyxformat 2.15
|
\lyxformat 2.15
|
||||||
\textclass amsart
|
\textclass amsart
|
||||||
\language default
|
\language default
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#This file was created by <dlj0> Sun Dec 14 14:56:10 1997
|
#This file was created by <larsbj> Sun Dec 5 17:49:17 1999
|
||||||
#LyX 0.11 (C) 1995-1997 Matthias Ettrich and the LyX Team
|
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
|
||||||
\lyxformat 2.15
|
\lyxformat 2.15
|
||||||
\textclass amsbook
|
\textclass amsbook
|
||||||
\language default
|
\language default
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#This file was created by <lasgoutt> Wed Mar 25 16:47:59 1998
|
#This file was created by <larsbj> Sun Dec 5 17:50:17 1999
|
||||||
#LyX 0.12 (C) 1995-1998 Matthias Ettrich and the LyX Team
|
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
|
||||||
\lyxformat 2.15
|
\lyxformat 2.15
|
||||||
\textclass foils
|
\textclass foils
|
||||||
\options dvips
|
\options dvips
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#This file was created by <larsbj> Tue Nov 9 04:47:40 1999
|
#This file was created by <larsbj> Sun Dec 5 17:51:04 1999
|
||||||
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
|
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
|
||||||
\lyxformat 2.15
|
\lyxformat 2.15
|
||||||
\textclass article
|
\textclass article
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include "Spacing.h"
|
#include "Spacing.h"
|
||||||
|
|
||||||
/// how can I put this inside of Spacing (class)
|
/// how can I put this inside of Spacing (class)
|
||||||
static
|
static
|
||||||
char const *spacing_string[] = {"single", "onehalf", "double", "other"};
|
char const * spacing_string[] = {"single", "onehalf", "double", "other"};
|
||||||
|
|
||||||
|
|
||||||
void Spacing::writeFile(FILE *file)
|
void Spacing::writeFile(ostream & os)
|
||||||
{
|
{
|
||||||
if (getSpace() == Spacing::Other) {
|
if (getSpace() == Spacing::Other) {
|
||||||
fprintf(file, "\\spacing %s %.2f \n",
|
os.setf(ios::showpoint|ios::fixed);
|
||||||
spacing_string[getSpace()],
|
os.precision(2);
|
||||||
getValue());
|
os << "\\spacing " << spacing_string[getSpace()]
|
||||||
|
<< " " << getValue() << " \n";
|
||||||
} else {
|
} else {
|
||||||
fprintf(file, "\\spacing %s \n",
|
os << "\\spacing " << spacing_string[getSpace()] << " \n";
|
||||||
spacing_string[getSpace()]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
#define SPACING_H
|
#define SPACING_H
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
#include "support/LOstream.h"
|
||||||
|
|
||||||
|
|
||||||
///
|
///
|
||||||
class Spacing {
|
class Spacing {
|
||||||
@ -71,7 +73,7 @@ public:
|
|||||||
set(sp, fval);
|
set(sp, fval);
|
||||||
}
|
}
|
||||||
///
|
///
|
||||||
void writeFile(FILE * file);
|
void writeFile(ostream &);
|
||||||
///
|
///
|
||||||
friend bool operator!=(Spacing const & a, Spacing const & b)
|
friend bool operator!=(Spacing const & a, Spacing const & b)
|
||||||
{
|
{
|
||||||
|
@ -24,7 +24,7 @@ typedef struct {
|
|||||||
int dx, dy; /* Size of each item */
|
int dx, dy; /* Size of each item */
|
||||||
int bx, by; /* Bitmap's position */
|
int bx, by; /* Bitmap's position */
|
||||||
int bw, bh; /* Bitmap dimensions */
|
int bw, bh; /* Bitmap dimensions */
|
||||||
unsigned char * bdata; /* Bitmap data */
|
unsigned char const * bdata; /* Bitmap data */
|
||||||
int maxi; /* Number of items */
|
int maxi; /* Number of items */
|
||||||
int i; /* Current position */
|
int i; /* Current position */
|
||||||
int mousebut; /* mouse button pushed */
|
int mousebut; /* mouse button pushed */
|
||||||
@ -32,14 +32,14 @@ typedef struct {
|
|||||||
} BMTABLE_SPEC;
|
} BMTABLE_SPEC;
|
||||||
|
|
||||||
|
|
||||||
extern "C" int handle_bitmaptable(FL_OBJECT *ob, int event, FL_Coord mx,
|
extern "C" int handle_bitmaptable(FL_OBJECT * ob, int event, FL_Coord mx,
|
||||||
FL_Coord my, int key, void *xev);
|
FL_Coord my, int key, void * xev);
|
||||||
|
|
||||||
|
|
||||||
FL_OBJECT *fl_create_bmtable(int type, FL_Coord x, FL_Coord y,
|
FL_OBJECT * fl_create_bmtable(int type, FL_Coord x, FL_Coord y,
|
||||||
FL_Coord w, FL_Coord h, char const *label)
|
FL_Coord w, FL_Coord h, char const * label)
|
||||||
{
|
{
|
||||||
FL_OBJECT *ob;
|
FL_OBJECT * ob;
|
||||||
|
|
||||||
ob = fl_make_object(FL_BMTABLE, type, x, y, w, h, label, handle_bitmaptable);
|
ob = fl_make_object(FL_BMTABLE, type, x, y, w, h, label, handle_bitmaptable);
|
||||||
ob->boxtype = FL_BMTABLE_BOXTYPE;
|
ob->boxtype = FL_BMTABLE_BOXTYPE;
|
||||||
@ -89,7 +89,7 @@ static void draw_bitmaptable(FL_OBJECT *ob)
|
|||||||
if (sp->bdata) {
|
if (sp->bdata) {
|
||||||
if (!sp->pix) {
|
if (!sp->pix) {
|
||||||
sp->pix = XCreatePixmapFromBitmapData(fl_display, fl_winget(),
|
sp->pix = XCreatePixmapFromBitmapData(fl_display, fl_winget(),
|
||||||
reinterpret_cast<char*>(sp->bdata),
|
const_cast<char*>(reinterpret_cast<char const *>(sp->bdata)),
|
||||||
sp->bw, sp->bh,
|
sp->bw, sp->bh,
|
||||||
fl_get_flcolor(ob->lcol), fl_get_flcolor(ob->col1),
|
fl_get_flcolor(ob->lcol), fl_get_flcolor(ob->col1),
|
||||||
/*DefaultDepth(fl_display, DefaultScreen(fl_display))*/ fl_state[fl_get_vclass()].depth);
|
/*DefaultDepth(fl_display, DefaultScreen(fl_display))*/ fl_state[fl_get_vclass()].depth);
|
||||||
@ -166,11 +166,11 @@ static void draw_bitmaptable(FL_OBJECT *ob)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern "C" int handle_bitmaptable(FL_OBJECT *ob, int event, FL_Coord mx,
|
extern "C" int handle_bitmaptable(FL_OBJECT * ob, int event, FL_Coord mx,
|
||||||
FL_Coord my, int key, void */*xev*/)
|
FL_Coord my, int key, void */*xev*/)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
BMTABLE_SPEC *sp = (BMTABLE_SPEC *)ob->spec;
|
BMTABLE_SPEC * sp = (BMTABLE_SPEC *)ob->spec;
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case FL_DRAW:
|
case FL_DRAW:
|
||||||
@ -239,7 +239,7 @@ void fl_set_bmtable_data(FL_OBJECT * ob, int nx, int ny, int bw, int bh,
|
|||||||
sp->maxi = sp->nx * sp->ny;
|
sp->maxi = sp->nx * sp->ny;
|
||||||
sp->bw = bw;
|
sp->bw = bw;
|
||||||
sp->bh = bh;
|
sp->bh = bh;
|
||||||
sp->bdata = const_cast<unsigned char *>(bdata);
|
sp->bdata = bdata;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,11 +284,11 @@ void fl_set_bmtable_pixmap_data(FL_OBJECT * ob, int nx, int ny,
|
|||||||
*/
|
*/
|
||||||
#if XlibSpecificationRelease > 5
|
#if XlibSpecificationRelease > 5
|
||||||
|
|
||||||
void fl_set_bmtable_file(FL_OBJECT *ob, int nx, int ny, char const *filename)
|
void fl_set_bmtable_file(FL_OBJECT * ob, int nx, int ny, char const * filename)
|
||||||
{
|
{
|
||||||
int xh, yh;
|
int xh, yh;
|
||||||
unsigned int bw, bh;
|
unsigned int bw, bh;
|
||||||
unsigned char *bdata;
|
unsigned char * bdata;
|
||||||
|
|
||||||
if(XReadBitmapFileData(filename, &bw, &bh,
|
if(XReadBitmapFileData(filename, &bw, &bh,
|
||||||
&bdata, &xh, &yh) == BitmapSuccess)
|
&bdata, &xh, &yh) == BitmapSuccess)
|
||||||
@ -443,9 +443,9 @@ void fl_draw_bmtable_item(FL_OBJECT *ob, int i, Drawable d, int xx, int yy)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Free the current bitmap and pixmap in preparation for installing a new one */
|
/* Free the current bitmap and pixmap in preparation for installing a new one */
|
||||||
void fl_free_bmtable_bitmap(FL_OBJECT *ob)
|
void fl_free_bmtable_bitmap(FL_OBJECT * ob)
|
||||||
{
|
{
|
||||||
BMTABLE_SPEC *sp = (BMTABLE_SPEC *)ob->spec;
|
BMTABLE_SPEC * sp = (BMTABLE_SPEC *)ob->spec;
|
||||||
|
|
||||||
/* dump the temporary pixmap */
|
/* dump the temporary pixmap */
|
||||||
if (sp && sp->pix) {
|
if (sp && sp->pix) {
|
||||||
@ -456,7 +456,7 @@ void fl_free_bmtable_bitmap(FL_OBJECT *ob)
|
|||||||
|
|
||||||
/* and free the space taken by bdata etc. */
|
/* and free the space taken by bdata etc. */
|
||||||
if (sp && sp->bdata) {
|
if (sp && sp->bdata) {
|
||||||
fl_free(sp->bdata);
|
fl_free((void*)sp->bdata);
|
||||||
sp->bdata = 0;
|
sp->bdata = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -465,7 +465,7 @@ void fl_free_bmtable_bitmap(FL_OBJECT *ob)
|
|||||||
/* This is needed when using data instead of files to set bitmaps */
|
/* This is needed when using data instead of files to set bitmaps */
|
||||||
void fl_free_bmtable_pixmap(FL_OBJECT *ob)
|
void fl_free_bmtable_pixmap(FL_OBJECT *ob)
|
||||||
{
|
{
|
||||||
BMTABLE_SPEC *sp = (BMTABLE_SPEC *)ob->spec;
|
BMTABLE_SPEC * sp = (BMTABLE_SPEC *)ob->spec;
|
||||||
|
|
||||||
/* dump the temporary pixmap */
|
/* dump the temporary pixmap */
|
||||||
if (sp && sp->pix) {
|
if (sp && sp->pix) {
|
||||||
|
677
src/buffer.C
677
src/buffer.C
File diff suppressed because it is too large
Load Diff
21
src/buffer.h
21
src/buffer.h
@ -34,6 +34,7 @@
|
|||||||
#include "lyxtext.h"
|
#include "lyxtext.h"
|
||||||
#include "support/filetools.h"
|
#include "support/filetools.h"
|
||||||
|
|
||||||
|
|
||||||
class LyXRC;
|
class LyXRC;
|
||||||
class TeXErrors;
|
class TeXErrors;
|
||||||
class LaTeXFeatures;
|
class LaTeXFeatures;
|
||||||
@ -222,7 +223,7 @@ public:
|
|||||||
dvi_clean_orgd = false;
|
dvi_clean_orgd = false;
|
||||||
nw_clean = false;
|
nw_clean = false;
|
||||||
bak_clean = false;
|
bak_clean = false;
|
||||||
DEPCLEAN* tmp = dep_clean;
|
DEPCLEAN * tmp = dep_clean;
|
||||||
while (tmp) {
|
while (tmp) {
|
||||||
tmp->clean = false;
|
tmp->clean = false;
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
@ -371,25 +372,25 @@ private:
|
|||||||
void insertErrors(TeXErrors &);
|
void insertErrors(TeXErrors &);
|
||||||
|
|
||||||
///
|
///
|
||||||
void linuxDocHandleFootnote(FILE * file,
|
void linuxDocHandleFootnote(ostream & os,
|
||||||
LyXParagraph * & par, int const depth);
|
LyXParagraph * & par, int const depth);
|
||||||
///
|
///
|
||||||
void DocBookHandleCaption(FILE * file, string & inner_tag,
|
void DocBookHandleCaption(ostream & os, string & inner_tag,
|
||||||
int const depth, int desc_on,
|
int const depth, int desc_on,
|
||||||
LyXParagraph * &par);
|
LyXParagraph * &par);
|
||||||
///
|
///
|
||||||
void DocBookHandleFootnote(FILE * file,
|
void DocBookHandleFootnote(ostream & os,
|
||||||
LyXParagraph * & par, int const depth);
|
LyXParagraph * & par, int const depth);
|
||||||
///
|
///
|
||||||
void sgmlOpenTag(FILE * file, int depth,
|
void sgmlOpenTag(ostream & os, int depth,
|
||||||
string const & latexname) const;
|
string const & latexname) const;
|
||||||
///
|
///
|
||||||
void sgmlCloseTag(FILE * file, int depth,
|
void sgmlCloseTag(ostream & os, int depth,
|
||||||
string const & latexname) const;
|
string const & latexname) const;
|
||||||
///
|
///
|
||||||
void LinuxDocError(LyXParagraph * par, int pos, char const * message);
|
void LinuxDocError(LyXParagraph * par, int pos, char const * message);
|
||||||
///
|
///
|
||||||
void SimpleLinuxDocOnePar(FILE * file, LyXParagraph * par,
|
void SimpleLinuxDocOnePar(ostream & os, LyXParagraph * par,
|
||||||
int desc_on, int const depth);
|
int desc_on, int const depth);
|
||||||
///
|
///
|
||||||
void SimpleDocBookOnePar(string & file, string & extra,
|
void SimpleDocBookOnePar(string & file, string & extra,
|
||||||
@ -397,15 +398,15 @@ private:
|
|||||||
int const depth);
|
int const depth);
|
||||||
|
|
||||||
/// LinuxDoc.
|
/// LinuxDoc.
|
||||||
void push_tag(FILE * file, char const * tag,
|
void push_tag(ostream & os, char const * tag,
|
||||||
int & pos, char stack[5][3]);
|
int & pos, char stack[5][3]);
|
||||||
|
|
||||||
/// LinuxDoc.
|
/// LinuxDoc.
|
||||||
void pop_tag(FILE * file, char const * tag,
|
void pop_tag(ostream & os, char const * tag,
|
||||||
int & pos, char stack[5][3]);
|
int & pos, char stack[5][3]);
|
||||||
|
|
||||||
///
|
///
|
||||||
void RoffAsciiTable(FILE * file, LyXParagraph * par);
|
void RoffAsciiTable(ostream &, LyXParagraph * par);
|
||||||
|
|
||||||
/// is save needed
|
/// is save needed
|
||||||
bool lyx_clean;
|
bool lyx_clean;
|
||||||
|
@ -60,116 +60,108 @@ BufferParams::BufferParams()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void BufferParams::writeFile(FILE * file)
|
void BufferParams::writeFile(ostream & os)
|
||||||
{
|
{
|
||||||
// The top of the file is written by the buffer.
|
// The top of the file is written by the buffer.
|
||||||
// Prints out the buffer info into the .lyx file given by file
|
// Prints out the buffer info into the .lyx file given by file
|
||||||
|
|
||||||
// the textclass
|
// the textclass
|
||||||
fprintf(file, "\\textclass %s\n",
|
os << "\\textclass " << textclasslist.NameOfClass(textclass) << '\n';
|
||||||
textclasslist.NameOfClass(textclass).c_str());
|
|
||||||
|
|
||||||
// then the the preamble
|
// then the the preamble
|
||||||
if (!preamble.empty()) {
|
if (!preamble.empty()) {
|
||||||
fprintf(file, "\\begin_preamble\n");
|
|
||||||
{
|
|
||||||
// remove '\n' from the end of preamble
|
// remove '\n' from the end of preamble
|
||||||
preamble = strip(preamble, '\n');
|
preamble = strip(preamble, '\n');
|
||||||
|
os << "\\begin_preamble\n"
|
||||||
// write out the whole preamble in one go
|
<< preamble
|
||||||
fwrite(preamble.c_str(),
|
<< "\n\\end_preamble\n";
|
||||||
sizeof(char),
|
|
||||||
preamble.length(),
|
|
||||||
file);
|
|
||||||
fprintf(file, "\n\\end_preamble\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* the options */
|
/* the options */
|
||||||
if (!options.empty()) {
|
if (!options.empty()) {
|
||||||
fprintf(file,
|
os << "\\options " << options << '\n';
|
||||||
"\\options %s\n",
|
|
||||||
options.c_str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* then the text parameters */
|
/* then the text parameters */
|
||||||
fprintf(file, "\\language %s\n", language.c_str());
|
os << "\\language " << language
|
||||||
fprintf(file, "\\inputencoding %s\n", inputenc.c_str());
|
<< "\n\\inputencoding " << inputenc
|
||||||
fprintf(file, "\\fontscheme %s\n", fonts.c_str());
|
<< "\n\\fontscheme " << fonts
|
||||||
fprintf(file, "\\graphics %s\n", graphicsDriver.c_str());
|
<< "\n\\graphics " << graphicsDriver << '\n';
|
||||||
|
|
||||||
if (!float_placement.empty()) {
|
if (!float_placement.empty()) {
|
||||||
fprintf(file,
|
os << "\\float_placement " << float_placement << '\n';
|
||||||
"\\float_placement %s\n",
|
|
||||||
float_placement.c_str());
|
|
||||||
}
|
}
|
||||||
fprintf(file, "\\paperfontsize %s\n", fontsize.c_str());
|
os << "\\paperfontsize " << fontsize << '\n';
|
||||||
|
|
||||||
spacing.writeFile(file);
|
spacing.writeFile(os);
|
||||||
|
|
||||||
fprintf(file, "\\papersize %s\n", string_papersize[papersize2]);
|
os << "\\papersize " << string_papersize[papersize2]
|
||||||
fprintf(file, "\\paperpackage %s\n",
|
<< "\n\\paperpackage " << string_paperpackages[paperpackage]
|
||||||
string_paperpackages[paperpackage]);
|
<< "\n\\use_geometry " << use_geometry
|
||||||
fprintf(file, "\\use_geometry %d\n", use_geometry);
|
<< "\n\\use_amsmath " << use_amsmath
|
||||||
fprintf(file, "\\use_amsmath %d\n", use_amsmath);
|
<< "\n\\paperorientation " << string_orientation[orientation]
|
||||||
fprintf(file, "\\paperorientation %s\n",
|
<< '\n';
|
||||||
string_orientation[orientation]);
|
|
||||||
if (!paperwidth.empty())
|
if (!paperwidth.empty())
|
||||||
fprintf(file, "\\paperwidth %s\n",
|
os << "\\paperwidth "
|
||||||
VSpace(paperwidth).asLyXCommand().c_str());
|
<< VSpace(paperwidth).asLyXCommand() << '\n';
|
||||||
if (!paperheight.empty())
|
if (!paperheight.empty())
|
||||||
fprintf(file, "\\paperheight %s\n",
|
os << "\\paperheight "
|
||||||
VSpace(paperheight).asLyXCommand().c_str());
|
<< VSpace(paperheight).asLyXCommand() << '\n';
|
||||||
if (!leftmargin.empty())
|
if (!leftmargin.empty())
|
||||||
fprintf(file, "\\leftmargin %s\n",
|
os << "\\leftmargin "
|
||||||
VSpace(leftmargin).asLyXCommand().c_str());
|
<< VSpace(leftmargin).asLyXCommand() << '\n';
|
||||||
if (!topmargin.empty())
|
if (!topmargin.empty())
|
||||||
fprintf(file, "\\topmargin %s\n",
|
os << "\\topmargin "
|
||||||
VSpace(topmargin).asLyXCommand().c_str());
|
<< VSpace(topmargin).asLyXCommand() << '\n';
|
||||||
if (!rightmargin.empty())
|
if (!rightmargin.empty())
|
||||||
fprintf(file, "\\rightmargin %s\n",
|
os << "\\rightmargin "
|
||||||
VSpace(rightmargin).asLyXCommand().c_str());
|
<< VSpace(rightmargin).asLyXCommand() << '\n';
|
||||||
if (!bottommargin.empty())
|
if (!bottommargin.empty())
|
||||||
fprintf(file, "\\bottommargin %s\n",
|
os << "\\bottommargin "
|
||||||
VSpace(bottommargin).asLyXCommand().c_str());
|
<< VSpace(bottommargin).asLyXCommand() << '\n';
|
||||||
if (!headheight.empty())
|
if (!headheight.empty())
|
||||||
fprintf(file, "\\headheight %s\n",
|
os << "\\headheight "
|
||||||
VSpace(headheight).asLyXCommand().c_str());
|
<< VSpace(headheight).asLyXCommand() << '\n';
|
||||||
if (!headsep.empty())
|
if (!headsep.empty())
|
||||||
fprintf(file, "\\headsep %s\n",
|
os << "\\headsep "
|
||||||
VSpace(headsep).asLyXCommand().c_str());
|
<< VSpace(headsep).asLyXCommand() << '\n';
|
||||||
if (!footskip.empty())
|
if (!footskip.empty())
|
||||||
fprintf(file, "\\footskip %s\n",
|
os << "\\footskip "
|
||||||
VSpace(footskip).asLyXCommand().c_str());
|
<< VSpace(footskip).asLyXCommand() << '\n';
|
||||||
fprintf(file, "\\secnumdepth %d\n", secnumdepth);
|
os << "\\secnumdepth " << secnumdepth
|
||||||
fprintf(file, "\\tocdepth %d\n", tocdepth);
|
<< "\n\\tocdepth " << tocdepth
|
||||||
fprintf(file, "\\paragraph_separation %s\n",
|
<< "\n\\paragraph_separation "
|
||||||
string_paragraph_separation[paragraph_separation]);
|
<< string_paragraph_separation[paragraph_separation]
|
||||||
fprintf(file, "\\defskip %s\n", defskip.asLyXCommand().c_str());
|
<< "\n\\defskip " << defskip.asLyXCommand()
|
||||||
fprintf(file, "\\quotes_language %s\n",
|
<< "\n\\quotes_language "
|
||||||
string_quotes_language[quotes_language]);
|
<< string_quotes_language[quotes_language] << '\n';
|
||||||
switch(quotes_times) {
|
switch(quotes_times) {
|
||||||
|
// An output operator for insetquotes would be nice
|
||||||
case InsetQuotes::SingleQ:
|
case InsetQuotes::SingleQ:
|
||||||
fprintf(file, "\\quotes_times 1\n"); break;
|
os << "\\quotes_times 1\n"; break;
|
||||||
case InsetQuotes::DoubleQ:
|
case InsetQuotes::DoubleQ:
|
||||||
fprintf(file, "\\quotes_times 2\n"); break;
|
os << "\\quotes_times 2\n"; break;
|
||||||
}
|
}
|
||||||
fprintf(file, "\\papercolumns %d\n", columns);
|
os << "\\papercolumns " << columns
|
||||||
fprintf(file, "\\papersides %d\n", sides);
|
<< "\n\\papersides " << sides
|
||||||
fprintf(file, "\\paperpagestyle %s\n", pagestyle.c_str());
|
<< "\n\\paperpagestyle " << pagestyle << '\n';
|
||||||
for (int i = 0; i < 4; ++i) {
|
for (int i = 0; i < 4; ++i) {
|
||||||
if (user_defined_bullets[i] != ITEMIZE_DEFAULTS[i]) {
|
if (user_defined_bullets[i] != ITEMIZE_DEFAULTS[i]) {
|
||||||
if (user_defined_bullets[i].getFont() != -1) {
|
if (user_defined_bullets[i].getFont() != -1) {
|
||||||
fprintf(file, "\\bullet %d\n\t%d\n\t%d\n\t%d\n\\end_bullet\n",
|
os << "\\bullet " << i
|
||||||
i,
|
<< "\n\t"
|
||||||
user_defined_bullets[i].getFont(),
|
<< user_defined_bullets[i].getFont()
|
||||||
user_defined_bullets[i].getCharacter(),
|
<< "\n\t"
|
||||||
user_defined_bullets[i].getSize());
|
<< user_defined_bullets[i].getCharacter()
|
||||||
|
<< "\n\t"
|
||||||
|
<< user_defined_bullets[i].getSize()
|
||||||
|
<< "\n\\end_bullet\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fprintf(file, "\\bulletLaTeX %d\n\t%s\n\\end_bullet\n",
|
os << "\\bulletLaTeX " << i
|
||||||
i,
|
<< "\n\t"
|
||||||
user_defined_bullets[i].c_str());
|
<< user_defined_bullets[i].c_str()
|
||||||
|
<< "\n\\end_bullet\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "layout.h"
|
#include "layout.h"
|
||||||
#include "support/block.h"
|
#include "support/block.h"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This class contains all the parameters for this a buffer uses. Some
|
This class contains all the parameters for this a buffer uses. Some
|
||||||
work needs to be done on this class to make it nice. Now everything
|
work needs to be done on this class to make it nice. Now everything
|
||||||
@ -108,8 +109,7 @@ public:
|
|||||||
//@}
|
//@}
|
||||||
|
|
||||||
///
|
///
|
||||||
void writeFile(FILE *);
|
void writeFile(ostream &);
|
||||||
|
|
||||||
|
|
||||||
///
|
///
|
||||||
void useClassDefaults();
|
void useClassDefaults();
|
||||||
|
@ -1108,22 +1108,22 @@ void InsetFig::Draw(LyXFont font, LyXScreen & scr, int baseline, float & x)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetFig::Write(FILE * file)
|
void InsetFig::Write(ostream & os)
|
||||||
{
|
{
|
||||||
Regenerate();
|
Regenerate();
|
||||||
fprintf(file, "Figure size %d %d\n", wid, hgh);
|
os << "Figure size " << wid << " " << hgh << "\n";
|
||||||
if (!fname.empty()) {
|
if (!fname.empty()) {
|
||||||
string buf1 = OnlyPath(owner->getFileName());
|
string buf1 = OnlyPath(owner->getFileName());
|
||||||
string fname2 = MakeRelPath(fname, buf1);
|
string fname2 = MakeRelPath(fname, buf1);
|
||||||
fprintf(file, "file %s\n", fname2.c_str());
|
os << "file " << fname2 << "\n";
|
||||||
}
|
}
|
||||||
if (!subcaption.empty())
|
if (!subcaption.empty())
|
||||||
fprintf(file, "subcaption %s\n", subcaption.c_str());
|
os << "subcaption " << subcaption << "\n";
|
||||||
if (wtype) fprintf(file, "width %d %g\n", wtype, xwid);
|
if (wtype) os << "width " << wtype << " " << xwid << "\n";
|
||||||
if (htype) fprintf(file, "height %d %g\n", htype, xhgh);
|
if (htype) os << "height " << htype << " " << xhgh << "\n";
|
||||||
if (angle != 0) fprintf(file, "angle %g\n", angle);
|
if (angle != 0) os << "angle " << angle << "\n";
|
||||||
fprintf(file, "flags %d\n", flags);
|
os << "flags " << flags << "\n";
|
||||||
if (subfigure) fprintf(file, "subfigure\n");
|
if (subfigure) os << "subfigure\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1211,10 +1211,10 @@ void InsetFig::Read(LyXLex & lex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetFig::Latex(FILE * file, signed char /* fragile*/ )
|
int InsetFig::Latex(ostream & os, signed char /* fragile*/ )
|
||||||
{
|
{
|
||||||
Regenerate();
|
Regenerate();
|
||||||
if (!cmd.empty()) fprintf(file, "%s ", cmd.c_str());
|
if (!cmd.empty()) os << cmd << " ";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,9 +11,10 @@
|
|||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "LString.h"
|
#include "LString.h"
|
||||||
#include "LaTeXFeatures.h"
|
#include "LaTeXFeatures.h"
|
||||||
|
#include "insets/lyxinset.h"
|
||||||
/* the rest is figure stuff */
|
/* the rest is figure stuff */
|
||||||
|
|
||||||
|
|
||||||
struct Figref;
|
struct Figref;
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -32,11 +33,11 @@ public:
|
|||||||
///
|
///
|
||||||
void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
|
void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
///
|
///
|
||||||
int Latex(FILE * file, signed char fragile);
|
int Latex(ostream &, signed char fragile);
|
||||||
///
|
///
|
||||||
int Latex(string & file, signed char fragile);
|
int Latex(string & file, signed char fragile);
|
||||||
///
|
///
|
||||||
|
@ -72,9 +72,10 @@ extern "C" void bibitem_cb(FL_OBJECT *, long data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FD_citation_form *create_form_citation_form(void)
|
|
||||||
|
FD_citation_form * create_form_citation_form(void)
|
||||||
{
|
{
|
||||||
FL_OBJECT *obj;
|
FL_OBJECT * obj;
|
||||||
FD_citation_form *fdui = (FD_citation_form *) fl_calloc(1, sizeof(FD_citation_form));
|
FD_citation_form *fdui = (FD_citation_form *) fl_calloc(1, sizeof(FD_citation_form));
|
||||||
|
|
||||||
fdui->citation_form = fl_bgn_form(FL_NO_BOX, 220, 130);
|
fdui->citation_form = fl_bgn_form(FL_NO_BOX, 220, 130);
|
||||||
@ -104,9 +105,9 @@ FD_citation_form *create_form_citation_form(void)
|
|||||||
}
|
}
|
||||||
/*---------------------------------------*/
|
/*---------------------------------------*/
|
||||||
|
|
||||||
FD_bibitem_form *create_form_bibitem_form(void)
|
FD_bibitem_form * create_form_bibitem_form(void)
|
||||||
{
|
{
|
||||||
FL_OBJECT *obj;
|
FL_OBJECT * obj;
|
||||||
FD_bibitem_form *fdui = (FD_bibitem_form *) fl_calloc(1, sizeof(FD_bibitem_form));
|
FD_bibitem_form *fdui = (FD_bibitem_form *) fl_calloc(1, sizeof(FD_bibitem_form));
|
||||||
|
|
||||||
fdui->bibitem_form = fl_bgn_form(FL_NO_BOX, 220, 130);
|
fdui->bibitem_form = fl_bgn_form(FL_NO_BOX, 220, 130);
|
||||||
@ -133,11 +134,13 @@ FD_bibitem_form *create_form_bibitem_form(void)
|
|||||||
/*---------------------------------------*/
|
/*---------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
InsetCitation::InsetCitation(string const & key, string const & note):
|
InsetCitation::InsetCitation(string const & key, string const & note)
|
||||||
InsetCommand("cite", key, note)
|
: InsetCommand("cite", key, note)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
InsetCitation::~InsetCitation()
|
InsetCitation::~InsetCitation()
|
||||||
{
|
{
|
||||||
if(citation_form && citation_form->citation_form
|
if(citation_form && citation_form->citation_form
|
||||||
@ -196,7 +199,7 @@ InsetBibKey::InsetBibKey(string const & key, string const & label):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
InsetBibKey::InsetBibKey(InsetBibKey const *b):
|
InsetBibKey::InsetBibKey(InsetBibKey const * b):
|
||||||
InsetCommand("bibitem", b->contents, b->options)
|
InsetCommand("bibitem", b->contents, b->options)
|
||||||
{
|
{
|
||||||
counter = b->counter;
|
counter = b->counter;
|
||||||
@ -223,7 +226,7 @@ void InsetBibKey::setCounter(int c)
|
|||||||
// as a LyX 2.x command, and lyxlex is not enough smart to understand
|
// as a LyX 2.x command, and lyxlex is not enough smart to understand
|
||||||
// real LaTeX commands. Yes, that could be fixed, but would be a waste
|
// real LaTeX commands. Yes, that could be fixed, but would be a waste
|
||||||
// of time cause LyX3 won't use lyxlex anyway. (ale)
|
// of time cause LyX3 won't use lyxlex anyway. (ale)
|
||||||
void InsetBibKey::Write(FILE * file)
|
void InsetBibKey::Write(ostream & os)
|
||||||
{
|
{
|
||||||
string s;
|
string s;
|
||||||
if (!options.empty()) {
|
if (!options.empty()) {
|
||||||
@ -232,7 +235,7 @@ void InsetBibKey::Write(FILE * file)
|
|||||||
}
|
}
|
||||||
s += '{';
|
s += '{';
|
||||||
s += contents + '}';
|
s += contents + '}';
|
||||||
fprintf(file, "\\bibitem %s\n", s.c_str());
|
os << "\\bibitem " << s << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -281,8 +284,8 @@ void InsetBibKey::Edit(int, int)
|
|||||||
|
|
||||||
|
|
||||||
InsetBibtex::InsetBibtex(string const & dbase, string const & style,
|
InsetBibtex::InsetBibtex(string const & dbase, string const & style,
|
||||||
Buffer *o)
|
Buffer * o)
|
||||||
:InsetCommand("BibTeX", dbase, style), owner(o)
|
: InsetCommand("BibTeX", dbase, style), owner(o)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,17 +296,17 @@ string InsetBibtex::getScreenLabel() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetBibtex::Latex(FILE *file, signed char /*fragile*/)
|
int InsetBibtex::Latex(ostream & os, signed char /*fragile*/)
|
||||||
{
|
{
|
||||||
string bib;
|
string bib;
|
||||||
signed char dummy = 0;
|
signed char dummy = 0;
|
||||||
int result = Latex(bib, dummy);
|
int result = Latex(bib, dummy);
|
||||||
fprintf(file, "%s", bib.c_str());
|
os << bib;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetBibtex::Latex(string &file, signed char /*fragile*/)
|
int InsetBibtex::Latex(string & file, signed char /*fragile*/)
|
||||||
{
|
{
|
||||||
// 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
|
||||||
@ -315,9 +318,9 @@ int InsetBibtex::Latex(string &file, signed char /*fragile*/)
|
|||||||
// If we generate in a temp dir, we might need to give an
|
// If we generate in a temp dir, we might need to give an
|
||||||
// absolute path there. This is a bit complicated since we can
|
// absolute path there. This is a bit complicated since we can
|
||||||
// have a comma-separated list of bibliographies
|
// have a comma-separated list of bibliographies
|
||||||
string db_in, adb, db_out;
|
string adb, db_out;
|
||||||
db_in = getContents();
|
string db_in = getContents();
|
||||||
db_in= split(db_in, adb, ',');
|
db_in = split(db_in, adb, ',');
|
||||||
while(!adb.empty()) {
|
while(!adb.empty()) {
|
||||||
if (!owner->niceFile &&
|
if (!owner->niceFile &&
|
||||||
IsFileReadable(MakeAbsPath(adb, owner->filepath)+".bib"))
|
IsFileReadable(MakeAbsPath(adb, owner->filepath)+".bib"))
|
||||||
@ -454,8 +457,7 @@ void BibitemUpdate(Combox * combox)
|
|||||||
{
|
{
|
||||||
combox->clear();
|
combox->clear();
|
||||||
|
|
||||||
if (!current_view->available())
|
if (!current_view->available()) return;
|
||||||
return;
|
|
||||||
|
|
||||||
string tmp, bibkeys = current_view->buffer()->getBibkeyList(',');
|
string tmp, bibkeys = current_view->buffer()->getBibkeyList(',');
|
||||||
bibkeys = split(bibkeys, tmp,',');
|
bibkeys = split(bibkeys, tmp,',');
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
class InsetCitation: public InsetCommand {
|
class InsetCitation: public InsetCommand {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
InsetCitation(): InsetCommand("cite") {}
|
InsetCitation() : InsetCommand("cite") {}
|
||||||
///
|
///
|
||||||
InsetCitation(string const & key, string const & note = string());
|
InsetCitation(string const & key, string const & note = string());
|
||||||
///
|
///
|
||||||
@ -64,7 +64,7 @@ public:
|
|||||||
///
|
///
|
||||||
Inset * Clone() const { return new InsetBibKey(this); }
|
Inset * Clone() const { return new InsetBibKey(this); }
|
||||||
/// Currently \bibitem is used as a LyX2.x command, so we need this method.
|
/// Currently \bibitem is used as a LyX2.x command, so we need this method.
|
||||||
void Write(FILE *);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
virtual string getScreenLabel() const;
|
virtual string getScreenLabel() const;
|
||||||
///
|
///
|
||||||
@ -93,7 +93,7 @@ public:
|
|||||||
class InsetBibtex: public InsetCommand {
|
class InsetBibtex: public InsetCommand {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
InsetBibtex(): InsetCommand("BibTeX") { owner = 0; }
|
InsetBibtex() : InsetCommand("BibTeX") { owner = 0; }
|
||||||
///
|
///
|
||||||
InsetBibtex(string const & dbase, string const & style,
|
InsetBibtex(string const & dbase, string const & style,
|
||||||
Buffer *);
|
Buffer *);
|
||||||
@ -111,7 +111,7 @@ public:
|
|||||||
///
|
///
|
||||||
void Edit(int, int);
|
void Edit(int, int);
|
||||||
///
|
///
|
||||||
int Latex(FILE *, signed char);
|
int Latex(ostream &, signed char);
|
||||||
///
|
///
|
||||||
int Latex(string & file, signed char fragile);
|
int Latex(string & file, signed char fragile);
|
||||||
///
|
///
|
||||||
|
@ -89,9 +89,9 @@ void InsetCommand::Draw(LyXFont font, LyXScreen & scr,
|
|||||||
|
|
||||||
|
|
||||||
// In lyxf3 this will be just LaTeX
|
// In lyxf3 this will be just LaTeX
|
||||||
void InsetCommand::Write(FILE * file)
|
void InsetCommand::Write(ostream & os)
|
||||||
{
|
{
|
||||||
fprintf(file, "LatexCommand %s\n", getCommand().c_str());
|
os << "LatexCommand " << getCommand() << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -169,9 +169,9 @@ void InsetCommand::Read(LyXLex & lex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetCommand::Latex(FILE * file, signed char /*fragile*/)
|
int InsetCommand::Latex(ostream & os, signed char /*fragile*/)
|
||||||
{
|
{
|
||||||
fprintf(file, "%s", getCommand().c_str());
|
os << getCommand();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,13 +41,13 @@ public:
|
|||||||
///
|
///
|
||||||
void Draw(LyXFont, LyXScreen & scr, int baseline, float & x);
|
void Draw(LyXFont, LyXScreen & scr, int baseline, float & x);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
/// Parse the command.
|
/// Parse the command.
|
||||||
void scanCommand(string const & cmd);
|
void scanCommand(string const & cmd);
|
||||||
/// Will not be used when lyxf3
|
/// Will not be used when lyxf3
|
||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
///
|
///
|
||||||
virtual int Latex(FILE * file, signed char fragile);
|
virtual int Latex(ostream &, signed char fragile);
|
||||||
///
|
///
|
||||||
virtual int Latex(string & file, signed char fragile);
|
virtual int Latex(string & file, signed char fragile);
|
||||||
///
|
///
|
||||||
|
@ -26,6 +26,7 @@ InsetError::InsetError()
|
|||||||
form = 0;
|
form = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
InsetError::InsetError(string const & str)
|
InsetError::InsetError(string const & str)
|
||||||
: contents(str)
|
: contents(str)
|
||||||
{
|
{
|
||||||
@ -88,16 +89,17 @@ void InsetError::Draw(LyXFont font, LyXScreen & scr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetError::Write(FILE *)
|
void InsetError::Write(ostream &)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetError::Read(LyXLex &)
|
void InsetError::Read(LyXLex &)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetError::Latex(FILE *, signed char /*fragile*/)
|
int InsetError::Latex(ostream &, signed char /*fragile*/)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -42,11 +42,11 @@ public:
|
|||||||
///
|
///
|
||||||
void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
|
void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
///
|
///
|
||||||
int Latex(FILE * file, signed char fragile);
|
int Latex(ostream &, signed char fragile);
|
||||||
///
|
///
|
||||||
int Latex(string & file, signed char fragile);
|
int Latex(string & file, signed char fragile);
|
||||||
///
|
///
|
||||||
|
@ -210,6 +210,7 @@ InsetInclude::~InsetInclude()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Inset * InsetInclude::Clone() const
|
Inset * InsetInclude::Clone() const
|
||||||
{
|
{
|
||||||
InsetInclude * ii = new InsetInclude (contents, master);
|
InsetInclude * ii = new InsetInclude (contents, master);
|
||||||
@ -225,6 +226,7 @@ Inset * InsetInclude::Clone() const
|
|||||||
return ii;
|
return ii;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetInclude::Edit(int, int)
|
void InsetInclude::Edit(int, int)
|
||||||
{
|
{
|
||||||
if(current_view->buffer()->isReadonly())
|
if(current_view->buffer()->isReadonly())
|
||||||
@ -258,9 +260,9 @@ void InsetInclude::Edit(int, int)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetInclude::Write(FILE * file)
|
void InsetInclude::Write(ostream & os)
|
||||||
{
|
{
|
||||||
fprintf(file, "Include %s\n", getCommand().c_str());
|
os << "Include " << getCommand() << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -314,12 +316,12 @@ bool InsetInclude::loadIfNeeded() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetInclude::Latex(FILE * file, signed char /*fragile*/)
|
int InsetInclude::Latex(ostream & os, signed char /*fragile*/)
|
||||||
{
|
{
|
||||||
string include_file;
|
string include_file;
|
||||||
signed char dummy = 0;
|
signed char dummy = 0;
|
||||||
Latex(include_file, dummy);
|
Latex(include_file, dummy);
|
||||||
fprintf(file, "%s", include_file.c_str());
|
os << include_file;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,7 +338,7 @@ int InsetInclude::Latex(string & file, signed char /*fragile*/)
|
|||||||
incfile += contents;
|
incfile += contents;
|
||||||
|
|
||||||
if (loadIfNeeded()) {
|
if (loadIfNeeded()) {
|
||||||
Buffer *tmp = bufferlist.getBuffer(getFileName());
|
Buffer * tmp = bufferlist.getBuffer(getFileName());
|
||||||
|
|
||||||
if (tmp->params.textclass != master->params.textclass) {
|
if (tmp->params.textclass != master->params.textclass) {
|
||||||
lyxerr << "ERROR: Cannot handle include file `"
|
lyxerr << "ERROR: Cannot handle include file `"
|
||||||
@ -354,9 +356,9 @@ int InsetInclude::Latex(string & file, signed char /*fragile*/)
|
|||||||
if (!master->tmppath.empty()
|
if (!master->tmppath.empty()
|
||||||
&& !master->niceFile) {
|
&& !master->niceFile) {
|
||||||
incfile = subst(incfile, '/','@');
|
incfile = subst(incfile, '/','@');
|
||||||
#ifdef __EMX__
|
#ifdef __EMX__
|
||||||
incfile = subst(incfile, ':', '$');
|
incfile = subst(incfile, ':', '$');
|
||||||
#endif
|
#endif
|
||||||
writefile = AddName(master->tmppath, incfile);
|
writefile = AddName(master->tmppath, incfile);
|
||||||
} else
|
} else
|
||||||
writefile = getFileName();
|
writefile = getFileName();
|
||||||
@ -434,9 +436,9 @@ string InsetInclude::getLabel(int) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetInclude::GetNumberOfLabels() const {
|
int InsetInclude::GetNumberOfLabels() const
|
||||||
|
{
|
||||||
string label;
|
string label;
|
||||||
int nl;
|
|
||||||
|
|
||||||
if (loadIfNeeded()) {
|
if (loadIfNeeded()) {
|
||||||
Buffer * tmp = bufferlist.getBuffer(getFileName());
|
Buffer * tmp = bufferlist.getBuffer(getFileName());
|
||||||
@ -444,7 +446,7 @@ int InsetInclude::GetNumberOfLabels() const {
|
|||||||
label = tmp->getReferenceList('\n');
|
label = tmp->getReferenceList('\n');
|
||||||
tmp->setParentName(getMasterFilename());
|
tmp->setParentName(getMasterFilename());
|
||||||
}
|
}
|
||||||
nl = (label.empty())? 0: 1;
|
int nl = (label.empty())? 0: 1;
|
||||||
|
|
||||||
return nl;
|
return nl;
|
||||||
}
|
}
|
||||||
|
@ -54,11 +54,11 @@ public:
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
/// With lyx3 we won't overload these 3 methods
|
/// With lyx3 we won't overload these 3 methods
|
||||||
void Write(FILE *);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Read(LyXLex &);
|
void Read(LyXLex &);
|
||||||
///
|
///
|
||||||
int Latex(FILE * file, signed char fragile);
|
int Latex(ostream &, signed char fragile);
|
||||||
///
|
///
|
||||||
int Latex(string & file, signed char fragile);
|
int Latex(string & file, signed char fragile);
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
extern BufferView * current_view;
|
extern BufferView * current_view;
|
||||||
|
|
||||||
|
|
||||||
InsetInfo::InsetInfo()
|
InsetInfo::InsetInfo()
|
||||||
{
|
{
|
||||||
form = 0;
|
form = 0;
|
||||||
@ -90,9 +91,9 @@ void InsetInfo::Draw(LyXFont font, LyXScreen & scr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetInfo::Write(FILE * file)
|
void InsetInfo::Write(ostream & os)
|
||||||
{
|
{
|
||||||
fprintf(file, "Info %s", contents.c_str());
|
os << "Info " << contents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -123,7 +124,7 @@ void InsetInfo::Read(LyXLex & lex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetInfo::Latex(FILE *, signed char /*fragile*/)
|
int InsetInfo::Latex(ostream &, signed char /*fragile*/)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -45,11 +45,11 @@ public:
|
|||||||
///
|
///
|
||||||
void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
|
void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
///
|
///
|
||||||
int Latex(FILE * file, signed char fragile);
|
int Latex(ostream &, signed char fragile);
|
||||||
///
|
///
|
||||||
int Latex(string & file, signed char fragile);
|
int Latex(string & file, signed char fragile);
|
||||||
///
|
///
|
||||||
|
@ -42,9 +42,10 @@ string InsetLabel::getLabel(int) const
|
|||||||
return contents;
|
return contents;
|
||||||
}
|
}
|
||||||
|
|
||||||
int InsetLabel::Latex(FILE * file, signed char /*fragile*/)
|
|
||||||
|
int InsetLabel::Latex(ostream & os, signed char /*fragile*/)
|
||||||
{
|
{
|
||||||
fprintf(file, "%s", escape(getCommand()).c_str());
|
os << escape(getCommand());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ public:
|
|||||||
///
|
///
|
||||||
unsigned char Editable() const { return 0; }
|
unsigned char Editable() const { return 0; }
|
||||||
///
|
///
|
||||||
int Latex(FILE * file, signed char fragile);
|
int Latex(ostream &, signed char fragile);
|
||||||
///
|
///
|
||||||
int Latex(string & file, signed char fragile);
|
int Latex(string & file, signed char fragile);
|
||||||
///
|
///
|
||||||
|
@ -33,7 +33,7 @@ InsetLatexAccent::InsetLatexAccent()
|
|||||||
|
|
||||||
|
|
||||||
InsetLatexAccent::InsetLatexAccent(InsetLatexAccent const & other)
|
InsetLatexAccent::InsetLatexAccent(InsetLatexAccent const & other)
|
||||||
:contents(other.contents),
|
: contents(other.contents),
|
||||||
candisp(other.candisp),
|
candisp(other.candisp),
|
||||||
modtype(other.modtype),
|
modtype(other.modtype),
|
||||||
remdot(other.remdot),
|
remdot(other.remdot),
|
||||||
@ -243,7 +243,7 @@ void InsetLatexAccent::checkContents()
|
|||||||
for(string::size_type j = 4; j < contents.length(); ++j)
|
for(string::size_type j = 4; j < contents.length(); ++j)
|
||||||
temp+= contents[j];
|
temp+= contents[j];
|
||||||
contents= temp;
|
contents= temp;
|
||||||
i++;
|
++i;
|
||||||
remdot = true;
|
remdot = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,9 +271,9 @@ int InsetLatexAccent::Ascent(LyXFont const & font) const
|
|||||||
else
|
else
|
||||||
max = font.ascent(ic);
|
max = font.ascent(ic);
|
||||||
if (plusasc)
|
if (plusasc)
|
||||||
max += (font.maxAscent()+3) / 3;
|
max += (font.maxAscent() + 3) / 3;
|
||||||
} else
|
} else
|
||||||
max = font.maxAscent()+4;
|
max = font.maxAscent() + 4;
|
||||||
return max;
|
return max;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -576,9 +576,9 @@ void InsetLatexAccent::Draw(LyXFont font,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetLatexAccent::Write(FILE * file)
|
void InsetLatexAccent::Write(ostream & os)
|
||||||
{
|
{
|
||||||
fprintf(file, "\\i %s\n", contents.c_str());
|
os << "\\i " << contents << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -590,9 +590,9 @@ void InsetLatexAccent::Read(LyXLex & lex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetLatexAccent::Latex(FILE * file, signed char /*fragile*/)
|
int InsetLatexAccent::Latex(ostream & os, signed char /*fragile*/)
|
||||||
{
|
{
|
||||||
fprintf(file, "%s", contents.c_str());
|
os << contents;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,11 +47,11 @@ public:
|
|||||||
///
|
///
|
||||||
void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
|
void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
///
|
///
|
||||||
int Latex(FILE * file, signed char fragile);
|
int Latex(ostream &, signed char fragile);
|
||||||
///
|
///
|
||||||
int Latex(string & file, signed char fragile);
|
int Latex(string & file, signed char fragile);
|
||||||
///
|
///
|
||||||
|
@ -28,7 +28,8 @@
|
|||||||
extern BufferView * current_view;
|
extern BufferView * current_view;
|
||||||
|
|
||||||
|
|
||||||
InsetParent::InsetParent(string fn, Buffer * owner): InsetCommand("lyxparent")
|
InsetParent::InsetParent(string const & fn, Buffer * owner)
|
||||||
|
: InsetCommand("lyxparent")
|
||||||
{
|
{
|
||||||
if (owner)
|
if (owner)
|
||||||
setContents(MakeAbsPath(fn, OnlyPath(owner->getFileName())));
|
setContents(MakeAbsPath(fn, OnlyPath(owner->getFileName())));
|
||||||
@ -36,20 +37,23 @@ InsetParent::InsetParent(string fn, Buffer * owner): InsetCommand("lyxparent")
|
|||||||
setContents(fn);
|
setContents(fn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetParent::Edit(int, int)
|
void InsetParent::Edit(int, int)
|
||||||
{
|
{
|
||||||
current_view->owner()->getLyXFunc()->Dispatch(LFUN_CHILDOPEN,
|
current_view->owner()->getLyXFunc()->Dispatch(LFUN_CHILDOPEN,
|
||||||
getContents().c_str());
|
getContents().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// LaTeX must just ignore this command
|
// LaTeX must just ignore this command
|
||||||
int InsetParent::Latex(FILE * file, signed char fragile)
|
int InsetParent::Latex(ostream & os, signed char fragile)
|
||||||
{
|
{
|
||||||
fprintf(file, "%%#{lyx}");
|
os << "%%#{lyx}";
|
||||||
InsetCommand::Latex(file, fragile);
|
InsetCommand::Latex(os, fragile);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// LaTeX must just ignore this command
|
// LaTeX must just ignore this command
|
||||||
int InsetParent::Latex(string & file, signed char fragile)
|
int InsetParent::Latex(string & file, signed char fragile)
|
||||||
{
|
{
|
||||||
|
@ -29,9 +29,9 @@ public:
|
|||||||
/// Non-standard LyX macro
|
/// Non-standard LyX macro
|
||||||
InsetParent() : InsetCommand("lyxparent") {}
|
InsetParent() : InsetCommand("lyxparent") {}
|
||||||
///
|
///
|
||||||
InsetParent(string fn, Buffer * owner = 0);
|
InsetParent(string const & fn, Buffer * owner = 0);
|
||||||
///
|
///
|
||||||
int Latex(FILE * file, signed char fragile);
|
int Latex(ostream &, signed char fragile);
|
||||||
///
|
///
|
||||||
int Latex(string & file, signed char fragile);
|
int Latex(string & file, signed char fragile);
|
||||||
///
|
///
|
||||||
|
@ -38,8 +38,8 @@ static char const * const times_char = "sd";
|
|||||||
static char const * const quote_char = ",'`<>";
|
static char const * const quote_char = ",'`<>";
|
||||||
|
|
||||||
// Index of chars used for the quote. Index is [side, language]
|
// Index of chars used for the quote. Index is [side, language]
|
||||||
int quote_index[2][6] =
|
int quote_index[2][6] = {
|
||||||
{ { 2, 1, 0, 0, 3, 4 }, // "'',,<>"
|
{ 2, 1, 0, 0, 3, 4 }, // "'',,<>"
|
||||||
{ 1, 1, 2, 1, 4, 3 } }; // "`'`'><"
|
{ 1, 1, 2, 1, 4, 3 } }; // "`'`'><"
|
||||||
|
|
||||||
// Corresponding LaTeX code, for double and single quotes.
|
// Corresponding LaTeX code, for double and single quotes.
|
||||||
@ -64,6 +64,7 @@ InsetQuotes::InsetQuotes(string const & str)
|
|||||||
ParseString(str);
|
ParseString(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
InsetQuotes::InsetQuotes(InsetQuotes::quote_language l,
|
InsetQuotes::InsetQuotes(InsetQuotes::quote_language l,
|
||||||
InsetQuotes::quote_side s,
|
InsetQuotes::quote_side s,
|
||||||
InsetQuotes::quote_times t)
|
InsetQuotes::quote_times t)
|
||||||
@ -99,43 +100,44 @@ void InsetQuotes::ParseString(string const & s)
|
|||||||
str = "eld";
|
str = "eld";
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i= 0;i<6;i++) {
|
for (i = 0; i < 6; ++i) {
|
||||||
if (str[0] == language_char[i]) {
|
if (str[0] == language_char[i]) {
|
||||||
language = (InsetQuotes::quote_language)i;
|
language = (InsetQuotes::quote_language)i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i>= 6) {
|
if (i >= 6) {
|
||||||
lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
|
lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
|
||||||
" bad language specification." << endl;
|
" bad language specification." << endl;
|
||||||
language = InsetQuotes::EnglishQ;
|
language = InsetQuotes::EnglishQ;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i= 0;i<2;i++) {
|
for (i = 0; i < 2; ++i) {
|
||||||
if (str[1] == side_char[i]) {
|
if (str[1] == side_char[i]) {
|
||||||
side = (InsetQuotes::quote_side)i;
|
side = (InsetQuotes::quote_side)i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i>= 2) {
|
if (i >= 2) {
|
||||||
lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
|
lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
|
||||||
" bad side specification." << endl;
|
" bad side specification." << endl;
|
||||||
side = InsetQuotes::LeftQ;
|
side = InsetQuotes::LeftQ;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i= 0;i<2;i++) {
|
for (i = 0; i < 2; ++i) {
|
||||||
if (str[2] == times_char[i]) {
|
if (str[2] == times_char[i]) {
|
||||||
times = (InsetQuotes::quote_times)i;
|
times = (InsetQuotes::quote_times)i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i>= 2) {
|
if (i >= 2) {
|
||||||
lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
|
lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
|
||||||
" bad times specification." << endl;
|
" bad times specification." << endl;
|
||||||
times = InsetQuotes::DoubleQ;
|
times = InsetQuotes::DoubleQ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
string InsetQuotes::DispString() const
|
string InsetQuotes::DispString() const
|
||||||
{
|
{
|
||||||
string disp;
|
string disp;
|
||||||
@ -201,13 +203,13 @@ void InsetQuotes::Draw(LyXFont font, LyXScreen & scr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetQuotes::Write(FILE * file)
|
void InsetQuotes::Write(ostream & os)
|
||||||
{
|
{
|
||||||
string text;
|
string text;
|
||||||
text += language_char[language];
|
text += language_char[language];
|
||||||
text += side_char[side];
|
text += side_char[side];
|
||||||
text += times_char[times];
|
text += times_char[times];
|
||||||
fprintf(file, "Quotes %s", text.c_str());
|
os << "Quotes " << text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -218,14 +220,15 @@ void InsetQuotes::Read(LyXLex & lex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetQuotes::Latex(FILE * file, signed char /*fragile*/)
|
int InsetQuotes::Latex(ostream & os, signed char /*fragile*/)
|
||||||
{
|
{
|
||||||
string quote;
|
string quote;
|
||||||
int res = Latex(quote, 0);
|
int res = Latex(quote, 0);
|
||||||
fprintf(file, "%s", quote.c_str());
|
os << quote;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetQuotes::Latex(string & file, signed char /*fragile*/)
|
int InsetQuotes::Latex(string & file, signed char /*fragile*/)
|
||||||
{
|
{
|
||||||
string doclang =
|
string doclang =
|
||||||
|
@ -81,11 +81,11 @@ public:
|
|||||||
///
|
///
|
||||||
LyXFont ConvertFont(LyXFont font);
|
LyXFont ConvertFont(LyXFont font);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
///
|
///
|
||||||
int Latex(FILE * file, signed char fragile);
|
int Latex(ostream &, signed char fragile);
|
||||||
///
|
///
|
||||||
int Latex(string & file, signed char fragile);
|
int Latex(string & file, signed char fragile);
|
||||||
///
|
///
|
||||||
|
@ -43,11 +43,6 @@ InsetRef::InsetRef(InsetCommand const & inscmd, Buffer * bf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
InsetRef::~InsetRef()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void InsetRef::Edit(int, int)
|
void InsetRef::Edit(int, int)
|
||||||
{
|
{
|
||||||
current_view->owner()->getLyXFunc()
|
current_view->owner()->getLyXFunc()
|
||||||
@ -72,14 +67,15 @@ string InsetRef::getScreenLabel() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetRef::Latex(FILE * file, signed char /*fragile*/)
|
int InsetRef::Latex(ostream & os, signed char /*fragile*/)
|
||||||
{
|
{
|
||||||
if(getOptions().empty())
|
if(getOptions().empty())
|
||||||
fprintf(file, "%s", escape(getCommand()).c_str());
|
os << escape(getCommand());
|
||||||
else {
|
else {
|
||||||
string ns;
|
string ns;
|
||||||
InsetCommand clone = InsetCommand(getCmdName(), getContents(), ns);
|
InsetCommand clone = InsetCommand(getCmdName(),
|
||||||
fprintf(file, "%s", escape(clone.getCommand()).c_str());
|
getContents(), ns);
|
||||||
|
os << escape(clone.getCommand());
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -91,7 +87,8 @@ int InsetRef::Latex(string & file, signed char /*fragile*/)
|
|||||||
file += escape(getCommand());
|
file += escape(getCommand());
|
||||||
else {
|
else {
|
||||||
string ns;
|
string ns;
|
||||||
InsetCommand clone= InsetCommand(getCmdName(), getContents(), ns);
|
InsetCommand clone = InsetCommand(getCmdName(),
|
||||||
|
getContents(), ns);
|
||||||
file += escape(clone.getCommand());
|
file += escape(clone.getCommand());
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -118,7 +115,8 @@ int InsetRef::DocBook(string & file)
|
|||||||
|
|
||||||
// This function escapes 8-bit characters and other problematic characters
|
// This function escapes 8-bit characters and other problematic characters
|
||||||
// It's exactly the same code as in insetlabel.C.
|
// It's exactly the same code as in insetlabel.C.
|
||||||
string InsetRef::escape(string const & lab) const {
|
string InsetRef::escape(string const & lab) const
|
||||||
|
{
|
||||||
char hexdigit[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
|
char hexdigit[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
|
||||||
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
|
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
|
||||||
string enc;
|
string enc;
|
||||||
|
@ -39,8 +39,6 @@ public:
|
|||||||
///
|
///
|
||||||
InsetRef(InsetCommand const &, Buffer *);
|
InsetRef(InsetCommand const &, Buffer *);
|
||||||
///
|
///
|
||||||
~InsetRef();
|
|
||||||
///
|
|
||||||
Inset * Clone() const {
|
Inset * Clone() const {
|
||||||
return new InsetRef (getCommand(), master);
|
return new InsetRef (getCommand(), master);
|
||||||
}
|
}
|
||||||
@ -63,7 +61,7 @@ public:
|
|||||||
///
|
///
|
||||||
void gotoLabel();
|
void gotoLabel();
|
||||||
///
|
///
|
||||||
int Latex(FILE * file, signed char fragile);
|
int Latex(ostream &, signed char fragile);
|
||||||
///
|
///
|
||||||
int Latex(string & file, signed char fragile);
|
int Latex(string & file, signed char fragile);
|
||||||
///
|
///
|
||||||
|
@ -106,7 +106,7 @@ void InsetSpecialChar::Draw(LyXFont font, LyXScreen & scr,
|
|||||||
|
|
||||||
|
|
||||||
// In lyxf3 this will be just LaTeX
|
// In lyxf3 this will be just LaTeX
|
||||||
void InsetSpecialChar::Write(FILE * file)
|
void InsetSpecialChar::Write(ostream & os)
|
||||||
{
|
{
|
||||||
string command;
|
string command;
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
@ -115,7 +115,7 @@ void InsetSpecialChar::Write(FILE * file)
|
|||||||
case LDOTS: command = "\\ldots{}"; break;
|
case LDOTS: command = "\\ldots{}"; break;
|
||||||
case MENU_SEPARATOR: command = "\\menuseparator"; break;
|
case MENU_SEPARATOR: command = "\\menuseparator"; break;
|
||||||
}
|
}
|
||||||
fprintf(file, "\\SpecialChar %s\n", command.c_str());
|
os << "\\SpecialChar " << command << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -138,12 +138,12 @@ void InsetSpecialChar::Read(LyXLex & lex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetSpecialChar::Latex(FILE * file, signed char /*fragile*/)
|
int InsetSpecialChar::Latex(ostream & os, signed char /*fragile*/)
|
||||||
{
|
{
|
||||||
string command;
|
string command;
|
||||||
signed char dummy = 0;
|
signed char dummy = 0;
|
||||||
Latex(command, dummy);
|
Latex(command, dummy);
|
||||||
fprintf(file, "%s", command.c_str());
|
os << command;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,11 +49,11 @@ public:
|
|||||||
///
|
///
|
||||||
void Draw(LyXFont, LyXScreen & scr, int baseline, float & x);
|
void Draw(LyXFont, LyXScreen & scr, int baseline, float & x);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
/// Will not be used when lyxf3
|
/// Will not be used when lyxf3
|
||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
///
|
///
|
||||||
int Latex(FILE * file, signed char fragile);
|
int Latex(ostream &, signed char fragile);
|
||||||
///
|
///
|
||||||
int Latex(string & file, signed char fragile);
|
int Latex(string & file, signed char fragile);
|
||||||
///
|
///
|
||||||
|
@ -117,7 +117,8 @@ void InsetUrl::Edit(int, int)
|
|||||||
if (!fd_form_url) {
|
if (!fd_form_url) {
|
||||||
fd_form_url = create_form_form_url();
|
fd_form_url = create_form_form_url();
|
||||||
fd_form_url->button_close->u_vdata = this;
|
fd_form_url->button_close->u_vdata = this;
|
||||||
fl_set_form_atclose(fd_form_url->form_url, CancelCloseBoxCB, 0);
|
fl_set_form_atclose(fd_form_url->form_url,
|
||||||
|
CancelCloseBoxCB, 0);
|
||||||
}
|
}
|
||||||
fl_set_input(fd_form_url->url_name, getContents().c_str());
|
fl_set_input(fd_form_url->url_name, getContents().c_str());
|
||||||
fl_set_input(fd_form_url->name_name, getOptions().c_str());
|
fl_set_input(fd_form_url->name_name, getOptions().c_str());
|
||||||
@ -161,17 +162,17 @@ string InsetUrl::getScreenLabel() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetUrl::Latex(FILE * file, signed char fragile)
|
int InsetUrl::Latex(ostream & os, signed char fragile)
|
||||||
{
|
{
|
||||||
string latex_output;
|
string latex_output;
|
||||||
int res = Latex(latex_output, fragile);
|
int res = Latex(latex_output, fragile);
|
||||||
fprintf(file, "%s", latex_output.c_str());
|
os << latex_output;
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetUrl::Latex(string &file, signed char fragile)
|
int InsetUrl::Latex(string & file, signed char fragile)
|
||||||
{
|
{
|
||||||
if (!getOptions().empty())
|
if (!getOptions().empty())
|
||||||
file += getOptions() + ' ';
|
file += getOptions() + ' ';
|
||||||
|
@ -70,7 +70,7 @@ public:
|
|||||||
///
|
///
|
||||||
void gotoLabel();
|
void gotoLabel();
|
||||||
///
|
///
|
||||||
int Latex(FILE * file, signed char fragile);
|
int Latex(ostream &, signed char fragile);
|
||||||
///
|
///
|
||||||
int Latex(string & file, signed char fragile);
|
int Latex(string & file, signed char fragile);
|
||||||
///
|
///
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "lyxlex.h"
|
#include "lyxlex.h"
|
||||||
#include "lyxscreen.h"
|
#include "lyxscreen.h"
|
||||||
|
|
||||||
|
|
||||||
class Buffer;
|
class Buffer;
|
||||||
struct LaTeXFeatures;
|
struct LaTeXFeatures;
|
||||||
|
|
||||||
@ -99,14 +100,15 @@ public:
|
|||||||
///
|
///
|
||||||
virtual bool AutoDelete() const;
|
virtual bool AutoDelete() const;
|
||||||
///
|
///
|
||||||
virtual void Write(FILE * file) = 0;
|
virtual void Write(ostream &) = 0;
|
||||||
///
|
///
|
||||||
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 != 0 means, that the inset should take care about
|
||||||
fragile commands by adding a \protect before.
|
fragile commands by adding a \protect before.
|
||||||
*/
|
*/
|
||||||
virtual int Latex(FILE * file, signed char fragile) = 0;
|
virtual int Latex(ostream &, signed char fragile) = 0;
|
||||||
|
///
|
||||||
virtual int Latex(string & file, signed char fragile) = 0;
|
virtual int Latex(string & file, signed char fragile) = 0;
|
||||||
///
|
///
|
||||||
virtual int Linuxdoc(string & /*file*/) = 0;
|
virtual int Linuxdoc(string & /*file*/) = 0;
|
||||||
|
13
src/layout.h
13
src/layout.h
@ -481,6 +481,19 @@ inline void operator|=(LyXTextClass::Provides & p1, LyXTextClass::Provides p2)
|
|||||||
p1 = static_cast<LyXTextClass::Provides>(p1 | p2);
|
p1 = static_cast<LyXTextClass::Provides>(p1 | p2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
inline ostream & operator<<(ostream & os, LyXTextClass::PageSides p)
|
||||||
|
{
|
||||||
|
switch (p) {
|
||||||
|
case LyXTextClass::OneSide:
|
||||||
|
os << "1";
|
||||||
|
break;
|
||||||
|
case LyXTextClass::TwoSides:
|
||||||
|
os << "2";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
class LyXTextClassList {
|
class LyXTextClassList {
|
||||||
|
@ -110,7 +110,7 @@ string const LaTeXColorNames[13] =
|
|||||||
"yellow", "error12", "error13", "error14", "error15" };
|
"yellow", "error12", "error13", "error14", "error15" };
|
||||||
|
|
||||||
/// Decreases font size by one
|
/// Decreases font size by one
|
||||||
LyXFont& LyXFont::decSize()
|
LyXFont & LyXFont::decSize()
|
||||||
{
|
{
|
||||||
switch (size()) {
|
switch (size()) {
|
||||||
case SIZE_HUGER: setSize(SIZE_HUGE); break;
|
case SIZE_HUGER: setSize(SIZE_HUGE); break;
|
||||||
@ -141,7 +141,7 @@ LyXFont& LyXFont::decSize()
|
|||||||
|
|
||||||
|
|
||||||
/// Increases font size by one
|
/// Increases font size by one
|
||||||
LyXFont& LyXFont::incSize()
|
LyXFont & LyXFont::incSize()
|
||||||
{
|
{
|
||||||
switch(size()) {
|
switch(size()) {
|
||||||
case SIZE_HUGER: break;
|
case SIZE_HUGER: break;
|
||||||
@ -339,6 +339,7 @@ bool LyXFont::resolved() const
|
|||||||
color() != INHERIT_COLOR);
|
color() != INHERIT_COLOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Build GUI description of font state
|
/// Build GUI description of font state
|
||||||
string LyXFont::stateText() const
|
string LyXFont::stateText() const
|
||||||
{
|
{
|
||||||
@ -371,7 +372,7 @@ string LyXFont::stateText() const
|
|||||||
|
|
||||||
|
|
||||||
// Set family according to lyx format string
|
// Set family according to lyx format string
|
||||||
LyXFont& LyXFont::setLyXFamily(string const & fam)
|
LyXFont & LyXFont::setLyXFamily(string const & fam)
|
||||||
{
|
{
|
||||||
string s = lowercase(fam);
|
string s = lowercase(fam);
|
||||||
|
|
||||||
@ -387,7 +388,7 @@ LyXFont& LyXFont::setLyXFamily(string const & fam)
|
|||||||
|
|
||||||
|
|
||||||
// Set series according to lyx format string
|
// Set series according to lyx format string
|
||||||
LyXFont& LyXFont::setLyXSeries(string const & ser)
|
LyXFont & LyXFont::setLyXSeries(string const & ser)
|
||||||
{
|
{
|
||||||
string s = lowercase(ser);
|
string s = lowercase(ser);
|
||||||
|
|
||||||
@ -403,7 +404,7 @@ LyXFont& LyXFont::setLyXSeries(string const & ser)
|
|||||||
|
|
||||||
|
|
||||||
// Set shape according to lyx format string
|
// Set shape according to lyx format string
|
||||||
LyXFont& LyXFont::setLyXShape(string const & sha)
|
LyXFont & LyXFont::setLyXShape(string const & sha)
|
||||||
{
|
{
|
||||||
string s = lowercase(sha);
|
string s = lowercase(sha);
|
||||||
|
|
||||||
@ -419,7 +420,7 @@ LyXFont& LyXFont::setLyXShape(string const & sha)
|
|||||||
|
|
||||||
|
|
||||||
// Set size according to lyx format string
|
// Set size according to lyx format string
|
||||||
LyXFont& LyXFont::setLyXSize(string const & siz)
|
LyXFont & LyXFont::setLyXSize(string const & siz)
|
||||||
{
|
{
|
||||||
string s = lowercase(siz);
|
string s = lowercase(siz);
|
||||||
int i= 0;
|
int i= 0;
|
||||||
@ -446,7 +447,7 @@ LyXFont::FONT_MISC_STATE LyXFont::setLyXMisc(string const & siz)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Sets color after LyX text format
|
/// Sets color after LyX text format
|
||||||
LyXFont& LyXFont::setLyXColor(string const & col)
|
LyXFont & LyXFont::setLyXColor(string const & col)
|
||||||
{
|
{
|
||||||
string s = lowercase(col);
|
string s = lowercase(col);
|
||||||
int i= 0;
|
int i= 0;
|
||||||
@ -461,7 +462,7 @@ LyXFont& LyXFont::setLyXColor(string const & col)
|
|||||||
|
|
||||||
|
|
||||||
/// Sets size after GUI name
|
/// Sets size after GUI name
|
||||||
LyXFont& LyXFont::setGUISize(string const & siz)
|
LyXFont & LyXFont::setGUISize(string const & siz)
|
||||||
{
|
{
|
||||||
string s = lowercase(siz);
|
string s = lowercase(siz);
|
||||||
int i= 0;
|
int i= 0;
|
||||||
@ -558,36 +559,34 @@ LyXFont & LyXFont::lyxRead(LyXLex & lex)
|
|||||||
|
|
||||||
|
|
||||||
/// Writes the changes from this font to orgfont in .lyx format in file
|
/// Writes the changes from this font to orgfont in .lyx format in file
|
||||||
void LyXFont::lyxWriteChanges(LyXFont const & orgfont, FILE * file) const
|
void LyXFont::lyxWriteChanges(LyXFont const & orgfont, ostream & os) const
|
||||||
{
|
{
|
||||||
fprintf(file, "\n");
|
os << "\n";
|
||||||
if (orgfont.family() != family()) {
|
if (orgfont.family() != family()) {
|
||||||
fprintf(file, "\\family %s \n",
|
os << "\\family " << LyXFamilyNames[family()] << " \n";
|
||||||
LyXFamilyNames[family()].c_str());
|
|
||||||
}
|
}
|
||||||
if (orgfont.series() != series()) {
|
if (orgfont.series() != series()) {
|
||||||
fprintf(file, "\\series %s \n",
|
os << "\\series " << LyXSeriesNames[series()] << " \n";
|
||||||
LyXSeriesNames[series()].c_str());
|
|
||||||
}
|
}
|
||||||
if (orgfont.shape() != shape()) {
|
if (orgfont.shape() != shape()) {
|
||||||
fprintf(file, "\\shape %s \n", LyXShapeNames[shape()].c_str());
|
os << "\\shape " << LyXShapeNames[shape()] << " \n";
|
||||||
}
|
}
|
||||||
if (orgfont.size() != size()) {
|
if (orgfont.size() != size()) {
|
||||||
fprintf(file, "\\size %s \n", LyXSizeNames[size()].c_str());
|
os << "\\size " << LyXSizeNames[size()] << " \n";
|
||||||
}
|
}
|
||||||
if (orgfont.emph() != emph()) {
|
if (orgfont.emph() != emph()) {
|
||||||
fprintf(file, "\\emph %s \n", LyXMiscNames[emph()].c_str());
|
os << "\\emph " << LyXMiscNames[emph()] << " \n";
|
||||||
}
|
}
|
||||||
if (orgfont.underbar() != underbar()) {
|
if (orgfont.underbar() != underbar()) {
|
||||||
// This is only for backwards compatibility
|
// This is only for backwards compatibility
|
||||||
switch (underbar()) {
|
switch (underbar()) {
|
||||||
case OFF: fprintf(file, "\\bar no \n"); break;
|
case OFF: os << "\\bar no \n"; break;
|
||||||
case ON: fprintf(file, "\\bar under \n"); break;
|
case ON: os << "\\bar under \n"; break;
|
||||||
case TOGGLE: lyxerr << "LyXFont::lyxWriteFontChanges: "
|
case TOGGLE: lyxerr << "LyXFont::lyxWriteFontChanges: "
|
||||||
"TOGGLE should not appear here!"
|
"TOGGLE should not appear here!"
|
||||||
<< endl;
|
<< endl;
|
||||||
break;
|
break;
|
||||||
case INHERIT: fprintf(file, "\\bar default \n"); break;
|
case INHERIT: os << "\\bar default \n"; break;
|
||||||
case IGNORE: lyxerr << "LyXFont::lyxWriteFontChanges: "
|
case IGNORE: lyxerr << "LyXFont::lyxWriteFontChanges: "
|
||||||
"IGNORE should not appear here!"
|
"IGNORE should not appear here!"
|
||||||
<< endl;
|
<< endl;
|
||||||
@ -595,18 +594,18 @@ void LyXFont::lyxWriteChanges(LyXFont const & orgfont, FILE * file) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (orgfont.noun() != noun()) {
|
if (orgfont.noun() != noun()) {
|
||||||
fprintf(file, "\\noun %s \n", LyXMiscNames[noun()].c_str());
|
os << "\\noun " << LyXMiscNames[noun()] << " \n";
|
||||||
}
|
}
|
||||||
if (orgfont.latex() != latex()) {
|
if (orgfont.latex() != latex()) {
|
||||||
// This is only for backwards compatibility
|
// This is only for backwards compatibility
|
||||||
switch (latex()) {
|
switch (latex()) {
|
||||||
case OFF: fprintf(file, "\\latex no_latex \n"); break;
|
case OFF: os << "\\latex no_latex \n"; break;
|
||||||
case ON: fprintf(file, "\\latex latex \n"); break;
|
case ON: os << "\\latex latex \n"; break;
|
||||||
case TOGGLE: lyxerr << "LyXFont::lyxWriteFontChanges: "
|
case TOGGLE: lyxerr << "LyXFont::lyxWriteFontChanges: "
|
||||||
"TOGGLE should not appear here!"
|
"TOGGLE should not appear here!"
|
||||||
<< endl;
|
<< endl;
|
||||||
break;
|
break;
|
||||||
case INHERIT: fprintf(file, "\\latex default \n"); break;
|
case INHERIT: os << "\\latex default \n"; break;
|
||||||
case IGNORE: lyxerr << "LyXFont::lyxWriteFontChanges: "
|
case IGNORE: lyxerr << "LyXFont::lyxWriteFontChanges: "
|
||||||
"IGNORE should not appear here!"
|
"IGNORE should not appear here!"
|
||||||
<< endl;
|
<< endl;
|
||||||
@ -614,22 +613,11 @@ void LyXFont::lyxWriteChanges(LyXFont const & orgfont, FILE * file) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (orgfont.color() != color()) {
|
if (orgfont.color() != color()) {
|
||||||
fprintf(file, "\\color %s\n", LyXColorNames[color()].c_str());
|
os << "\\color " << LyXColorNames[color()] << "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Writes the head of the LaTeX needed to impose this font
|
|
||||||
// Returns number of chars written.
|
|
||||||
int LyXFont::latexWriteStartChanges(FILE * file, LyXFont const & base) const
|
|
||||||
{
|
|
||||||
string font;
|
|
||||||
int count = latexWriteStartChanges(font, base);
|
|
||||||
fprintf(file, "%s", font.c_str());
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// Writes the head of the LaTeX needed to impose this font
|
/// Writes the head of the LaTeX needed to impose this font
|
||||||
// Returns number of chars written.
|
// Returns number of chars written.
|
||||||
int LyXFont::latexWriteStartChanges(string & file, LyXFont const & base) const
|
int LyXFont::latexWriteStartChanges(string & file, LyXFont const & base) const
|
||||||
@ -702,18 +690,6 @@ int LyXFont::latexWriteStartChanges(string & file, LyXFont const & base) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Writes ending block of LaTeX needed to close use of this font
|
|
||||||
// Returns number of chars written
|
|
||||||
// This one corresponds to latexWriteStartChanges(). (Asger)
|
|
||||||
int LyXFont::latexWriteEndChanges(FILE * file, LyXFont const & base) const
|
|
||||||
{
|
|
||||||
string ending;
|
|
||||||
int count = latexWriteEndChanges(ending, base);
|
|
||||||
fprintf(file, "%s", ending.c_str());
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// Writes ending block of LaTeX needed to close use of this font
|
/// Writes ending block of LaTeX needed to close use of this font
|
||||||
// Returns number of chars written
|
// Returns number of chars written
|
||||||
// This one corresponds to latexWriteStartChanges(). (Asger)
|
// This one corresponds to latexWriteStartChanges(). (Asger)
|
||||||
@ -815,7 +791,7 @@ GC LyXFont::getGC() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
XFontStruct* LyXFont::getXFontstruct() const
|
XFontStruct * LyXFont::getXFontstruct() const
|
||||||
{
|
{
|
||||||
return fontloader.load(family(), series(), realShape(), size());
|
return fontloader.load(family(), series(), realShape(), size());
|
||||||
}
|
}
|
||||||
@ -835,7 +811,7 @@ int LyXFont::maxDescent() const
|
|||||||
|
|
||||||
int LyXFont::ascent(char c) const
|
int LyXFont::ascent(char c) const
|
||||||
{
|
{
|
||||||
XFontStruct *finfo = getXFontstruct();
|
XFontStruct * finfo = getXFontstruct();
|
||||||
if (finfo->per_char
|
if (finfo->per_char
|
||||||
&& c >= static_cast<char>(finfo->min_char_or_byte2)
|
&& c >= static_cast<char>(finfo->min_char_or_byte2)
|
||||||
&& c <= static_cast<char>(finfo->max_char_or_byte2)) {
|
&& c <= static_cast<char>(finfo->max_char_or_byte2)) {
|
||||||
@ -848,7 +824,7 @@ int LyXFont::ascent(char c) const
|
|||||||
|
|
||||||
int LyXFont::descent(char c) const
|
int LyXFont::descent(char c) const
|
||||||
{
|
{
|
||||||
XFontStruct *finfo = getXFontstruct();
|
XFontStruct * finfo = getXFontstruct();
|
||||||
if (finfo->per_char
|
if (finfo->per_char
|
||||||
&& c >= static_cast<char>(finfo->min_char_or_byte2)
|
&& c >= static_cast<char>(finfo->min_char_or_byte2)
|
||||||
&& c <= static_cast<char>(finfo->max_char_or_byte2)) {
|
&& c <= static_cast<char>(finfo->max_char_or_byte2)) {
|
||||||
@ -870,7 +846,7 @@ int LyXFont::width(char c) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int LyXFont::textWidth(char const *s, int n) const
|
int LyXFont::textWidth(char const * s, int n) const
|
||||||
{
|
{
|
||||||
if (realShape() != LyXFont::SMALLCAPS_SHAPE){
|
if (realShape() != LyXFont::SMALLCAPS_SHAPE){
|
||||||
return XTextWidth(getXFontstruct(), s, n);
|
return XTextWidth(getXFontstruct(), s, n);
|
||||||
@ -902,6 +878,7 @@ int LyXFont::stringWidth(string const & s) const
|
|||||||
return textWidth(s.c_str(), s.length());
|
return textWidth(s.c_str(), s.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int LyXFont::signedStringWidth(string const & s) const
|
int LyXFont::signedStringWidth(string const & s) const
|
||||||
{
|
{
|
||||||
if (s.empty()) return 0;
|
if (s.empty()) return 0;
|
||||||
@ -912,7 +889,7 @@ int LyXFont::signedStringWidth(string const & s) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int LyXFont::drawText(char const* s, int n, Pixmap pm,
|
int LyXFont::drawText(char const * s, int n, Pixmap pm,
|
||||||
int baseline, int x) const
|
int baseline, int x) const
|
||||||
{
|
{
|
||||||
if (realShape() != LyXFont::SMALLCAPS_SHAPE) {
|
if (realShape() != LyXFont::SMALLCAPS_SHAPE) {
|
||||||
@ -942,7 +919,8 @@ int LyXFont::drawText(char const* s, int n, Pixmap pm,
|
|||||||
smallfont.getGC(),
|
smallfont.getGC(),
|
||||||
x, baseline,
|
x, baseline,
|
||||||
&c, 1);
|
&c, 1);
|
||||||
x += XTextWidth(smallfont.getXFontstruct(), &c, 1);
|
x += XTextWidth(smallfont.getXFontstruct(),
|
||||||
|
&c, 1);
|
||||||
XFlush(fl_display);
|
XFlush(fl_display);
|
||||||
} else {
|
} else {
|
||||||
XDrawString(fl_display,
|
XDrawString(fl_display,
|
||||||
@ -959,19 +937,20 @@ int LyXFont::drawText(char const* s, int n, Pixmap pm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int LyXFont::drawString(string const &s, Pixmap pm, int baseline, int x) const
|
int LyXFont::drawString(string const & s, Pixmap pm, int baseline, int x) const
|
||||||
{
|
{
|
||||||
return drawText(s.c_str(), s.length(), pm, baseline, x);
|
return drawText(s.c_str(), s.length(), pm, baseline, x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool LyXFont::equalExceptLatex(LyXFont const &f) const
|
bool LyXFont::equalExceptLatex(LyXFont const & f) const
|
||||||
{
|
{
|
||||||
LyXFont f1 = *this;
|
LyXFont f1 = *this;
|
||||||
f1.setLatex(f.latex());
|
f1.setLatex(f.latex());
|
||||||
return f1 == f;
|
return f1 == f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ostream & operator<<(ostream & o, LyXFont::FONT_MISC_STATE fms)
|
ostream & operator<<(ostream & o, LyXFont::FONT_MISC_STATE fms)
|
||||||
{
|
{
|
||||||
return o << int(fms);
|
return o << int(fms);
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "LString.h"
|
#include "LString.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
|
|
||||||
// It might happen that locale.h defines ON and OFF. This is not good
|
// It might happen that locale.h defines ON and OFF. This is not good
|
||||||
// for us, since we use these names below. But of course this is due
|
// for us, since we use these names below. But of course this is due
|
||||||
// to some old compilers. Than is broken when it comes to C++ scoping.
|
// to some old compilers. Than is broken when it comes to C++ scoping.
|
||||||
@ -296,26 +297,15 @@ public:
|
|||||||
LyXFont & lyxRead(LyXLex&);
|
LyXFont & lyxRead(LyXLex&);
|
||||||
|
|
||||||
/// Writes the changes from this font to orgfont in .lyx format in file
|
/// Writes the changes from this font to orgfont in .lyx format in file
|
||||||
void lyxWriteChanges(LyXFont const & orgfont, FILE *) const;
|
void lyxWriteChanges(LyXFont const & orgfont, ostream &) const;
|
||||||
|
|
||||||
/** Writes the head of the LaTeX needed to change to this font.
|
/** Writes the head of the LaTeX needed to change to this font.
|
||||||
Writes to file, the head of the LaTeX needed to change to this font.
|
Writes to string, the head of the LaTeX needed to change
|
||||||
Returns number of chars written. Base is the font state active now.
|
|
||||||
*/
|
|
||||||
int latexWriteStartChanges(FILE *, LyXFont const & base) const;
|
|
||||||
|
|
||||||
/** Writes to string, the head of the LaTeX needed to change
|
|
||||||
to this font. Returns number of chars written. Base is the
|
to this font. Returns number of chars written. Base is the
|
||||||
font state active now.
|
font state active now.
|
||||||
*/
|
*/
|
||||||
int latexWriteStartChanges(string &, LyXFont const & base) const;
|
int latexWriteStartChanges(string &, LyXFont const & base) const;
|
||||||
|
|
||||||
/** Writes the tail of the LaTeX needd to change to this font.
|
|
||||||
Returns number of chars written. Base is the font state we want
|
|
||||||
to achieve.
|
|
||||||
*/
|
|
||||||
int latexWriteEndChanges(FILE *, LyXFont const & base) const;
|
|
||||||
|
|
||||||
/** Writes tha tail of the LaTeX needed to chagne to this font.
|
/** Writes tha tail of the LaTeX needed to chagne to this font.
|
||||||
Returns number of chars written. Base is the font state we want
|
Returns number of chars written. Base is the font state we want
|
||||||
to achieve.
|
to achieve.
|
||||||
|
@ -121,8 +121,7 @@ public:
|
|||||||
~LyXParagraph();
|
~LyXParagraph();
|
||||||
|
|
||||||
///
|
///
|
||||||
void writeFile(FILE *, BufferParams &, char, char);
|
void writeFile(ostream &, BufferParams &, char, char);
|
||||||
|
|
||||||
///
|
///
|
||||||
void validate(LaTeXFeatures &);
|
void validate(LaTeXFeatures &);
|
||||||
|
|
||||||
@ -461,8 +460,7 @@ public:
|
|||||||
///
|
///
|
||||||
void UnsetPExtraType();
|
void UnsetPExtraType();
|
||||||
///
|
///
|
||||||
bool RoffContTableRows(FILE * file, size_type i,
|
bool RoffContTableRows(ostream &, size_type i, int actcell);
|
||||||
int actcell);
|
|
||||||
///
|
///
|
||||||
void DocBookContTableRows(string & file, string & extra, int & desc_on,
|
void DocBookContTableRows(string & file, string & extra, int & desc_on,
|
||||||
size_type i,
|
size_type i,
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "LaTeXFeatures.h"
|
#include "LaTeXFeatures.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "lyx_gui_misc.h"
|
#include "lyx_gui_misc.h"
|
||||||
|
#include "support/LOstream.h"
|
||||||
|
|
||||||
extern void UpdateInset(Inset * inset, bool mark_dirty = true);
|
extern void UpdateInset(Inset * inset, bool mark_dirty = true);
|
||||||
extern void LockedInsetStoreUndo(Undo::undo_kind);
|
extern void LockedInsetStoreUndo(Undo::undo_kind);
|
||||||
@ -324,21 +325,21 @@ Inset * InsetFormula::Clone() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetFormula::Write(FILE * file)
|
void InsetFormula::Write(ostream & os)
|
||||||
{
|
{
|
||||||
fprintf(file, "Formula ");
|
os << "Formula ";
|
||||||
Latex(file, 0);
|
Latex(os, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetFormula::Latex(FILE * file, signed char fragile)
|
int InsetFormula::Latex(ostream & os, signed char fragile)
|
||||||
{
|
{
|
||||||
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.
|
||||||
string output;
|
string output;
|
||||||
InsetFormula::Latex(output, fragile);
|
InsetFormula::Latex(output, fragile);
|
||||||
fprintf(file, "%s", output.c_str());
|
os << output;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -742,7 +743,7 @@ bool InsetFormula::LocalDispatch(int action, char const * arg)
|
|||||||
// extern char *dispatch_result;
|
// extern char *dispatch_result;
|
||||||
MathedTextCodes varcode = LM_TC_MIN;
|
MathedTextCodes varcode = LM_TC_MIN;
|
||||||
bool was_macro = mathcursor->InMacroMode();
|
bool was_macro = mathcursor->InMacroMode();
|
||||||
bool sel= false;
|
bool sel = false;
|
||||||
bool space_on = false;
|
bool space_on = false;
|
||||||
bool was_selection = mathcursor->Selection();
|
bool was_selection = mathcursor->Selection();
|
||||||
bool result = true;
|
bool result = true;
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "insets/lyxinset.h"
|
#include "insets/lyxinset.h"
|
||||||
|
#include "support/LOstream.h"
|
||||||
|
|
||||||
class MathParInset;
|
class MathParInset;
|
||||||
class MathedCursor;
|
class MathedCursor;
|
||||||
@ -45,11 +45,11 @@ public:
|
|||||||
///
|
///
|
||||||
void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
|
void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
///
|
///
|
||||||
int Latex(FILE * file, signed char fragile);
|
int Latex(ostream &, signed char fragile);
|
||||||
///
|
///
|
||||||
int Latex(string & file, signed char fragile);
|
int Latex(string & file, signed char fragile);
|
||||||
///
|
///
|
||||||
|
@ -34,16 +34,16 @@
|
|||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
|
|
||||||
|
|
||||||
InsetFormulaMacro::InsetFormulaMacro():
|
InsetFormulaMacro::InsetFormulaMacro()
|
||||||
InsetFormula(true)
|
: InsetFormula(true)
|
||||||
{
|
{
|
||||||
tmacro = 0;
|
tmacro = 0;
|
||||||
opened = false;
|
opened = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
InsetFormulaMacro::InsetFormulaMacro(string nm, int na, bool /*e*/):
|
InsetFormulaMacro::InsetFormulaMacro(string nm, int na, bool /*e*/)
|
||||||
InsetFormula(true), name(nm)
|
: InsetFormula(true), name(nm)
|
||||||
{
|
{
|
||||||
tmacro = MathMacroTable::mathMTable.getTemplate(name.c_str());
|
tmacro = MathMacroTable::mathMTable.getTemplate(name.c_str());
|
||||||
if (!tmacro) {
|
if (!tmacro) {
|
||||||
@ -66,17 +66,17 @@ Inset * InsetFormulaMacro::Clone() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetFormulaMacro::Write(FILE *file)
|
void InsetFormulaMacro::Write(ostream & os)
|
||||||
{
|
{
|
||||||
fprintf(file, "FormulaMacro ");
|
os << "FormulaMacro ";
|
||||||
Latex(file, 0);
|
Latex(os, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetFormulaMacro::Latex(FILE *file, signed char /*fragile*/)
|
int InsetFormulaMacro::Latex(ostream & os, signed char /*fragile*/)
|
||||||
{
|
{
|
||||||
int ret = 1;
|
int ret = 1;
|
||||||
tmacro->WriteDef(file);
|
tmacro->WriteDef(os);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,9 +101,9 @@ int InsetFormulaMacro::DocBook(string &/*file*/)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetFormulaMacro::Read(LyXLex &lex)
|
void InsetFormulaMacro::Read(LyXLex & lex)
|
||||||
{
|
{
|
||||||
FILE *file = lex.getFile();
|
FILE * file = lex.getFile();
|
||||||
mathed_parser_file(file, lex.GetLineNo());
|
mathed_parser_file(file, lex.GetLineNo());
|
||||||
mathed_parse(0, 0, (MathParInset **)&tmacro);
|
mathed_parse(0, 0, (MathParInset **)&tmacro);
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ void InsetFormulaMacro::Read(LyXLex &lex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetFormulaMacro::Ascent(LyXFont const &f) const
|
int InsetFormulaMacro::Ascent(LyXFont const & f) const
|
||||||
{
|
{
|
||||||
if (opened) {
|
if (opened) {
|
||||||
tmacro->update();
|
tmacro->update();
|
||||||
@ -126,7 +126,7 @@ int InsetFormulaMacro::Ascent(LyXFont const &f) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetFormulaMacro::Descent(LyXFont const &f) const
|
int InsetFormulaMacro::Descent(LyXFont const & f) const
|
||||||
{
|
{
|
||||||
if (opened) {
|
if (opened) {
|
||||||
tmacro->update();
|
tmacro->update();
|
||||||
@ -136,7 +136,7 @@ int InsetFormulaMacro::Descent(LyXFont const &f) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetFormulaMacro::Width(LyXFont const &f) const
|
int InsetFormulaMacro::Width(LyXFont const & f) const
|
||||||
{
|
{
|
||||||
if (opened) {
|
if (opened) {
|
||||||
tmacro->update();
|
tmacro->update();
|
||||||
@ -148,8 +148,8 @@ int InsetFormulaMacro::Width(LyXFont const &f) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetFormulaMacro::Draw(LyXFont font, LyXScreen &scr,
|
void InsetFormulaMacro::Draw(LyXFont font, LyXScreen & scr,
|
||||||
int baseline, float &x)
|
int baseline, float & x)
|
||||||
{
|
{
|
||||||
tmacro->update();
|
tmacro->update();
|
||||||
if (opened) {
|
if (opened) {
|
||||||
@ -159,8 +159,8 @@ void InsetFormulaMacro::Draw(LyXFont font, LyXScreen &scr,
|
|||||||
} else {
|
} else {
|
||||||
font.setColor(LyXFont::MATH);
|
font.setColor(LyXFont::MATH);
|
||||||
|
|
||||||
int y= baseline - Ascent(font)+1;
|
int y = baseline - Ascent(font) + 1;
|
||||||
int w= Width(font) - 2, h= (Ascent(font)+Descent(font)-2);
|
int w = Width(font) - 2, h = (Ascent(font) + Descent(font) - 2);
|
||||||
|
|
||||||
|
|
||||||
scr.fillRectangle(gc_lighted, int(x), y, w, h);
|
scr.fillRectangle(gc_lighted, int(x), y, w, h);
|
||||||
@ -194,7 +194,7 @@ void InsetFormulaMacro::InsetUnlock()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool InsetFormulaMacro::LocalDispatch(int action, char const *arg)
|
bool InsetFormulaMacro::LocalDispatch(int action, char const * arg)
|
||||||
{
|
{
|
||||||
if (action == LFUN_MATH_MACROARG) {
|
if (action == LFUN_MATH_MACROARG) {
|
||||||
int i = atoi(arg) - 1;
|
int i = atoi(arg) - 1;
|
||||||
|
@ -46,9 +46,9 @@ public:
|
|||||||
///
|
///
|
||||||
void Read(LyXLex & lex);
|
void Read(LyXLex & lex);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream & os);
|
||||||
///
|
///
|
||||||
int Latex(FILE * file, signed char fragile);
|
int Latex(ostream & os, signed char fragile);
|
||||||
///
|
///
|
||||||
int Latex(string & file, signed char fragile);
|
int Latex(string & file, signed char fragile);
|
||||||
///
|
///
|
||||||
@ -64,18 +64,18 @@ public:
|
|||||||
void Edit(int x, int y);
|
void Edit(int x, int y);
|
||||||
///
|
///
|
||||||
void InsetUnlock();
|
void InsetUnlock();
|
||||||
|
///
|
||||||
bool LocalDispatch(int, char const *);
|
bool LocalDispatch(int, char const *);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
///
|
||||||
void UpdateLocal();
|
void UpdateLocal();
|
||||||
private:
|
private:
|
||||||
|
///
|
||||||
bool opened;
|
bool opened;
|
||||||
|
///
|
||||||
string name;
|
string name;
|
||||||
class MathMacroTemplate * tmacro;
|
///
|
||||||
|
MathMacroTemplate * tmacro;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include "array.h"
|
#include "array.h"
|
||||||
|
|
||||||
|
|
||||||
///
|
///
|
||||||
enum math_align {
|
enum math_align {
|
||||||
///
|
///
|
||||||
@ -207,10 +208,8 @@ enum MathedBinaryTypes {
|
|||||||
LMB_BOP = (LMB_RELATION | LMB_OPERATOR)
|
LMB_BOP = (LMB_RELATION | LMB_OPERATOR)
|
||||||
};
|
};
|
||||||
|
|
||||||
class MathedInset;
|
|
||||||
class MathParInset;
|
class MathParInset;
|
||||||
|
|
||||||
|
|
||||||
/** Abstract base class for all math objects.
|
/** Abstract base class for all math objects.
|
||||||
A math insets is for use of the math editor only, it isn't a
|
A math insets is for use of the math editor only, it isn't a
|
||||||
general LyX inset. It's used to represent all the math objects.
|
general LyX inset. It's used to represent all the math objects.
|
||||||
@ -229,7 +228,8 @@ class MathedInset {
|
|||||||
virtual void Draw(int x, int baseline) = 0;
|
virtual void Draw(int x, int baseline) = 0;
|
||||||
|
|
||||||
/// Write LaTeX and Lyx code
|
/// Write LaTeX and Lyx code
|
||||||
virtual void Write(FILE * file) = 0;
|
virtual void Write(ostream &) = 0;
|
||||||
|
|
||||||
/// Write LaTeX and Lyx code
|
/// Write LaTeX and Lyx code
|
||||||
virtual void Write(string & file) = 0;
|
virtual void Write(string & file) = 0;
|
||||||
|
|
||||||
@ -321,8 +321,8 @@ enum MathedParFlag {
|
|||||||
class MathParInset: public MathedInset {
|
class MathParInset: public MathedInset {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
MathParInset(short st= LM_ST_TEXT, char const * nm= 0,
|
MathParInset(short st = LM_ST_TEXT, char const * nm = 0,
|
||||||
short ot= LM_OT_MIN);
|
short ot = LM_OT_MIN);
|
||||||
///
|
///
|
||||||
MathParInset(MathParInset *);
|
MathParInset(MathParInset *);
|
||||||
///
|
///
|
||||||
@ -334,7 +334,8 @@ class MathParInset: public MathedInset {
|
|||||||
virtual void Draw(int x, int baseline);
|
virtual void Draw(int x, int baseline);
|
||||||
|
|
||||||
/// Write LaTeX code
|
/// Write LaTeX code
|
||||||
virtual void Write(FILE * file);
|
virtual void Write(ostream &);
|
||||||
|
|
||||||
/// Write LaTeX code
|
/// Write LaTeX code
|
||||||
virtual void Write(string & file);
|
virtual void Write(string & file);
|
||||||
///
|
///
|
||||||
@ -488,7 +489,7 @@ class MathMatrixInset: public MathParInset {
|
|||||||
///
|
///
|
||||||
void Draw(int, int);
|
void Draw(int, int);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Write(string & file);
|
void Write(string & file);
|
||||||
///
|
///
|
||||||
@ -537,9 +538,12 @@ 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 *, FILE *, int *, char fragile,
|
void mathed_write(MathParInset *, ostream &, int *, char fragile,
|
||||||
char const * label = 0);
|
char const * label = 0);
|
||||||
///
|
///
|
||||||
|
//void mathed_write(MathParInset *, FILE *, int *, char fragile,
|
||||||
|
// char const * label = 0);
|
||||||
|
///
|
||||||
void mathed_write(MathParInset *, string &, int *, char fragile,
|
void mathed_write(MathParInset *, string &, int *, char fragile,
|
||||||
char const * label = 0);
|
char const * label = 0);
|
||||||
///
|
///
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include "math_defs.h"
|
#include "math_defs.h"
|
||||||
#include "symbol_def.h"
|
#include "symbol_def.h"
|
||||||
#include "LString.h"
|
#include "LString.h"
|
||||||
@ -47,7 +47,7 @@ public:
|
|||||||
///
|
///
|
||||||
void Draw(int, int);
|
void Draw(int, int);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Write(string & file);
|
void Write(string & file);
|
||||||
///
|
///
|
||||||
@ -66,7 +66,7 @@ protected:
|
|||||||
|
|
||||||
/// Accents
|
/// Accents
|
||||||
class MathAccentInset: public MathedInset {
|
class MathAccentInset: public MathedInset {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
MathAccentInset(byte, MathedTextCodes, int, short st = LM_ST_TEXT);
|
MathAccentInset(byte, MathedTextCodes, int, short st = LM_ST_TEXT);
|
||||||
///
|
///
|
||||||
@ -78,7 +78,7 @@ class MathAccentInset: public MathedInset {
|
|||||||
///
|
///
|
||||||
void Draw(int, int);
|
void Draw(int, int);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Write(string & file);
|
void Write(string & file);
|
||||||
///
|
///
|
||||||
@ -86,7 +86,7 @@ class MathAccentInset: public MathedInset {
|
|||||||
///
|
///
|
||||||
int getAccentCode() const { return code; }
|
int getAccentCode() const { return code; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
///
|
///
|
||||||
byte c;
|
byte c;
|
||||||
///
|
///
|
||||||
@ -102,22 +102,20 @@ class MathAccentInset: public MathedInset {
|
|||||||
|
|
||||||
///
|
///
|
||||||
class MathDotsInset: public MathedInset {
|
class MathDotsInset: public MathedInset {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
MathDotsInset(char const *, int, short st = LM_ST_TEXT);
|
MathDotsInset(char const *, int, short st = LM_ST_TEXT);
|
||||||
///
|
///
|
||||||
~MathDotsInset() {}
|
|
||||||
///
|
|
||||||
MathedInset * Clone();
|
MathedInset * Clone();
|
||||||
///
|
///
|
||||||
void Draw(int, int);
|
void Draw(int, int);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Write(string & file);
|
void Write(string & file);
|
||||||
///
|
///
|
||||||
void Metrics();
|
void Metrics();
|
||||||
protected:
|
protected:
|
||||||
///
|
///
|
||||||
int dh, code;
|
int dh, code;
|
||||||
};
|
};
|
||||||
@ -125,17 +123,15 @@ class MathDotsInset: public MathedInset {
|
|||||||
|
|
||||||
/// Smart spaces
|
/// Smart spaces
|
||||||
class MathSpaceInset: public MathedInset {
|
class MathSpaceInset: public MathedInset {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
MathSpaceInset(int sp, short ot = LM_OT_SPACE, short st = LM_ST_TEXT);
|
MathSpaceInset(int sp, short ot = LM_OT_SPACE, short st = LM_ST_TEXT);
|
||||||
///
|
///
|
||||||
~MathSpaceInset() {}
|
|
||||||
///
|
|
||||||
MathedInset * Clone();
|
MathedInset * Clone();
|
||||||
///
|
///
|
||||||
void Draw(int, int);
|
void Draw(int, int);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Write(string & file);
|
void Write(string & file);
|
||||||
///
|
///
|
||||||
@ -144,7 +140,7 @@ class MathSpaceInset: public MathedInset {
|
|||||||
inline void SetSpace(int sp);
|
inline void SetSpace(int sp);
|
||||||
///
|
///
|
||||||
int GetSpace() { return space; }
|
int GetSpace() { return space; }
|
||||||
protected:
|
protected:
|
||||||
///
|
///
|
||||||
int space;
|
int space;
|
||||||
};
|
};
|
||||||
@ -152,17 +148,15 @@ class MathSpaceInset: public MathedInset {
|
|||||||
|
|
||||||
/// big operators
|
/// big operators
|
||||||
class MathBigopInset: public MathedInset {
|
class MathBigopInset: public MathedInset {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
MathBigopInset(char const *, int, short st = LM_ST_TEXT);
|
MathBigopInset(char const *, int, short st = LM_ST_TEXT);
|
||||||
///
|
///
|
||||||
~MathBigopInset() {}
|
|
||||||
///
|
|
||||||
MathedInset * Clone();
|
MathedInset * Clone();
|
||||||
///
|
///
|
||||||
void Draw(int, int);
|
void Draw(int, int);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Write(string & file);
|
void Write(string & file);
|
||||||
///
|
///
|
||||||
@ -171,7 +165,7 @@ class MathBigopInset: public MathedInset {
|
|||||||
inline bool GetLimits() const;
|
inline bool GetLimits() const;
|
||||||
///
|
///
|
||||||
inline void SetLimits(bool);
|
inline void SetLimits(bool);
|
||||||
protected:
|
protected:
|
||||||
///
|
///
|
||||||
int lims;
|
int lims;
|
||||||
///
|
///
|
||||||
@ -183,25 +177,22 @@ class MathBigopInset: public MathedInset {
|
|||||||
|
|
||||||
///
|
///
|
||||||
class MathSqrtInset: public MathParInset {
|
class MathSqrtInset: public MathParInset {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
MathSqrtInset(short st = LM_ST_TEXT);
|
MathSqrtInset(short st = LM_ST_TEXT);
|
||||||
///
|
///
|
||||||
~MathSqrtInset() {}
|
|
||||||
///
|
|
||||||
MathedInset * Clone();
|
MathedInset * Clone();
|
||||||
///
|
///
|
||||||
void Draw(int x, int baseline);
|
void Draw(int x, int baseline);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Write(string & file);
|
void Write(string & file);
|
||||||
///
|
///
|
||||||
void Metrics();
|
void Metrics();
|
||||||
///
|
///
|
||||||
bool Inside(int, int);
|
bool Inside(int, int);
|
||||||
|
private:
|
||||||
private:
|
|
||||||
///
|
///
|
||||||
int hmax, wbody;
|
int hmax, wbody;
|
||||||
};
|
};
|
||||||
@ -209,7 +200,7 @@ class MathSqrtInset: public MathParInset {
|
|||||||
|
|
||||||
/// Fraction like objects (frac, stackrel, binom)
|
/// Fraction like objects (frac, stackrel, binom)
|
||||||
class MathFracInset: public MathParInset {
|
class MathFracInset: public MathParInset {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
MathFracInset(short ot = LM_OT_FRAC);
|
MathFracInset(short ot = LM_OT_FRAC);
|
||||||
///
|
///
|
||||||
@ -219,7 +210,7 @@ class MathFracInset: public MathParInset {
|
|||||||
///
|
///
|
||||||
void Draw(int x, int baseline);
|
void Draw(int x, int baseline);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Write(string & file);
|
void Write(string & file);
|
||||||
///
|
///
|
||||||
@ -247,7 +238,7 @@ class MathFracInset: public MathParInset {
|
|||||||
int getMaxArgumentIdx() { return 1; }
|
int getMaxArgumentIdx() { return 1; }
|
||||||
///
|
///
|
||||||
void SetStyle(short);
|
void SetStyle(short);
|
||||||
protected:
|
protected:
|
||||||
///
|
///
|
||||||
short idx;
|
short idx;
|
||||||
///
|
///
|
||||||
@ -259,22 +250,20 @@ class MathFracInset: public MathParInset {
|
|||||||
|
|
||||||
/// A delimiter
|
/// A delimiter
|
||||||
class MathDelimInset: public MathParInset {
|
class MathDelimInset: public MathParInset {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
MathDelimInset(int, int, short st = LM_ST_TEXT);
|
MathDelimInset(int, int, short st = LM_ST_TEXT);
|
||||||
///
|
///
|
||||||
~MathDelimInset() {}
|
|
||||||
///
|
|
||||||
MathedInset * Clone();
|
MathedInset * Clone();
|
||||||
///
|
///
|
||||||
void Draw(int, int);
|
void Draw(int, int);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Write(string & file);
|
void Write(string & file);
|
||||||
///
|
///
|
||||||
void Metrics();
|
void Metrics();
|
||||||
protected:
|
protected:
|
||||||
///
|
///
|
||||||
int left, right;
|
int left, right;
|
||||||
///
|
///
|
||||||
@ -284,24 +273,22 @@ class MathDelimInset: public MathParInset {
|
|||||||
|
|
||||||
/// Decorations over (below) a math object
|
/// Decorations over (below) a math object
|
||||||
class MathDecorationInset: public MathParInset {
|
class MathDecorationInset: public MathParInset {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
MathDecorationInset(int, short st = LM_ST_TEXT);
|
MathDecorationInset(int, short st = LM_ST_TEXT);
|
||||||
///
|
///
|
||||||
~MathDecorationInset() {}
|
|
||||||
///
|
|
||||||
MathedInset * Clone();
|
MathedInset * Clone();
|
||||||
///
|
///
|
||||||
void Draw(int, int);
|
void Draw(int, int);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Write(string & file);
|
void Write(string & file);
|
||||||
///
|
///
|
||||||
void Metrics();
|
void Metrics();
|
||||||
///
|
///
|
||||||
inline bool GetLimits() const;
|
inline bool GetLimits() const;
|
||||||
protected:
|
protected:
|
||||||
///
|
///
|
||||||
int deco;
|
int deco;
|
||||||
///
|
///
|
||||||
@ -329,9 +316,9 @@ bool MathFuncInset::GetLimits() const
|
|||||||
|
|
||||||
|
|
||||||
inline
|
inline
|
||||||
void MathFuncInset::Write(FILE * file)
|
void MathFuncInset::Write(ostream & os)
|
||||||
{
|
{
|
||||||
fprintf(file, "\\%s ", name);
|
os << "\\" << name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -347,8 +334,8 @@ void MathFuncInset::Write(string & file)
|
|||||||
inline
|
inline
|
||||||
void MathSpaceInset::Metrics()
|
void MathSpaceInset::Metrics()
|
||||||
{
|
{
|
||||||
width = (space) ? space * 2 : 2;
|
width = space ? space * 2 : 2;
|
||||||
if (space>3) width *= 2;
|
if (space > 3) width *= 2;
|
||||||
if (space == 5) width *= 2;
|
if (space == 5) width *= 2;
|
||||||
width += 4;
|
width += 4;
|
||||||
ascent = 4; descent = 0;
|
ascent = 4; descent = 0;
|
||||||
|
@ -36,18 +36,21 @@ extern int mathed_char_height(short, int, byte, int&, int&);
|
|||||||
|
|
||||||
// the builtin memcpy() is broken in egcs and gcc 2.95.x on alpha
|
// the builtin memcpy() is broken in egcs and gcc 2.95.x on alpha
|
||||||
// stations. We provide a hand-made version instead.
|
// stations. We provide a hand-made version instead.
|
||||||
inline void my_memcpy( void* ps_in, const void* pt_in, unsigned int n )
|
inline void my_memcpy( void * ps_in, const void * pt_in, size_t n )
|
||||||
{
|
{
|
||||||
char* ps = static_cast<char*>(ps_in);
|
char * ps = static_cast<char *>(ps_in);
|
||||||
char* pt = static_cast<char*>(const_cast<void*>(pt_in));
|
char const * pt = static_cast<char const *>(pt_in);
|
||||||
for( int i = 0; i < n; i++)
|
/*
|
||||||
|
for(size_t i = n; i--;)
|
||||||
*ps++ = *pt++;
|
*ps++ = *pt++;
|
||||||
|
*/
|
||||||
|
while (n--) *ps++ = *pt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathedIter::Reset()
|
void MathedIter::Reset()
|
||||||
{
|
{
|
||||||
if (array->last>0 && MathIsFont(array->bf[0])) {
|
if (array->last > 0 && MathIsFont(array->bf[0])) {
|
||||||
fcode = array->bf[0];
|
fcode = array->bf[0];
|
||||||
pos = 1;
|
pos = 1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -58,7 +58,7 @@ MathMacro::MathMacro(MathMacroTemplate* t):
|
|||||||
nargs = tmplate->getNoArgs();
|
nargs = tmplate->getNoArgs();
|
||||||
tcode = tmplate->getTCode();
|
tcode = tmplate->getTCode();
|
||||||
args = new MacroArgumentBase[nargs];
|
args = new MacroArgumentBase[nargs];
|
||||||
for (int i= 0; i<nargs; i++) {
|
for (int i = 0; i < nargs; ++i) {
|
||||||
// if (tmplate->getMacroPar(i)->Permit(LMPF_ALLOW_CR))
|
// if (tmplate->getMacroPar(i)->Permit(LMPF_ALLOW_CR))
|
||||||
// args[i].row = new MathedRowSt(tmplate->getMacroPar(i)->GetColumns());
|
// args[i].row = new MathedRowSt(tmplate->getMacroPar(i)->GetColumns());
|
||||||
// else
|
// else
|
||||||
@ -73,7 +73,8 @@ MathMacro::MathMacro(MathMacroTemplate* t):
|
|||||||
SetName(tmplate->GetName());
|
SetName(tmplate->GetName());
|
||||||
}
|
}
|
||||||
|
|
||||||
MathMacro::MathMacro(MathMacro* m):
|
|
||||||
|
MathMacro::MathMacro(MathMacro * m):
|
||||||
MathParInset(LM_ST_TEXT, m->GetName(), LM_OT_MACRO)
|
MathParInset(LM_ST_TEXT, m->GetName(), LM_OT_MACRO)
|
||||||
{
|
{
|
||||||
tmplate = m->tmplate;
|
tmplate = m->tmplate;
|
||||||
@ -82,7 +83,7 @@ MathMacro::MathMacro(MathMacro* m):
|
|||||||
args = new MacroArgumentBase[nargs];
|
args = new MacroArgumentBase[nargs];
|
||||||
idx = 0;
|
idx = 0;
|
||||||
SetName(tmplate->GetName());
|
SetName(tmplate->GetName());
|
||||||
for (int i= 0; i<tmplate->nargs; i++) {
|
for (int i = 0; i < tmplate->nargs; ++i) {
|
||||||
m->setArgumentIdx(i);
|
m->setArgumentIdx(i);
|
||||||
MathedIter it(m->GetData());
|
MathedIter it(m->GetData());
|
||||||
args[i].row = m->args[i].row;
|
args[i].row = m->args[i].row;
|
||||||
@ -92,7 +93,7 @@ MathMacro::MathMacro(MathMacro* m):
|
|||||||
|
|
||||||
MathMacro::~MathMacro()
|
MathMacro::~MathMacro()
|
||||||
{
|
{
|
||||||
for (idx= 0; idx<nargs; idx++) {
|
for (idx = 0; idx < nargs; ++idx) {
|
||||||
MathedIter it(args[idx].array);
|
MathedIter it(args[idx].array);
|
||||||
it. Clear();
|
it. Clear();
|
||||||
delete args[idx].row;
|
delete args[idx].row;
|
||||||
@ -103,17 +104,13 @@ MathMacro::~MathMacro()
|
|||||||
|
|
||||||
MathedInset * MathMacro::Clone()
|
MathedInset * MathMacro::Clone()
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
MathMacro *m = new MathMacro(this);
|
|
||||||
return m;
|
|
||||||
#endif
|
|
||||||
return new MathMacro(this);
|
return new MathMacro(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathMacro::Metrics()
|
void MathMacro::Metrics()
|
||||||
{
|
{
|
||||||
if (nargs>0)
|
if (nargs > 0)
|
||||||
tmplate->update(this);
|
tmplate->update(this);
|
||||||
tmplate->Metrics();
|
tmplate->Metrics();
|
||||||
width = tmplate->Width();
|
width = tmplate->Width();
|
||||||
@ -130,7 +127,7 @@ void MathMacro::Draw(int x, int y)
|
|||||||
tmplate->SetStyle(size);
|
tmplate->SetStyle(size);
|
||||||
mathGC = latexGC;
|
mathGC = latexGC;
|
||||||
tmplate->Draw(x, y);
|
tmplate->Draw(x, y);
|
||||||
for (int i= 0; i<nargs; i++)
|
for (int i = 0; i < nargs; ++i)
|
||||||
tmplate->GetMacroXY(i, args[i].x, args[i].y);
|
tmplate->GetMacroXY(i, args[i].x, args[i].y);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,7 +138,7 @@ int MathMacro::GetColumns()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathMacro::GetXY(int& x, int& y) const
|
void MathMacro::GetXY(int & x, int & y) const
|
||||||
{
|
{
|
||||||
x = args[idx].x; y = args[idx].y;
|
x = args[idx].x; y = args[idx].y;
|
||||||
}
|
}
|
||||||
@ -149,9 +146,11 @@ void MathMacro::GetXY(int& x, int& y) const
|
|||||||
|
|
||||||
bool MathMacro::Permit(short f)
|
bool MathMacro::Permit(short f)
|
||||||
{
|
{
|
||||||
return ((nargs>0) ? tmplate->getMacroPar(idx)->Permit(f): MathParInset::Permit(f));
|
return (nargs > 0) ?
|
||||||
|
tmplate->getMacroPar(idx)->Permit(f) : MathParInset::Permit(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathMacro::SetFocus(int x, int y)
|
void MathMacro::SetFocus(int x, int y)
|
||||||
{
|
{
|
||||||
tmplate->update(this);
|
tmplate->update(this);
|
||||||
@ -159,11 +158,11 @@ void MathMacro::SetFocus(int x, int y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathMacro::Write(FILE *file)
|
void MathMacro::Write(ostream & os)
|
||||||
{
|
{
|
||||||
string output;
|
string output;
|
||||||
MathMacro::Write(output);
|
MathMacro::Write(output);
|
||||||
fprintf(file, "%s", output.c_str());
|
os << output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -189,13 +188,13 @@ void MathMacro::Write(string &file)
|
|||||||
// file += ']';
|
// file += ']';
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (!(tmplate->flags & MMF_Env) && nargs>0)
|
if (!(tmplate->flags & MMF_Env) && nargs > 0)
|
||||||
file += '{';
|
file += '{';
|
||||||
|
|
||||||
for (int i= 0; i<nargs; i++) {
|
for (int i = 0; i < nargs; ++i) {
|
||||||
array = args[i].array;
|
array = args[i].array;
|
||||||
MathParInset::Write(file);
|
MathParInset::Write(file);
|
||||||
if (i<nargs-1)
|
if (i < nargs - 1)
|
||||||
file += "}{";
|
file += "}{";
|
||||||
}
|
}
|
||||||
if (tmplate->flags & MMF_Env) {
|
if (tmplate->flags & MMF_Env) {
|
||||||
@ -203,7 +202,7 @@ void MathMacro::Write(string &file)
|
|||||||
file += name;
|
file += name;
|
||||||
file += '}';
|
file += '}';
|
||||||
} else {
|
} else {
|
||||||
if (nargs>0)
|
if (nargs > 0)
|
||||||
file += '}';
|
file += '}';
|
||||||
else
|
else
|
||||||
file += ' ';
|
file += ' ';
|
||||||
@ -222,6 +221,7 @@ MathMacroArgument::MathMacroArgument(int n)
|
|||||||
SetType(LM_OT_MACRO_ARG);
|
SetType(LM_OT_MACRO_ARG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathMacroArgument::Draw(int x, int baseline)
|
void MathMacroArgument::Draw(int x, int baseline)
|
||||||
{
|
{
|
||||||
if (expnd_mode) {
|
if (expnd_mode) {
|
||||||
@ -246,14 +246,16 @@ void MathMacroArgument::Metrics()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MathMacroArgument::Write(FILE *file)
|
|
||||||
|
void MathMacroArgument::Write(ostream & os)
|
||||||
{
|
{
|
||||||
string output;
|
string output;
|
||||||
MathMacroArgument::Write(output);
|
MathMacroArgument::Write(output);
|
||||||
fprintf(file, "%s", output.c_str());
|
os << output;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MathMacroArgument::Write(string &file)
|
|
||||||
|
void MathMacroArgument::Write(string & file)
|
||||||
{
|
{
|
||||||
if (expnd_mode) {
|
if (expnd_mode) {
|
||||||
MathParInset::Write(file);
|
MathParInset::Write(file);
|
||||||
@ -267,7 +269,7 @@ void MathMacroArgument::Write(string &file)
|
|||||||
|
|
||||||
/* --------------------- MathMacroTemplate ---------------------------*/
|
/* --------------------- MathMacroTemplate ---------------------------*/
|
||||||
|
|
||||||
MathMacroTemplate::MathMacroTemplate(char const *nm, int na, int flg):
|
MathMacroTemplate::MathMacroTemplate(char const * nm, int na, int flg):
|
||||||
MathParInset(LM_ST_TEXT, nm, LM_OT_MACRO),
|
MathParInset(LM_ST_TEXT, nm, LM_OT_MACRO),
|
||||||
flags(flg), nargs(na)
|
flags(flg), nargs(na)
|
||||||
{
|
{
|
||||||
@ -296,12 +298,12 @@ void MathMacroTemplate::setEditMode(bool ed)
|
|||||||
{
|
{
|
||||||
if (ed) {
|
if (ed) {
|
||||||
flags |= MMF_Edit;
|
flags |= MMF_Edit;
|
||||||
for (int i= 0; i<nargs; i++) {
|
for (int i = 0; i < nargs; ++i) {
|
||||||
args[i].setExpand(false);
|
args[i].setExpand(false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
flags &= ~MMF_Edit;
|
flags &= ~MMF_Edit;
|
||||||
for (int i= 0; i<nargs; i++) {
|
for (int i = 0; i < nargs; ++i) {
|
||||||
args[i].setExpand(true);
|
args[i].setExpand(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -313,12 +315,12 @@ void MathMacroTemplate::Draw(int x, int y)
|
|||||||
int x2, y2;
|
int x2, y2;
|
||||||
bool expnd = (nargs>0) ? args[0].getExpand(): false;
|
bool expnd = (nargs>0) ? args[0].getExpand(): false;
|
||||||
if (flags & MMF_Edit) {
|
if (flags & MMF_Edit) {
|
||||||
for (int i= 0; i<nargs; i++) {
|
for (int i = 0; i < nargs; ++i) {
|
||||||
args[i].setExpand(false);
|
args[i].setExpand(false);
|
||||||
}
|
}
|
||||||
x2 = x; y2 = y;
|
x2 = x; y2 = y;
|
||||||
} else {
|
} else {
|
||||||
for (int i= 0; i<nargs; i++) {
|
for (int i = 0; i < nargs; ++i) {
|
||||||
args[i].setExpand(true);
|
args[i].setExpand(true);
|
||||||
}
|
}
|
||||||
x2 = xo; y2 = yo;
|
x2 = xo; y2 = yo;
|
||||||
@ -326,11 +328,12 @@ void MathMacroTemplate::Draw(int x, int y)
|
|||||||
MathParInset::Draw(x, y);
|
MathParInset::Draw(x, y);
|
||||||
xo = x2; yo = y2;
|
xo = x2; yo = y2;
|
||||||
|
|
||||||
for (int i= 0; i<nargs; i++) {
|
for (int i = 0; i < nargs; ++i) {
|
||||||
args[i].setExpand(expnd);
|
args[i].setExpand(expnd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathMacroTemplate::Metrics()
|
void MathMacroTemplate::Metrics()
|
||||||
{
|
{
|
||||||
bool expnd = (nargs>0) ? args[0].getExpand(): false;
|
bool expnd = (nargs>0) ? args[0].getExpand(): false;
|
||||||
@ -351,7 +354,8 @@ void MathMacroTemplate::Metrics()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MathMacroTemplate::update(MathMacro* macro)
|
|
||||||
|
void MathMacroTemplate::update(MathMacro * macro)
|
||||||
{
|
{
|
||||||
int idx = (macro) ? macro->getArgumentIdx(): 0;
|
int idx = (macro) ? macro->getArgumentIdx(): 0;
|
||||||
for (int i= 0; i<nargs; i++) {
|
for (int i= 0; i<nargs; i++) {
|
||||||
@ -367,22 +371,23 @@ void MathMacroTemplate::update(MathMacro* macro)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathMacroTemplate::WriteDef(FILE *file)
|
void MathMacroTemplate::WriteDef(ostream & os)
|
||||||
{
|
{
|
||||||
fprintf(file, "\n\\newcommand{\\%s}", name);
|
os << "\n\\newcommand{\\" << name << "}";
|
||||||
|
|
||||||
if (nargs > 0 )
|
if (nargs > 0 )
|
||||||
fprintf(file, "[%d]", nargs);
|
os << "[" << nargs << "]";
|
||||||
|
|
||||||
fprintf(file, "{");
|
os << "{";
|
||||||
|
|
||||||
for (int i= 0; i<nargs; i++) {
|
for (int i = 0; i < nargs; ++i) {
|
||||||
args[i].setExpand(false);
|
args[i].setExpand(false);
|
||||||
}
|
}
|
||||||
Write(file);
|
Write(os);
|
||||||
fprintf(file, "}\n");
|
os << "}\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathMacroTemplate::WriteDef(string &file)
|
void MathMacroTemplate::WriteDef(string &file)
|
||||||
{
|
{
|
||||||
file += "\n\\newcommand{\\";
|
file += "\n\\newcommand{\\";
|
||||||
@ -397,33 +402,35 @@ void MathMacroTemplate::WriteDef(string &file)
|
|||||||
|
|
||||||
file += '{';
|
file += '{';
|
||||||
|
|
||||||
for (int i= 0; i<nargs; i++) {
|
for (int i = 0; i < nargs; ++i) {
|
||||||
args[i].setExpand(false);
|
args[i].setExpand(false);
|
||||||
}
|
}
|
||||||
Write(file);
|
Write(file);
|
||||||
file += "}\n";
|
file += "}\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
void MathMacroTemplate::setArgument(LyxArrayBase *a, int i)
|
|
||||||
|
void MathMacroTemplate::setArgument(LyxArrayBase * a, int i)
|
||||||
{
|
{
|
||||||
args[i].SetData(a);
|
args[i].SetData(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MathMacroTemplate::GetMacroXY(int i, int& x, int& y) const
|
|
||||||
|
void MathMacroTemplate::GetMacroXY(int i, int & x, int & y) const
|
||||||
{
|
{
|
||||||
args[i].GetXY(x, y);
|
args[i].GetXY(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MathParInset *MathMacroTemplate::getMacroPar(int i) const
|
MathParInset * MathMacroTemplate::getMacroPar(int i) const
|
||||||
{
|
{
|
||||||
return ((i>= 0 && i<nargs) ? (MathParInset*)&args[i]: 0);
|
return (i >= 0 && i < nargs) ? (MathParInset*)&args[i] : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathMacroTemplate::SetMacroFocus(int &idx, int x, int y)
|
void MathMacroTemplate::SetMacroFocus(int &idx, int x, int y)
|
||||||
{
|
{
|
||||||
for (int i= 0; i<nargs; i++) {
|
for (int i = 0; i < nargs; ++i) {
|
||||||
if (args[i].Inside(x, y)) {
|
if (args[i].Inside(x, y)) {
|
||||||
idx = i;
|
idx = i;
|
||||||
break;
|
break;
|
||||||
@ -448,9 +455,9 @@ MathMacroTable::~MathMacroTable()
|
|||||||
|
|
||||||
|
|
||||||
// The search is currently linear but will be binary or hash, later.
|
// The search is currently linear but will be binary or hash, later.
|
||||||
MathMacroTemplate *MathMacroTable::getTemplate(char const* name) const
|
MathMacroTemplate * MathMacroTable::getTemplate(char const * name) const
|
||||||
{
|
{
|
||||||
for (int i= 0; i<num_macros; i++) {
|
for (int i = 0; i < num_macros; ++i) {
|
||||||
if (strcmp(name, macro_table[i]->GetName()) == 0)
|
if (strcmp(name, macro_table[i]->GetName()) == 0)
|
||||||
return macro_table[i];
|
return macro_table[i];
|
||||||
}
|
}
|
||||||
@ -458,9 +465,9 @@ MathMacroTemplate *MathMacroTable::getTemplate(char const* name) const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MathMacroTable::addTemplate(MathMacroTemplate *m)
|
void MathMacroTable::addTemplate(MathMacroTemplate * m)
|
||||||
{
|
{
|
||||||
if (num_macros<max_macros)
|
if (num_macros < max_macros)
|
||||||
macro_table[num_macros++] = m;
|
macro_table[num_macros++] = m;
|
||||||
else
|
else
|
||||||
lyxerr << "Error (MathMacroTable::addTemplate): "
|
lyxerr << "Error (MathMacroTable::addTemplate): "
|
||||||
@ -475,19 +482,18 @@ void MathMacroTable::addTemplate(MathMacroTemplate *m)
|
|||||||
|
|
||||||
void MathMacroTable::builtinMacros()
|
void MathMacroTable::builtinMacros()
|
||||||
{
|
{
|
||||||
MathMacroTemplate *m;
|
|
||||||
MathedIter iter;
|
MathedIter iter;
|
||||||
MathParInset* inset;// *arg;
|
MathParInset * inset;// *arg;
|
||||||
LyxArrayBase *array, *array2;
|
LyxArrayBase * array2;
|
||||||
|
|
||||||
built = true;
|
built = true;
|
||||||
|
|
||||||
lyxerr[Debug::MATHED] << "Building macros" << endl;
|
lyxerr[Debug::MATHED] << "Building macros" << endl;
|
||||||
|
|
||||||
// This macro doesn't have arguments
|
// This macro doesn't have arguments
|
||||||
m = new MathMacroTemplate("notin"); // this leaks
|
MathMacroTemplate * m = new MathMacroTemplate("notin"); // this leaks
|
||||||
addTemplate(m);
|
addTemplate(m);
|
||||||
array = new LyxArrayBase; // this leaks
|
LyxArrayBase * array = new LyxArrayBase; // this leaks
|
||||||
iter.SetData(array);
|
iter.SetData(array);
|
||||||
iter.Insert(new MathAccentInset(LM_in, LM_TC_BOPS, LM_not)); // this leaks
|
iter.Insert(new MathAccentInset(LM_in, LM_TC_BOPS, LM_not)); // this leaks
|
||||||
m->SetData(array);
|
m->SetData(array);
|
||||||
@ -562,4 +568,3 @@ void MathMacroTable::builtinMacros()
|
|||||||
|
|
||||||
MathMacroTable MathMacroTable::mathMTable(255);
|
MathMacroTable MathMacroTable::mathMTable(255);
|
||||||
bool MathMacroTable::built = false;
|
bool MathMacroTable::built = false;
|
||||||
|
|
||||||
|
@ -25,21 +25,21 @@
|
|||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
///
|
///
|
||||||
typedef MathParInset* MathParInsetP;
|
typedef MathParInset * MathParInsetP;
|
||||||
///
|
///
|
||||||
typedef LyxArrayBase *LyxArrayBaseP;
|
typedef LyxArrayBase * LyxArrayBaseP;
|
||||||
|
|
||||||
class MathMacroTemplate;
|
class MathMacroTemplate;
|
||||||
|
|
||||||
|
|
||||||
/// This class contains the data for a macro
|
/// This class contains the data for a macro
|
||||||
class MathMacro: public MathParInset
|
class MathMacro : public MathParInset
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// A macro can only be builded from an existing template
|
/// A macro can only be builded from an existing template
|
||||||
MathMacro(MathMacroTemplate *);
|
MathMacro(MathMacroTemplate *);
|
||||||
/// or from another macro.
|
/// or from another macro.
|
||||||
MathMacro(MathMacro*);
|
MathMacro(MathMacro *);
|
||||||
///
|
///
|
||||||
~MathMacro();
|
~MathMacro();
|
||||||
///
|
///
|
||||||
@ -49,7 +49,7 @@ class MathMacro: public MathParInset
|
|||||||
///
|
///
|
||||||
MathedInset * Clone();
|
MathedInset * Clone();
|
||||||
///
|
///
|
||||||
void Write(FILE *);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Write(string &);
|
void Write(string &);
|
||||||
///
|
///
|
||||||
@ -61,13 +61,13 @@ class MathMacro: public MathParInset
|
|||||||
///
|
///
|
||||||
int GetColumns();
|
int GetColumns();
|
||||||
///
|
///
|
||||||
void GetXY(int&, int&) const;
|
void GetXY(int &, int &) const;
|
||||||
///
|
///
|
||||||
void SetFocus(int, int);
|
void SetFocus(int, int);
|
||||||
///
|
///
|
||||||
LyxArrayBase *GetData();
|
LyxArrayBase * GetData();
|
||||||
///
|
///
|
||||||
MathedRowSt *getRowSt() const { return args[idx].row; }
|
MathedRowSt * getRowSt() const { return args[idx].row; }
|
||||||
///
|
///
|
||||||
void SetData(LyxArrayBase *);
|
void SetData(LyxArrayBase *);
|
||||||
///
|
///
|
||||||
@ -77,18 +77,19 @@ class MathMacro: public MathParInset
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
///
|
///
|
||||||
MathMacroTemplate *tmplate;
|
MathMacroTemplate * tmplate;
|
||||||
///
|
///
|
||||||
struct MacroArgumentBase {
|
struct MacroArgumentBase {
|
||||||
/// Position of the macro
|
/// Position of the macro
|
||||||
int x, y;
|
int x, y;
|
||||||
///
|
///
|
||||||
MathedRowSt *row;
|
MathedRowSt * row;
|
||||||
///
|
///
|
||||||
LyxArrayBase *array;
|
LyxArrayBase * array;
|
||||||
///
|
///
|
||||||
MacroArgumentBase() { x = y = 0; array = 0; row = 0; }
|
MacroArgumentBase() { x = y = 0; array = 0; row = 0; }
|
||||||
} *args;
|
};
|
||||||
|
MacroArgumentBase * args;
|
||||||
///
|
///
|
||||||
int idx;
|
int idx;
|
||||||
///
|
///
|
||||||
@ -117,7 +118,7 @@ class MathMacroArgument: public MathParInset
|
|||||||
///
|
///
|
||||||
void Draw(int x, int baseline);
|
void Draw(int x, int baseline);
|
||||||
///
|
///
|
||||||
void Write(FILE*);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Write(string &);
|
void Write(string &);
|
||||||
///
|
///
|
||||||
@ -140,7 +141,7 @@ class MathMacroTemplate: public MathParInset
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// A template constructor needs all the data
|
/// A template constructor needs all the data
|
||||||
MathMacroTemplate(char const*, int na= 0, int f= 0);
|
MathMacroTemplate(char const *, int na = 0, int f = 0);
|
||||||
///
|
///
|
||||||
~MathMacroTemplate();
|
~MathMacroTemplate();
|
||||||
///
|
///
|
||||||
@ -148,7 +149,7 @@ class MathMacroTemplate: public MathParInset
|
|||||||
///
|
///
|
||||||
void Metrics();
|
void Metrics();
|
||||||
///
|
///
|
||||||
void WriteDef(FILE *);
|
void WriteDef(ostream &);
|
||||||
///
|
///
|
||||||
void WriteDef(string &);
|
void WriteDef(string &);
|
||||||
/// useful for special insets
|
/// useful for special insets
|
||||||
@ -160,16 +161,16 @@ class MathMacroTemplate: public MathParInset
|
|||||||
/// Number of arguments
|
/// Number of arguments
|
||||||
int getNoArgs() { return nargs; }
|
int getNoArgs() { return nargs; }
|
||||||
///
|
///
|
||||||
void GetMacroXY(int, int&, int&) const;
|
void GetMacroXY(int, int &, int &) const;
|
||||||
///
|
///
|
||||||
MathParInset *getMacroPar(int) const;
|
MathParInset * getMacroPar(int) const;
|
||||||
///
|
///
|
||||||
void SetMacroFocus(int&, int, int);
|
void SetMacroFocus(int &, int, int);
|
||||||
///
|
///
|
||||||
void setEditMode(bool);
|
void setEditMode(bool);
|
||||||
|
|
||||||
/// Replace the appropriate arguments with a specific macro's data
|
/// Replace the appropriate arguments with a specific macro's data
|
||||||
void update(MathMacro* m= 0);
|
void update(MathMacro * m = 0);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
///
|
///
|
||||||
@ -177,7 +178,7 @@ class MathMacroTemplate: public MathParInset
|
|||||||
///
|
///
|
||||||
MathedTextCodes tcode;
|
MathedTextCodes tcode;
|
||||||
///
|
///
|
||||||
MathMacroArgument *args;
|
MathMacroArgument * args;
|
||||||
///
|
///
|
||||||
int nargs;
|
int nargs;
|
||||||
///
|
///
|
||||||
@ -186,9 +187,9 @@ class MathMacroTemplate: public MathParInset
|
|||||||
|
|
||||||
|
|
||||||
///
|
///
|
||||||
typedef MathMacro *MathMacroP;
|
typedef MathMacro * MathMacroP;
|
||||||
///
|
///
|
||||||
typedef MathMacroTemplate *MathMacroTemplateP;
|
typedef MathMacroTemplate * MathMacroTemplateP;
|
||||||
|
|
||||||
///
|
///
|
||||||
class MathMacroTable
|
class MathMacroTable
|
||||||
@ -201,9 +202,9 @@ class MathMacroTable
|
|||||||
///
|
///
|
||||||
void addTemplate(MathMacroTemplate *);
|
void addTemplate(MathMacroTemplate *);
|
||||||
///
|
///
|
||||||
MathMacro *getMacro(char const*) const;
|
MathMacro * getMacro(char const *) const;
|
||||||
///
|
///
|
||||||
MathMacroTemplate *getTemplate(char const*) const;
|
MathMacroTemplate * getTemplate(char const *) const;
|
||||||
///
|
///
|
||||||
void builtinMacros();
|
void builtinMacros();
|
||||||
///
|
///
|
||||||
@ -217,7 +218,7 @@ class MathMacroTable
|
|||||||
///
|
///
|
||||||
int num_macros;
|
int num_macros;
|
||||||
///
|
///
|
||||||
MathMacroTemplateP *macro_table;
|
MathMacroTemplateP * macro_table;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -227,7 +228,7 @@ class MathMacroTable
|
|||||||
inline
|
inline
|
||||||
bool MathMacro::setArgumentIdx(int i)
|
bool MathMacro::setArgumentIdx(int i)
|
||||||
{
|
{
|
||||||
if (i>= 0 && i<nargs) {
|
if (i >= 0 && i < nargs) {
|
||||||
idx = i;
|
idx = i;
|
||||||
return true;
|
return true;
|
||||||
} else
|
} else
|
||||||
@ -243,28 +244,28 @@ int MathMacro::getArgumentIdx()
|
|||||||
inline
|
inline
|
||||||
int MathMacro::getMaxArgumentIdx()
|
int MathMacro::getMaxArgumentIdx()
|
||||||
{
|
{
|
||||||
return nargs-1;
|
return nargs - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline
|
inline
|
||||||
LyxArrayBase *MathMacro::GetData()
|
LyxArrayBase * MathMacro::GetData()
|
||||||
{
|
{
|
||||||
return args[idx].array;
|
return args[idx].array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline
|
inline
|
||||||
void MathMacro::SetData(LyxArrayBase *a)
|
void MathMacro::SetData(LyxArrayBase * a)
|
||||||
{
|
{
|
||||||
args[idx].array = a;
|
args[idx].array = a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline
|
inline
|
||||||
MathMacro *MathMacroTable::getMacro(char const* name) const
|
MathMacro * MathMacroTable::getMacro(char const * name) const
|
||||||
{
|
{
|
||||||
MathMacroTemplate *mt = getTemplate(name);
|
MathMacroTemplate * mt = getTemplate(name);
|
||||||
return (mt) ? new MathMacro(mt): 0;
|
return (mt) ? new MathMacro(mt): 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +143,6 @@ void delim_cb(FL_OBJECT *, long data)
|
|||||||
{
|
{
|
||||||
int left= fd_delim->left->u_ldata, right= fd_delim->right->u_ldata;
|
int left= fd_delim->left->u_ldata, right= fd_delim->right->u_ldata;
|
||||||
int side= (fl_get_button(fd_delim->right)!= 0);
|
int side= (fl_get_button(fd_delim->right)!= 0);
|
||||||
Pixmap p1, p2;
|
|
||||||
|
|
||||||
switch (data) {
|
switch (data) {
|
||||||
case MM_APPLY:
|
case MM_APPLY:
|
||||||
@ -171,6 +170,7 @@ void delim_cb(FL_OBJECT *, long data)
|
|||||||
right = delim_rversion[i];
|
right = delim_rversion[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Pixmap p1, p2;
|
||||||
p1 = fl_get_pixmap_pixmap(fd_delim->pix, &p1, &p2);
|
p1 = fl_get_pixmap_pixmap(fd_delim->pix, &p1, &p2);
|
||||||
fl_draw_bmtable_item(fd_delim->menu, left, p1, 0, 0);
|
fl_draw_bmtable_item(fd_delim->menu, left, p1, 0, 0);
|
||||||
fl_draw_bmtable_item(fd_delim->menu, right, p1, 16, 0);
|
fl_draw_bmtable_item(fd_delim->menu, right, p1, 16, 0);
|
||||||
@ -189,7 +189,6 @@ void delim_cb(FL_OBJECT *, long data)
|
|||||||
/* callbacks for form matrix */
|
/* callbacks for form matrix */
|
||||||
void matrix_cb(FL_OBJECT *, long data)
|
void matrix_cb(FL_OBJECT *, long data)
|
||||||
{
|
{
|
||||||
int nx, ny;
|
|
||||||
static char v_align_c[] = "tcb";
|
static char v_align_c[] = "tcb";
|
||||||
|
|
||||||
switch (data) {
|
switch (data) {
|
||||||
@ -199,8 +198,8 @@ void matrix_cb(FL_OBJECT *, long data)
|
|||||||
char s[80];
|
char s[80];
|
||||||
char c = v_align_c[fl_get_choice(fd_matrix->valign)-1];
|
char c = v_align_c[fl_get_choice(fd_matrix->valign)-1];
|
||||||
char const * sh = fl_get_input(fd_matrix->halign);
|
char const * sh = fl_get_input(fd_matrix->halign);
|
||||||
nx = int(fl_get_slider_value(fd_matrix->columns)+0.5);
|
int nx = int(fl_get_slider_value(fd_matrix->columns)+0.5);
|
||||||
ny = int(fl_get_slider_value(fd_matrix->rows)+0.5);
|
int ny = int(fl_get_slider_value(fd_matrix->rows)+0.5);
|
||||||
sprintf(s, "%d %d %c%s", nx, ny, c, sh);
|
sprintf(s, "%d %d %c%s", nx, ny, c, sh);
|
||||||
if (data == MM_OK) fl_hide_form(fd_matrix->matrix);
|
if (data == MM_OK) fl_hide_form(fd_matrix->matrix);
|
||||||
lyxfunc->Dispatch(LFUN_INSERT_MATRIX, s);
|
lyxfunc->Dispatch(LFUN_INSERT_MATRIX, s);
|
||||||
@ -209,7 +208,7 @@ void matrix_cb(FL_OBJECT *, long data)
|
|||||||
case MM_CLOSE: fl_hide_form(fd_matrix->matrix); break;
|
case MM_CLOSE: fl_hide_form(fd_matrix->matrix); break;
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
nx = int(fl_get_slider_value(fd_matrix->columns)+0.5);
|
int nx = int(fl_get_slider_value(fd_matrix->columns)+0.5);
|
||||||
for (int i= 0; i<nx; i++) h_align_str[i] = 'c';
|
for (int i= 0; i<nx; i++) h_align_str[i] = 'c';
|
||||||
//memset(h_align_str, 'c', nx);
|
//memset(h_align_str, 'c', nx);
|
||||||
h_align_str[nx] = '\0';
|
h_align_str[nx] = '\0';
|
||||||
|
@ -47,7 +47,7 @@ MathedInset * MathRootInset::Clone()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathRootInset::SetData(LyxArrayBase *d)
|
void MathRootInset::SetData(LyxArrayBase * d)
|
||||||
{
|
{
|
||||||
if (idx == 1)
|
if (idx == 1)
|
||||||
MathParInset::SetData(d);
|
MathParInset::SetData(d);
|
||||||
@ -67,7 +67,7 @@ bool MathRootInset::setArgumentIdx(int i)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathRootInset::GetXY(int& x, int& y) const
|
void MathRootInset::GetXY(int & x, int & y) const
|
||||||
{
|
{
|
||||||
if (idx == 1)
|
if (idx == 1)
|
||||||
MathParInset::GetXY(x, y);
|
MathParInset::GetXY(x, y);
|
||||||
@ -75,7 +75,8 @@ void MathRootInset::GetXY(int& x, int& y) const
|
|||||||
uroot->GetXY(x, y);
|
uroot->GetXY(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
LyxArrayBase *MathRootInset::GetData()
|
|
||||||
|
LyxArrayBase * MathRootInset::GetData()
|
||||||
{
|
{
|
||||||
if (idx == 1)
|
if (idx == 1)
|
||||||
return array;
|
return array;
|
||||||
@ -134,11 +135,11 @@ void MathRootInset::SetFocus(int x, int)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathRootInset::Write(FILE *outf)
|
void MathRootInset::Write(ostream & os)
|
||||||
{
|
{
|
||||||
string output;
|
string output;
|
||||||
MathRootInset::Write(output);
|
MathRootInset::Write(output);
|
||||||
fprintf(outf, "%s", output.c_str());
|
os << output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ class MathRootInset: public MathSqrtInset {
|
|||||||
///
|
///
|
||||||
void Draw(int x, int baseline);
|
void Draw(int x, int baseline);
|
||||||
///
|
///
|
||||||
void Write(FILE * file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Write(string & file);
|
void Write(string & file);
|
||||||
///
|
///
|
||||||
|
@ -41,15 +41,16 @@ char const * math_font_name[] = {
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MathSpaceInset::Write(FILE * outf)
|
MathSpaceInset::Write(ostream & os)
|
||||||
{
|
{
|
||||||
if (space >= 0 && space < 6) {
|
if (space >= 0 && space < 6) {
|
||||||
string output;
|
string output;
|
||||||
MathSpaceInset::Write(output);
|
MathSpaceInset::Write(output);
|
||||||
fprintf(outf, "%s", output.c_str());
|
os << output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MathSpaceInset::Write(string & outf)
|
MathSpaceInset::Write(string & outf)
|
||||||
{
|
{
|
||||||
@ -62,13 +63,14 @@ MathSpaceInset::Write(string & outf)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MathDotsInset::Write(FILE * outf)
|
MathDotsInset::Write(ostream & os)
|
||||||
{
|
{
|
||||||
string output;
|
string output;
|
||||||
MathDotsInset::Write(output);
|
MathDotsInset::Write(output);
|
||||||
fprintf(outf, "%s", output.c_str());
|
os << output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MathDotsInset::Write(string & outf)
|
MathDotsInset::Write(string & outf)
|
||||||
{
|
{
|
||||||
@ -78,13 +80,14 @@ MathDotsInset::Write(string & outf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathSqrtInset::Write(FILE * outf)
|
void MathSqrtInset::Write(ostream & os)
|
||||||
{
|
{
|
||||||
string output;
|
string output;
|
||||||
MathSqrtInset::Write(output);
|
MathSqrtInset::Write(output);
|
||||||
fprintf(outf, "%s", output.c_str());
|
os << output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathSqrtInset::Write(string & outf)
|
void MathSqrtInset::Write(string & outf)
|
||||||
{
|
{
|
||||||
outf += '\\';
|
outf += '\\';
|
||||||
@ -95,13 +98,14 @@ void MathSqrtInset::Write(string & outf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathDelimInset::Write(FILE * outf)
|
void MathDelimInset::Write(ostream & os)
|
||||||
{
|
{
|
||||||
string output;
|
string output;
|
||||||
MathDelimInset::Write(output);
|
MathDelimInset::Write(output);
|
||||||
fprintf(outf, "%s", output.c_str());
|
os << output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathDelimInset::Write(string & outf)
|
void MathDelimInset::Write(string & outf)
|
||||||
{
|
{
|
||||||
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;
|
||||||
@ -140,13 +144,14 @@ void MathDelimInset::Write(string & outf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathDecorationInset::Write(FILE * outf)
|
void MathDecorationInset::Write(ostream & os)
|
||||||
{
|
{
|
||||||
string output;
|
string output;
|
||||||
MathDecorationInset::Write(output);
|
MathDecorationInset::Write(output);
|
||||||
fprintf(outf, "%s", output.c_str());
|
os << output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathDecorationInset::Write(string & outf)
|
void MathDecorationInset::Write(string & outf)
|
||||||
{
|
{
|
||||||
latexkeys * l = lm_get_key_by_id(deco, LM_TK_WIDE);
|
latexkeys * l = lm_get_key_by_id(deco, LM_TK_WIDE);
|
||||||
@ -158,13 +163,14 @@ void MathDecorationInset::Write(string & outf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathAccentInset::Write(FILE * outf)
|
void MathAccentInset::Write(ostream & os)
|
||||||
{
|
{
|
||||||
string output;
|
string output;
|
||||||
MathAccentInset::Write(output);
|
MathAccentInset::Write(output);
|
||||||
fprintf(outf, "%s", output.c_str());
|
os << output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathAccentInset::Write(string & outf)
|
void MathAccentInset::Write(string & outf)
|
||||||
{
|
{
|
||||||
latexkeys * l = lm_get_key_by_id(code, LM_TK_ACCENT);
|
latexkeys * l = lm_get_key_by_id(code, LM_TK_ACCENT);
|
||||||
@ -202,13 +208,14 @@ void MathAccentInset::Write(string & outf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathBigopInset::Write(FILE * outf)
|
void MathBigopInset::Write(ostream & os)
|
||||||
{
|
{
|
||||||
string output;
|
string output;
|
||||||
MathBigopInset::Write(output);
|
MathBigopInset::Write(output);
|
||||||
fprintf(outf, "%s", output.c_str());
|
os << output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathBigopInset::Write(string & outf)
|
void MathBigopInset::Write(string & outf)
|
||||||
{
|
{
|
||||||
bool limp = GetLimits();
|
bool limp = GetLimits();
|
||||||
@ -226,13 +233,14 @@ void MathBigopInset::Write(string & outf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathFracInset::Write(FILE * outf)
|
void MathFracInset::Write(ostream & os)
|
||||||
{
|
{
|
||||||
string output;
|
string output;
|
||||||
MathFracInset::Write(output);
|
MathFracInset::Write(output);
|
||||||
fprintf(outf, "%s", output.c_str());
|
os << output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathFracInset::Write(string & outf)
|
void MathFracInset::Write(string & outf)
|
||||||
{
|
{
|
||||||
outf += '\\';
|
outf += '\\';
|
||||||
@ -245,12 +253,12 @@ void MathFracInset::Write(string & outf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathParInset::Write(FILE * outf)
|
void MathParInset::Write(ostream & os)
|
||||||
{
|
{
|
||||||
if (!array) return;
|
if (!array) return;
|
||||||
string output;
|
string output;
|
||||||
MathParInset::Write(output);
|
MathParInset::Write(output);
|
||||||
fprintf(outf, "%s", output.c_str());
|
os << output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -373,14 +381,15 @@ void MathParInset::Write(string & outf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathMatrixInset::Write(FILE *outf)
|
void MathMatrixInset::Write(ostream & os)
|
||||||
{
|
{
|
||||||
string output;
|
string output;
|
||||||
MathMatrixInset::Write(output);
|
MathMatrixInset::Write(output);
|
||||||
fprintf(outf, "%s", output.c_str());
|
os << output;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MathMatrixInset::Write(string &outf)
|
|
||||||
|
void MathMatrixInset::Write(string & outf)
|
||||||
{
|
{
|
||||||
if (GetType() == LM_OT_MATRIX){
|
if (GetType() == LM_OT_MATRIX){
|
||||||
outf += "\\begin{";
|
outf += "\\begin{";
|
||||||
@ -406,17 +415,19 @@ void MathMatrixInset::Write(string &outf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void mathed_write(MathParInset* p, FILE* outf, int* newlines, char fragile, char const* label)
|
void mathed_write(MathParInset * p, ostream & os, int * newlines,
|
||||||
|
char fragile, char const * label)
|
||||||
{
|
{
|
||||||
string output;
|
string output;
|
||||||
mathed_write(p, output, newlines, fragile, label);
|
mathed_write(p, output, newlines, fragile, label);
|
||||||
fprintf(outf, "%s", output.c_str());
|
os << output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern int tex_code_break_column;
|
extern int tex_code_break_column;
|
||||||
|
|
||||||
void mathed_write(MathParInset* p, string & outf, int* newlines,
|
void mathed_write(MathParInset * p, string & outf, int * newlines,
|
||||||
char fragile, char const* label)
|
char fragile, char const * label)
|
||||||
{
|
{
|
||||||
number_of_newlines = 0;
|
number_of_newlines = 0;
|
||||||
short mathed_env = p->GetType();
|
short mathed_env = p->GetType();
|
||||||
|
140
src/paragraph.C
140
src/paragraph.C
@ -14,6 +14,8 @@
|
|||||||
#pragma implementation "lyxparagraph.h"
|
#pragma implementation "lyxparagraph.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
#include "lyxparagraph.h"
|
#include "lyxparagraph.h"
|
||||||
#include "support/textutils.h"
|
#include "support/textutils.h"
|
||||||
#include "lyxrc.h"
|
#include "lyxrc.h"
|
||||||
@ -112,7 +114,7 @@ LyXParagraph::LyXParagraph(LyXParagraph * par)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LyXParagraph::writeFile(FILE * file, BufferParams & params,
|
void LyXParagraph::writeFile(ostream & os, BufferParams & params,
|
||||||
char footflag, char dth)
|
char footflag, char dth)
|
||||||
{
|
{
|
||||||
LyXFont font1, font2;
|
LyXFont font1, font2;
|
||||||
@ -129,11 +131,12 @@ void LyXParagraph::writeFile(FILE * file, BufferParams & params,
|
|||||||
if (footflag != footnoteflag) {
|
if (footflag != footnoteflag) {
|
||||||
footflag = footnoteflag;
|
footflag = footnoteflag;
|
||||||
if (footflag) {
|
if (footflag) {
|
||||||
fprintf(file, "\n\\begin_float %s ",
|
os << "\n\\begin_float "
|
||||||
string_footnotekinds[footnotekind]);
|
<< string_footnotekinds[footnotekind]
|
||||||
|
<< " ";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fprintf(file, "\n\\end_float ");
|
os << "\n\\end_float ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,55 +144,55 @@ void LyXParagraph::writeFile(FILE * file, BufferParams & params,
|
|||||||
if (dth != depth) {
|
if (dth != depth) {
|
||||||
if (depth > dth) {
|
if (depth > dth) {
|
||||||
while (depth > dth) {
|
while (depth > dth) {
|
||||||
fprintf(file, "\n\\begin_deeper ");
|
os << "\n\\begin_deeper ";
|
||||||
dth++;
|
dth++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
while (depth < dth) {
|
while (depth < dth) {
|
||||||
fprintf(file, "\n\\end_deeper ");
|
os << "\n\\end_deeper ";
|
||||||
dth--;
|
dth--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* First write the layout */
|
/* First write the layout */
|
||||||
fprintf(file, "\n\\layout %s\n",
|
os << "\n\\layout "
|
||||||
textclasslist.NameOfLayout(params.textclass, layout)
|
<< textclasslist.NameOfLayout(params.textclass, layout)
|
||||||
.c_str());
|
<< "\n";
|
||||||
|
|
||||||
/* maybe some vertical spaces */
|
/* maybe some vertical spaces */
|
||||||
if (added_space_top.kind() != VSpace::NONE)
|
if (added_space_top.kind() != VSpace::NONE)
|
||||||
fprintf(file, "\\added_space_top %s ",
|
os << "\\added_space_top "
|
||||||
added_space_top.asLyXCommand().c_str());
|
<< added_space_top.asLyXCommand() << " ";
|
||||||
if (added_space_bottom.kind() != VSpace::NONE)
|
if (added_space_bottom.kind() != VSpace::NONE)
|
||||||
fprintf(file, "\\added_space_bottom %s ",
|
os << "\\added_space_bottom "
|
||||||
added_space_bottom.asLyXCommand().c_str());
|
<< added_space_bottom.asLyXCommand() << " ";
|
||||||
|
|
||||||
/* The labelwidth string used in lists */
|
/* The labelwidth string used in lists */
|
||||||
if (!labelwidthstring.empty())
|
if (!labelwidthstring.empty())
|
||||||
fprintf(file, "\\labelwidthstring %s\n",
|
os << "\\labelwidthstring "
|
||||||
labelwidthstring.c_str());
|
<< labelwidthstring << '\n';
|
||||||
|
|
||||||
/* Lines above or below? */
|
/* Lines above or below? */
|
||||||
if (line_top)
|
if (line_top)
|
||||||
fprintf(file, "\\line_top ");
|
os << "\\line_top ";
|
||||||
if (line_bottom)
|
if (line_bottom)
|
||||||
fprintf(file, "\\line_bottom ");
|
os << "\\line_bottom ";
|
||||||
|
|
||||||
/* Pagebreaks above or below? */
|
/* Pagebreaks above or below? */
|
||||||
if (pagebreak_top)
|
if (pagebreak_top)
|
||||||
fprintf(file, "\\pagebreak_top ");
|
os << "\\pagebreak_top ";
|
||||||
if (pagebreak_bottom)
|
if (pagebreak_bottom)
|
||||||
fprintf(file, "\\pagebreak_bottom ");
|
os << "\\pagebreak_bottom ";
|
||||||
|
|
||||||
/* Start of appendix? */
|
/* Start of appendix? */
|
||||||
if (start_of_appendix)
|
if (start_of_appendix)
|
||||||
fprintf(file, "\\start_of_appendix ");
|
os << "\\start_of_appendix ";
|
||||||
|
|
||||||
/* Noindent? */
|
/* Noindent? */
|
||||||
if (noindent)
|
if (noindent)
|
||||||
fprintf(file, "\\noindent ");
|
os << "\\noindent ";
|
||||||
|
|
||||||
/* Alignment? */
|
/* Alignment? */
|
||||||
if (align != LYX_ALIGN_LAYOUT) {
|
if (align != LYX_ALIGN_LAYOUT) {
|
||||||
@ -199,61 +202,59 @@ void LyXParagraph::writeFile(FILE * file, BufferParams & params,
|
|||||||
case LYX_ALIGN_CENTER: h = 3; break;
|
case LYX_ALIGN_CENTER: h = 3; break;
|
||||||
default: h = 0; break;
|
default: h = 0; break;
|
||||||
}
|
}
|
||||||
fprintf(file, "\\align %s ", string_align[h]);
|
os << "\\align " << string_align[h] << " ";
|
||||||
}
|
}
|
||||||
if (pextra_type != PEXTRA_NONE) {
|
if (pextra_type != PEXTRA_NONE) {
|
||||||
fprintf(file, "\\pextra_type %d", pextra_type);
|
os << "\\pextra_type " << pextra_type;
|
||||||
if (pextra_type == PEXTRA_MINIPAGE) {
|
if (pextra_type == PEXTRA_MINIPAGE) {
|
||||||
fprintf(file, " \\pextra_alignment %d",
|
os << " \\pextra_alignment "
|
||||||
pextra_alignment);
|
<< pextra_alignment;
|
||||||
if (pextra_hfill)
|
if (pextra_hfill)
|
||||||
fprintf(file, " \\pextra_hfill %d",
|
os << " \\pextra_hfill "
|
||||||
pextra_hfill);
|
<< pextra_hfill;
|
||||||
if (pextra_start_minipage)
|
if (pextra_start_minipage)
|
||||||
fprintf(file,
|
os << " \\pextra_start_minipage "
|
||||||
" \\pextra_start_minipage %d",
|
<< pextra_start_minipage;
|
||||||
pextra_start_minipage);
|
|
||||||
}
|
}
|
||||||
if (!pextra_width.empty()) {
|
if (!pextra_width.empty()) {
|
||||||
fprintf(file, " \\pextra_width %s",
|
os << " \\pextra_width "
|
||||||
VSpace(pextra_width)
|
<< VSpace(pextra_width).asLyXCommand();
|
||||||
.asLyXCommand().c_str());
|
|
||||||
} else if (!pextra_widthp.empty()) {
|
} else if (!pextra_widthp.empty()) {
|
||||||
fprintf(file, " \\pextra_widthp %s",
|
os << " \\pextra_widthp "
|
||||||
pextra_widthp.c_str());
|
<< pextra_widthp;
|
||||||
}
|
}
|
||||||
fprintf(file, "\n");
|
os << '\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Dummy layout. This means that a footnote ended */
|
/* Dummy layout. This means that a footnote ended */
|
||||||
fprintf(file, "\n\\end_float ");
|
os << "\n\\end_float ";
|
||||||
footflag = LyXParagraph::NO_FOOTNOTE;
|
footflag = LyXParagraph::NO_FOOTNOTE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* It might be a table */
|
/* It might be a table */
|
||||||
if (table){
|
if (table){
|
||||||
fprintf(file, "\\LyXTable\n");
|
os << "\\LyXTable\n";
|
||||||
table->Write(file);
|
table->Write(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
// bibitem ale970302
|
// bibitem ale970302
|
||||||
if (bibkey)
|
if (bibkey)
|
||||||
bibkey->Write(file);
|
bibkey->Write(os);
|
||||||
|
|
||||||
font1 = LyXFont(LyXFont::ALL_INHERIT);
|
font1 = LyXFont(LyXFont::ALL_INHERIT);
|
||||||
|
|
||||||
column = 0;
|
column = 0;
|
||||||
for (size_type i = 0; i < size(); i++) {
|
for (size_type i = 0; i < size(); i++) {
|
||||||
if (!i){
|
if (!i){
|
||||||
fprintf(file, "\n");
|
os << "\n";
|
||||||
column = 0;
|
column = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write font changes
|
// Write font changes
|
||||||
font2 = GetFontSettings(i);
|
font2 = GetFontSettings(i);
|
||||||
if (font2 != font1) {
|
if (font2 != font1) {
|
||||||
font2.lyxWriteChanges(font1, file);
|
font2.lyxWriteChanges(font1, os);
|
||||||
column = 0;
|
column = 0;
|
||||||
font1 = font2;
|
font1 = font2;
|
||||||
}
|
}
|
||||||
@ -267,48 +268,47 @@ void LyXParagraph::writeFile(FILE * file, BufferParams & params,
|
|||||||
// international char, let it write
|
// international char, let it write
|
||||||
// code directly so it's shorter in
|
// code directly so it's shorter in
|
||||||
// the file
|
// the file
|
||||||
inset->Write(file);
|
inset->Write(os);
|
||||||
} else {
|
} else {
|
||||||
fprintf(file, "\n\\begin_inset ");
|
os << "\n\\begin_inset ";
|
||||||
inset->Write(file);
|
inset->Write(os);
|
||||||
fprintf(file, "\n\\end_inset \n");
|
os << "\n\\end_inset \n\n";
|
||||||
fprintf(file, "\n");
|
|
||||||
column = 0;
|
column = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case META_NEWLINE:
|
case META_NEWLINE:
|
||||||
fprintf(file, "\n\\newline \n");
|
os << "\n\\newline \n";
|
||||||
column = 0;
|
column = 0;
|
||||||
break;
|
break;
|
||||||
case META_HFILL:
|
case META_HFILL:
|
||||||
fprintf(file, "\n\\hfill \n");
|
os << "\n\\hfill \n";
|
||||||
column = 0;
|
column = 0;
|
||||||
break;
|
break;
|
||||||
case META_PROTECTED_SEPARATOR:
|
case META_PROTECTED_SEPARATOR:
|
||||||
fprintf(file, "\n\\protected_separator \n");
|
os << "\n\\protected_separator \n";
|
||||||
column = 0;
|
column = 0;
|
||||||
break;
|
break;
|
||||||
case '\\':
|
case '\\':
|
||||||
fprintf(file, "\n\\backslash \n");
|
os << "\n\\backslash \n";
|
||||||
column = 0;
|
column = 0;
|
||||||
break;
|
break;
|
||||||
case '.':
|
case '.':
|
||||||
if (i + 1 < size() && GetChar(i + 1) == ' ') {
|
if (i + 1 < size() && GetChar(i + 1) == ' ') {
|
||||||
fprintf(file, ".\n");
|
os << ".\n";
|
||||||
column = 0;
|
column = 0;
|
||||||
} else
|
} else
|
||||||
fprintf(file, ".");
|
os << ".";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if ((column > 70 && c == ' ')
|
if ((column > 70 && c == ' ')
|
||||||
|| column > 79){
|
|| column > 79){
|
||||||
fprintf(file, "\n");
|
os << "\n";
|
||||||
column = 0;
|
column = 0;
|
||||||
}
|
}
|
||||||
// this check is to amend a bug. LyX sometimes
|
// this check is to amend a bug. LyX sometimes
|
||||||
// inserts '\0' this could cause problems.
|
// inserts '\0' this could cause problems.
|
||||||
if (c != '\0')
|
if (c != '\0')
|
||||||
fprintf(file, "%c", c);
|
os << c;
|
||||||
else
|
else
|
||||||
lyxerr << "ERROR (LyXParagraph::writeFile):"
|
lyxerr << "ERROR (LyXParagraph::writeFile):"
|
||||||
" NULL char in structure." << endl;
|
" NULL char in structure." << endl;
|
||||||
@ -319,7 +319,7 @@ void LyXParagraph::writeFile(FILE * file, BufferParams & params,
|
|||||||
|
|
||||||
// now write the next paragraph
|
// now write the next paragraph
|
||||||
if (next)
|
if (next)
|
||||||
next->writeFile(file, params, footflag, dth);
|
next->writeFile(os, params, footflag, dth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3530,7 +3530,7 @@ void LyXParagraph::SimpleTeXSpecialChars(string & file, TexRow & texrow,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool LyXParagraph::RoffContTableRows(FILE * fp,
|
bool LyXParagraph::RoffContTableRows(ostream & os,
|
||||||
LyXParagraph::size_type i,
|
LyXParagraph::size_type i,
|
||||||
int actcell)
|
int actcell)
|
||||||
{
|
{
|
||||||
@ -3541,7 +3541,6 @@ bool LyXParagraph::RoffContTableRows(FILE * fp,
|
|||||||
LyXFont font2;
|
LyXFont font2;
|
||||||
Inset * inset;
|
Inset * inset;
|
||||||
char c;
|
char c;
|
||||||
FILE * fp2;
|
|
||||||
|
|
||||||
string fname2 = TmpFileName(string(), "RAT2");
|
string fname2 = TmpFileName(string(), "RAT2");
|
||||||
int lastpos = i;
|
int lastpos = i;
|
||||||
@ -3558,7 +3557,7 @@ bool LyXParagraph::RoffContTableRows(FILE * fp,
|
|||||||
lastpos = i;
|
lastpos = i;
|
||||||
c = GetChar(i);
|
c = GetChar(i);
|
||||||
if ((c != ' ') && (c != LyXParagraph::META_NEWLINE))
|
if ((c != ' ') && (c != LyXParagraph::META_NEWLINE))
|
||||||
fprintf(fp, " ");
|
os << " ";
|
||||||
for (; i < size()
|
for (; i < size()
|
||||||
&& (c = GetChar(i)) != LyXParagraph::META_NEWLINE;
|
&& (c = GetChar(i)) != LyXParagraph::META_NEWLINE;
|
||||||
++i) {
|
++i) {
|
||||||
@ -3571,23 +3570,24 @@ bool LyXParagraph::RoffContTableRows(FILE * fp,
|
|||||||
switch (c) {
|
switch (c) {
|
||||||
case LyXParagraph::META_INSET:
|
case LyXParagraph::META_INSET:
|
||||||
if ((inset = GetInset(i))) {
|
if ((inset = GetInset(i))) {
|
||||||
if (!(fp2= fopen(fname2.c_str(), "w+"))) {
|
fstream fs(fname2.c_str(), ios::in|ios::out);
|
||||||
|
if (!fs) {
|
||||||
WriteAlert(_("LYX_ERROR:"),
|
WriteAlert(_("LYX_ERROR:"),
|
||||||
_("Cannot open temporary file:"),
|
_("Cannot open temporary file:"),
|
||||||
fname2);
|
fname2);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
inset->Latex(fp2,-1);
|
inset->Latex(fs, -1);
|
||||||
rewind(fp2);
|
fs.seekp(0);
|
||||||
c = fgetc(fp2);
|
fs.get(c);
|
||||||
while(!feof(fp2)) {
|
while (!fs) {
|
||||||
if (c == '\\')
|
if (c == '\\')
|
||||||
fprintf(fp, "\\\\");
|
os << "\\\\";
|
||||||
else
|
else
|
||||||
fputc(c, fp);
|
os << c;
|
||||||
c = fgetc(fp2);
|
fs.get(c);
|
||||||
}
|
}
|
||||||
fclose(fp2);
|
fs.close();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case LyXParagraph::META_NEWLINE:
|
case LyXParagraph::META_NEWLINE:
|
||||||
@ -3597,11 +3597,11 @@ bool LyXParagraph::RoffContTableRows(FILE * fp,
|
|||||||
case LyXParagraph::META_PROTECTED_SEPARATOR:
|
case LyXParagraph::META_PROTECTED_SEPARATOR:
|
||||||
break;
|
break;
|
||||||
case '\\':
|
case '\\':
|
||||||
fprintf(fp, "\\\\");
|
os << "\\\\";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (c != '\0')
|
if (c != '\0')
|
||||||
fprintf(fp, "%c", c);
|
os << c;
|
||||||
else
|
else
|
||||||
lyxerr.debug() << "RoffAsciiTable: NULL char in structure." << endl;
|
lyxerr.debug() << "RoffAsciiTable: NULL char in structure." << endl;
|
||||||
break;
|
break;
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
// Since the current C++ lib in egcs does not have a standard implementation
|
// Since the current C++ lib in egcs does not have a standard implementation
|
||||||
// of basic_streambuf and basic_filebuf we don't have to include this
|
// of basic_streambuf and basic_filebuf we don't have to include this
|
||||||
// header.
|
// header.
|
||||||
|
//#define MODERN_STL_STREAMS
|
||||||
#ifdef MODERN_STL_STREAMS
|
#ifdef MODERN_STL_STREAMS
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#endif
|
#endif
|
||||||
|
@ -100,7 +100,7 @@ string QuoteName(string const & name)
|
|||||||
#endif
|
#endif
|
||||||
string qname = name;
|
string qname = name;
|
||||||
while (qname.find("'") != string::npos)
|
while (qname.find("'") != string::npos)
|
||||||
LSubstring(qname,"'") = "\\'";
|
LSubstring(qname, "'") = "\\'";
|
||||||
return '\'' + qname + '\'';
|
return '\'' + qname + '\'';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,9 +121,9 @@ string TmpFileName(string const & dir, string const & mask)
|
|||||||
// a short string...
|
// a short string...
|
||||||
string ret;
|
string ret;
|
||||||
FileInfo fnfo;
|
FileInfo fnfo;
|
||||||
for (int a= 'a'; a<= 'z'; ++a)
|
for (int a = 'a'; a <= 'z'; ++a)
|
||||||
for (int b= 'a'; b<= 'z'; ++b)
|
for (int b = 'a'; b <= 'z'; ++b)
|
||||||
for (int c= 'a'; c<= 'z'; ++c) {
|
for (int c = 'a'; c <= 'z'; ++c) {
|
||||||
// if this is not enough I have no idea what
|
// if this is not enough I have no idea what
|
||||||
// to do.
|
// to do.
|
||||||
ret = tmpfl + char(a) + char(b) + char(c);
|
ret = tmpfl + char(a) + char(b) + char(c);
|
||||||
@ -190,7 +190,7 @@ int IsDirWriteable (string const & path)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (remove (tmpfl.c_str())) {
|
if (remove(tmpfl.c_str())) {
|
||||||
WriteFSAlert(_("LyX Internal Error!"),
|
WriteFSAlert(_("LyX Internal Error!"),
|
||||||
_("Created test file but cannot remove it?"));
|
_("Created test file but cannot remove it?"));
|
||||||
return -1;
|
return -1;
|
||||||
@ -271,8 +271,8 @@ string FileSearch(string const & path, string const & name,
|
|||||||
string LibFileSearch(string const & dir, string const & name,
|
string LibFileSearch(string const & dir, string const & name,
|
||||||
string const & ext)
|
string const & ext)
|
||||||
{
|
{
|
||||||
string fullname = FileSearch(AddPath(user_lyxdir, dir), name,
|
string fullname = FileSearch(AddPath(user_lyxdir, dir),
|
||||||
ext);
|
name, ext);
|
||||||
if (!fullname.empty())
|
if (!fullname.empty())
|
||||||
return fullname;
|
return fullname;
|
||||||
|
|
||||||
@ -330,17 +330,16 @@ bool PutEnv(string const & envstr)
|
|||||||
#warning Look at and fix this.
|
#warning Look at and fix this.
|
||||||
#endif
|
#endif
|
||||||
// f.ex. what about error checking?
|
// f.ex. what about error checking?
|
||||||
int retval = 0;
|
|
||||||
#if HAVE_PUTENV
|
#if HAVE_PUTENV
|
||||||
// this leaks, but what can we do about it?
|
// this leaks, but what can we do about it?
|
||||||
// Is doing a getenv() and a free() of the older value
|
// Is doing a getenv() and a free() of the older value
|
||||||
// a good idea? (JMarc)
|
// a good idea? (JMarc)
|
||||||
retval = putenv((new string(envstr))->c_str());
|
int retval = putenv((new string(envstr))->c_str());
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_SETENV
|
#ifdef HAVE_SETENV
|
||||||
string varname;
|
string varname;
|
||||||
string str = envstr.split(varname,'=');
|
string str = envstr.split(varname,'=');
|
||||||
retval = setenv(varname.c_str(), str.c_str(), true);
|
int retval = setenv(varname.c_str(), str.c_str(), true);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
return retval == 0;
|
return retval == 0;
|
||||||
@ -356,12 +355,12 @@ bool PutEnvPath(string const & envstr)
|
|||||||
static
|
static
|
||||||
int DeleteAllFilesInDir (string const & path)
|
int DeleteAllFilesInDir (string const & path)
|
||||||
{
|
{
|
||||||
struct dirent * de;
|
|
||||||
DIR * dir = opendir(path.c_str());
|
DIR * dir = opendir(path.c_str());
|
||||||
if (!dir) {
|
if (!dir) {
|
||||||
WriteFSAlert (_("Error! Cannot open directory:"), path);
|
WriteFSAlert (_("Error! Cannot open directory:"), path);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
struct dirent * de;
|
||||||
while ((de = readdir(dir))) {
|
while ((de = readdir(dir))) {
|
||||||
string temp = de->d_name;
|
string temp = de->d_name;
|
||||||
if (temp == "." || temp == "..")
|
if (temp == "." || temp == "..")
|
||||||
@ -370,11 +369,11 @@ int DeleteAllFilesInDir (string const & path)
|
|||||||
|
|
||||||
lyxerr.debug() << "Deleting file: " << unlinkpath << endl;
|
lyxerr.debug() << "Deleting file: " << unlinkpath << endl;
|
||||||
|
|
||||||
if (remove (unlinkpath.c_str()))
|
if (remove(unlinkpath.c_str()))
|
||||||
WriteFSAlert (_("Error! Could not remove file:"),
|
WriteFSAlert (_("Error! Could not remove file:"),
|
||||||
unlinkpath);
|
unlinkpath);
|
||||||
}
|
}
|
||||||
closedir (dir);
|
closedir(dir);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -411,26 +410,24 @@ int DestroyTmpDir (string const & tmpdir, bool Allfiles)
|
|||||||
|
|
||||||
string CreateBufferTmpDir (string const & pathfor)
|
string CreateBufferTmpDir (string const & pathfor)
|
||||||
{
|
{
|
||||||
return CreateTmpDir (pathfor, "lyx_bufrtmp");
|
return CreateTmpDir(pathfor, "lyx_bufrtmp");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int DestroyBufferTmpDir (string const & tmpdir)
|
int DestroyBufferTmpDir (string const & tmpdir)
|
||||||
{
|
{
|
||||||
return DestroyTmpDir (tmpdir, true);
|
return DestroyTmpDir(tmpdir, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
string CreateLyXTmpDir (string const & deflt)
|
string CreateLyXTmpDir (string const & deflt)
|
||||||
{
|
{
|
||||||
string t;
|
|
||||||
|
|
||||||
if ((!deflt.empty()) && (deflt != "/tmp")) {
|
if ((!deflt.empty()) && (deflt != "/tmp")) {
|
||||||
if (mkdir (deflt.c_str(), 0777)) {
|
if (mkdir(deflt.c_str(), 0777)) {
|
||||||
#ifdef __EMX__
|
#ifdef __EMX__
|
||||||
Path p(user_lyxdir);
|
Path p(user_lyxdir);
|
||||||
#endif
|
#endif
|
||||||
t = CreateTmpDir (deflt.c_str(), "lyx_tmp");
|
string t = CreateTmpDir (deflt.c_str(), "lyx_tmp");
|
||||||
return t;
|
return t;
|
||||||
} else
|
} else
|
||||||
return deflt;
|
return deflt;
|
||||||
@ -438,7 +435,7 @@ string CreateLyXTmpDir (string const & deflt)
|
|||||||
#ifdef __EMX__
|
#ifdef __EMX__
|
||||||
Path p(user_lyxdir);
|
Path p(user_lyxdir);
|
||||||
#endif
|
#endif
|
||||||
t = CreateTmpDir ("/tmp", "lyx_tmp");
|
string t = CreateTmpDir ("/tmp", "lyx_tmp");
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -475,7 +472,6 @@ string GetCWD ()
|
|||||||
int n = 256; // Assume path is less than 256 chars
|
int n = 256; // Assume path is less than 256 chars
|
||||||
char * err;
|
char * err;
|
||||||
char * tbuf = new char[n];
|
char * tbuf = new char[n];
|
||||||
string result;
|
|
||||||
|
|
||||||
// Safe. Hopefully all getcwds behave this way!
|
// Safe. Hopefully all getcwds behave this way!
|
||||||
while (((err = lyx::getcwd (tbuf, n)) == 0) && (errno == ERANGE)) {
|
while (((err = lyx::getcwd (tbuf, n)) == 0) && (errno == ERANGE)) {
|
||||||
@ -485,6 +481,7 @@ string GetCWD ()
|
|||||||
tbuf = new char[n];
|
tbuf = new char[n];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string result;
|
||||||
if (err) result = tbuf;
|
if (err) result = tbuf;
|
||||||
delete[] tbuf;
|
delete[] tbuf;
|
||||||
return result;
|
return result;
|
||||||
@ -553,7 +550,7 @@ string MakeAbsPath(string const & RelPath, string const & BasePath)
|
|||||||
if (Temp == ".") continue;
|
if (Temp == ".") continue;
|
||||||
if (Temp == "..") {
|
if (Temp == "..") {
|
||||||
// Remove one level of TempBase
|
// Remove one level of TempBase
|
||||||
int i = TempBase.length()-2;
|
int i = TempBase.length() - 2;
|
||||||
#ifndef __EMX__
|
#ifndef __EMX__
|
||||||
if (i < 0) i = 0;
|
if (i < 0) i = 0;
|
||||||
while (i > 0 && TempBase[i] != '/') --i;
|
while (i > 0 && TempBase[i] != '/') --i;
|
||||||
@ -675,11 +672,11 @@ string NormalizePath(string const & path)
|
|||||||
TempBase = "./";
|
TempBase = "./";
|
||||||
} else if (Temp == "..") {
|
} else if (Temp == "..") {
|
||||||
// Remove one level of TempBase
|
// Remove one level of TempBase
|
||||||
int i = TempBase.length()-2;
|
int i = TempBase.length() - 2;
|
||||||
while (i>0 && TempBase[i] != '/')
|
while (i > 0 && TempBase[i] != '/')
|
||||||
--i;
|
--i;
|
||||||
if (i>= 0 && TempBase[i] == '/')
|
if (i >= 0 && TempBase[i] == '/')
|
||||||
TempBase.erase(i+1, string::npos);
|
TempBase.erase(i + 1, string::npos);
|
||||||
else
|
else
|
||||||
TempBase = "../";
|
TempBase = "../";
|
||||||
} else {
|
} else {
|
||||||
@ -764,7 +761,7 @@ string ReplaceEnvironmentPath(string const & path)
|
|||||||
|
|
||||||
// Check for variable names
|
// Check for variable names
|
||||||
// Situation ${} is detected as "No Environmentvariable"
|
// Situation ${} is detected as "No Environmentvariable"
|
||||||
char const * cp1 = res1_contents+1;
|
char const * cp1 = res1_contents + 1;
|
||||||
bool result = isalpha(*cp1) || (*cp1 == UnderscoreChar);
|
bool result = isalpha(*cp1) || (*cp1 == UnderscoreChar);
|
||||||
++cp1;
|
++cp1;
|
||||||
while (*cp1 && result) {
|
while (*cp1 && result) {
|
||||||
@ -844,7 +841,7 @@ string MakeRelPath(string const & abspath0, string const & basepath0)
|
|||||||
|
|
||||||
// Append relative stuff from common directory to abspath
|
// Append relative stuff from common directory to abspath
|
||||||
if (abspath[i] == '/') ++i;
|
if (abspath[i] == '/') ++i;
|
||||||
for (; i<abslen; ++i)
|
for (; i < abslen; ++i)
|
||||||
buf += abspath[i];
|
buf += abspath[i];
|
||||||
// Remove trailing /
|
// Remove trailing /
|
||||||
if (suffixIs(buf, '/'))
|
if (suffixIs(buf, '/'))
|
||||||
@ -865,7 +862,6 @@ string AddPath(string const & path, string const & path_2)
|
|||||||
if (!path.empty() && path != "." && path != "./") {
|
if (!path.empty() && path != "." && path != "./") {
|
||||||
buf = CleanupPath(path);
|
buf = CleanupPath(path);
|
||||||
if (path[path.length() - 1] != '/')
|
if (path[path.length() - 1] != '/')
|
||||||
|
|
||||||
buf += '/';
|
buf += '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -913,7 +909,6 @@ string ChangeExtension(string const & oldname, string const & extension,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Creates a nice compact path for displaying
|
// Creates a nice compact path for displaying
|
||||||
string MakeDisplayPath (string const & path, unsigned int threshold)
|
string MakeDisplayPath (string const & path, unsigned int threshold)
|
||||||
{
|
{
|
||||||
@ -968,8 +963,7 @@ bool LyXReadLink(string const & File, string & Link)
|
|||||||
{
|
{
|
||||||
char LinkBuffer[512];
|
char LinkBuffer[512];
|
||||||
// Should be PATH_MAX but that needs autconf support
|
// Should be PATH_MAX but that needs autconf support
|
||||||
int nRead;
|
int nRead = readlink(File.c_str(), LinkBuffer, sizeof(LinkBuffer)-1);
|
||||||
nRead = readlink(File.c_str(), LinkBuffer, sizeof(LinkBuffer)-1);
|
|
||||||
if (nRead <= 0)
|
if (nRead <= 0)
|
||||||
return false;
|
return false;
|
||||||
LinkBuffer[nRead] = 0;
|
LinkBuffer[nRead] = 0;
|
||||||
|
@ -62,13 +62,8 @@ using std::min;
|
|||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
// The internal string representation
|
// The internal string representation
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
#define NEW_ALLOC 1
|
|
||||||
|
|
||||||
struct lyxstring::Srep {
|
struct lyxstring::Srep {
|
||||||
#ifndef NEW_ALLOC
|
|
||||||
///
|
|
||||||
static size_t const xtra = static_cast<size_t>(8);
|
|
||||||
#endif
|
|
||||||
/// size
|
/// size
|
||||||
size_t sz;
|
size_t sz;
|
||||||
/// Reference count
|
/// Reference count
|
||||||
@ -116,17 +111,14 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::Srep::Srep(lyxstring::size_type nsz, const value_type * p)
|
lyxstring::Srep::Srep(lyxstring::size_type nsz, const value_type * p)
|
||||||
{
|
{
|
||||||
// can be called with p == 0 by lyxstring::assign(const value_type *, size_type)
|
// can be called with p == 0 by lyxstring::assign(const value_type *, size_type)
|
||||||
|
|
||||||
sz = nsz;
|
sz = nsz;
|
||||||
ref = 1;
|
ref = 1;
|
||||||
#ifdef NEW_ALLOC
|
|
||||||
res = sz ? sz : 1;
|
res = sz ? sz : 1;
|
||||||
#else
|
|
||||||
res = sz + xtra;
|
|
||||||
#endif
|
|
||||||
s = new value_type[res + 1]; // add space for terminator
|
s = new value_type[res + 1]; // add space for terminator
|
||||||
if (p && sz) {
|
if (p && sz) {
|
||||||
// if sz = 0 nothing gets copied and we have an error
|
// if sz = 0 nothing gets copied and we have an error
|
||||||
@ -139,15 +131,12 @@ lyxstring::Srep::Srep(lyxstring::size_type nsz, const value_type * p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::Srep::Srep(lyxstring::size_type nsz, value_type ch)
|
lyxstring::Srep::Srep(lyxstring::size_type nsz, value_type ch)
|
||||||
{
|
{
|
||||||
sz = nsz;
|
sz = nsz;
|
||||||
ref = 1;
|
ref = 1;
|
||||||
#ifdef NEW_ALLOC
|
|
||||||
res = sz ? sz : 1;
|
res = sz ? sz : 1;
|
||||||
#else
|
|
||||||
res = sz + xtra;
|
|
||||||
#endif
|
|
||||||
s = new value_type[res + 1]; // add space for terminator
|
s = new value_type[res + 1]; // add space for terminator
|
||||||
memset(s, ch, sz);
|
memset(s, ch, sz);
|
||||||
if (!ch) {
|
if (!ch) {
|
||||||
@ -158,6 +147,7 @@ lyxstring::Srep::Srep(lyxstring::size_type nsz, value_type ch)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
void lyxstring::Srep::assign(lyxstring::size_type nsz, const value_type * p)
|
void lyxstring::Srep::assign(lyxstring::size_type nsz, const value_type * p)
|
||||||
{
|
{
|
||||||
// can be called with p == 0 by lyxstring::assign(const value_type *, size_type)
|
// can be called with p == 0 by lyxstring::assign(const value_type *, size_type)
|
||||||
@ -165,11 +155,7 @@ void lyxstring::Srep::assign(lyxstring::size_type nsz, const value_type * p)
|
|||||||
if (res < nsz) {
|
if (res < nsz) {
|
||||||
delete[] s;
|
delete[] s;
|
||||||
sz = nsz;
|
sz = nsz;
|
||||||
#ifdef NEW_ALLOC
|
|
||||||
res = sz ? sz : 1;
|
res = sz ? sz : 1;
|
||||||
#else
|
|
||||||
res = sz + xtra;
|
|
||||||
#endif
|
|
||||||
s = new value_type[res + 1]; // add space for terminator
|
s = new value_type[res + 1]; // add space for terminator
|
||||||
} else {
|
} else {
|
||||||
sz = nsz;
|
sz = nsz;
|
||||||
@ -185,16 +171,13 @@ void lyxstring::Srep::assign(lyxstring::size_type nsz, const value_type * p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
void lyxstring::Srep::assign(lyxstring::size_type nsz, value_type ch)
|
void lyxstring::Srep::assign(lyxstring::size_type nsz, value_type ch)
|
||||||
{
|
{
|
||||||
sz = nsz;
|
sz = nsz;
|
||||||
if (res < nsz) {
|
if (res < nsz) {
|
||||||
delete[] s;
|
delete[] s;
|
||||||
#ifdef NEW_ALLOC
|
|
||||||
res = sz ? sz : 1;
|
res = sz ? sz : 1;
|
||||||
#else
|
|
||||||
res = sz + xtra;
|
|
||||||
#endif
|
|
||||||
s = new value_type[res + 1]; // add space for terminator
|
s = new value_type[res + 1]; // add space for terminator
|
||||||
}
|
}
|
||||||
memset(s, ch, sz);
|
memset(s, ch, sz);
|
||||||
@ -206,17 +189,14 @@ void lyxstring::Srep::assign(lyxstring::size_type nsz, value_type ch)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
void lyxstring::Srep::append(lyxstring::size_type asz, const value_type * p)
|
void lyxstring::Srep::append(lyxstring::size_type asz, const value_type * p)
|
||||||
{
|
{
|
||||||
register unsigned int const len = sz + asz;
|
register unsigned int const len = sz + asz;
|
||||||
if (res < len) {
|
if (res < len) {
|
||||||
#ifdef NEW_ALLOC
|
|
||||||
do {
|
do {
|
||||||
res *= 2;
|
res *= 2;
|
||||||
} while (res < len);
|
} while (res < len);
|
||||||
#else
|
|
||||||
res = len + xtra;
|
|
||||||
#endif
|
|
||||||
value_type * tmp = new value_type[res + 1];
|
value_type * tmp = new value_type[res + 1];
|
||||||
memcpy(tmp, s, sz);
|
memcpy(tmp, s, sz);
|
||||||
memcpy(tmp + sz, p, asz);
|
memcpy(tmp + sz, p, asz);
|
||||||
@ -230,18 +210,15 @@ void lyxstring::Srep::append(lyxstring::size_type asz, const value_type * p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
void lyxstring::Srep::push_back(value_type c)
|
void lyxstring::Srep::push_back(value_type c)
|
||||||
{
|
{
|
||||||
s[sz] = c; // it is always room to put a value_type at the end
|
s[sz] = c; // it is always room to put a value_type at the end
|
||||||
++sz;
|
++sz;
|
||||||
if (res < sz) {
|
if (res < sz) {
|
||||||
#ifdef NEW_ALLOC
|
|
||||||
do {
|
do {
|
||||||
res *= 2;
|
res *= 2;
|
||||||
} while (res < sz);
|
} while (res < sz);
|
||||||
#else
|
|
||||||
res = sz + xtra;
|
|
||||||
#endif
|
|
||||||
value_type * tmp = new value_type[res + 1];
|
value_type * tmp = new value_type[res + 1];
|
||||||
memcpy(tmp, s, sz);
|
memcpy(tmp, s, sz);
|
||||||
delete[] s;
|
delete[] s;
|
||||||
@ -250,32 +227,30 @@ void lyxstring::Srep::push_back(value_type c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
void lyxstring::Srep::insert(lyxstring::size_type pos, const value_type * p,
|
void lyxstring::Srep::insert(lyxstring::size_type pos, const value_type * p,
|
||||||
lyxstring::size_type n)
|
lyxstring::size_type n)
|
||||||
{
|
{
|
||||||
if (res < n + sz) {
|
if (res < n + sz) {
|
||||||
#ifdef NEW_ALLOC
|
|
||||||
do {
|
do {
|
||||||
res *= 2;
|
res *= 2;
|
||||||
} while (res < n + sz);
|
} while (res < n + sz);
|
||||||
#else
|
|
||||||
res = sz + n + xtra;
|
|
||||||
#endif
|
|
||||||
value_type * tmp = new value_type[res + 1];
|
value_type * tmp = new value_type[res + 1];
|
||||||
memcpy(tmp, s, pos);
|
memcpy(tmp, s, pos);
|
||||||
memcpy(tmp + pos, p, n);
|
memcpy(tmp + pos, p, n);
|
||||||
memcpy(tmp + pos + n, & s[pos], sz - pos);
|
memcpy(tmp + pos + n, &s[pos], sz - pos);
|
||||||
sz += n;
|
sz += n;
|
||||||
delete[] s;
|
delete[] s;
|
||||||
s = tmp;
|
s = tmp;
|
||||||
} else {
|
} else {
|
||||||
memmove(s + pos + n, & s[pos], sz - pos);
|
memmove(s + pos + n, &s[pos], sz - pos);
|
||||||
memcpy(s + pos, p, n);
|
memcpy(s + pos, p, n);
|
||||||
sz += n;
|
sz += n;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
void lyxstring::Srep::resize(size_type n, value_type c)
|
void lyxstring::Srep::resize(size_type n, value_type c)
|
||||||
{
|
{
|
||||||
// This resets sz to res_arg
|
// This resets sz to res_arg
|
||||||
@ -290,6 +265,7 @@ void lyxstring::Srep::resize(size_type n, value_type c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
void lyxstring::Srep::reserve(lyxstring::size_type res_arg)
|
void lyxstring::Srep::reserve(lyxstring::size_type res_arg)
|
||||||
{
|
{
|
||||||
// This keeps the old sz, but
|
// This keeps the old sz, but
|
||||||
@ -302,6 +278,7 @@ void lyxstring::Srep::reserve(lyxstring::size_type res_arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
void lyxstring::Srep::replace(lyxstring::size_type i, lyxstring::size_type n,
|
void lyxstring::Srep::replace(lyxstring::size_type i, lyxstring::size_type n,
|
||||||
value_type const * p, size_type n2)
|
value_type const * p, size_type n2)
|
||||||
{
|
{
|
||||||
@ -313,13 +290,9 @@ void lyxstring::Srep::replace(lyxstring::size_type i, lyxstring::size_type n,
|
|||||||
memcpy(s + i, p, n2);
|
memcpy(s + i, p, n2);
|
||||||
sz += n2;
|
sz += n2;
|
||||||
} else {
|
} else {
|
||||||
#ifdef NEW_ALLOC
|
|
||||||
do {
|
do {
|
||||||
res *= 2;
|
res *= 2;
|
||||||
} while (res < n2 + sz);
|
} while (res < n2 + sz);
|
||||||
#else
|
|
||||||
res = sz + n2 + xtra;
|
|
||||||
#endif
|
|
||||||
value_type * tmp = new value_type[res + 1];
|
value_type * tmp = new value_type[res + 1];
|
||||||
memcpy(tmp, s, i);
|
memcpy(tmp, s, i);
|
||||||
memcpy(tmp + i, p, n2);
|
memcpy(tmp + i, p, n2);
|
||||||
@ -378,18 +351,23 @@ private:
|
|||||||
// NOTE: The easiest way to catch this snippet of the output is to wait for
|
// NOTE: The easiest way to catch this snippet of the output is to wait for
|
||||||
// the splash screen to disappear and then open and close Help->Credits
|
// the splash screen to disappear and then open and close Help->Credits
|
||||||
//
|
//
|
||||||
|
inline
|
||||||
lyxstringInvariant::lyxstringInvariant(lyxstring const * ls) : object(ls)
|
lyxstringInvariant::lyxstringInvariant(lyxstring const * ls) : object(ls)
|
||||||
{
|
{
|
||||||
// printf("lyxstringInvariant constructor\n");
|
// printf("lyxstringInvariant constructor\n");
|
||||||
helper();
|
helper();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstringInvariant::~lyxstringInvariant()
|
lyxstringInvariant::~lyxstringInvariant()
|
||||||
{
|
{
|
||||||
helper();
|
helper();
|
||||||
// printf("lyxstringInvariant destructor completed\n");
|
// printf("lyxstringInvariant destructor completed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
void lyxstringInvariant::helper() const
|
void lyxstringInvariant::helper() const
|
||||||
{
|
{
|
||||||
// Some of these tests might look pointless but they are
|
// Some of these tests might look pointless but they are
|
||||||
@ -421,6 +399,8 @@ void lyxstringInvariant::helper() const
|
|||||||
lyxstring::size_type const lyxstring::npos =
|
lyxstring::size_type const lyxstring::npos =
|
||||||
static_cast<lyxstring::size_type>(-1);
|
static_cast<lyxstring::size_type>(-1);
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::lyxstring()
|
lyxstring::lyxstring()
|
||||||
{
|
{
|
||||||
static Srep empty_rep(0, "");
|
static Srep empty_rep(0, "");
|
||||||
@ -429,6 +409,7 @@ lyxstring::lyxstring()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::lyxstring(lyxstring const & x, size_type pos, size_type n)
|
lyxstring::lyxstring(lyxstring const & x, size_type pos, size_type n)
|
||||||
{
|
{
|
||||||
Assert(pos <= x.rep->sz); // STD!
|
Assert(pos <= x.rep->sz); // STD!
|
||||||
@ -441,6 +422,7 @@ lyxstring::lyxstring(lyxstring const & x, size_type pos, size_type n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::lyxstring(value_type const * s, size_type n)
|
lyxstring::lyxstring(value_type const * s, size_type n)
|
||||||
{
|
{
|
||||||
Assert(s && n < npos); // STD!
|
Assert(s && n < npos); // STD!
|
||||||
@ -454,6 +436,7 @@ lyxstring::lyxstring(value_type const * s, size_type n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::lyxstring(value_type const * s)
|
lyxstring::lyxstring(value_type const * s)
|
||||||
{
|
{
|
||||||
Assert(s); // STD!
|
Assert(s); // STD!
|
||||||
@ -467,6 +450,7 @@ lyxstring::lyxstring(value_type const * s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::lyxstring(size_type n, value_type c)
|
lyxstring::lyxstring(size_type n, value_type c)
|
||||||
{
|
{
|
||||||
Assert(n < npos); // STD!
|
Assert(n < npos); // STD!
|
||||||
@ -474,12 +458,14 @@ lyxstring::lyxstring(size_type n, value_type c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::lyxstring(const_iterator first, const_iterator last)
|
lyxstring::lyxstring(const_iterator first, const_iterator last)
|
||||||
{
|
{
|
||||||
rep = new Srep(last - first, first);
|
rep = new Srep(last - first, first);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::~lyxstring()
|
lyxstring::~lyxstring()
|
||||||
{
|
{
|
||||||
if (--rep->ref == 0) delete rep;
|
if (--rep->ref == 0) delete rep;
|
||||||
@ -489,48 +475,56 @@ lyxstring::~lyxstring()
|
|||||||
// Iterators
|
// Iterators
|
||||||
///////////////////////
|
///////////////////////
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::iterator lyxstring::begin()
|
lyxstring::iterator lyxstring::begin()
|
||||||
{
|
{
|
||||||
return rep->s;
|
return rep->s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::const_iterator lyxstring::begin() const
|
lyxstring::const_iterator lyxstring::begin() const
|
||||||
{
|
{
|
||||||
return rep->s;
|
return rep->s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::iterator lyxstring::end()
|
lyxstring::iterator lyxstring::end()
|
||||||
{
|
{
|
||||||
return rep->s + rep->sz;
|
return rep->s + rep->sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::const_iterator lyxstring::end() const
|
lyxstring::const_iterator lyxstring::end() const
|
||||||
{
|
{
|
||||||
return rep->s + rep->sz;
|
return rep->s + rep->sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
inline
|
||||||
reverse_iterator lyxstring::rbegin()
|
reverse_iterator lyxstring::rbegin()
|
||||||
{
|
{
|
||||||
return reverse_iterator( end() );
|
return reverse_iterator( end() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
const_reverse_iterator lyxstring::rbegin() const
|
const_reverse_iterator lyxstring::rbegin() const
|
||||||
{
|
{
|
||||||
return const_reverse_iterator( end() );
|
return const_reverse_iterator( end() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
reverse_iterator lyxstring::rend()
|
reverse_iterator lyxstring::rend()
|
||||||
{
|
{
|
||||||
return reverse_iterator( begin() );
|
return reverse_iterator( begin() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
const_reverse_iterator lyxstring::rend() const
|
const_reverse_iterator lyxstring::rend() const
|
||||||
{
|
{
|
||||||
return const_reverse_iterator( begin() );
|
return const_reverse_iterator( begin() );
|
||||||
@ -542,12 +536,14 @@ const_reverse_iterator lyxstring::rend() const
|
|||||||
// Size and Capacity
|
// Size and Capacity
|
||||||
///////////////////////
|
///////////////////////
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::size() const
|
lyxstring::size_type lyxstring::size() const
|
||||||
{
|
{
|
||||||
return rep->sz;
|
return rep->sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
void lyxstring::resize(size_type n, value_type c)
|
void lyxstring::resize(size_type n, value_type c)
|
||||||
{
|
{
|
||||||
Assert(n <= npos); // STD!
|
Assert(n <= npos); // STD!
|
||||||
@ -559,12 +555,14 @@ void lyxstring::resize(size_type n, value_type c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::capacity() const
|
lyxstring::size_type lyxstring::capacity() const
|
||||||
{
|
{
|
||||||
return rep->res;
|
return rep->res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
void lyxstring::reserve(size_type res_arg)
|
void lyxstring::reserve(size_type res_arg)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -578,6 +576,7 @@ void lyxstring::reserve(size_type res_arg)
|
|||||||
// Assignment
|
// Assignment
|
||||||
////////////////
|
////////////////
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::operator= (lyxstring const & x)
|
lyxstring & lyxstring::operator= (lyxstring const & x)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -586,6 +585,7 @@ lyxstring & lyxstring::operator= (lyxstring const & x)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::operator= (value_type const * s)
|
lyxstring & lyxstring::operator= (value_type const * s)
|
||||||
{
|
{
|
||||||
Assert(s); // OURS!
|
Assert(s); // OURS!
|
||||||
@ -596,6 +596,7 @@ lyxstring & lyxstring::operator= (value_type const * s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::operator=(value_type c)
|
lyxstring & lyxstring::operator=(value_type c)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -612,6 +613,7 @@ lyxstring & lyxstring::operator=(value_type c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::assign(lyxstring const & x)
|
lyxstring & lyxstring::assign(lyxstring const & x)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -623,6 +625,7 @@ lyxstring & lyxstring::assign(lyxstring const & x)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::assign(lyxstring const & x, size_type pos, size_type n)
|
lyxstring & lyxstring::assign(lyxstring const & x, size_type pos, size_type n)
|
||||||
{
|
{
|
||||||
Assert(pos <= x.rep->sz); // STD!
|
Assert(pos <= x.rep->sz); // STD!
|
||||||
@ -632,6 +635,7 @@ lyxstring & lyxstring::assign(lyxstring const & x, size_type pos, size_type n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::assign(value_type const * s, size_type n)
|
lyxstring & lyxstring::assign(value_type const * s, size_type n)
|
||||||
{
|
{
|
||||||
Assert(s); // OURS!
|
Assert(s); // OURS!
|
||||||
@ -648,6 +652,7 @@ lyxstring & lyxstring::assign(value_type const * s, size_type n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::assign(value_type const * s)
|
lyxstring & lyxstring::assign(value_type const * s)
|
||||||
{
|
{
|
||||||
Assert(s); // OURS!
|
Assert(s); // OURS!
|
||||||
@ -657,6 +662,7 @@ lyxstring & lyxstring::assign(value_type const * s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::assign(size_type n, value_type ch)
|
lyxstring & lyxstring::assign(size_type n, value_type ch)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -667,6 +673,7 @@ lyxstring & lyxstring::assign(size_type n, value_type ch)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::assign(const_iterator first, const_iterator last)
|
lyxstring & lyxstring::assign(const_iterator first, const_iterator last)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -681,6 +688,7 @@ lyxstring & lyxstring::assign(const_iterator first, const_iterator last)
|
|||||||
// Element Access
|
// Element Access
|
||||||
////////////////////
|
////////////////////
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::const_reference lyxstring::operator[](size_type pos) const
|
lyxstring::const_reference lyxstring::operator[](size_type pos) const
|
||||||
{
|
{
|
||||||
Assert(pos <= rep->sz); // OURS!
|
Assert(pos <= rep->sz); // OURS!
|
||||||
@ -689,6 +697,7 @@ lyxstring::const_reference lyxstring::operator[](size_type pos) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::reference lyxstring::operator[](size_type pos)
|
lyxstring::reference lyxstring::operator[](size_type pos)
|
||||||
{
|
{
|
||||||
Assert(pos < rep->sz); // OURS!
|
Assert(pos < rep->sz); // OURS!
|
||||||
@ -699,6 +708,7 @@ lyxstring::reference lyxstring::operator[](size_type pos)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::const_reference lyxstring::at(size_type n) const
|
lyxstring::const_reference lyxstring::at(size_type n) const
|
||||||
{
|
{
|
||||||
Assert(n < rep->sz); // STD!
|
Assert(n < rep->sz); // STD!
|
||||||
@ -706,6 +716,7 @@ lyxstring::const_reference lyxstring::at(size_type n) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::reference lyxstring::at(size_type n)
|
lyxstring::reference lyxstring::at(size_type n)
|
||||||
{
|
{
|
||||||
Assert(n < rep->sz); // STD!
|
Assert(n < rep->sz); // STD!
|
||||||
@ -720,6 +731,7 @@ lyxstring::reference lyxstring::at(size_type n)
|
|||||||
// Insert
|
// Insert
|
||||||
/////////////
|
/////////////
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::operator+=(lyxstring const & x)
|
lyxstring & lyxstring::operator+=(lyxstring const & x)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -728,6 +740,7 @@ lyxstring & lyxstring::operator+=(lyxstring const & x)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::operator+=(value_type const * x)
|
lyxstring & lyxstring::operator+=(value_type const * x)
|
||||||
{
|
{
|
||||||
Assert(x); // OURS!
|
Assert(x); // OURS!
|
||||||
@ -737,6 +750,7 @@ lyxstring & lyxstring::operator+=(value_type const * x)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::operator+=(value_type c)
|
lyxstring & lyxstring::operator+=(value_type c)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -746,6 +760,7 @@ lyxstring & lyxstring::operator+=(value_type c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
void lyxstring::push_back(value_type c)
|
void lyxstring::push_back(value_type c)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -755,6 +770,7 @@ void lyxstring::push_back(value_type c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::append(lyxstring const & x)
|
lyxstring & lyxstring::append(lyxstring const & x)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -766,6 +782,7 @@ lyxstring & lyxstring::append(lyxstring const & x)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::append(lyxstring const & x, size_type pos, size_type n)
|
lyxstring & lyxstring::append(lyxstring const & x, size_type pos, size_type n)
|
||||||
{
|
{
|
||||||
Assert(pos <= x.rep->sz); // STD!
|
Assert(pos <= x.rep->sz); // STD!
|
||||||
@ -775,6 +792,7 @@ lyxstring & lyxstring::append(lyxstring const & x, size_type pos, size_type n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::append(value_type const * p, size_type n)
|
lyxstring & lyxstring::append(value_type const * p, size_type n)
|
||||||
{
|
{
|
||||||
Assert(p); // OURS!
|
Assert(p); // OURS!
|
||||||
@ -787,6 +805,7 @@ lyxstring & lyxstring::append(value_type const * p, size_type n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::append(value_type const * p)
|
lyxstring & lyxstring::append(value_type const * p)
|
||||||
{
|
{
|
||||||
Assert(p); // OURS!
|
Assert(p); // OURS!
|
||||||
@ -799,6 +818,7 @@ lyxstring & lyxstring::append(value_type const * p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::append(size_type n, value_type c)
|
lyxstring & lyxstring::append(size_type n, value_type c)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -812,6 +832,7 @@ lyxstring & lyxstring::append(size_type n, value_type c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::append(iterator first, iterator last)
|
lyxstring & lyxstring::append(iterator first, iterator last)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -823,6 +844,7 @@ lyxstring & lyxstring::append(iterator first, iterator last)
|
|||||||
|
|
||||||
// insert value_typeacters before (*this)[pos]
|
// insert value_typeacters before (*this)[pos]
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::insert(size_type pos, lyxstring const & x)
|
lyxstring & lyxstring::insert(size_type pos, lyxstring const & x)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -831,6 +853,7 @@ lyxstring & lyxstring::insert(size_type pos, lyxstring const & x)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::insert(size_type pos, lyxstring const & x,
|
lyxstring & lyxstring::insert(size_type pos, lyxstring const & x,
|
||||||
size_type pos2, size_type n)
|
size_type pos2, size_type n)
|
||||||
{
|
{
|
||||||
@ -843,6 +866,7 @@ lyxstring & lyxstring::insert(size_type pos, lyxstring const & x,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::insert(size_type pos, value_type const * p, size_type n)
|
lyxstring & lyxstring::insert(size_type pos, value_type const * p, size_type n)
|
||||||
{
|
{
|
||||||
Assert(p); // OURS!
|
Assert(p); // OURS!
|
||||||
@ -857,6 +881,7 @@ lyxstring & lyxstring::insert(size_type pos, value_type const * p, size_type n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::insert(size_type pos, value_type const * p)
|
lyxstring & lyxstring::insert(size_type pos, value_type const * p)
|
||||||
{
|
{
|
||||||
Assert(p); // OURS!
|
Assert(p); // OURS!
|
||||||
@ -871,6 +896,7 @@ lyxstring & lyxstring::insert(size_type pos, value_type const * p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::insert(size_type pos, size_type n, value_type c)
|
lyxstring & lyxstring::insert(size_type pos, size_type n, value_type c)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -884,6 +910,7 @@ lyxstring & lyxstring::insert(size_type pos, size_type n, value_type c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::iterator lyxstring::insert(iterator p, value_type c)
|
lyxstring::iterator lyxstring::insert(iterator p, value_type c)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -895,6 +922,7 @@ lyxstring::iterator lyxstring::insert(iterator p, value_type c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
void lyxstring::insert(iterator p, size_type n , value_type c)
|
void lyxstring::insert(iterator p, size_type n , value_type c)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -903,6 +931,7 @@ void lyxstring::insert(iterator p, size_type n , value_type c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
void lyxstring::insert(iterator p, iterator first, iterator last)
|
void lyxstring::insert(iterator p, iterator first, iterator last)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -920,6 +949,7 @@ void lyxstring::insert(iterator p, iterator first, iterator last)
|
|||||||
// some of the parameters wrong, also some of the funcs can surely
|
// some of the parameters wrong, also some of the funcs can surely
|
||||||
// be written more effectively.
|
// be written more effectively.
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find(lyxstring const & a, size_type i) const
|
lyxstring::size_type lyxstring::find(lyxstring const & a, size_type i) const
|
||||||
{
|
{
|
||||||
if (!rep->sz || i >= rep->sz) return npos;
|
if (!rep->sz || i >= rep->sz) return npos;
|
||||||
@ -944,6 +974,7 @@ lyxstring::size_type lyxstring::find(lyxstring const & a, size_type i) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find(value_type const * ptr, size_type i,
|
lyxstring::size_type lyxstring::find(value_type const * ptr, size_type i,
|
||||||
size_type n) const
|
size_type n) const
|
||||||
{
|
{
|
||||||
@ -975,6 +1006,7 @@ lyxstring::size_type lyxstring::find(value_type const * ptr, size_type i,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find(value_type const * s, size_type i) const
|
lyxstring::size_type lyxstring::find(value_type const * s, size_type i) const
|
||||||
{
|
{
|
||||||
Assert(s); // OURS!
|
Assert(s); // OURS!
|
||||||
@ -987,6 +1019,7 @@ lyxstring::size_type lyxstring::find(value_type const * s, size_type i) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find(value_type c, size_type i) const
|
lyxstring::size_type lyxstring::find(value_type c, size_type i) const
|
||||||
{
|
{
|
||||||
if (!rep->sz || i >= rep->sz) return npos;
|
if (!rep->sz || i >= rep->sz) return npos;
|
||||||
@ -1000,6 +1033,7 @@ lyxstring::size_type lyxstring::find(value_type c, size_type i) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::rfind(lyxstring const & a, size_type i) const
|
lyxstring::size_type lyxstring::rfind(lyxstring const & a, size_type i) const
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -1019,6 +1053,7 @@ lyxstring::size_type lyxstring::rfind(lyxstring const & a, size_type i) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::rfind(value_type const * ptr, size_type i,
|
lyxstring::size_type lyxstring::rfind(value_type const * ptr, size_type i,
|
||||||
size_type n) const
|
size_type n) const
|
||||||
{
|
{
|
||||||
@ -1041,6 +1076,7 @@ lyxstring::size_type lyxstring::rfind(value_type const * ptr, size_type i,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::rfind(value_type const * ptr,
|
lyxstring::size_type lyxstring::rfind(value_type const * ptr,
|
||||||
size_type i) const
|
size_type i) const
|
||||||
{
|
{
|
||||||
@ -1063,6 +1099,7 @@ lyxstring::size_type lyxstring::rfind(value_type const * ptr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::rfind(value_type c, size_type i) const
|
lyxstring::size_type lyxstring::rfind(value_type c, size_type i) const
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -1075,6 +1112,7 @@ lyxstring::size_type lyxstring::rfind(value_type c, size_type i) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find_first_of(lyxstring const & a,
|
lyxstring::size_type lyxstring::find_first_of(lyxstring const & a,
|
||||||
size_type i) const
|
size_type i) const
|
||||||
{
|
{
|
||||||
@ -1088,7 +1126,9 @@ lyxstring::size_type lyxstring::find_first_of(lyxstring const & a,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
lyxstring::size_type lyxstring::find_first_of(value_type const * ptr, size_type i,
|
inline
|
||||||
|
lyxstring::size_type lyxstring::find_first_of(value_type const * ptr,
|
||||||
|
size_type i,
|
||||||
size_type n) const
|
size_type n) const
|
||||||
{
|
{
|
||||||
Assert(ptr && i < rep->sz); // OURS!
|
Assert(ptr && i < rep->sz); // OURS!
|
||||||
@ -1102,6 +1142,7 @@ lyxstring::size_type lyxstring::find_first_of(value_type const * ptr, size_type
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find_first_of(value_type const * ptr,
|
lyxstring::size_type lyxstring::find_first_of(value_type const * ptr,
|
||||||
size_type i) const
|
size_type i) const
|
||||||
{
|
{
|
||||||
@ -1115,6 +1156,7 @@ lyxstring::size_type lyxstring::find_first_of(value_type const * ptr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find_first_of(value_type c, size_type i) const
|
lyxstring::size_type lyxstring::find_first_of(value_type c, size_type i) const
|
||||||
{
|
{
|
||||||
Assert(i < rep->sz); // OURS!
|
Assert(i < rep->sz); // OURS!
|
||||||
@ -1127,6 +1169,7 @@ lyxstring::size_type lyxstring::find_first_of(value_type c, size_type i) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find_last_of(lyxstring const & a,
|
lyxstring::size_type lyxstring::find_last_of(lyxstring const & a,
|
||||||
size_type i) const
|
size_type i) const
|
||||||
{
|
{
|
||||||
@ -1139,7 +1182,10 @@ lyxstring::size_type lyxstring::find_last_of(lyxstring const & a,
|
|||||||
return npos;
|
return npos;
|
||||||
}
|
}
|
||||||
|
|
||||||
lyxstring::size_type lyxstring::find_last_of(value_type const * ptr, size_type i,
|
|
||||||
|
inline
|
||||||
|
lyxstring::size_type lyxstring::find_last_of(value_type const * ptr,
|
||||||
|
size_type i,
|
||||||
size_type n) const
|
size_type n) const
|
||||||
{
|
{
|
||||||
Assert(ptr); // OURS!
|
Assert(ptr); // OURS!
|
||||||
@ -1154,6 +1200,7 @@ lyxstring::size_type lyxstring::find_last_of(value_type const * ptr, size_type i
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find_last_of(value_type const * ptr,
|
lyxstring::size_type lyxstring::find_last_of(value_type const * ptr,
|
||||||
size_type i) const
|
size_type i) const
|
||||||
{
|
{
|
||||||
@ -1168,6 +1215,7 @@ lyxstring::size_type lyxstring::find_last_of(value_type const * ptr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find_last_of(value_type c, size_type i) const
|
lyxstring::size_type lyxstring::find_last_of(value_type c, size_type i) const
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -1181,6 +1229,7 @@ lyxstring::size_type lyxstring::find_last_of(value_type c, size_type i) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find_first_not_of(lyxstring const & a,
|
lyxstring::size_type lyxstring::find_first_not_of(lyxstring const & a,
|
||||||
size_type i) const
|
size_type i) const
|
||||||
{
|
{
|
||||||
@ -1195,6 +1244,7 @@ lyxstring::size_type lyxstring::find_first_not_of(lyxstring const & a,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find_first_not_of(value_type const * ptr,
|
lyxstring::size_type lyxstring::find_first_not_of(value_type const * ptr,
|
||||||
size_type i,
|
size_type i,
|
||||||
size_type n) const
|
size_type n) const
|
||||||
@ -1210,6 +1260,7 @@ lyxstring::size_type lyxstring::find_first_not_of(value_type const * ptr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find_first_not_of(value_type const * ptr,
|
lyxstring::size_type lyxstring::find_first_not_of(value_type const * ptr,
|
||||||
size_type i) const
|
size_type i) const
|
||||||
{
|
{
|
||||||
@ -1223,6 +1274,7 @@ lyxstring::size_type lyxstring::find_first_not_of(value_type const * ptr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find_first_not_of(value_type c,
|
lyxstring::size_type lyxstring::find_first_not_of(value_type c,
|
||||||
size_type i) const
|
size_type i) const
|
||||||
{
|
{
|
||||||
@ -1237,6 +1289,7 @@ lyxstring::size_type lyxstring::find_first_not_of(value_type c,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find_last_not_of(lyxstring const & a,
|
lyxstring::size_type lyxstring::find_last_not_of(lyxstring const & a,
|
||||||
size_type i) const
|
size_type i) const
|
||||||
{
|
{
|
||||||
@ -1250,6 +1303,7 @@ lyxstring::size_type lyxstring::find_last_not_of(lyxstring const & a,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find_last_not_of(value_type const * ptr,
|
lyxstring::size_type lyxstring::find_last_not_of(value_type const * ptr,
|
||||||
size_type i,
|
size_type i,
|
||||||
size_type n) const
|
size_type n) const
|
||||||
@ -1267,6 +1321,7 @@ lyxstring::size_type lyxstring::find_last_not_of(value_type const * ptr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find_last_not_of(value_type const * ptr,
|
lyxstring::size_type lyxstring::find_last_not_of(value_type const * ptr,
|
||||||
size_type i) const
|
size_type i) const
|
||||||
{
|
{
|
||||||
@ -1281,6 +1336,7 @@ lyxstring::size_type lyxstring::find_last_not_of(value_type const * ptr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::find_last_not_of(value_type c,
|
lyxstring::size_type lyxstring::find_last_not_of(value_type c,
|
||||||
size_type i) const
|
size_type i) const
|
||||||
{
|
{
|
||||||
@ -1298,6 +1354,7 @@ lyxstring::size_type lyxstring::find_last_not_of(value_type c,
|
|||||||
// Replace
|
// Replace
|
||||||
/////////////////
|
/////////////////
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::replace(size_type i, size_type n, lyxstring const & x)
|
lyxstring & lyxstring::replace(size_type i, size_type n, lyxstring const & x)
|
||||||
{
|
{
|
||||||
Assert(i <= rep->sz); // OURS!
|
Assert(i <= rep->sz); // OURS!
|
||||||
@ -1307,6 +1364,7 @@ lyxstring & lyxstring::replace(size_type i, size_type n, lyxstring const & x)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::replace(size_type i, size_type n, lyxstring const & x,
|
lyxstring & lyxstring::replace(size_type i, size_type n, lyxstring const & x,
|
||||||
size_type i2, size_type n2)
|
size_type i2, size_type n2)
|
||||||
{
|
{
|
||||||
@ -1319,6 +1377,7 @@ lyxstring & lyxstring::replace(size_type i, size_type n, lyxstring const & x,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::replace(size_type i, size_type n,
|
lyxstring & lyxstring::replace(size_type i, size_type n,
|
||||||
value_type const * p, size_type n2)
|
value_type const * p, size_type n2)
|
||||||
{
|
{
|
||||||
@ -1331,6 +1390,7 @@ lyxstring & lyxstring::replace(size_type i, size_type n,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::replace(size_type i, size_type n, value_type const * p)
|
lyxstring & lyxstring::replace(size_type i, size_type n, value_type const * p)
|
||||||
{
|
{
|
||||||
Assert(p && i < rep->sz); // OURS!
|
Assert(p && i < rep->sz); // OURS!
|
||||||
@ -1340,6 +1400,7 @@ lyxstring & lyxstring::replace(size_type i, size_type n, value_type const * p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::replace(size_type i, size_type n,
|
lyxstring & lyxstring::replace(size_type i, size_type n,
|
||||||
size_type n2, value_type c)
|
size_type n2, value_type c)
|
||||||
{
|
{
|
||||||
@ -1355,6 +1416,7 @@ lyxstring & lyxstring::replace(size_type i, size_type n,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::replace(iterator i, iterator i2, const lyxstring & str)
|
lyxstring & lyxstring::replace(iterator i, iterator i2, const lyxstring & str)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -1363,6 +1425,7 @@ lyxstring & lyxstring::replace(iterator i, iterator i2, const lyxstring & str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::replace(iterator i, iterator i2,
|
lyxstring & lyxstring::replace(iterator i, iterator i2,
|
||||||
value_type const * p, size_type n)
|
value_type const * p, size_type n)
|
||||||
{
|
{
|
||||||
@ -1373,6 +1436,7 @@ lyxstring & lyxstring::replace(iterator i, iterator i2,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::replace(iterator i, iterator i2, value_type const * p)
|
lyxstring & lyxstring::replace(iterator i, iterator i2, value_type const * p)
|
||||||
{
|
{
|
||||||
Assert(p); // OURS!
|
Assert(p); // OURS!
|
||||||
@ -1382,6 +1446,7 @@ lyxstring & lyxstring::replace(iterator i, iterator i2, value_type const * p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::replace(iterator i, iterator i2,
|
lyxstring & lyxstring::replace(iterator i, iterator i2,
|
||||||
size_type n , value_type c)
|
size_type n , value_type c)
|
||||||
{
|
{
|
||||||
@ -1391,6 +1456,7 @@ lyxstring & lyxstring::replace(iterator i, iterator i2,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::replace(iterator i, iterator i2,
|
lyxstring & lyxstring::replace(iterator i, iterator i2,
|
||||||
iterator j, iterator j2)
|
iterator j, iterator j2)
|
||||||
{
|
{
|
||||||
@ -1400,6 +1466,7 @@ lyxstring & lyxstring::replace(iterator i, iterator i2,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
void lyxstring::swap(lyxstring & str)
|
void lyxstring::swap(lyxstring & str)
|
||||||
{
|
{
|
||||||
if (rep == str.rep) return;
|
if (rep == str.rep) return;
|
||||||
@ -1409,6 +1476,7 @@ void lyxstring::swap(lyxstring & str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring & lyxstring::erase(size_type i, size_type n)
|
lyxstring & lyxstring::erase(size_type i, size_type n)
|
||||||
{
|
{
|
||||||
Assert(i <= rep->sz); // STD!
|
Assert(i <= rep->sz); // STD!
|
||||||
@ -1426,6 +1494,7 @@ lyxstring & lyxstring::erase(size_type i, size_type n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::iterator lyxstring::erase(iterator i)
|
lyxstring::iterator lyxstring::erase(iterator i)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -1437,6 +1506,7 @@ lyxstring::iterator lyxstring::erase(iterator i)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::iterator lyxstring::erase(iterator first, iterator last)
|
lyxstring::iterator lyxstring::erase(iterator first, iterator last)
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -1450,6 +1520,7 @@ lyxstring::iterator lyxstring::erase(iterator first, iterator last)
|
|||||||
// Conversion to C-style Strings
|
// Conversion to C-style Strings
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::value_type const * lyxstring::c_str() const
|
lyxstring::value_type const * lyxstring::c_str() const
|
||||||
{
|
{
|
||||||
rep->s[length()] = '\0';
|
rep->s[length()] = '\0';
|
||||||
@ -1457,12 +1528,14 @@ lyxstring::value_type const * lyxstring::c_str() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::value_type const * lyxstring::data() const
|
lyxstring::value_type const * lyxstring::data() const
|
||||||
{
|
{
|
||||||
return rep->s;
|
return rep->s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
lyxstring::size_type lyxstring::copy(value_type * buf, size_type len,
|
lyxstring::size_type lyxstring::copy(value_type * buf, size_type len,
|
||||||
size_type pos) const
|
size_type pos) const
|
||||||
{
|
{
|
||||||
@ -1482,6 +1555,7 @@ lyxstring::size_type lyxstring::copy(value_type * buf, size_type len,
|
|||||||
|
|
||||||
// Compare funcs should be verified.
|
// Compare funcs should be verified.
|
||||||
|
|
||||||
|
inline
|
||||||
int lyxstring::internal_compare(size_type pos, size_type n,
|
int lyxstring::internal_compare(size_type pos, size_type n,
|
||||||
value_type const * s,
|
value_type const * s,
|
||||||
size_type slen, size_type n2) const
|
size_type slen, size_type n2) const
|
||||||
@ -1505,6 +1579,7 @@ int lyxstring::internal_compare(size_type pos, size_type n,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
int lyxstring::compare(lyxstring const & str) const
|
int lyxstring::compare(lyxstring const & str) const
|
||||||
{
|
{
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -1513,6 +1588,7 @@ int lyxstring::compare(lyxstring const & str) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
int lyxstring::compare(value_type const * s) const
|
int lyxstring::compare(value_type const * s) const
|
||||||
{
|
{
|
||||||
Assert(s); //OURS!
|
Assert(s); //OURS!
|
||||||
@ -1522,7 +1598,9 @@ int lyxstring::compare(value_type const * s) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int lyxstring::compare(size_type pos, size_type n, lyxstring const & str) const
|
inline
|
||||||
|
int lyxstring::compare(size_type pos, size_type n,
|
||||||
|
lyxstring const & str) const
|
||||||
{
|
{
|
||||||
Assert(pos <= rep->sz); // OURS!
|
Assert(pos <= rep->sz); // OURS!
|
||||||
TestlyxstringInvariant(this);
|
TestlyxstringInvariant(this);
|
||||||
@ -1530,6 +1608,7 @@ int lyxstring::compare(size_type pos, size_type n, lyxstring const & str) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
int lyxstring::compare(size_type pos, size_type n, lyxstring const & str,
|
int lyxstring::compare(size_type pos, size_type n, lyxstring const & str,
|
||||||
size_type pos2, size_type n2) const
|
size_type pos2, size_type n2) const
|
||||||
{
|
{
|
||||||
@ -1542,6 +1621,7 @@ int lyxstring::compare(size_type pos, size_type n, lyxstring const & str,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline
|
||||||
int lyxstring::compare(size_type pos, size_type n, value_type const * s,
|
int lyxstring::compare(size_type pos, size_type n, value_type const * s,
|
||||||
size_type n2) const
|
size_type n2) const
|
||||||
{
|
{
|
||||||
@ -1556,6 +1636,7 @@ int lyxstring::compare(size_type pos, size_type n, value_type const * s,
|
|||||||
/////////////////
|
/////////////////
|
||||||
|
|
||||||
// i = index, n = length
|
// i = index, n = length
|
||||||
|
inline
|
||||||
lyxstring lyxstring::substr(size_type i, size_type n) const
|
lyxstring lyxstring::substr(size_type i, size_type n) const
|
||||||
{
|
{
|
||||||
Assert(i <= rep->sz); // STD!
|
Assert(i <= rep->sz); // STD!
|
||||||
@ -1764,11 +1845,13 @@ istream & operator>>(istream & is, lyxstring & s)
|
|||||||
return is;
|
return is;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ostream & operator<<(ostream & o, lyxstring const & s)
|
ostream & operator<<(ostream & o, lyxstring const & s)
|
||||||
{
|
{
|
||||||
return o.write(s.data(), s.length());
|
return o.write(s.data(), s.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
istream & getline(istream & is, lyxstring & s,
|
istream & getline(istream & is, lyxstring & s,
|
||||||
lyxstring::value_type delim)
|
lyxstring::value_type delim)
|
||||||
{
|
{
|
||||||
|
@ -195,7 +195,7 @@ public:
|
|||||||
size_type size() const;
|
size_type size() const;
|
||||||
|
|
||||||
/// largest possible string
|
/// largest possible string
|
||||||
size_type max_size() const { return npos -1; }
|
size_type max_size() const { return npos - 1; }
|
||||||
|
|
||||||
///
|
///
|
||||||
size_type length() const { return size(); }
|
size_type length() const { return size(); }
|
||||||
|
133
src/table.C
133
src/table.C
@ -809,42 +809,44 @@ int LyXTable::right_column_of_cell(int cell)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LyXTable::Write(FILE* file)
|
void LyXTable::Write(ostream & os)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
fprintf(file, "multicol5\n");
|
os << "multicol5\n"
|
||||||
fprintf(file, "%d %d %d %d %d %d %d %d\n", rows, columns, is_long_table,
|
<< rows << " " << columns << " " << is_long_table << " "
|
||||||
rotate, endhead, endfirsthead, endfoot, endlastfoot);
|
<< rotate << " " << endhead << " " << endfirsthead << " "
|
||||||
for (i = 0; i<rows; i++){
|
<< endfoot << " " << endlastfoot << "\n";
|
||||||
fprintf(file, "%d %d %d %d\n", row_info[i].top_line,
|
for (i = 0; i < rows; ++i) {
|
||||||
row_info[i].bottom_line, row_info[i].is_cont_row,
|
os << row_info[i].top_line << " "
|
||||||
row_info[i].newpage);
|
<< row_info[i].bottom_line << " "
|
||||||
|
<< row_info[i].is_cont_row << " "
|
||||||
|
<< row_info[i].newpage << "\n";
|
||||||
}
|
}
|
||||||
for (i = 0; i<columns; i++){
|
for (i = 0; i < columns; ++i) {
|
||||||
fprintf(file, "%d %d %d \"%s\" \"%s\"\n",
|
os << column_info[i].alignment << " "
|
||||||
column_info[i].alignment, column_info[i].left_line,
|
<< column_info[i].left_line << " "
|
||||||
column_info[i].right_line,
|
<< column_info[i].right_line << " \""
|
||||||
VSpace(column_info[i].p_width).asLyXCommand().c_str(),
|
<< VSpace(column_info[i].p_width).asLyXCommand() << "\" \""
|
||||||
column_info[i].align_special.c_str());
|
<< column_info[i].align_special << "\"\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i<rows;i++){
|
for (i = 0; i < rows; ++i) {
|
||||||
for (j = 0;j<columns;j++){
|
for (j = 0; j < columns; ++j) {
|
||||||
fprintf(file, "%d %d %d %d %d %d %d \"%s\" \"%s\"\n",
|
os << cell_info[i][j].multicolumn << " "
|
||||||
cell_info[i][j].multicolumn,
|
<< cell_info[i][j].alignment << " "
|
||||||
cell_info[i][j].alignment,
|
<< cell_info[i][j].top_line << " "
|
||||||
cell_info[i][j].top_line,
|
<< cell_info[i][j].bottom_line << " "
|
||||||
cell_info[i][j].bottom_line,
|
<< cell_info[i][j].has_cont_row << " "
|
||||||
cell_info[i][j].has_cont_row,
|
<< cell_info[i][j].rotate << " "
|
||||||
cell_info[i][j].rotate,
|
<< cell_info[i][j].linebreaks << " \""
|
||||||
cell_info[i][j].linebreaks,
|
<< cell_info[i][j].align_special << "\" \""
|
||||||
cell_info[i][j].align_special.c_str(),
|
<< cell_info[i][j].p_width << "\"\n";
|
||||||
cell_info[i][j].p_width.c_str());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LyXTable::Read(FILE* file)
|
|
||||||
|
void LyXTable::Read(FILE * file)
|
||||||
{
|
{
|
||||||
int version;
|
int version;
|
||||||
int i, j;
|
int i, j;
|
||||||
@ -866,7 +868,7 @@ void LyXTable::Read(FILE* file)
|
|||||||
fscanf(file, "%s\n", vtmp);
|
fscanf(file, "%s\n", vtmp);
|
||||||
s = vtmp;
|
s = vtmp;
|
||||||
if (s.length() > 8)
|
if (s.length() > 8)
|
||||||
version = atoi(s.c_str()+8);
|
version = atoi(s.c_str() + 8);
|
||||||
else
|
else
|
||||||
version = 1;
|
version = 1;
|
||||||
#ifdef WITH_WARNINGS
|
#ifdef WITH_WARNINGS
|
||||||
@ -1297,7 +1299,7 @@ int LyXTable::TexEndOfCell(string & file, int cell)
|
|||||||
|
|
||||||
// cell <0 will tex the preamble
|
// cell <0 will tex the preamble
|
||||||
// returns the number of printed newlines
|
// returns the number of printed newlines
|
||||||
int LyXTable::RoffEndOfCell(FILE* file, int cell)
|
int LyXTable::RoffEndOfCell(ostream & os, int cell)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@ -1305,90 +1307,91 @@ int LyXTable::RoffEndOfCell(FILE* file, int cell)
|
|||||||
if (cell == GetNumberOfCells() - 1){
|
if (cell == GetNumberOfCells() - 1){
|
||||||
// the very end at the very beginning
|
// the very end at the very beginning
|
||||||
if (CellHasContRow(cell) >= 0) {
|
if (CellHasContRow(cell) >= 0) {
|
||||||
fprintf(file, "\nT}");
|
os << "\nT}";
|
||||||
ret++;
|
++ret;
|
||||||
}
|
}
|
||||||
fprintf(file, "\n");
|
os << "\n";
|
||||||
ret++;
|
ret++;
|
||||||
if (row_info[row_of_cell(cell)].bottom_line) {
|
if (row_info[row_of_cell(cell)].bottom_line) {
|
||||||
fprintf(file, "_\n");
|
os << "_\n";
|
||||||
ret++;
|
++ret;
|
||||||
}
|
}
|
||||||
fprintf(file, ".TE\n.pl 1c");
|
os << ".TE\n.pl 1c";
|
||||||
} else {
|
} else {
|
||||||
if (cell < 0){
|
if (cell < 0){
|
||||||
int fcell = 0;
|
int fcell = 0;
|
||||||
// preamble
|
// preamble
|
||||||
fprintf(file, "\n.pl 500c\n.TS\n");
|
os << "\n.pl 500c\n.TS\n";
|
||||||
for (j = 0; j<rows; j++) {
|
for (j = 0; j<rows; ++j) {
|
||||||
for (i = 0; i<columns;i++, fcell++) {
|
for (i = 0; i<columns; ++i, ++fcell) {
|
||||||
if (column_info[i].left_line)
|
if (column_info[i].left_line)
|
||||||
fprintf(file, " | ");
|
os << " | ";
|
||||||
if (cell_info[j][i].multicolumn == CELL_PART_OF_MULTICOLUMN)
|
if (cell_info[j][i].multicolumn == CELL_PART_OF_MULTICOLUMN)
|
||||||
fprintf(file, "s");
|
os << "s";
|
||||||
else {
|
else {
|
||||||
switch (column_info[i].alignment) {
|
switch (column_info[i].alignment) {
|
||||||
case LYX_ALIGN_LEFT:
|
case LYX_ALIGN_LEFT:
|
||||||
fprintf(file, "l");
|
os << "l";
|
||||||
break;
|
break;
|
||||||
case LYX_ALIGN_RIGHT:
|
case LYX_ALIGN_RIGHT:
|
||||||
fprintf(file, "r");
|
os << "r";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(file, "c");
|
os << "c";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!column_info[i].p_width.empty())
|
if (!column_info[i].p_width.empty())
|
||||||
fprintf(file, "w(%s)", column_info[i].p_width.c_str());
|
os << "w(" << column_info[i].p_width << ")";
|
||||||
if (column_info[i].right_line)
|
if (column_info[i].right_line)
|
||||||
fprintf(file, " | ");
|
os << " | ";
|
||||||
}
|
}
|
||||||
if ((j+1) < rows) {
|
if ((j + 1) < rows) {
|
||||||
fprintf(file, "\n");
|
os << "\n";
|
||||||
ret++;
|
++ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fprintf(file, ".\n");
|
os << ".\n";
|
||||||
ret++;
|
++ret;
|
||||||
if (row_info[0].top_line) {
|
if (row_info[0].top_line) {
|
||||||
fprintf(file, "_\n");
|
os << "_\n";
|
||||||
ret++;
|
++ret;
|
||||||
}
|
}
|
||||||
if (CellHasContRow(0) >= 0) {
|
if (CellHasContRow(0) >= 0) {
|
||||||
fprintf(file, "T{\n");
|
os << "T{\n";
|
||||||
ret++;
|
++ret;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// usual cells
|
// usual cells
|
||||||
if (CellHasContRow(cell) >= 0) {
|
if (CellHasContRow(cell) >= 0) {
|
||||||
fprintf(file, "\nT}");
|
os << "\nT}";
|
||||||
ret++;
|
++ret;
|
||||||
}
|
}
|
||||||
if (right_column_of_cell(cell) == columns -1){
|
if (right_column_of_cell(cell) == columns -1){
|
||||||
fprintf(file, "\n");
|
os << "\n";
|
||||||
ret++;
|
++ret;
|
||||||
int row = row_of_cell(cell);
|
int row = row_of_cell(cell);
|
||||||
if (row_info[row++].bottom_line) {
|
if (row_info[row++].bottom_line) {
|
||||||
fprintf(file, "_\n");
|
os << "_\n";
|
||||||
ret++;
|
++ret;
|
||||||
}
|
}
|
||||||
if ((row < rows) && row_info[row].top_line) {
|
if ((row < rows) && row_info[row].top_line) {
|
||||||
fprintf(file, "_\n");
|
os << "_\n";
|
||||||
ret++;
|
++ret;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
fprintf(file, "\t");
|
os << "\t";
|
||||||
if ((cell < GetNumberOfCells() - 1) &&
|
if ((cell < GetNumberOfCells() - 1) &&
|
||||||
(CellHasContRow(cell+1) >= 0)) {
|
(CellHasContRow(cell+1) >= 0)) {
|
||||||
fprintf(file, "T{\n");
|
os << "T{\n";
|
||||||
ret++;
|
++ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char const *LyXTable::getDocBookAlign(int cell, bool isColumn)
|
char const *LyXTable::getDocBookAlign(int cell, bool isColumn)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
33
src/table.h
33
src/table.h
@ -19,6 +19,7 @@
|
|||||||
#include "lyxlex.h"
|
#include "lyxlex.h"
|
||||||
#include "LString.h"
|
#include "LString.h"
|
||||||
|
|
||||||
|
|
||||||
/* The features the text class offers for tables */
|
/* The features the text class offers for tables */
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -68,11 +69,11 @@ public:
|
|||||||
///
|
///
|
||||||
LyXTable(int columns_arg, int rows_arg);
|
LyXTable(int columns_arg, int rows_arg);
|
||||||
///
|
///
|
||||||
LyXTable(LyXLex &lex);
|
LyXTable(LyXLex & lex);
|
||||||
///
|
///
|
||||||
~LyXTable();
|
~LyXTable();
|
||||||
///
|
///
|
||||||
LyXTable* Clone();
|
LyXTable * Clone();
|
||||||
|
|
||||||
/// Returns true if there is a topline, returns false if not
|
/// Returns true if there is a topline, returns false if not
|
||||||
bool TopLine(int cell);
|
bool TopLine(int cell);
|
||||||
@ -159,20 +160,20 @@ public:
|
|||||||
void Init(int columns_arg, int rows_arg);
|
void Init(int columns_arg, int rows_arg);
|
||||||
|
|
||||||
///
|
///
|
||||||
void Write(FILE* file);
|
void Write(ostream &);
|
||||||
///
|
///
|
||||||
void Read(FILE* file);
|
void Read(FILE * file);
|
||||||
|
|
||||||
// cell <0 will tex the preamble
|
// cell <0 will tex the preamble
|
||||||
// returns the number of printed newlines
|
// returns the number of printed newlines
|
||||||
///
|
///
|
||||||
int TexEndOfCell(string & file, int cell);
|
int TexEndOfCell(string & file, int cell);
|
||||||
///
|
///
|
||||||
int RoffEndOfCell(FILE* file, int cell);
|
int RoffEndOfCell(ostream &, int cell);
|
||||||
///
|
///
|
||||||
char const *getDocBookAlign(int cell, bool isColumn= false);
|
char const * getDocBookAlign(int cell, bool isColumn = false);
|
||||||
///
|
///
|
||||||
int DocBookEndOfCell(string &file, int cell, int &depth);
|
int DocBookEndOfCell(string & file, int cell, int & depth);
|
||||||
|
|
||||||
///
|
///
|
||||||
bool IsMultiColumn(int cell);
|
bool IsMultiColumn(int cell);
|
||||||
@ -253,9 +254,9 @@ private:
|
|||||||
///
|
///
|
||||||
int width_of_cell;
|
int width_of_cell;
|
||||||
///
|
///
|
||||||
char multicolumn; // add approp. signedness
|
int multicolumn; // add approp. signedness
|
||||||
///
|
///
|
||||||
char alignment; // add approp. signedness
|
int alignment; // add approp. signedness
|
||||||
///
|
///
|
||||||
bool top_line;
|
bool top_line;
|
||||||
///
|
///
|
||||||
@ -281,7 +282,7 @@ private:
|
|||||||
};
|
};
|
||||||
///
|
///
|
||||||
struct columnstruct {
|
struct columnstruct {
|
||||||
char alignment; // add approp. signedness
|
int alignment; // add approp. signedness
|
||||||
bool left_line;
|
bool left_line;
|
||||||
bool right_line;
|
bool right_line;
|
||||||
int width_of_column;
|
int width_of_column;
|
||||||
@ -291,18 +292,18 @@ private:
|
|||||||
///
|
///
|
||||||
int numberofcells;
|
int numberofcells;
|
||||||
///
|
///
|
||||||
int* rowofcell;
|
int * rowofcell;
|
||||||
///
|
///
|
||||||
int* columnofcell;
|
int * columnofcell;
|
||||||
///
|
///
|
||||||
void set_row_column_number_info();
|
void set_row_column_number_info();
|
||||||
|
|
||||||
///
|
///
|
||||||
rowstruct *row_info;
|
rowstruct * row_info;
|
||||||
///
|
///
|
||||||
columnstruct *column_info;
|
columnstruct * column_info;
|
||||||
///
|
///
|
||||||
cellstruct** cell_info;
|
cellstruct ** cell_info;
|
||||||
///
|
///
|
||||||
int width_of_table;
|
int width_of_table;
|
||||||
///
|
///
|
||||||
@ -326,7 +327,7 @@ private:
|
|||||||
int right_column_of_cell(int cell);
|
int right_column_of_cell(int cell);
|
||||||
|
|
||||||
///
|
///
|
||||||
cellstruct* cellinfo_of_cell(int cell);
|
cellstruct * cellinfo_of_cell(int cell);
|
||||||
|
|
||||||
///
|
///
|
||||||
void delete_column(int column);
|
void delete_column(int column);
|
||||||
|
@ -347,17 +347,13 @@ bool Trans::isAccentDefined(tex_accent accent, KmodInfo & i)
|
|||||||
|
|
||||||
string Trans::process(char c, TransManager & k)
|
string Trans::process(char c, TransManager & k)
|
||||||
{
|
{
|
||||||
lyxerr << "enter process" << endl;
|
|
||||||
char dummy[2] = "?";
|
char dummy[2] = "?";
|
||||||
char * dt = dummy;
|
char * dt = dummy;
|
||||||
char * t = Match(c);
|
char * t = Match(c);
|
||||||
lyxerr << "finished variables" << endl;
|
|
||||||
|
|
||||||
if ((t == 0 && (dt[0] = c)) || (t[0] != 0 && (dt = t)) ){
|
if ((t == 0 && (dt[0] = c)) || (t[0] != 0 && (dt = t)) ){
|
||||||
lyxerr << "normalkey" << endl;
|
|
||||||
return k.normalkey(c, dt);
|
return k.normalkey(c, dt);
|
||||||
} else {
|
} else {
|
||||||
lyxerr << "deadkey" << endl;
|
|
||||||
return k.deadkey(c, *kmod_list_[(tex_accent)t[1]]);
|
return k.deadkey(c, *kmod_list_[(tex_accent)t[1]]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -276,9 +276,7 @@ void TransManager::DisableKeymap()
|
|||||||
|
|
||||||
void TransManager::TranslateAndInsert(char c, LyXText * text)
|
void TransManager::TranslateAndInsert(char c, LyXText * text)
|
||||||
{
|
{
|
||||||
string res;
|
string res = active_->process(c, *this);
|
||||||
|
|
||||||
res = active_->process(c,*this);
|
|
||||||
|
|
||||||
// Process with tokens
|
// Process with tokens
|
||||||
string temp;
|
string temp;
|
||||||
|
Loading…
Reference in New Issue
Block a user