]> git.lyx.org Git - lyx.git/blobdiff - src/PrinterParams.cpp
Disable CheckTeX while buffer is processed
[lyx.git] / src / PrinterParams.cpp
index 7a96aae4717db20be3c017030537143c4e9e866b..fff8c63bf84ab27ee96d1c76b0b28cf20846a2d5 100644 (file)
 
 #include "PrinterParams.h"
 
-#include "support/lstrings.h"
-
-#include <boost/assert.hpp>
+#include "LyXRC.h"
 
+#include "support/lassert.h"
+#include "support/lstrings.h"
 
-using namespace std;
 
 namespace lyx {
 
-
-PrinterParams::PrinterParams(Target t,
-                            string const & pname,
-                            string const & fname,
-                            bool all,
-                            unsigned int from,
-                            unsigned int to,
-                            bool odd,
-                            bool even,
-                            unsigned int copies,
-                            bool sorted,
-                            bool reverse)
-       : target(t),
-         printer_name(pname),
-         file_name(fname),
-         all_pages(all),
-         from_page(from),
-         to_page(to),
-         odd_pages(odd),
-         even_pages(even),
-         count_copies(copies),
-         sorted_copies(sorted),
-         reverse_order(reverse)
+PrinterParams::PrinterParams()
 {
-       testInvariant();
-}
+       target = PRINTER;
+       all_pages = true;
+       from_page = 1;
+       to_page = 0;
+       odd_pages = true;
+       even_pages = true;
+       count_copies = 1;
+       sorted_copies = false;
+       reverse_order = false;
 
-
-PrinterParams::PrinterParams(PrinterParams const & pp)
-       : target(pp.target),
-         printer_name(pp.printer_name),
-         file_name(pp.file_name),
-         all_pages(pp.all_pages),
-         from_page(pp.from_page),
-         to_page(pp.to_page),
-         odd_pages(pp.odd_pages),
-         even_pages(pp.even_pages),
-         count_copies(pp.count_copies),
-         sorted_copies(pp.sorted_copies),
-         reverse_order(pp.reverse_order)
-{
        testInvariant();
 }
 
@@ -71,13 +41,15 @@ void PrinterParams::testInvariant() const
 #ifdef ENABLE_ASSERTIONS
        switch (target) {
        case PRINTER:
-               //BOOST_ASSERT(!printer_name.empty());
+               // We can't do this test, because no default printer
+               // may have been set.
+               // LASSERT(!printer_name.empty(), /**/);
                break;
        case FILE:
-               BOOST_ASSERT(!file_name.empty());
+               LATTEST(!file_name.empty());
                break;
        default:
-               BOOST_ASSERT(false);
+               LATTEST(false);
                break;
        }
 #endif