]> git.lyx.org Git - lyx.git/blobdiff - src/mover.C
cleanup after svn hang-up, #undef CursorShape. Should be compilable ganin now.
[lyx.git] / src / mover.C
index a646f49478ce8d28923a131fceec26d398d4fcb9..e8a69a5bea9af018d6b0b21bba7e8dd581a8219d 100644 (file)
@@ -8,6 +8,8 @@
  * Full author contact details are available in file CREDITS.
  */
 
+#include <config.h>
+
 #include "mover.h"
 
 #include "support/filetools.h"
@@ -26,38 +28,43 @@ Movers movers;
 Movers system_movers;
 
 
-bool Mover::do_copy(string const & from, string const & to) const
+bool Mover::do_copy(string const & from, string const & to,
+                   string const &) const
 {
        return support::copy(from, to);
 }
 
 
-bool Mover::do_rename(string const & from, string const & to) const
+bool Mover::do_rename(string const & from, string const & to,
+                     string const &) const
 {
        return support::rename(from, to);
 }
 
 
-bool SpecialisedMover::do_copy(string const & from, string const & to) const
+bool SpecialisedMover::do_copy(string const & from, string const & to,
+                              string const & latex) const
 {
        if (command_.empty())
-               return Mover::do_copy(from, to);
+               return Mover::do_copy(from, to, latex);
 
-       string command = support::LibScriptSearch(command_);
+       string command = support::libScriptSearch(command_);
        command = support::subst(command, "$$i", from);
        command = support::subst(command, "$$o", to);
+       command = support::subst(command, "$$l", latex);
 
        support::Systemcall one;
        return one.startscript(support::Systemcall::Wait, command) == 0;
 }
 
 
-bool SpecialisedMover::do_rename(string const & from, string const & to) const
+bool SpecialisedMover::do_rename(string const & from, string const & to,
+                                string const & latex) const
 {
        if (command_.empty())
-               return Mover::do_rename(from, to);
+               return Mover::do_rename(from, to, latex);
 
-       if (!do_copy(from, to))
+       if (!do_copy(from, to, latex))
                return false;
        return support::unlink(from) == 0;
 }