mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +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,
|
||||
|
@ -62,9 +62,9 @@ string const add_options(string const & command, string const & options)
|
||||
|
||||
|
||||
Converter::Converter(string const & f, string const & t, string const & c,
|
||||
string const & l): from(f), to(t), command(c), flags(l),
|
||||
From(0), To(0), latex(false),
|
||||
original_dir(false), need_aux(false)
|
||||
string const & l): from(f), to(t), command(c), flags(l),
|
||||
From(0), To(0), latex(false),
|
||||
original_dir(false), need_aux(false)
|
||||
{}
|
||||
|
||||
void Converter::readFlags()
|
||||
@ -669,7 +669,7 @@ Converters::intToFormat(std::vector<int> const & input)
|
||||
vector<Format const *> const
|
||||
Converters::getReachableTo(string const & target, bool clear_visited)
|
||||
{
|
||||
vector<int> const & reachablesto =
|
||||
vector<int> const & reachablesto =
|
||||
G_.getReachableTo(formats.getNumber(target), clear_visited);
|
||||
|
||||
return intToFormat(reachablesto);
|
||||
@ -679,9 +679,9 @@ vector<Format const *> const
|
||||
Converters::getReachable(string const & from, bool only_viewable,
|
||||
bool clear_visited)
|
||||
{
|
||||
vector<int> const & reachables =
|
||||
G_.getReachable(formats.getNumber(from),
|
||||
only_viewable,
|
||||
vector<int> const & reachables =
|
||||
G_.getReachable(formats.getNumber(from),
|
||||
only_viewable,
|
||||
clear_visited);
|
||||
|
||||
return intToFormat(reachables);
|
||||
@ -693,7 +693,7 @@ bool Converters::isReachable(string const & from, string const & to)
|
||||
formats.getNumber(to));
|
||||
}
|
||||
|
||||
Graph::EdgePath const
|
||||
Graph::EdgePath const
|
||||
Converters::getPath(string const & from, string const & to)
|
||||
{
|
||||
return G_.getPath(formats.getNumber(from),
|
||||
|
@ -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
|
||||
|
@ -1829,7 +1829,7 @@ bool InsetTabular::tabularFeatures(BufferView * bv, string const & what)
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
void checkLongtableSpecial(LyXTabular::ltType & ltt,
|
||||
string const & special, bool & flag)
|
||||
{
|
||||
@ -2774,7 +2774,7 @@ void InsetTabular::toggleSelection(BufferView * bv, bool kill_selection)
|
||||
void InsetTabular::markErased()
|
||||
{
|
||||
int cell = 0;
|
||||
|
||||
|
||||
while (!tabular->IsLastCell(cell)) {
|
||||
++cell;
|
||||
InsetText * inset = tabular->GetCellInset(cell);
|
||||
@ -2782,7 +2782,7 @@ void InsetTabular::markErased()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool InsetTabular::nextChange(BufferView * bv, lyx::pos_type & length)
|
||||
{
|
||||
if (the_locking_inset) {
|
||||
@ -2941,7 +2941,7 @@ bool InsetTabular::insertAsciiString(BufferView * bv, string const & buf,
|
||||
cols = ocol;
|
||||
rows = loctab->rows();
|
||||
int const columns = loctab->columns();
|
||||
|
||||
|
||||
while ((cell < cells) && (p < len) && (row < rows) &&
|
||||
(p = buf.find_first_of("\t\n", p)) != string::npos)
|
||||
{
|
||||
|
@ -220,7 +220,7 @@ void InsetText::clear(bool just_mark_erased)
|
||||
need_update = FULL;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// This is a gross hack...
|
||||
LyXLayout_ptr old_layout = paragraphs.begin()->layout();
|
||||
|
||||
@ -270,7 +270,7 @@ void InsetText::read(Buffer const * buf, LyXLex & lex)
|
||||
|
||||
if (buf->params.tracking_changes)
|
||||
paragraphs.begin()->trackChanges();
|
||||
|
||||
|
||||
while (lex.isOK()) {
|
||||
lex.nextToken();
|
||||
token = lex.getString();
|
||||
@ -1140,7 +1140,7 @@ bool InsetText::lfunMouseRelease(FuncRequest const & cmd)
|
||||
inset_y = ciy(bv) + drawTextYOffset;
|
||||
cmd1.x = cmd.x - inset_x;
|
||||
cmd1.y = cmd.x - inset_y;
|
||||
// note that we should do ret = inset->localDispatch(cmd1)
|
||||
// note that we should do ret = inset->localDispatch(cmd1)
|
||||
// and fix this instead (Alfredo);
|
||||
ret = true;
|
||||
inset->edit(bv, cmd1.x, cmd1.y, cmd.button());
|
||||
@ -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();
|
||||
}
|
||||
@ -2150,7 +2150,7 @@ void InsetText::markNew(bool track_changes)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void InsetText::setText(string const & data, LyXFont const & font)
|
||||
{
|
||||
clear(false);
|
||||
@ -2693,7 +2693,7 @@ bool InsetText::nextChange(BufferView * bv, lyx::pos_type & length)
|
||||
return result != lyxfind::SR_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool InsetText::searchForward(BufferView * bv, string const & str,
|
||||
bool cs, bool mw)
|
||||
{
|
||||
|
@ -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
|
||||
|
30
src/text.C
30
src/text.C
@ -1156,7 +1156,7 @@ void LyXText::setHeightOfRow(BufferView * bview, Row * row) const
|
||||
row->baseline(maxasc + labeladdon);
|
||||
|
||||
height += row->height();
|
||||
|
||||
|
||||
row->top_of_text(row->baseline() - font_metrics::maxAscent(font));
|
||||
|
||||
float x = 0;
|
||||
@ -1998,7 +1998,7 @@ void LyXText::acceptChange(BufferView * bv)
|
||||
return;
|
||||
|
||||
bv->hideCursor();
|
||||
|
||||
|
||||
if (selection.start.par() == selection.end.par()) {
|
||||
LyXCursor & startc = selection.start;
|
||||
LyXCursor & endc = selection.end;
|
||||
@ -2017,9 +2017,9 @@ void LyXText::rejectChange(BufferView * bv)
|
||||
{
|
||||
if (!selection.set() && cursor.par()->size())
|
||||
return;
|
||||
|
||||
|
||||
bv->hideCursor();
|
||||
|
||||
|
||||
if (selection.start.par() == selection.end.par()) {
|
||||
LyXCursor & startc = selection.start;
|
||||
LyXCursor & endc = selection.end;
|
||||
@ -2033,7 +2033,7 @@ void LyXText::rejectChange(BufferView * bv)
|
||||
#warning handle multi par selection
|
||||
}
|
||||
|
||||
|
||||
|
||||
// This function is only used by the spellchecker for NextWord().
|
||||
// It doesn't handle LYX_ACCENTs and probably never will.
|
||||
WordLangTuple const
|
||||
@ -2070,7 +2070,7 @@ LyXText::selectNextWordToSpellcheck(BufferView * bview, float & value) const
|
||||
while (1) {
|
||||
Paragraph * cpar(cursor.par());
|
||||
pos_type const cpos(cursor.pos());
|
||||
|
||||
|
||||
if (cpos == cpar->size()) {
|
||||
if (cpar->next()) {
|
||||
cursor.par(cpar->next());
|
||||
@ -2081,15 +2081,15 @@ LyXText::selectNextWordToSpellcheck(BufferView * bview, float & value) const
|
||||
}
|
||||
|
||||
bool const is_bad_inset(cpar->isInset(cpos)
|
||||
&& !cpar->getInset(cpos)->allowSpellcheck());
|
||||
|
||||
&& !cpar->getInset(cpos)->allowSpellcheck());
|
||||
|
||||
if (cpar->isLetter(cpos) && !isDeletedText(*cpar, cpos)
|
||||
&& !is_bad_inset)
|
||||
break;
|
||||
|
||||
|
||||
cursor.pos(cpos + 1);
|
||||
}
|
||||
|
||||
|
||||
// now check if we hit an inset so it has to be a inset containing text!
|
||||
if (cursor.pos() < cursor.par()->size() &&
|
||||
cursor.par()->isInset(cursor.pos())) {
|
||||
@ -2288,7 +2288,7 @@ void LyXText::transposeChars(BufferView & bview)
|
||||
pos_type tmppos = cursor.pos();
|
||||
|
||||
// First decide if it is possible to transpose at all
|
||||
|
||||
|
||||
if (tmppos == 0 || tmppos == tmppar->size())
|
||||
return;
|
||||
|
||||
@ -2301,9 +2301,9 @@ void LyXText::transposeChars(BufferView & bview)
|
||||
|
||||
// We should have an implementation that handles insets
|
||||
// as well, but that will have to come later. (Lgb)
|
||||
if (c1 == Paragraph::META_INSET || c2 == Paragraph::META_INSET)
|
||||
if (c1 == Paragraph::META_INSET || c2 == Paragraph::META_INSET)
|
||||
return;
|
||||
|
||||
|
||||
bool const erased = tmppar->erase(tmppos - 1, tmppos + 1);
|
||||
pos_type const ipos(erased ? tmppos - 1 : tmppos + 1);
|
||||
|
||||
@ -2367,7 +2367,7 @@ void LyXText::backspace(BufferView * bview)
|
||||
// but it's not allowed unless it's new
|
||||
if (cursor.par()->isChangeEdited(0, cursor.par()->size()))
|
||||
return;
|
||||
|
||||
|
||||
// we may paste some paragraphs
|
||||
|
||||
// is it an empty paragraph?
|
||||
@ -2705,7 +2705,7 @@ LyXText::getColumnNearX(BufferView * bview, Row * row, int & x,
|
||||
x = int(tmpx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
while (vc <= last && tmpx <= x) {
|
||||
c = vis2log(vc);
|
||||
last_tmpx = tmpx;
|
||||
|
@ -54,7 +54,7 @@ using lyx::pos_type;
|
||||
LyXText::LyXText(BufferView * bv)
|
||||
: height(0), width(0), first_y(0),
|
||||
inset_owner(0), the_locking_inset(0), need_break_row(0),
|
||||
refresh_y(0), refresh_row(0), bv_owner(bv),
|
||||
refresh_y(0), refresh_row(0), bv_owner(bv),
|
||||
status_(LyXText::UNCHANGED), firstrow(0), lastrow(0)
|
||||
{}
|
||||
|
||||
@ -62,7 +62,7 @@ LyXText::LyXText(BufferView * bv)
|
||||
LyXText::LyXText(InsetText * inset)
|
||||
: height(0), width(0), first_y(0),
|
||||
inset_owner(inset), the_locking_inset(0), need_break_row(0),
|
||||
refresh_y(0), refresh_row(0), bv_owner(0),
|
||||
refresh_y(0), refresh_row(0), bv_owner(0),
|
||||
status_(LyXText::UNCHANGED), firstrow(0), lastrow(0)
|
||||
{}
|
||||
|
||||
|
@ -380,7 +380,7 @@ void doInsertInset(LyXText * lt, FuncRequest const & cmd,
|
||||
{
|
||||
Inset * inset = createInset(cmd);
|
||||
BufferView * bv = cmd.view();
|
||||
|
||||
|
||||
if (inset) {
|
||||
bool gotsel = false;
|
||||
if (lt->selection.set()) {
|
||||
|
Loading…
Reference in New Issue
Block a user