mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
removed unused texrow::increasePos
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7021 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8f89b71dba
commit
a20a3cf798
@ -1,3 +1,9 @@
|
|||||||
|
|
||||||
|
2003-05-23 Alfredo Braunstein <abraunst@libero.it>
|
||||||
|
|
||||||
|
* texrow.[Ch] (increasePos): remove function
|
||||||
|
* exporter.C (export): removed unused var and outdated comment
|
||||||
|
|
||||||
2003-05-23 Angus Leeming <leeming@lyx.org>
|
2003-05-23 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
* latexrunparams.h: rename fragile as moving_arg.
|
* latexrunparams.h: rename fragile as moving_arg.
|
||||||
|
@ -29,11 +29,6 @@ using std::find;
|
|||||||
bool Exporter::Export(Buffer * buffer, string const & format,
|
bool Exporter::Export(Buffer * buffer, string const & format,
|
||||||
bool put_in_tempdir, string & result_file)
|
bool put_in_tempdir, string & result_file)
|
||||||
{
|
{
|
||||||
// There are so many different places that this function can be called
|
|
||||||
// from that the removal of auto insets is best done here. This ensures
|
|
||||||
// we always have a clean buffer for inserting errors found during export.
|
|
||||||
BufferView * bv = buffer->getUser();
|
|
||||||
|
|
||||||
string backend_format;
|
string backend_format;
|
||||||
LatexRunParams runparams;
|
LatexRunParams runparams;
|
||||||
runparams.flavor = LatexRunParams::LATEX;
|
runparams.flavor = LatexRunParams::LATEX;
|
||||||
|
38
src/texrow.C
38
src/texrow.C
@ -14,7 +14,6 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
using std::find_if;
|
using std::find_if;
|
||||||
using std::for_each;
|
|
||||||
using std::endl;
|
using std::endl;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
@ -31,37 +30,6 @@ private:
|
|||||||
int row_;
|
int row_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/// increment the pos value of the argument if the par id
|
|
||||||
/// is the same, and the pos parameter is larger
|
|
||||||
class increase_pos {
|
|
||||||
public:
|
|
||||||
increase_pos(int id, int pos)
|
|
||||||
: id_(id), pos_(pos) {}
|
|
||||||
|
|
||||||
void operator()(TexRow::RowList::value_type & vt) const {
|
|
||||||
if (vt.id() != id_ || vt.pos() >= pos_)
|
|
||||||
return;
|
|
||||||
vt.pos(vt.pos() + 1);
|
|
||||||
|
|
||||||
lyxerr[Debug::INFO]
|
|
||||||
<< "TeXRow::increasePos: ideally this "
|
|
||||||
"should never happen..." << endl;
|
|
||||||
|
|
||||||
// FIXME: When verified to work this clause should be deleted.
|
|
||||||
if (id_ == vt.id() && pos_ == vt.pos()) {
|
|
||||||
lyxerr[Debug::INFO]
|
|
||||||
<< "TexRow::increasePos: this should happen "
|
|
||||||
"maximum one time for each run of "
|
|
||||||
"increasePos!" << endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
int id_;
|
|
||||||
int pos_;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace anon
|
} // namespace anon
|
||||||
|
|
||||||
|
|
||||||
@ -106,12 +74,6 @@ bool TexRow::getIdFromRow(int row, int & id, int & pos) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TexRow::increasePos(int id, int pos)
|
|
||||||
{
|
|
||||||
for_each(rowlist.begin(), rowlist.end(), increase_pos(id, pos));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
TexRow & TexRow::operator+=(TexRow const & tr)
|
TexRow & TexRow::operator+=(TexRow const & tr)
|
||||||
{
|
{
|
||||||
rowlist.insert(rowlist.end(), tr.rowlist.begin(), tr.rowlist.end());
|
rowlist.insert(rowlist.end(), tr.rowlist.begin(), tr.rowlist.end());
|
||||||
|
@ -79,10 +79,6 @@ public:
|
|||||||
};
|
};
|
||||||
///
|
///
|
||||||
typedef std::list<RowItem> RowList;
|
typedef std::list<RowItem> RowList;
|
||||||
/// increment position of all other RowItems
|
|
||||||
/// with same par id, to avoid placing error insets
|
|
||||||
/// at the same position
|
|
||||||
void increasePos(int id, int pos);
|
|
||||||
private:
|
private:
|
||||||
/// number of lines
|
/// number of lines
|
||||||
unsigned int count;
|
unsigned int count;
|
||||||
|
Loading…
Reference in New Issue
Block a user