mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-06 00:10:59 +00:00
use ParagraphList::iterator a bit more
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6330 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
88969c910b
commit
63e1ebc312
@ -3,53 +3,49 @@
|
||||
|
||||
AC_DEFUN(CHECK_WITH_PSPELL,
|
||||
[
|
||||
USE_PSPELL="yes"
|
||||
AC_MSG_CHECKING([for pspell support])
|
||||
AC_MSG_CHECKING([for pspell support])
|
||||
AC_ARG_WITH(pspell,
|
||||
[ --with-pspell use PSpell libraries],[
|
||||
if test "$withval" = "no"; then
|
||||
USE_PSPELL="no"
|
||||
fi
|
||||
])
|
||||
AC_HELP_STRING([--with-pspell],[use PSpell libraries]),
|
||||
[
|
||||
case "$withval" in
|
||||
y*) USE_PSPELL="yes";;
|
||||
*) USE_PSPELL="no";;
|
||||
esac
|
||||
],
|
||||
[
|
||||
USE_PSPELL="yes"
|
||||
])
|
||||
|
||||
AC_ARG_WITH(pspell-includes, [ --with-pspell-include where the pspell.h is located],
|
||||
pspell_use_include="$withval",
|
||||
pspell_use_include=NONE)
|
||||
AC_ARG_WITH(pspell-includes,
|
||||
AC_HELP_STRING([--with-pspell-include],[where the pspell.h is located]),
|
||||
pspell_use_include="$withval",
|
||||
[])
|
||||
|
||||
if test "$pspell_use_include" = "" || \
|
||||
test "$pspell_use_include" = "NONE"; then
|
||||
pspell_includes="/usr/include /usr/local/include"
|
||||
AC_FIND_FILE(pspell/pspell.h,$pspell_includes,pspell_use_include)
|
||||
fi
|
||||
AC_ARG_WITH(pspell-libs,
|
||||
AC_HELP_STRING([--with-pspell-lib],[where the libpspell.a is located]),
|
||||
pspell_use_lib="$withval",
|
||||
[])
|
||||
|
||||
AC_ARG_WITH(pspell-libs, [ --with-pspell-lib where the libpspell.a is located],
|
||||
pspell_use_lib="$withval",
|
||||
pspell_use_lib=NONE)
|
||||
if test "$USE_PSPELL" = "yes" ; then
|
||||
AC_CHECK_HEADER(pspell/pspell.h)
|
||||
AC_CHECK_LIB(pspell, delete_pspell_config)
|
||||
|
||||
if test -n "$pspell_use_lib" && \
|
||||
test "$pspell_use_lib" != "NONE"; then
|
||||
pspell_lib_found="Setting to $pspell_use_lib"
|
||||
else
|
||||
pspell_libs="/usr/lib /usr/lib/pspell /usr/local/lib /usr/local/lib/pspell"
|
||||
AC_FIND_FILE(libpspell.la libpspell.so libpspell.a,$pspell_libs,pspell_use_lib)
|
||||
pspell_lib_found="yes"
|
||||
fi
|
||||
if test "$pspell_use_include" = "NO" || \
|
||||
test "$pspell_use_lib" = "NO"; then
|
||||
if test "$USE_PSPELL" = "yes"; then
|
||||
USE_PSPELL="not found"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$pspell_use_include" = "NO" || \
|
||||
test "$pspell_use_lib" = "NO"; then
|
||||
if test "$USE_PSPELL" = "yes"; then
|
||||
USE_PSPELL="not found"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$USE_PSPELL" = "yes"; then
|
||||
AC_DEFINE(USE_PSPELL, 1, [Define as 1 to use the pspell library])
|
||||
PSPELL_INCLUDES="-I$pspell_use_include"
|
||||
PSPELL_LIBS="-L$pspell_use_lib -lpspell"
|
||||
USE_PSPELL="yes ($pspell_use_include $pspell_use_lib)"
|
||||
AC_SUBST(PSPELL_INCLUDES)
|
||||
AC_SUBST(PSPELL_LIBS)
|
||||
lyx_flags="$lyx_flags use-pspell"
|
||||
if test "$USE_PSPELL" = "yes"; then
|
||||
AC_DEFINE(USE_PSPELL, 1, [Define as 1 to use the pspell library])
|
||||
# PSPELL_INCLUDES="-I$pspell_use_include"
|
||||
# PSPELL_LIBS="-L$pspell_use_lib -lpspell"
|
||||
# USE_PSPELL="yes ($pspell_use_include $pspell_use_lib)"
|
||||
AC_SUBST(PSPELL_INCLUDES)
|
||||
AC_SUBST(PSPELL_LIBS)
|
||||
lyx_flags="$lyx_flags use-pspell"
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT($USE_PSPELL)
|
||||
])
|
||||
])
|
||||
|
@ -1,19 +1,17 @@
|
||||
src/BufferView.C
|
||||
src/BufferView_pimpl.C
|
||||
src/Chktex.C
|
||||
src/CutAndPaste.C
|
||||
src/LColor.C
|
||||
src/LaTeX.C
|
||||
src/LyXAction.C
|
||||
src/MenuBackend.C
|
||||
src/buffer.C
|
||||
src/bufferlist.C
|
||||
src/BufferView.C
|
||||
src/bufferview_funcs.C
|
||||
src/BufferView_pimpl.C
|
||||
src/Chktex.C
|
||||
src/converter.C
|
||||
src/CutAndPaste.C
|
||||
src/debug.C
|
||||
src/exporter.C
|
||||
src/frontends/LyXView.C
|
||||
src/format.C
|
||||
src/frontends/controllers/biblio.C
|
||||
src/frontends/controllers/ButtonController.h
|
||||
src/frontends/controllers/character.C
|
||||
src/frontends/controllers/ControlAboutlyx.C
|
||||
src/frontends/controllers/ControlBibtex.C
|
||||
src/frontends/controllers/ControlCharacter.C
|
||||
@ -29,13 +27,13 @@ src/frontends/controllers/ControlSearch.C
|
||||
src/frontends/controllers/ControlSpellchecker.C
|
||||
src/frontends/controllers/ControlThesaurus.C
|
||||
src/frontends/controllers/ControlVCLog.C
|
||||
src/frontends/controllers/biblio.C
|
||||
src/frontends/controllers/character.C
|
||||
src/frontends/controllers/frnt_lang.C
|
||||
src/frontends/controllers/helper_funcs.C
|
||||
src/frontends/gnome/GLog.C
|
||||
src/frontends/LyXView.C
|
||||
src/frontends/qt2/Alert_pimpl.C
|
||||
src/frontends/qt2/FileDialog.C
|
||||
src/frontends/qt2/lengthcombo.C
|
||||
src/frontends/qt2/QAbout.C
|
||||
src/frontends/qt2/QBibitem.C
|
||||
src/frontends/qt2/QBibtex.C
|
||||
@ -48,8 +46,8 @@ src/frontends/qt2/QCommandBuffer.C
|
||||
src/frontends/qt2/QDelimiterDialog.C
|
||||
src/frontends/qt2/QDocument.C
|
||||
src/frontends/qt2/QDocumentDialog.C
|
||||
src/frontends/qt2/QERT.C
|
||||
src/frontends/qt2/QError.C
|
||||
src/frontends/qt2/QERT.C
|
||||
src/frontends/qt2/QExternal.C
|
||||
src/frontends/qt2/QExternalDialog.C
|
||||
src/frontends/qt2/QFloat.C
|
||||
@ -57,8 +55,8 @@ src/frontends/qt2/QGraphics.C
|
||||
src/frontends/qt2/QGraphicsDialog.C
|
||||
src/frontends/qt2/QInclude.C
|
||||
src/frontends/qt2/QIndex.C
|
||||
src/frontends/qt2/QLPrintDialog.C
|
||||
src/frontends/qt2/QLog.C
|
||||
src/frontends/qt2/QLPrintDialog.C
|
||||
src/frontends/qt2/QMathDialog.C
|
||||
src/frontends/qt2/QMathMatrixDialog.C
|
||||
src/frontends/qt2/QMinipage.C
|
||||
@ -76,13 +74,14 @@ src/frontends/qt2/QTabularCreate.C
|
||||
src/frontends/qt2/QTexinfo.C
|
||||
src/frontends/qt2/QThesaurus.C
|
||||
src/frontends/qt2/QToc.C
|
||||
src/frontends/qt2/QtView.C
|
||||
src/frontends/qt2/QURL.C
|
||||
src/frontends/qt2/QVCLog.C
|
||||
src/frontends/qt2/QWrap.C
|
||||
src/frontends/qt2/QtView.C
|
||||
src/frontends/qt2/lengthcombo.C
|
||||
src/frontends/xforms/Alert_pimpl.C
|
||||
src/frontends/xforms/ColorHandler.C
|
||||
src/frontends/xforms/combox.C
|
||||
src/frontends/xforms/Dialogs3.C
|
||||
src/frontends/xforms/FileDialog.C
|
||||
src/frontends/xforms/FormAboutlyx.C
|
||||
src/frontends/xforms/FormBase.C
|
||||
@ -93,15 +92,14 @@ src/frontends/xforms/FormCharacter.C
|
||||
src/frontends/xforms/FormCitation.C
|
||||
src/frontends/xforms/FormDialogView.C
|
||||
src/frontends/xforms/FormDocument.C
|
||||
src/frontends/xforms/FormERT.C
|
||||
src/frontends/xforms/FormError.C
|
||||
src/frontends/xforms/FormERT.C
|
||||
src/frontends/xforms/FormExternal.C
|
||||
src/frontends/xforms/FormFiledialog.C
|
||||
src/frontends/xforms/FormFloat.C
|
||||
src/frontends/xforms/FormForks.C
|
||||
src/frontends/xforms/FormGraphics.C
|
||||
src/frontends/xforms/FormInclude.C
|
||||
src/frontends/xforms/FormIndex.C
|
||||
src/frontends/xforms/FormLog.C
|
||||
src/frontends/xforms/FormMathsBitmap.C
|
||||
src/frontends/xforms/FormMathsDelim.C
|
||||
@ -127,15 +125,14 @@ src/frontends/xforms/FormToc.C
|
||||
src/frontends/xforms/FormUrl.C
|
||||
src/frontends/xforms/FormVCLog.C
|
||||
src/frontends/xforms/FormWrap.C
|
||||
src/frontends/xforms/Menubar_pimpl.C
|
||||
src/frontends/xforms/XMiniBuffer.C
|
||||
src/frontends/xforms/combox.C
|
||||
src/frontends/xforms/input_validators.C
|
||||
src/frontends/xforms/Menubar_pimpl.C
|
||||
src/frontends/xforms/xforms_helpers.C
|
||||
src/frontends/xforms/XMiniBuffer.C
|
||||
src/gettext.h
|
||||
src/importer.C
|
||||
src/insets/inset.C
|
||||
src/insets/insetbibtex.C
|
||||
src/insets/inset.C
|
||||
src/insets/insetcaption.C
|
||||
src/insets/inseterror.C
|
||||
src/insets/insetert.C
|
||||
@ -146,7 +143,6 @@ src/insets/insetfoot.C
|
||||
src/insets/insetgraphics.C
|
||||
src/insets/insetinclude.C
|
||||
src/insets/insetindex.C
|
||||
src/insets/insetlabel.C
|
||||
src/insets/insetlist.C
|
||||
src/insets/insetmarginal.C
|
||||
src/insets/insetminipage.C
|
||||
@ -163,12 +159,15 @@ src/insets/insetwrap.C
|
||||
src/ispell.C
|
||||
src/kbsequence.C
|
||||
src/language.C
|
||||
src/LaTeX.C
|
||||
src/LColor.C
|
||||
src/lengthcommon.C
|
||||
src/LyXAction.C
|
||||
src/lyx_cb.C
|
||||
src/lyx_main.C
|
||||
src/lyxfind.C
|
||||
src/lyxfont.C
|
||||
src/lyxfunc.C
|
||||
src/lyx_main.C
|
||||
src/lyxrc.C
|
||||
src/lyxtextclasslist.C
|
||||
src/lyxvc.C
|
||||
@ -177,9 +176,11 @@ src/mathed/formulamacro.C
|
||||
src/mathed/math_hullinset.C
|
||||
src/mathed/math_parboxinset.C
|
||||
src/mathed/ref_inset.C
|
||||
src/MenuBackend.C
|
||||
src/paragraph.C
|
||||
src/rowpainter.C
|
||||
src/support/filetools.C
|
||||
src/tabular.C
|
||||
src/text.C
|
||||
src/text2.C
|
||||
src/text3.C
|
||||
src/text.C
|
||||
|
@ -1,3 +1,12 @@
|
||||
2003-03-04 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* paragraph_funcs.C (TeXOnePar): take ParagraphList::iterator as args
|
||||
(TeXEnvironment): ditto
|
||||
(TeXDeeper): ditto
|
||||
|
||||
* buffer.C (makeLaTeXFile): adjust
|
||||
(latexParagraphs): make it take ParagraphList::iterator as args
|
||||
|
||||
2003-03-03 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* buffer.C (latexParagraphs): adjust
|
||||
|
@ -1778,7 +1778,7 @@ void Buffer::makeLaTeXFile(ostream & os,
|
||||
texrow.newline();
|
||||
}
|
||||
|
||||
latexParagraphs(os, &*(paragraphs.begin()), 0, texrow);
|
||||
latexParagraphs(os, paragraphs.begin(), paragraphs.end(), texrow);
|
||||
|
||||
// add this just in case after all the paragraphs
|
||||
os << endl;
|
||||
@ -1816,8 +1816,10 @@ void Buffer::makeLaTeXFile(ostream & os,
|
||||
//
|
||||
// LaTeX all paragraphs from par to endpar, if endpar == 0 then to the end
|
||||
//
|
||||
void Buffer::latexParagraphs(ostream & ofs, Paragraph * par,
|
||||
Paragraph * endpar, TexRow & texrow,
|
||||
void Buffer::latexParagraphs(ostream & ofs,
|
||||
ParagraphList::iterator par,
|
||||
ParagraphList::iterator endpar,
|
||||
TexRow & texrow,
|
||||
bool moving_arg) const
|
||||
{
|
||||
bool was_title = false;
|
||||
|
@ -150,8 +150,10 @@ public:
|
||||
/** LaTeX all paragraphs from par to endpar.
|
||||
\param \a endpar if == 0 then to the end
|
||||
*/
|
||||
void latexParagraphs(std::ostream & os, Paragraph * par,
|
||||
Paragraph * endpar, TexRow & texrow, bool moving_arg = false) const;
|
||||
void latexParagraphs(std::ostream & os,
|
||||
ParagraphList::iterator par,
|
||||
ParagraphList::iterator endpar,
|
||||
TexRow & texrow, bool moving_arg = false) const;
|
||||
///
|
||||
void simpleDocBookOnePar(std::ostream &,
|
||||
Paragraph * par, int & desc_on,
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-03-04 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* insettext.C (latex): adjust for ParagraphList::iterator
|
||||
|
||||
2003-03-03 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* insetbutton.C (view): adjust for boost 1.30.0
|
||||
|
@ -1595,7 +1595,7 @@ int InsetText::latex(Buffer const * buf, ostream & os,
|
||||
bool moving_arg, bool) const
|
||||
{
|
||||
TexRow texrow;
|
||||
buf->latexParagraphs(os, &*(paragraphs.begin()), 0,
|
||||
buf->latexParagraphs(os, paragraphs.begin(), paragraphs.end(),
|
||||
texrow, moving_arg);
|
||||
return texrow.rows();
|
||||
}
|
||||
|
@ -247,15 +247,16 @@ int getEndLabel(Paragraph * para, BufferParams const & bparams)
|
||||
#endif
|
||||
|
||||
|
||||
Paragraph * TeXDeeper(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
Paragraph * pit,
|
||||
ostream & os, TexRow & texrow)
|
||||
ParagraphList::iterator
|
||||
TeXDeeper(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
ParagraphList::iterator pit,
|
||||
ostream & os, TexRow & texrow)
|
||||
{
|
||||
lyxerr[Debug::LATEX] << "TeXDeeper... " << pit << endl;
|
||||
Paragraph * par = pit;
|
||||
lyxerr[Debug::LATEX] << "TeXDeeper... " << &*pit << endl;
|
||||
ParagraphList::iterator par = pit;
|
||||
|
||||
while (par && par->params().depth() == pit->params().depth()) {
|
||||
while (par != buf->paragraphs.end()&& par->params().depth() == pit->params().depth()) {
|
||||
if (par->layout()->isEnvironment()) {
|
||||
par = TeXEnvironment(buf, bparams, par,
|
||||
os, texrow);
|
||||
@ -264,18 +265,19 @@ Paragraph * TeXDeeper(Buffer const * buf,
|
||||
os, texrow, false);
|
||||
}
|
||||
}
|
||||
lyxerr[Debug::LATEX] << "TeXDeeper...done " << par << endl;
|
||||
lyxerr[Debug::LATEX] << "TeXDeeper...done " << &*par << endl;
|
||||
|
||||
return par;
|
||||
}
|
||||
|
||||
|
||||
Paragraph * TeXEnvironment(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
Paragraph * pit,
|
||||
ostream & os, TexRow & texrow)
|
||||
ParagraphList::iterator
|
||||
TeXEnvironment(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
ParagraphList::iterator pit,
|
||||
ostream & os, TexRow & texrow)
|
||||
{
|
||||
lyxerr[Debug::LATEX] << "TeXEnvironment... " << pit << endl;
|
||||
lyxerr[Debug::LATEX] << "TeXEnvironment... " << &*pit << endl;
|
||||
|
||||
LyXLayout_ptr const & style = pit->layout();
|
||||
|
||||
@ -327,11 +329,11 @@ Paragraph * TeXEnvironment(Buffer const * buf,
|
||||
<< style->latexparam() << '\n';
|
||||
texrow.newline();
|
||||
}
|
||||
Paragraph * par = pit;
|
||||
ParagraphList::iterator par = pit;
|
||||
do {
|
||||
par = TeXOnePar(buf, bparams, par, os, texrow, false);
|
||||
|
||||
if (par && par->params().depth() > pit->params().depth()) {
|
||||
if (par != buf->paragraphs.end()&& par->params().depth() > pit->params().depth()) {
|
||||
if (par->layout()->isParagraph()) {
|
||||
|
||||
// Thinko!
|
||||
@ -353,7 +355,7 @@ Paragraph * TeXEnvironment(Buffer const * buf,
|
||||
}
|
||||
par = TeXDeeper(buf, bparams, par, os, texrow);
|
||||
}
|
||||
} while (par
|
||||
} while (par != buf->paragraphs.end()
|
||||
&& par->layout() == pit->layout()
|
||||
&& par->params().depth() == pit->params().depth()
|
||||
&& par->params().leftIndent() == pit->params().leftIndent());
|
||||
@ -368,7 +370,7 @@ Paragraph * TeXEnvironment(Buffer const * buf,
|
||||
texrow.newline();
|
||||
}
|
||||
|
||||
lyxerr[Debug::LATEX] << "TeXEnvironment...done " << par << endl;
|
||||
lyxerr[Debug::LATEX] << "TeXEnvironment...done " << &*par << endl;
|
||||
return par; // ale970302
|
||||
}
|
||||
|
||||
@ -392,13 +394,14 @@ InsetOptArg * optArgInset(Paragraph const & par)
|
||||
} // end namespace
|
||||
|
||||
|
||||
Paragraph * TeXOnePar(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
Paragraph * pit,
|
||||
ostream & os, TexRow & texrow,
|
||||
bool moving_arg)
|
||||
ParagraphList::iterator
|
||||
TeXOnePar(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
ParagraphList::iterator pit,
|
||||
ostream & os, TexRow & texrow,
|
||||
bool moving_arg)
|
||||
{
|
||||
lyxerr[Debug::LATEX] << "TeXOnePar... " << pit << endl;
|
||||
lyxerr[Debug::LATEX] << "TeXOnePar... " << &*pit << endl;
|
||||
Inset const * in = pit->inInset();
|
||||
bool further_blank_line = false;
|
||||
LyXLayout_ptr style;
|
||||
@ -416,7 +419,7 @@ Paragraph * TeXOnePar(Buffer const * buf,
|
||||
}
|
||||
|
||||
if (!pit->params().spacing().isDefault()
|
||||
&& (!pit->previous() || !pit->previous()->hasSameLayout(pit))) {
|
||||
&& (!pit->previous() || !pit->previous()->hasSameLayout(&*pit))) {
|
||||
os << pit->params().spacing().writeEnvirBegin() << '\n';
|
||||
texrow.newline();
|
||||
}
|
||||
@ -586,7 +589,7 @@ Paragraph * TeXOnePar(Buffer const * buf,
|
||||
}
|
||||
|
||||
if (!pit->params().spacing().isDefault()
|
||||
&& (!pit->next() || !pit->next()->hasSameLayout(pit))) {
|
||||
&& (!pit->next() || !pit->next()->hasSameLayout(&*pit))) {
|
||||
os << pit->params().spacing().writeEnvirEnd() << '\n';
|
||||
texrow.newline();
|
||||
}
|
||||
@ -617,5 +620,5 @@ Paragraph * TeXOnePar(Buffer const * buf,
|
||||
}
|
||||
|
||||
lyxerr[Debug::LATEX] << "TeXOnePar...done " << pit->next() << endl;
|
||||
return pit->next();
|
||||
return ++pit;
|
||||
}
|
||||
|
@ -12,6 +12,7 @@
|
||||
#ifndef PARAGRAPH_FUNCS_H
|
||||
#define PARAGRAPH_FUNCS_H
|
||||
|
||||
#include "ParagraphList.h"
|
||||
#include "support/types.h"
|
||||
|
||||
class Buffer;
|
||||
@ -51,20 +52,23 @@ bool isFirstInSequence(Paragraph * par);
|
||||
int getEndLabel(Paragraph * para, BufferParams const & bparams);
|
||||
#endif
|
||||
|
||||
Paragraph * TeXDeeper(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
Paragraph * pit,
|
||||
std::ostream & os, TexRow & texrow);
|
||||
ParagraphList::iterator
|
||||
TeXDeeper(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
ParagraphList::iterator pit,
|
||||
std::ostream & os, TexRow & texrow);
|
||||
|
||||
Paragraph * TeXEnvironment(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
Paragraph * pit,
|
||||
std::ostream & os, TexRow & texrow);
|
||||
ParagraphList::iterator
|
||||
TeXEnvironment(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
ParagraphList::iterator pit,
|
||||
std::ostream & os, TexRow & texrow);
|
||||
|
||||
Paragraph * TeXOnePar(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
Paragraph * pit,
|
||||
std::ostream & os, TexRow & texrow,
|
||||
bool moving_arg);
|
||||
ParagraphList::iterator
|
||||
TeXOnePar(Buffer const * buf,
|
||||
BufferParams const & bparams,
|
||||
ParagraphList::iterator pit,
|
||||
std::ostream & os, TexRow & texrow,
|
||||
bool moving_arg);
|
||||
|
||||
#endif // PARAGRAPH_FUNCS_H
|
||||
|
Loading…
Reference in New Issue
Block a user