#include "format.h"
#include "debug.h"
#include "lyxrc.h"
-#include "LColor.h"
-#include "Lsstream.h"
-
-#include "insets/inset.h"
#include "frontends/lyx_gui.h" // hexname
#include "support/filetools.h"
#include "support/forkedcall.h"
#include "support/forkedcontr.h"
-#include "support/tostr.h"
#include "support/lstrings.h"
#include "support/lyxlib.h"
+#include "support/tostr.h"
#include <boost/bind.hpp>
-#include <boost/signals/trackable.hpp>
+#include "support/std_sstream.h"
#include <fstream>
#include <iomanip>
-#include <list>
-#include <map>
-#include <utility>
-#include <vector>
-using namespace lyx::support;
+namespace support = lyx::support;
+
using std::endl;
using std::find;
void InProgress::stop() const
{
if (pid)
- ForkedcallsController::get().kill(pid, 0);
+ support::ForkedcallsController::get().kill(pid, 0);
if (!metrics_file.empty())
- unlink(metrics_file);
+ support::unlink(metrics_file);
BitmapFile::const_iterator vit = snippets.begin();
BitmapFile::const_iterator vend = snippets.end();
for (; vit != vend; ++vit) {
if (!vit->second.empty())
- unlink(vit->second);
+ support::unlink(vit->second);
}
}
if (!pconverter_ || status(latex_snippet) != NotFound)
return;
- string const snippet = trim(latex_snippet);
+ string const snippet = support::trim(latex_snippet);
if (snippet.empty())
return;
cs << pconverter_->command << ' ' << latexfile << ' '
<< int(font_scaling_factor_) << ' ' << pconverter_->to;
- string const command = "sh " + LibScriptSearch(STRCONV(cs.str()));
+ string const command = "sh " + support::LibScriptSearch(STRCONV(cs.str()));
// Initiate the conversion from LaTeX to bitmap images files.
- Forkedcall::SignalTypePtr convert_ptr(new Forkedcall::SignalType);
+ support::Forkedcall::SignalTypePtr
+ convert_ptr(new support::Forkedcall::SignalType);
convert_ptr->connect(
boost::bind(&Impl::finishedGenerating, this, _1, _2));
- Forkedcall call;
+ support::Forkedcall call;
int ret = call.startscript(command, convert_ptr);
if (ret != 0) {
{
static int theCounter = 0;
string const filename = tostr(theCounter++) + "lyxpreview";
- return AddName(bufferpath, filename);
+ return support::AddName(bufferpath, filename);
}
double const a = ascent + tp_ascent;
double const d = descent - tp_descent;
- if (!float_equal(a + d, 0, 0.1))
+ if (!support::float_equal(a + d, 0, 0.1))
*it = a / (a + d);
if (++it == end)