blob: 7f4cd49897c27dde757dc1ed9c906aecf3c919ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
$NetBSD: patch-src_insets_InsetTabular.cpp,v 1.1 2012/11/23 12:32:00 joerg Exp $
--- src/insets/InsetTabular.cpp.orig 2012-11-22 22:03:25.000000000 +0000
+++ src/insets/InsetTabular.cpp
@@ -176,6 +176,56 @@ private:
};
+string const tostr(LyXAlignment const & num)
+{
+ switch (num) {
+ case LYX_ALIGN_NONE:
+ return "none";
+ case LYX_ALIGN_BLOCK:
+ return "block";
+ case LYX_ALIGN_LEFT:
+ return "left";
+ case LYX_ALIGN_CENTER:
+ return "center";
+ case LYX_ALIGN_RIGHT:
+ return "right";
+ case LYX_ALIGN_LAYOUT:
+ return "layout";
+ case LYX_ALIGN_SPECIAL:
+ return "special";
+ }
+ return string();
+}
+
+
+string const tostr(Tabular::VAlignment const & num)
+{
+ switch (num) {
+ case Tabular::LYX_VALIGN_TOP:
+ return "top";
+ case Tabular::LYX_VALIGN_MIDDLE:
+ return "middle";
+ case Tabular::LYX_VALIGN_BOTTOM:
+ return "bottom";
+ }
+ return string();
+}
+
+
+string const tostr(Tabular::BoxType const & num)
+{
+ switch (num) {
+ case Tabular::BOX_NONE:
+ return "none";
+ case Tabular::BOX_PARBOX:
+ return "parbox";
+ case Tabular::BOX_MINIPAGE:
+ return "minipage";
+ }
+ return string();
+}
+
+
template <class T>
string const write_attribute(string const & name, T const & t)
{
@@ -232,56 +282,6 @@ string const write_attribute(string cons
}
-string const tostr(LyXAlignment const & num)
-{
- switch (num) {
- case LYX_ALIGN_NONE:
- return "none";
- case LYX_ALIGN_BLOCK:
- return "block";
- case LYX_ALIGN_LEFT:
- return "left";
- case LYX_ALIGN_CENTER:
- return "center";
- case LYX_ALIGN_RIGHT:
- return "right";
- case LYX_ALIGN_LAYOUT:
- return "layout";
- case LYX_ALIGN_SPECIAL:
- return "special";
- }
- return string();
-}
-
-
-string const tostr(Tabular::VAlignment const & num)
-{
- switch (num) {
- case Tabular::LYX_VALIGN_TOP:
- return "top";
- case Tabular::LYX_VALIGN_MIDDLE:
- return "middle";
- case Tabular::LYX_VALIGN_BOTTOM:
- return "bottom";
- }
- return string();
-}
-
-
-string const tostr(Tabular::BoxType const & num)
-{
- switch (num) {
- case Tabular::BOX_NONE:
- return "none";
- case Tabular::BOX_PARBOX:
- return "parbox";
- case Tabular::BOX_MINIPAGE:
- return "minipage";
- }
- return string();
-}
-
-
// I would have liked a fromstr template a lot better. (Lgb)
bool string2type(string const str, LyXAlignment & num)
{
|