]> git.lyx.org Git - lyx.git/blob - src/ParameterStruct.h
work around for bug reported by Mario Morandini
[lyx.git] / src / ParameterStruct.h
1 // -*- C++ -*-
2
3 #ifndef PARAMETERSTRUCT_H
4 #define PARAMETERSTRUCT_H
5
6 #include "vspace.h"
7 #include "Spacing.h"
8 #include "layout.h"
9
10 #ifdef __GNUG__
11 #pragma interface
12 #endif
13
14 ///
15 struct ParameterStruct {
16         ///
17         ParameterStruct();
18         ///
19         typedef unsigned int depth_type;
20         ///
21         VSpace added_space_top;
22         ///
23         VSpace added_space_bottom;
24         ///
25         Spacing spacing;
26         ///
27         bool noindent;
28         ///
29         bool line_top;
30         ///
31         bool line_bottom;
32         ///
33         bool pagebreak_top;
34         ///
35         bool pagebreak_bottom;
36         ///
37         LyXAlignment align;
38         ///
39         depth_type depth;
40         ///
41         bool start_of_appendix;
42         ///
43         bool appendix;
44         ///
45         string labelstring;
46         ///
47         string labelwidthstring;
48 #ifndef NO_PEXTRA_REALLY
49         ///
50         int pextra_type;
51         ///
52         string pextra_width;
53         ///
54         string pextra_widthp;
55         ///
56         int pextra_alignment;
57         ///
58         bool pextra_hfill;
59         ///
60         bool pextra_start_minipage;
61 #endif
62 };
63
64
65 inline
66 ParameterStruct::ParameterStruct()
67         : noindent(false), line_top(false), line_bottom(false),
68           pagebreak_top(false), pagebreak_bottom(false),
69           align(LYX_ALIGN_BLOCK), depth(0), start_of_appendix(false),
70           appendix(false)
71 #ifndef NO_PEXTRA_REALLY
72         , pextra_type(0), pextra_alignment(0), pextra_hfill(false),
73         pextra_start_minipage(false)
74 #endif
75 {}
76
77
78 inline
79 bool operator==(ParameterStruct const & ps1,
80                 ParameterStruct const & ps2)
81 {
82         return ps1.added_space_top == ps2.added_space_top
83                 && ps1.added_space_bottom == ps2.added_space_bottom
84                 && ps1.spacing == ps2.spacing
85                 && ps1.noindent == ps2.noindent
86                 && ps1.line_top == ps2.line_top
87                 && ps1.line_bottom == ps2.line_bottom
88                 && ps1.pagebreak_top == ps2.pagebreak_top
89                 && ps1.pagebreak_bottom == ps2.pagebreak_bottom
90                 && ps1.align == ps2.align
91                 && ps1.depth == ps2.depth
92                 && ps1.start_of_appendix == ps2.start_of_appendix
93                 && ps1.appendix == ps2.appendix
94                 && ps1.labelstring == ps2.labelstring
95                 && ps1.labelwidthstring == ps2.labelwidthstring
96 #ifndef NO_PEXTRA_REALLY
97                 && ps1.pextra_type == ps2.pextra_type
98                 && ps1.pextra_width == ps2.pextra_width
99                 && ps1.pextra_widthp == ps2.pextra_widthp
100                 && ps1.pextra_alignment == ps2.pextra_alignment
101                 && ps1.pextra_hfill == ps2.pextra_hfill
102                 && ps1.pextra_start_minipage == ps2.pextra_start_minipage
103 #endif
104         ;
105
106 }
107
108 #endif