#include <locale>
#endif
+#include <boost/tuple/tuple.hpp>
+
#ifdef __GNUG__
#pragma implementation
#endif
#include "converter.h"
#include "BufferView.h"
#include "ParagraphParameters.h"
+#include "iterators.h"
using std::ostream;
using std::ofstream;
ErtComp ert_comp;
#endif
-} // anon
-
-
#warning And _why_ is this here? (Lgb)
int unknown_layouts;
+} // anon
+
+
// candidate for move to BufferView
// (at least some parts in the beginning of the func)
//
pos = 0;
if (pp.first) {
par->layout = pp.second;
+#ifndef NO_COMPABILITY
+ } else if (ert_comp.active) {
+ par->layout = 0;
+#endif
} else {
// layout not found
// use default layout "Standard" (0)
if (tmptok == "footnote") {
inset = new InsetFoot;
+ old_float << "collapsed true\n";
} else if (tmptok == "margin") {
inset = new InsetMarginal;
+ old_float << "collapsed true\n";
} else if (tmptok == "fig") {
inset = new InsetFloat("figure");
old_float << "placement htbp\n"
- << "wide false\n";
+ << "wide false\n"
+ << "collapsed false\n";
} else if (tmptok == "tab") {
inset = new InsetFloat("table");
old_float << "placement htbp\n"
- << "wide false\n";
+ << "wide false\n"
+ << "collapsed false\n";
} else if (tmptok == "alg") {
inset = new InsetFloat("algorithm");
old_float << "placement htbp\n"
- << "wide false\n";
+ << "wide false\n"
+ << "collapsed false\n";
} else if (tmptok == "wide-fig") {
inset = new InsetFloat("figure");
//InsetFloat * tmp = new InsetFloat("figure");
//tmp->wide(true);
//inset = tmp;
old_float << "placement htbp\n"
- << "wide true\n";
+ << "wide true\n"
+ << "collapsed false\n";
} else if (tmptok == "wide-tab") {
inset = new InsetFloat("table");
//InsetFloat * tmp = new InsetFloat("table");
//tmp->wide(true);
//inset = tmp;
old_float << "placement htbp\n"
- << "wide true\n";
+ << "wide true\n"
+ << "collapsed false\n";
}
if (!inset) {
#endif
return false; // no end read yet
}
-
- old_float << "collapsed true\n";
// Here we need to check for \end_deeper and handle that
// before we do the footnote parsing.
void Buffer::changeLanguage(Language const * from, Language const * to)
{
- Paragraph * par = paragraph;
- while (par) {
- par->changeLanguage(params, from, to);
- par = par->next();
- }
+ ParIterator end = par_iterator_end();
+ for (ParIterator it = par_iterator_begin(); it != end; ++it)
+ (*it)->changeLanguage(params, from, to);
}
bool Buffer::isMultiLingual()
{
- Paragraph * par = paragraph;
- while (par) {
- if (par->isMultiLingual(params))
+ ParIterator end = par_iterator_end();
+ for (ParIterator it = par_iterator_begin(); it != end; ++it)
+ if ((*it)->isMultiLingual(params))
return true;
- par = par->next();
- }
+
return false;
}
}
return 0;
}
+
+
+ParIterator Buffer::par_iterator_begin()
+{
+ return ParIterator(paragraph);
+}
+
+
+ParIterator Buffer::par_iterator_end()
+{
+ return ParIterator();
+}