]> git.lyx.org Git - lyx.git/blob - src/PrinterParams.cpp
Remove updateInfo() calls in favor of doing the relevant work
[lyx.git] / src / PrinterParams.cpp
1 /**
2  * \file PrinterParams.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Allan Rae
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "PrinterParams.h"
14
15 #include "LyXRC.h"
16
17 #include "support/lassert.h"
18 #include "support/lstrings.h"
19
20
21 namespace lyx {
22
23 PrinterParams::PrinterParams()
24 {
25         target = PRINTER;
26         all_pages = true;
27         from_page = 1;
28         to_page = 0;
29         odd_pages = true;
30         even_pages = true;
31         count_copies = 1;
32         sorted_copies = false;
33         reverse_order = false;
34
35         testInvariant();
36 }
37
38
39 void PrinterParams::testInvariant() const
40 {
41 #ifdef ENABLE_ASSERTIONS
42         switch (target) {
43         case PRINTER:
44                 // We can't do this test, because no default printer
45                 // may have been set.
46                 // LASSERT(!printer_name.empty(), /**/);
47                 break;
48         case FILE:
49                 LATTEST(!file_name.empty());
50                 break;
51         default:
52                 LATTEST(false);
53                 break;
54         }
55 #endif
56 }
57
58
59 } // namespace lyx