#include <config.h>
-
#include "ControlPrint.h"
#include "ViewBase.h"
#include "ButtonController.h"
#include "buffer.h"
+#include "bufferparams.h"
#include "gettext.h"
#include "helper_funcs.h"
#include "PrinterParams.h"
#include "exporter.h"
-#include "converter.h"
#include "frontends/Alert.h"
+#include "support/tostr.h"
#include "support/LAssert.h"
#include "support/filetools.h"
#include "support/path.h"
#include "support/systemcall.h"
-#include "support/BoostFormat.h"
-#include "debug.h" // for lyxerr
+#include "debug.h"
+
+using namespace lyx::support;
using std::endl;
PrinterParams & ControlPrint::params() const
{
- lyx::Assert(params_);
+ Assert(params_);
return *params_;
}
void showPrintError(string const & name)
{
-#if USE_BOOST_FORMAT
- boost::format fmt(_("Could not print the document %1$s.\n"
- "Check that your printer is set up correctly."));
- fmt % MakeDisplayPath(name, 50);
- string str = fmt.str();
-#else
- string str = _("Could not print the document ");
- str += MakeDisplayPath(name, 50);
- str += _(".\nCheck that your printer is set up correctly.");
-#endif
+ string str = bformat(_("Could not print the document %1$s.\n"
+ "Check that your printer is set up correctly."),
+ MakeDisplayPath(name, 50));
Alert::error(_("Print document failed"), str);
}
command += lyxrc.print_extra_options + ' ';
}
- command += converters.dvips_options(buffer()) + ' ';
+ command += buffer()->params.dvips_options() + ' ';
if (!Exporter::Export(buffer(), "dvi", true)) {
showPrintError(buffer()->fileName());