]> mj.ucw.cz Git - paperjam.git/blobdiff - cmds.cc
Manual: Fix grammar errors found by LanguageTool
[paperjam.git] / cmds.cc
diff --git a/cmds.cc b/cmds.cc
index 97c24d58ab1d92bfa788c9563b0af1b909447d02..7fad3028cccd0d462b3ba2d7cd72c7d258319c1a 100644 (file)
--- a/cmds.cc
+++ b/cmds.cc
@@ -204,8 +204,8 @@ public:
     {
       bb->x_min += l;
       bb->x_max -= r;
-      bb->y_min += b;
-      bb->y_max -= t;
+      bb->y_min += t;
+      bb->y_max -= b;
       if (bb->x_min >= bb->x_max || bb->y_min >= bb->y_max)
        err("Margins cannot be larger than the whole page");
     }
@@ -213,8 +213,8 @@ public:
     {
       bb->x_min -= l;
       bb->x_max += r;
-      bb->y_min -= b;
-      bb->y_max += t;
+      bb->y_min -= t;
+      bb->y_max += b;
     }
 };
 
@@ -580,7 +580,7 @@ vector<page *> select_cmd::process(vector<page *> &pages)
          int f = validate_page_index(pages, ps.from);
          int t = validate_page_index(pages, ps.to);
          int step = (f <= t) ? 1 : -1;
-         for (int i=f; i<=t; i += step)
+         for (int i=f; i != t + step; i += step)
            selected.push_back(pages[i]);
        }
       auto processed = run_command_list(pb->commands, selected);