]> git.lyx.org Git - lyx.git/blob - src/OutputParams.cpp
Move several common types to support/types.h
[lyx.git] / src / OutputParams.cpp
1 /**
2  * \file OutputParams.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  *  \author Angus Leeming
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "OutputParams.h"
14 #include "Exporter.h"
15 #include "Encoding.h"
16
17
18 namespace lyx {
19
20
21 OutputParams::OutputParams(Encoding const * enc)
22         : encoding(enc), exportdata(new ExportData)
23 {
24         // Note: in PreviewLoader::Impl::dumpPreamble
25         // OutputParams runparams(0);
26         if (enc && enc->package() == Encoding::japanese)
27                 use_japanese = true;
28         if (enc && enc->package() == Encoding::CJK)
29                 use_CJK = true;
30 }
31
32
33 OutputParams::~OutputParams()
34 {}
35
36
37 bool OutputParams::isLaTeX() const
38 {
39         return flavor == LATEX || flavor == LUATEX || flavor == DVILUATEX
40                 || flavor == PDFLATEX || flavor == XETEX;
41 }
42
43
44 bool OutputParams::isFullUnicode() const
45 {
46         return flavor == LUATEX || flavor == DVILUATEX || flavor == XETEX;
47 }
48
49
50 bool OutputParams::useBidiPackage() const
51 {
52         return use_polyglossia && flavor == XETEX;
53 }
54
55 } // namespace lyx