]> git.lyx.org Git - lyx.git/blob - src/PrinterParams.cpp
#5502 add binding for full screen toggle on mac
[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         printer_name = lyxrc.printer;
27         file_name = std::string();
28         all_pages = true;
29         from_page = 1;
30         to_page = 0;
31         odd_pages = true;
32         even_pages = true;
33         count_copies = 1;
34         sorted_copies = false;
35         reverse_order = false;
36
37         testInvariant();
38 }
39
40
41 void PrinterParams::testInvariant() const
42 {
43 #ifdef ENABLE_ASSERTIONS
44         switch (target) {
45         case PRINTER:
46                 // We can't do this test, because no default printer
47                 // may have been set.
48                 // LASSERT(!printer_name.empty(), /**/);
49                 break;
50         case FILE:
51                 LATTEST(!file_name.empty());
52                 break;
53         default:
54                 LATTEST(false);
55                 break;
56         }
57 #endif
58 }
59
60
61 } // namespace lyx