Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 :
21 : #include <xmloff/txtprmap.hxx>
22 :
23 : #include <tools/debug.hxx>
24 :
25 : #include <xmloff/xmlnmspe.hxx>
26 : #include <xmloff/xmltoken.hxx>
27 : #include "txtprhdl.hxx"
28 :
29 : using namespace ::com::sun::star;
30 : using namespace ::com::sun::star::uno;
31 : using namespace ::xmloff::token;
32 :
33 : #define _M_E( a, p, l, t, c ) \
34 : { a, sizeof(a)-1, XML_NAMESPACE_##p, XML_##l, t, c, SvtSaveOptions::ODFVER_010, false }
35 :
36 : #define _M_EV( a, p, l, t, c, v ) \
37 : { a, sizeof(a)-1, XML_NAMESPACE_##p, XML_##l, t, c, v, false }
38 :
39 : #define _M_ED( a, p, l, t, c ) \
40 : { a, sizeof(a)-1, XML_NAMESPACE_##p, XML_##l, (t) | MID_FLAG_DEFAULT_ITEM_EXPORT, c, SvtSaveOptions::ODFVER_010, false }
41 :
42 : // text properties
43 : #define MT_E( a, p, l, t, c ) \
44 : _M_E( a, p, l, (t|XML_TYPE_PROP_TEXT), c )
45 : #define MT_ED( a, p, l, t, c ) \
46 : _M_ED( a, p, l, (t|XML_TYPE_PROP_TEXT), c )
47 : #define MT_EV( a, p, l, t, c, v ) \
48 : _M_EV( a, p, l, (t|XML_TYPE_PROP_TEXT), c, v )
49 :
50 : // paragraph properties
51 : #define MP_E( a, p, l, t, c ) \
52 : _M_E( a, p, l, (t|XML_TYPE_PROP_PARAGRAPH), c )
53 : #define MP_ED( a, p, l, t, c ) \
54 : _M_ED( a, p, l, (t|XML_TYPE_PROP_PARAGRAPH), c )
55 :
56 : // graphic properties
57 : #define MG_E( a, p, l, t, c ) \
58 : _M_E( a, p, l, (t|XML_TYPE_PROP_GRAPHIC), c )
59 : #define MG_ED( a, p, l, t, c ) \
60 : _M_ED( a, p, l, (t|XML_TYPE_PROP_GRAPHIC), c )
61 : #define MG_EV( a, p, l, t, c, v ) \
62 : _M_EV( a, p, l, (t|XML_TYPE_PROP_GRAPHIC), c, v )
63 :
64 : // section properties
65 : #define MS_E( a, p, l, t, c ) \
66 : _M_E( a, p, l, (t|XML_TYPE_PROP_SECTION), c )
67 :
68 : // ruby properties
69 : #define MR_E( a, p, l, t, c ) \
70 : _M_E( a, p, l, (t|XML_TYPE_PROP_RUBY), c )
71 :
72 : // extensions import/export
73 : #define MAP_EXT(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false }
74 : // extensions import only
75 : #define MAP_EXT_I(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_012_EXT_COMPAT, true }
76 :
77 : #define M_END() \
78 : { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010, false }
79 :
80 : //UUUU
81 : #define _MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010, false }
82 : #define GMAP(name,prefix,token,type,context) _MAP(name,prefix,token,static_cast<sal_Int32>(type|XML_TYPE_PROP_GRAPHIC),context)
83 :
84 : XMLPropertyMapEntry aXMLParaPropMap[] =
85 : {
86 : // RES_UNKNOWNATR_CONTAINER
87 : MP_E( "ParaUserDefinedAttributes", TEXT, XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
88 : // RES_LR_SPACE
89 : // !!! DO NOT REORDER THE MARGINS !!!
90 : MP_E( "ParaLeftMargin", FO, MARGIN, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARAMARGINALL ),
91 : MP_E( "ParaLeftMarginRelative", FO, MARGIN, XML_TYPE_PERCENT16, CTF_PARAMARGINALL_REL ),
92 : MP_E( "ParaLeftMargin", FO, MARGIN_LEFT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARALEFTMARGIN ),
93 : MP_E( "ParaLeftMarginRelative", FO, MARGIN_LEFT, XML_TYPE_PERCENT16, CTF_PARALEFTMARGIN_REL ),
94 : MP_E( "ParaRightMargin", FO, MARGIN_RIGHT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARARIGHTMARGIN ),
95 : MP_E( "ParaRightMarginRelative", FO, MARGIN_RIGHT, XML_TYPE_PERCENT16, CTF_PARARIGHTMARGIN_REL ),
96 : // RES_UL_SPACE
97 : MP_E( "ParaTopMargin", FO, MARGIN_TOP, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARATOPMARGIN ),
98 : MP_E( "ParaTopMarginRelative", FO, MARGIN_TOP, XML_TYPE_PERCENT16, CTF_PARATOPMARGIN_REL ),
99 : MP_E( "ParaBottomMargin", FO, MARGIN_BOTTOM, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARABOTTOMMARGIN ),
100 : MP_E( "ParaBottomMarginRelative",FO, MARGIN_BOTTOM, XML_TYPE_PERCENT16, CTF_PARABOTTOMMARGIN_REL ),
101 : MAP_EXT_I( "ParaContextMargin", XML_NAMESPACE_STYLE, XML_CONTEXTUAL_SPACING, XML_TYPE_BOOL|XML_TYPE_PROP_PARAGRAPH, 0 ), // proposed ODF 1.2+ and was written by LO<=4.2
102 : MAP_EXT( "ParaContextMargin", XML_NAMESPACE_LO_EXT, XML_CONTEXTUAL_SPACING, XML_TYPE_BOOL|XML_TYPE_PROP_PARAGRAPH, 0 ), // extension namespace
103 : // RES_CHRATR_CASEMAP
104 : MT_E( "CharCaseMap", FO, FONT_VARIANT, XML_TYPE_TEXT_CASEMAP_VAR, 0 ),
105 : MT_E( "CharCaseMap", FO, TEXT_TRANSFORM, XML_TYPE_TEXT_CASEMAP, 0 ),
106 : // RES_CHRATR_COLOR
107 : MT_ED( "CharColor", FO, COLOR, XML_TYPE_COLORAUTO|MID_FLAG_MERGE_PROPERTY, 0 ),
108 : MT_ED( "CharColor", STYLE, USE_WINDOW_FONT_COLOR, XML_TYPE_ISAUTOCOLOR|MID_FLAG_MERGE_PROPERTY, 0 ),
109 : // RES_CHRATR_CONTOUR
110 : MT_E( "CharContoured", STYLE, TEXT_OUTLINE, XML_TYPE_BOOL, 0 ),
111 : // RES_CHRATR_CROSSEDOUT
112 : MT_E( "CharStrikeout", STYLE, TEXT_LINE_THROUGH_STYLE, XML_TYPE_TEXT_CROSSEDOUT_STYLE|MID_FLAG_MERGE_PROPERTY, 0),
113 : MT_E( "CharStrikeout", STYLE, TEXT_LINE_THROUGH_TYPE, XML_TYPE_TEXT_CROSSEDOUT_TYPE|MID_FLAG_MERGE_PROPERTY, 0),
114 : MT_E( "CharStrikeout", STYLE, TEXT_LINE_THROUGH_WIDTH, XML_TYPE_TEXT_CROSSEDOUT_WIDTH|MID_FLAG_MERGE_PROPERTY, 0),
115 : MT_E( "CharStrikeout", STYLE, TEXT_LINE_THROUGH_TEXT, XML_TYPE_TEXT_CROSSEDOUT_TEXT|MID_FLAG_MERGE_PROPERTY, 0),
116 : // RES_CHRATR_ESCAPEMENT
117 : MT_E( "CharEscapement", STYLE, TEXT_POSITION, XML_TYPE_TEXT_ESCAPEMENT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
118 : MT_E( "CharEscapementHeight", STYLE, TEXT_POSITION, XML_TYPE_TEXT_ESCAPEMENT_HEIGHT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
119 : // RES_CHRATR_FONT
120 : MT_ED( "CharFontName", STYLE, FONT_NAME, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME ),
121 : MT_ED( "CharFontName", FO, FONT_FAMILY, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME ),
122 : MT_ED( "CharFontStyleName",STYLE, FONT_STYLE_NAME, XML_TYPE_STRING, CTF_FONTSTYLENAME ),
123 : MT_ED( "CharFontFamily", STYLE, FONT_FAMILY_GENERIC,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY ),
124 : MT_ED( "CharFontPitch", STYLE, FONT_PITCH, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH ),
125 : MT_ED( "CharFontCharSet", STYLE, FONT_CHARSET, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET ),
126 : // RES_CHRATR_FONTSIZE
127 : MT_ED( "CharHeight", FO, FONT_SIZE, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT ),
128 : MT_ED( "CharPropHeight",FO, FONT_SIZE, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL ),
129 : MT_ED( "CharDiffHeight",STYLE,FONT_SIZE_REL, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF ),
130 : // RES_CHRATR_KERNING
131 : MT_E( "CharKerning", FO, LETTER_SPACING, XML_TYPE_TEXT_KERNING, 0 ),
132 : // RES_CHRATR_LANGUAGE
133 : MT_ED( "CharLocale", STYLE, RFC_LANGUAGE_TAG, XML_TYPE_CHAR_RFC_LANGUAGE_TAG|MID_FLAG_MERGE_PROPERTY, 0 ),
134 : MT_ED( "CharLocale", FO, LANGUAGE, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
135 : MT_ED( "CharLocale", FO, SCRIPT, XML_TYPE_CHAR_SCRIPT|MID_FLAG_MERGE_PROPERTY, 0 ),
136 : MT_ED( "CharLocale", FO, COUNTRY, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
137 : // RES_CHRATR_POSTURE
138 : MT_E( "CharPosture", FO, FONT_STYLE, XML_TYPE_TEXT_POSTURE, 0 ),
139 : // RES_CHRATR_PROPORTIONALFONTSIZE
140 : // TODO: not used?
141 : // RES_CHRATR_SHADOWED
142 : MT_E( "CharShadowed", FO, TEXT_SHADOW, XML_TYPE_TEXT_SHADOWED, 0 ),
143 : // RES_CHRATR_UNDERLINE
144 : MT_E( "CharUnderline", STYLE, TEXT_UNDERLINE_STYLE, XML_TYPE_TEXT_UNDERLINE_STYLE|MID_FLAG_MERGE_PROPERTY, CTF_UNDERLINE ),
145 : MT_E( "CharUnderline", STYLE, TEXT_UNDERLINE_TYPE, XML_TYPE_TEXT_UNDERLINE_TYPE|MID_FLAG_MERGE_PROPERTY, 0 ),
146 : MT_E( "CharUnderline", STYLE, TEXT_UNDERLINE_WIDTH, XML_TYPE_TEXT_UNDERLINE_WIDTH|MID_FLAG_MERGE_PROPERTY, 0 ),
147 : MT_E( "CharUnderlineColor", STYLE, TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_COLOR|MID_FLAG_MULTI_PROPERTY, CTF_UNDERLINE_COLOR ),
148 : MT_E( "CharUnderlineHasColor", STYLE, TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_HASCOLOR|MID_FLAG_MERGE_ATTRIBUTE, CTF_UNDERLINE_HASCOLOR ),
149 : // RES_CHRATR_WEIGHT
150 : MT_E( "CharWeight", FO, FONT_WEIGHT, XML_TYPE_TEXT_WEIGHT, 0 ),
151 : // RES_CHRATR_RSID
152 : { "Rsid", sizeof("Rsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_RSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false },
153 : // RES_PARATR_RSID
154 : { "ParRsid", sizeof("ParRsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_PARRSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false },
155 : // RES_CHRATR_WORDLINEMODE
156 : MT_E( "CharWordMode", STYLE, TEXT_UNDERLINE_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
157 : MT_E( "CharWordMode", STYLE, TEXT_OVERLINE_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
158 : MT_E( "CharWordMode", STYLE, TEXT_LINE_THROUGH_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
159 : // RES_CHRATR_AUTOKERN
160 : MT_E( "CharAutoKerning", STYLE, LETTER_KERNING, XML_TYPE_BOOL, 0 ),
161 : // RES_CHRATR_BLINK
162 : MT_E( "CharFlash", STYLE, TEXT_BLINKING, XML_TYPE_BOOL, 0 ),
163 : // RES_CHRATR_NOHYPHEN
164 : // TODO: not used?
165 : // RES_CHRATR_NOLINEBREAK
166 : // TODO: not used?
167 : // RES_CHRATR_BACKGROUND
168 : MT_E( "CharBackColor", FO, BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
169 : MT_E( "CharBackTransparent", FO, BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
170 : MT_E( "CharBackColor", FO, TEXT_BACKGROUND_COLOR, XML_TYPE_COLOR|MID_FLAG_SPECIAL_ITEM_EXPORT, CTF_OLDTEXTBACKGROUND ),
171 : // RES_CHRATR_CJK_FONT
172 : MT_ED( "CharFontNameAsian", STYLE, FONT_NAME_ASIAN, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME_CJK ),
173 : MT_ED( "CharFontNameAsian", STYLE, FONT_FAMILY_ASIAN, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME_CJK ),
174 : MT_ED( "CharFontStyleNameAsian",STYLE, FONT_STYLE_NAME_ASIAN, XML_TYPE_STRING, CTF_FONTSTYLENAME_CJK ),
175 : MT_ED( "CharFontFamilyAsian", STYLE, FONT_FAMILY_GENERIC_ASIAN,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY_CJK ),
176 : MT_ED( "CharFontPitchAsian", STYLE, FONT_PITCH_ASIAN, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH_CJK ),
177 : MT_ED( "CharFontCharSetAsian", STYLE, FONT_CHARSET_ASIAN, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET_CJK ),
178 : // RES_CHRATR_CJK_FONTSIZE
179 : MT_ED( "CharHeightAsian", STYLE, FONT_SIZE_ASIAN, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_CJK ),
180 : MT_ED( "CharPropHeightAsian",STYLE, FONT_SIZE_ASIAN, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL_CJK ),
181 : MT_ED( "CharDiffHeightAsian",STYLE,FONT_SIZE_REL_ASIAN, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF_CJK ),
182 : // RES_CHRATR_CJK_LANGUAGE
183 : MT_ED( "CharLocaleAsian", STYLE, RFC_LANGUAGE_TAG_ASIAN, XML_TYPE_CHAR_RFC_LANGUAGE_TAG|MID_FLAG_MERGE_PROPERTY, 0 ),
184 : MT_ED( "CharLocaleAsian", STYLE, LANGUAGE_ASIAN, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
185 : MT_ED( "CharLocaleAsian", STYLE, SCRIPT_ASIAN, XML_TYPE_CHAR_SCRIPT|MID_FLAG_MERGE_PROPERTY, 0 ),
186 : MT_ED( "CharLocaleAsian", STYLE, COUNTRY_ASIAN, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
187 : // RES_CHRATR_CJK_POSTURE
188 : MT_E( "CharPostureAsian", STYLE, FONT_STYLE_ASIAN, XML_TYPE_TEXT_POSTURE, 0 ),
189 : // RES_CHRATR_CJK_WEIGHT
190 : MT_E( "CharWeightAsian", STYLE, FONT_WEIGHT_ASIAN, XML_TYPE_TEXT_WEIGHT, 0 ),
191 : // RES_CHRATR_CTL_FONT
192 : MT_ED( "CharFontNameComplex", STYLE, FONT_NAME_COMPLEX, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME_CTL ),
193 : MT_ED( "CharFontNameComplex", STYLE, FONT_FAMILY_COMPLEX, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME_CTL ),
194 : MT_ED( "CharFontStyleNameComplex",STYLE, FONT_STYLE_NAME_COMPLEX, XML_TYPE_STRING, CTF_FONTSTYLENAME_CTL ),
195 : MT_ED( "CharFontFamilyComplex", STYLE, FONT_FAMILY_GENERIC_COMPLEX,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY_CTL ),
196 : MT_ED( "CharFontPitchComplex", STYLE, FONT_PITCH_COMPLEX, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH_CTL ),
197 : MT_ED( "CharFontCharSetComplex", STYLE, FONT_CHARSET_COMPLEX, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET_CTL ),
198 : // RES_CHRATR_CTL_FONTSIZE
199 : MT_ED( "CharHeightComplex", STYLE, FONT_SIZE_COMPLEX, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_CTL ),
200 : MT_ED( "CharPropHeightComplex",STYLE, FONT_SIZE_COMPLEX, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL_CTL ),
201 : MT_ED( "CharDiffHeightComplex",STYLE,FONT_SIZE_REL_COMPLEX, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF_CTL ),
202 : // RES_CHRATR_CTL_LANGUAGE
203 : MT_ED( "CharLocaleComplex", STYLE, RFC_LANGUAGE_TAG_COMPLEX, XML_TYPE_CHAR_RFC_LANGUAGE_TAG|MID_FLAG_MERGE_PROPERTY, 0 ),
204 : MT_ED( "CharLocaleComplex", STYLE, LANGUAGE_COMPLEX, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
205 : MT_ED( "CharLocaleComplex", STYLE, SCRIPT_COMPLEX, XML_TYPE_CHAR_SCRIPT|MID_FLAG_MERGE_PROPERTY, 0 ),
206 : MT_ED( "CharLocaleComplex", STYLE, COUNTRY_COMPLEX, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
207 : // RES_CHRATR_CTL_POSTURE
208 : MT_E( "CharPostureComplex", STYLE, FONT_STYLE_COMPLEX, XML_TYPE_TEXT_POSTURE, 0 ),
209 : // RES_CHRATR_CTL_WEIGHT
210 : MT_E( "CharWeightComplex", STYLE, FONT_WEIGHT_COMPLEX, XML_TYPE_TEXT_WEIGHT, 0 ),
211 : // RES_CHRATR_ROTATE
212 : MT_E( "CharRotation", STYLE, TEXT_ROTATION_ANGLE, XML_TYPE_TEXT_ROTATION_ANGLE, 0 ),
213 : MT_E( "CharRotationIsFitToLine", STYLE, TEXT_ROTATION_SCALE, XML_TYPE_TEXT_ROTATION_SCALE, 0 ),
214 : // RES_CHRATR_EMPHASIS_MARK
215 : MT_E( "CharEmphasis", STYLE, TEXT_EMPHASIZE, XML_TYPE_TEXT_EMPHASIZE, 0 ),
216 : // RES_CHRATR_TWO_LINES
217 : MT_E( "CharCombineIsOn", STYLE, TEXT_COMBINE, XML_TYPE_TEXT_COMBINE, 0 ),
218 : MT_E( "CharCombinePrefix", STYLE, TEXT_COMBINE_START_CHAR, XML_TYPE_TEXT_COMBINECHAR, 0 ),
219 : MT_E( "CharCombineSuffix", STYLE, TEXT_COMBINE_END_CHAR, XML_TYPE_TEXT_COMBINECHAR, 0 ),
220 : // RES_CHRATR_SCALEW
221 : MT_E( "CharScaleWidth", STYLE, TEXT_SCALE, XML_TYPE_PERCENT16, 0 ),
222 : //RES_CHRATR_RELIEF
223 : MT_E( "CharRelief", STYLE, FONT_RELIEF, XML_TYPE_TEXT_FONT_RELIEF, 0 ),
224 : // RES_CHRATR_HIDDEN
225 : MT_E( "CharHidden", TEXT, DISPLAY, XML_TYPE_TEXT_HIDDEN_AS_DISPLAY|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_TEXT_DISPLAY ),
226 : // RES_CHRATR_OVERLINE
227 : MT_E( "CharOverline", STYLE, TEXT_OVERLINE_STYLE, XML_TYPE_TEXT_OVERLINE_STYLE|MID_FLAG_MERGE_PROPERTY, 0 ),
228 : MT_E( "CharOverline", STYLE, TEXT_OVERLINE_TYPE, XML_TYPE_TEXT_OVERLINE_TYPE|MID_FLAG_MERGE_PROPERTY, 0 ),
229 : MT_E( "CharOverline", STYLE, TEXT_OVERLINE_WIDTH, XML_TYPE_TEXT_OVERLINE_WIDTH|MID_FLAG_MERGE_PROPERTY, 0 ),
230 : MT_E( "CharOverlineColor", STYLE, TEXT_OVERLINE_COLOR, XML_TYPE_TEXT_OVERLINE_COLOR|MID_FLAG_MULTI_PROPERTY, 0 ),
231 : MT_E( "CharOverlineHasColor", STYLE, TEXT_OVERLINE_COLOR, XML_TYPE_TEXT_OVERLINE_HASCOLOR|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
232 : // RES_CHRATR_BOX
233 : MT_EV( "CharLeftBorder", STYLE, BORDER_LINE_WIDTH, XML_TYPE_BORDER_WIDTH, CTF_CHARALLBORDERWIDTH, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
234 : MT_EV( "CharLeftBorder", STYLE, BORDER_LINE_WIDTH_LEFT, XML_TYPE_BORDER_WIDTH, CTF_CHARLEFTBORDERWIDTH, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
235 : MT_EV( "CharRightBorder", STYLE, BORDER_LINE_WIDTH_RIGHT, XML_TYPE_BORDER_WIDTH, CTF_CHARRIGHTBORDERWIDTH, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
236 : MT_EV( "CharTopBorder", STYLE, BORDER_LINE_WIDTH_TOP, XML_TYPE_BORDER_WIDTH, CTF_CHARTOPBORDERWIDTH, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
237 : MT_EV( "CharBottomBorder", STYLE, BORDER_LINE_WIDTH_BOTTOM, XML_TYPE_BORDER_WIDTH, CTF_CHARBOTTOMBORDERWIDTH, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
238 :
239 : MT_EV( "CharLeftBorderDistance", FO, PADDING, XML_TYPE_MEASURE, CTF_CHARALLBORDERDISTANCE, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
240 : MT_EV( "CharLeftBorderDistance", FO, PADDING_LEFT, XML_TYPE_MEASURE, CTF_CHARLEFTBORDERDISTANCE, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
241 : MT_EV( "CharRightBorderDistance", FO, PADDING_RIGHT, XML_TYPE_MEASURE, CTF_CHARRIGHTBORDERDISTANCE, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
242 : MT_EV( "CharTopBorderDistance", FO, PADDING_TOP, XML_TYPE_MEASURE, CTF_CHARTOPBORDERDISTANCE, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
243 : MT_EV( "CharBottomBorderDistance",FO, PADDING_BOTTOM, XML_TYPE_MEASURE, CTF_CHARBOTTOMBORDERDISTANCE, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
244 :
245 : MT_EV( "CharLeftBorder", FO, BORDER, XML_TYPE_BORDER, CTF_CHARALLBORDER, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
246 : MT_EV( "CharLeftBorder", FO, BORDER_LEFT, XML_TYPE_BORDER, CTF_CHARLEFTBORDER, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
247 : MT_EV( "CharRightBorder", FO, BORDER_RIGHT, XML_TYPE_BORDER, CTF_CHARRIGHTBORDER, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
248 : MT_EV( "CharTopBorder", FO, BORDER_TOP, XML_TYPE_BORDER, CTF_CHARTOPBORDER, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
249 : MT_EV( "CharBottomBorder", FO, BORDER_BOTTOM, XML_TYPE_BORDER, CTF_CHARBOTTOMBORDER, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
250 : // RES_CHRATR_SHADOW
251 : MT_EV( "CharShadowFormat", STYLE, SHADOW, XML_TYPE_TEXT_SHADOW, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
252 : // RES_TXTATR_INETFMT
253 : // TODO
254 : // RES_TXTATR_REFMARK
255 : // TODO
256 : // RES_TXTATR_TOXMARK
257 : // TODO
258 : // RES_TXTATR_CHARFMT
259 : // M_E_SI( TEXT, style_name, RES_TXTATR_CHARFMT, 0 ),
260 : // RES_TXTATR_CJK_RUBY
261 : // TODO
262 : // RES_TXTATR_FIELD
263 : // TODO
264 : // RES_TXTATR_FLYCNT
265 : // TODO
266 : // RES_TXTATR_FTN
267 : // TODO
268 : // RES_TXTATR_SOFTHYPH
269 : // TODO
270 : // RES_TXTATR_HARDBLANK
271 : // TODO
272 :
273 : // RES_PARATR_LINESPACING
274 : MP_E( "ParaLineSpacing", FO, LINE_HEIGHT, XML_TYPE_LINE_SPACE_FIXED, 0 ),
275 : MP_E( "ParaLineSpacing", STYLE, LINE_HEIGHT_AT_LEAST, XML_TYPE_LINE_SPACE_MINIMUM, 0 ),
276 : MP_E( "ParaLineSpacing", STYLE, LINE_SPACING, XML_TYPE_LINE_SPACE_DISTANCE, 0 ),
277 : // RES_PARATR_ADJUST
278 : MP_E( "ParaAdjust", FO, TEXT_ALIGN, XML_TYPE_TEXT_ADJUST, CTF_SD_SHAPE_PARA_ADJUST ),
279 : MP_E( "ParaLastLineAdjust", FO, TEXT_ALIGN_LAST, XML_TYPE_TEXT_ADJUSTLAST, CTF_PARA_ADJUSTLAST ),
280 : MP_E( "ParaExpandSingleWord",STYLE, JUSTIFY_SINGLE_WORD,XML_TYPE_BOOL, 0 ),
281 : // RES_PARATR_SPLIT
282 : MP_E( "ParaSplit", FO, KEEP_TOGETHER, XML_TYPE_TEXT_SPLIT, 0 ),
283 : // RES_PARATR_ORPHANS
284 : MP_E( "ParaOrphans", FO, ORPHANS, XML_TYPE_NUMBER8, 0 ),
285 : // RES_PARATR_WIDOWS
286 : MP_E( "ParaWidows", FO, WIDOWS, XML_TYPE_NUMBER8, 0 ),
287 : // RES_PARATR_TABSTOP
288 : MP_ED( "ParaTabStops", STYLE, TAB_STOPS, MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_TABSTOP, CTF_TABSTOP ), // this is not really a string!
289 : // RES_PARATR_HYPHENZONE
290 : MT_E( "ParaIsHyphenation", FO, HYPHENATE, XML_TYPE_BOOL, 0 ),
291 : MT_E( "ParaHyphenationMaxLeadingChars", FO, HYPHENATION_REMAIN_CHAR_COUNT, XML_TYPE_NUMBER16_NO_ZERO, 0 ),
292 : MT_E( "ParaHyphenationMaxTrailingChars",FO, HYPHENATION_PUSH_CHAR_COUNT, XML_TYPE_NUMBER16_NO_ZERO, 0 ),
293 : MP_E( "ParaHyphenationMaxHyphens", FO, HYPHENATION_LADDER_COUNT, XML_TYPE_NUMBER16_NONE, 0 ),
294 : // RES_PARATR_DROP
295 : MP_E( "DropCapWholeWord", STYLE, LENGTH, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_DROPCAPWHOLEWORD ),
296 : MP_E( "DropCapCharStyleName", STYLE, STYLE_NAME, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_DROPCAPCHARSTYLE ),
297 : MP_E( "DropCapFormat", STYLE, DROP_CAP, MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_DROPCAP, CTF_DROPCAPFORMAT ),
298 : // RES_PARATR_REGISTER
299 : MP_E( "ParaRegisterModeActive", STYLE, REGISTER_TRUE, XML_TYPE_BOOL, 0 ),
300 : // RES_PARATR_NUMRULE
301 : MP_E( "NumberingStyleName", STYLE, LIST_STYLE_NAME, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STYLENAME, CTF_NUMBERINGSTYLENAME ),
302 :
303 : // RES_FILL_ORDER
304 : // not required
305 : // RES_FRM_SIZE
306 : // not required
307 : // RES_PAPER_BIN
308 : // not required
309 : // RES_LR_SPACE
310 :
311 : MP_E( "ParaFirstLineIndent", FO, TEXT_INDENT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARAFIRSTLINE ),
312 : MP_E( "ParaFirstLineIndentRelative", FO, TEXT_INDENT, XML_TYPE_PERCENT, CTF_PARAFIRSTLINE_REL ),
313 : MP_E( "ParaIsAutoFirstLineIndent", STYLE, AUTO_TEXT_INDENT, XML_TYPE_BOOL, 0 ),
314 : // RES_PAGEDESC
315 : MP_E( "PageDescName", STYLE, MASTER_PAGE_NAME, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STYLENAME, CTF_PAGEDESCNAME ),
316 : MP_E( "PageNumberOffset", STYLE, PAGE_NUMBER, XML_TYPE_NUMBER16_AUTO, 0 ),
317 : // RES_BREAK : TODO: does this work?
318 : MP_E( "BreakType", FO, BREAK_BEFORE, XML_TYPE_TEXT_BREAKBEFORE|MID_FLAG_MULTI_PROPERTY, 0 ),
319 : MP_E( "BreakType", FO, BREAK_AFTER, XML_TYPE_TEXT_BREAKAFTER, 0 ),
320 : // RES_CNTNT
321 : // not required
322 : // RES_HEADER
323 : // not required
324 : // RES_FOOTER
325 : // not required
326 : // RES_PRINT
327 : // not required
328 : // RES_OPAQUE
329 : // not required
330 : // RES_PROTECT
331 : // not required
332 : // RES_SURROUND
333 : // not required
334 : // RES_VERT_ORIENT
335 : // not required
336 : // RES_HORI_ORIENT
337 : // not required
338 : // RES_ANCHOR
339 : // not required
340 : // RES_BACKGROUND
341 : MP_E( "ParaBackColor", FO, BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
342 : MP_E( "ParaBackTransparent", FO, BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
343 : MP_E( "ParaBackGraphicLocation", STYLE, POSITION, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BUILDIN_CMP_ONLY, CTF_BACKGROUND_POS ),
344 : MP_E( "ParaBackGraphicFilter",STYLE, FILTER_NAME, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_FILTER ),
345 : MP_E( "ParaBackGraphicURL", STYLE, BACKGROUND_IMAGE, MID_FLAG_ELEMENT_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_URL ),
346 : // RES_BOX
347 : MP_E( "LeftBorder", STYLE, BORDER_LINE_WIDTH, XML_TYPE_BORDER_WIDTH, CTF_ALLBORDERWIDTH ),
348 : MP_E( "LeftBorder", STYLE, BORDER_LINE_WIDTH_LEFT, XML_TYPE_BORDER_WIDTH, CTF_LEFTBORDERWIDTH ),
349 : MP_E( "RightBorder", STYLE, BORDER_LINE_WIDTH_RIGHT, XML_TYPE_BORDER_WIDTH, CTF_RIGHTBORDERWIDTH ),
350 : MP_E( "TopBorder", STYLE, BORDER_LINE_WIDTH_TOP, XML_TYPE_BORDER_WIDTH, CTF_TOPBORDERWIDTH ),
351 : MP_E( "BottomBorder", STYLE, BORDER_LINE_WIDTH_BOTTOM, XML_TYPE_BORDER_WIDTH, CTF_BOTTOMBORDERWIDTH ),
352 :
353 : MP_E( "LeftBorderDistance", FO, PADDING, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_ALLBORDERDISTANCE ), // need special import filtering
354 : MP_E( "LeftBorderDistance", FO, PADDING_LEFT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_LEFTBORDERDISTANCE ),
355 : MP_E( "RightBorderDistance", FO, PADDING_RIGHT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_RIGHTBORDERDISTANCE ),
356 : MP_E( "TopBorderDistance", FO, PADDING_TOP, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_TOPBORDERDISTANCE ),
357 : MP_E( "BottomBorderDistance",FO, PADDING_BOTTOM, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_BOTTOMBORDERDISTANCE ),
358 :
359 : MP_E( "LeftBorder", FO, BORDER, XML_TYPE_BORDER, CTF_ALLBORDER ),
360 : MP_E( "LeftBorder", FO, BORDER_LEFT, XML_TYPE_BORDER, CTF_LEFTBORDER ),
361 : MP_E( "RightBorder", FO, BORDER_RIGHT, XML_TYPE_BORDER, CTF_RIGHTBORDER ),
362 : MP_E( "TopBorder", FO, BORDER_TOP, XML_TYPE_BORDER, CTF_TOPBORDER ),
363 : MP_E( "BottomBorder", FO, BORDER_BOTTOM, XML_TYPE_BORDER, CTF_BOTTOMBORDER ),
364 : // RES_SHADOW
365 : MP_E( "ParaShadowFormat", STYLE, SHADOW, XML_TYPE_TEXT_SHADOW, 0 ),
366 : // RES_FRMMACRO
367 : // not required
368 : // RES_COL
369 : // not required
370 : // RES_KEEP
371 : MP_E( "ParaKeepTogether", FO, KEEP_WITH_NEXT, XML_TYPE_TEXT_KEEP, 0 ),
372 : // RES_URL
373 : // not required
374 : // RES_EDIT_IN_READONLY
375 : // not required
376 : // RES_LAYOUT_SPLIT
377 : // not required
378 : // RES_CHAIN
379 : // not required
380 :
381 : // RES_LINENUMBER
382 : MP_E( "ParaLineNumberCount", TEXT, NUMBER_LINES, XML_TYPE_BOOL, 0 ),
383 : MP_E( "ParaLineNumberStartValue", TEXT, LINE_NUMBER, XML_TYPE_NUMBER, 0 ),
384 :
385 : // RES_FTN_AT_TXTEND
386 : // not required
387 : // RES_END_AT_TXTEND
388 : // not required
389 : MP_ED( "ParaIsCharacterDistance", STYLE, TEXT_AUTOSPACE, XML_TYPE_TEXT_AUTOSPACE, 0 ),
390 : MP_ED( "ParaIsHangingPunctuation", STYLE, PUNCTUATION_WRAP, XML_TYPE_TEXT_PUNCTUATION_WRAP, 0 ),
391 : MP_ED( "ParaIsForbiddenRules", STYLE, LINE_BREAK, XML_TYPE_TEXT_LINE_BREAK, 0 ),
392 : MP_E( "TabStopDistance", STYLE, TAB_STOP_DISTANCE, XML_TYPE_MEASURE, 0 ),
393 :
394 : // RES_PARATR_VERTALIGN
395 : MP_E( "ParaVertAlignment", STYLE, VERTICAL_ALIGN, XML_TYPE_TEXT_VERTICAL_ALIGN, 0 ),
396 :
397 : // RES_PARATR_SNAPTOGRID
398 : MP_E( "SnapToGrid", STYLE, SNAP_TO_LAYOUT_GRID, XML_TYPE_BOOL, 0 ),
399 :
400 : MP_ED( "WritingMode", STYLE, WRITING_MODE, XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT, CTF_TEXTWRITINGMODE ),
401 :
402 : MP_E( "ParaIsConnectBorder", STYLE, JOIN_BORDER, XML_TYPE_BOOL, 0 ),
403 :
404 : MP_E( "DefaultOutlineLevel", STYLE, DEFAULT_OUTLINE_LEVEL, XML_TYPE_TEXT_NUMBER8_ONE_BASED|MID_FLAG_SPECIAL_ITEM_EXPORT|MID_FLAG_NO_PROPERTY_IMPORT, CTF_DEFAULT_OUTLINE_LEVEL ),
405 :
406 : MP_ED( "FontIndependentLineSpacing", STYLE, FONT_INDEPENDENT_LINE_SPACING, XML_TYPE_BOOL, 0 ),
407 :
408 : M_END()
409 : };
410 :
411 :
412 : XMLPropertyMapEntry aXMLAdditionalTextDefaultsMap[] =
413 : {
414 : // RES_FOLLOW_TEXT_FLOW - DVO, OD 01.10.2003 #i18732#
415 : MG_ED( "IsFollowingTextFlow", STYLE, FLOW_WITH_TEXT, XML_TYPE_BOOL, 0 ),
416 :
417 : // OD 2004-05-05 #i28701# - RES_WRAP_INFLUENCE_ON_OBJPOS
418 : MG_ED( "WrapInfluenceOnPosition", DRAW, WRAP_INFLUENCE_ON_POSITION, XML_TYPE_WRAP_INFLUENCE_ON_POSITION, 0 ),
419 :
420 : M_END()
421 : };
422 :
423 : XMLPropertyMapEntry aXMLTextPropMap[] =
424 : {
425 : // RES_CHRATR_CASEMAP
426 : MT_E( "CharCaseMap", FO, FONT_VARIANT, XML_TYPE_TEXT_CASEMAP_VAR, 0 ),
427 : MT_E( "CharCaseMap", FO, TEXT_TRANSFORM, XML_TYPE_TEXT_CASEMAP, 0 ),
428 : // RES_CHRATR_COLOR
429 : MT_ED( "CharColor", FO, COLOR, XML_TYPE_COLORAUTO|MID_FLAG_MERGE_PROPERTY, 0 ),
430 : MT_ED( "CharColor", STYLE, USE_WINDOW_FONT_COLOR, XML_TYPE_ISAUTOCOLOR|MID_FLAG_MERGE_PROPERTY, 0 ),
431 : // RES_CHRATR_CONTOUR
432 : MT_E( "CharContoured", STYLE, TEXT_OUTLINE, XML_TYPE_BOOL, 0 ),
433 : // RES_CHRATR_CROSSEDOUT
434 : MT_E( "CharStrikeout", STYLE, TEXT_LINE_THROUGH_STYLE, XML_TYPE_TEXT_CROSSEDOUT_STYLE|MID_FLAG_MERGE_PROPERTY, 0),
435 : MT_E( "CharStrikeout", STYLE, TEXT_LINE_THROUGH_TYPE, XML_TYPE_TEXT_CROSSEDOUT_TYPE|MID_FLAG_MERGE_PROPERTY, 0),
436 : MT_E( "CharStrikeout", STYLE, TEXT_LINE_THROUGH_WIDTH, XML_TYPE_TEXT_CROSSEDOUT_WIDTH|MID_FLAG_MERGE_PROPERTY, 0),
437 : MT_E( "CharStrikeout", STYLE, TEXT_LINE_THROUGH_TEXT, XML_TYPE_TEXT_CROSSEDOUT_TEXT|MID_FLAG_MERGE_PROPERTY, 0),
438 : // RES_CHRATR_ESCAPEMENT
439 : MT_E( "CharEscapement", STYLE, TEXT_POSITION, XML_TYPE_TEXT_ESCAPEMENT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
440 : MT_E( "CharEscapementHeight", STYLE, TEXT_POSITION, XML_TYPE_TEXT_ESCAPEMENT_HEIGHT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
441 : // RES_CHRATR_FONT
442 : MT_ED( "CharFontName", STYLE, FONT_NAME, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME ),
443 : MT_ED( "CharFontName", FO, FONT_FAMILY, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME ),
444 : MT_ED( "CharFontStyleName",STYLE, FONT_STYLE_NAME, XML_TYPE_STRING, CTF_FONTSTYLENAME ),
445 : MT_ED( "CharFontFamily", STYLE, FONT_FAMILY_GENERIC,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY ),
446 : MT_ED( "CharFontPitch", STYLE, FONT_PITCH, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH ),
447 : MT_ED( "CharFontCharSet", STYLE, FONT_CHARSET, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET ),
448 : // RES_CHRATR_FONTSIZE
449 : MT_ED( "CharHeight", FO, FONT_SIZE, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT ),
450 : MT_ED( "CharPropHeight",FO, FONT_SIZE, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL ),
451 : MT_ED( "CharDiffHeight",STYLE,FONT_SIZE_REL, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF ),
452 : // RES_CHRATR_KERNING
453 : MT_E( "CharKerning", FO, LETTER_SPACING, XML_TYPE_TEXT_KERNING, 0 ),
454 : // RES_CHRATR_LANGUAGE
455 : MT_ED( "CharLocale", STYLE, RFC_LANGUAGE_TAG, XML_TYPE_CHAR_RFC_LANGUAGE_TAG|MID_FLAG_MERGE_PROPERTY, 0 ),
456 : MT_ED( "CharLocale", FO, LANGUAGE, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
457 : MT_ED( "CharLocale", FO, SCRIPT, XML_TYPE_CHAR_SCRIPT|MID_FLAG_MERGE_PROPERTY, 0 ),
458 : MT_ED( "CharLocale", FO, COUNTRY, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
459 : // RES_CHRATR_POSTURE
460 : MT_E( "CharPosture", FO, FONT_STYLE, XML_TYPE_TEXT_POSTURE, 0 ),
461 : // RES_CHRATR_PROPORTIONALFONTSIZE
462 : // TODO: not used?
463 : // RES_CHRATR_SHADOWED
464 : MT_E( "CharShadowed", FO, TEXT_SHADOW, XML_TYPE_TEXT_SHADOWED, 0 ),
465 : // VALIDATED UP TO THIS LINE
466 : // RES_CHRATR_UNDERLINE
467 : MT_E( "CharUnderline", STYLE, TEXT_UNDERLINE_STYLE, XML_TYPE_TEXT_UNDERLINE_STYLE|MID_FLAG_MERGE_PROPERTY, CTF_UNDERLINE ),
468 : MT_E( "CharUnderline", STYLE, TEXT_UNDERLINE_TYPE, XML_TYPE_TEXT_UNDERLINE_TYPE|MID_FLAG_MERGE_PROPERTY, 0 ),
469 : MT_E( "CharUnderline", STYLE, TEXT_UNDERLINE_WIDTH, XML_TYPE_TEXT_UNDERLINE_WIDTH|MID_FLAG_MERGE_PROPERTY, 0 ),
470 : MT_E( "CharUnderlineColor", STYLE, TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_COLOR|MID_FLAG_MULTI_PROPERTY, CTF_UNDERLINE_COLOR ),
471 : MT_E( "CharUnderlineHasColor", STYLE, TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_HASCOLOR|MID_FLAG_MERGE_ATTRIBUTE, CTF_UNDERLINE_HASCOLOR ),
472 : // RES_CHRATR_WEIGHT
473 : MT_E( "CharWeight", FO, FONT_WEIGHT, XML_TYPE_TEXT_WEIGHT, 0 ),
474 : // RES_CHRATR_RSID
475 : { "Rsid", sizeof("Rsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_RSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false },
476 : // RES_PARATR_RSID
477 : { "ParRsid", sizeof("ParRsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_PARRSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false },
478 : // RES_CHRATR_WORDLINEMODE
479 : MT_E( "CharWordMode", STYLE, TEXT_UNDERLINE_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
480 : MT_E( "CharWordMode", STYLE, TEXT_OVERLINE_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
481 : MT_E( "CharWordMode", STYLE, TEXT_LINE_THROUGH_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
482 : // RES_CHRATR_AUTOKERN
483 : MT_E( "CharAutoKerning", STYLE, LETTER_KERNING, XML_TYPE_BOOL, 0 ),
484 : // RES_CHRATR_BLINK
485 : MT_E( "CharFlash", STYLE, TEXT_BLINKING, XML_TYPE_BOOL, 0 ),
486 : // RES_CHRATR_NOHYPHEN
487 : // TODO: not used?
488 : // RES_CHRATR_NOLINEBREAK
489 : // TODO: not used?
490 : // RES_CHRATR_BACKGROUND
491 : MT_E( "CharBackColor", FO, BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
492 : MT_E( "CharBackTransparent", FO, BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
493 : { "CharShadingValue", sizeof("CharShadingValue")-1, XML_NAMESPACE_LO_EXT, XML_CHAR_SHADING_VALUE, XML_TYPE_NUMBER|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false },
494 : MT_E( "CharBackColor", FO, TEXT_BACKGROUND_COLOR, XML_TYPE_COLOR|MID_FLAG_SPECIAL_ITEM_EXPORT, CTF_OLDTEXTBACKGROUND ),
495 : // RES_CHRATR_CJK_FONT
496 : MT_ED( "CharFontNameAsian", STYLE, FONT_NAME_ASIAN, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME_CJK ),
497 : MT_ED( "CharFontNameAsian", STYLE, FONT_FAMILY_ASIAN, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME_CJK ),
498 : MT_ED( "CharFontStyleNameAsian",STYLE, FONT_STYLE_NAME_ASIAN, XML_TYPE_STRING, CTF_FONTSTYLENAME_CJK ),
499 : MT_ED( "CharFontFamilyAsian", STYLE, FONT_FAMILY_GENERIC_ASIAN,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY_CJK ),
500 : MT_ED( "CharFontPitchAsian", STYLE, FONT_PITCH_ASIAN, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH_CJK ),
501 : MT_ED( "CharFontCharSetAsian", STYLE, FONT_CHARSET_ASIAN, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET_CJK ),
502 : // RES_CHRATR_CJK_FONTSIZE
503 : MT_ED( "CharHeightAsian", STYLE, FONT_SIZE_ASIAN, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_CJK ),
504 : MT_ED( "CharPropHeightAsian",STYLE, FONT_SIZE_ASIAN, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL_CJK ),
505 : MT_ED( "CharDiffHeightAsian",STYLE,FONT_SIZE_REL_ASIAN, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF_CJK ),
506 : // RES_CHRATR_CJK_LANGUAGE
507 : MT_ED( "CharLocaleAsian", STYLE, RFC_LANGUAGE_TAG_ASIAN, XML_TYPE_CHAR_RFC_LANGUAGE_TAG|MID_FLAG_MERGE_PROPERTY, 0 ),
508 : MT_ED( "CharLocaleAsian", STYLE, LANGUAGE_ASIAN, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
509 : MT_ED( "CharLocaleAsian", STYLE, SCRIPT_ASIAN, XML_TYPE_CHAR_SCRIPT|MID_FLAG_MERGE_PROPERTY, 0 ),
510 : MT_ED( "CharLocaleAsian", STYLE, COUNTRY_ASIAN, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
511 : // RES_CHRATR_CJK_POSTURE
512 : MT_E( "CharPostureAsian", STYLE, FONT_STYLE_ASIAN, XML_TYPE_TEXT_POSTURE, 0 ),
513 : // RES_CHRATR_CJK_WEIGHT
514 : MT_E( "CharWeightAsian", STYLE, FONT_WEIGHT_ASIAN, XML_TYPE_TEXT_WEIGHT, 0 ),
515 : // RES_CHRATR_CTL_FONT
516 : MT_ED( "CharFontNameComplex", STYLE, FONT_NAME_COMPLEX, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME_CTL ),
517 : MT_ED( "CharFontNameComplex", STYLE, FONT_FAMILY_COMPLEX, XML_TYPE_TEXT_FONTFAMILYNAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTFAMILYNAME_CTL ),
518 : MT_ED( "CharFontStyleNameComplex",STYLE, FONT_STYLE_NAME_COMPLEX, XML_TYPE_STRING, CTF_FONTSTYLENAME_CTL ),
519 : MT_ED( "CharFontFamilyComplex", STYLE, FONT_FAMILY_GENERIC_COMPLEX,XML_TYPE_TEXT_FONTFAMILY, CTF_FONTFAMILY_CTL ),
520 : MT_ED( "CharFontPitchComplex", STYLE, FONT_PITCH_COMPLEX, XML_TYPE_TEXT_FONTPITCH, CTF_FONTPITCH_CTL ),
521 : MT_ED( "CharFontCharSetComplex", STYLE, FONT_CHARSET_COMPLEX, XML_TYPE_TEXT_FONTENCODING, CTF_FONTCHARSET_CTL ),
522 : // RES_CHRATR_CTL_FONTSIZE
523 : MT_ED( "CharHeightComplex", STYLE, FONT_SIZE_COMPLEX, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_CTL ),
524 : MT_ED( "CharPropHeightComplex",STYLE, FONT_SIZE_COMPLEX, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL_CTL ),
525 : MT_ED( "CharDiffHeightComplex",STYLE,FONT_SIZE_REL_COMPLEX, XML_TYPE_CHAR_HEIGHT_DIFF, CTF_CHARHEIGHT_DIFF_CTL ),
526 : // RES_CHRATR_CTL_LANGUAGE
527 : MT_ED( "CharLocaleComplex", STYLE, RFC_LANGUAGE_TAG_COMPLEX, XML_TYPE_CHAR_RFC_LANGUAGE_TAG|MID_FLAG_MERGE_PROPERTY, 0 ),
528 : MT_ED( "CharLocaleComplex", STYLE, LANGUAGE_COMPLEX, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
529 : MT_ED( "CharLocaleComplex", STYLE, SCRIPT_COMPLEX, XML_TYPE_CHAR_SCRIPT|MID_FLAG_MERGE_PROPERTY, 0 ),
530 : MT_ED( "CharLocaleComplex", STYLE, COUNTRY_COMPLEX, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
531 : // RES_CHRATR_CTL_POSTURE
532 : MT_E( "CharPostureComplex", STYLE, FONT_STYLE_COMPLEX, XML_TYPE_TEXT_POSTURE, 0 ),
533 : // RES_CHRATR_CTL_WEIGHT
534 : MT_E( "CharWeightComplex", STYLE, FONT_WEIGHT_COMPLEX, XML_TYPE_TEXT_WEIGHT, 0 ),
535 : // RES_CHRATR_ROTATE
536 : MT_E( "CharRotation", STYLE, TEXT_ROTATION_ANGLE, XML_TYPE_TEXT_ROTATION_ANGLE, 0 ),
537 : MT_E( "CharRotationIsFitToLine", STYLE, TEXT_ROTATION_SCALE, XML_TYPE_TEXT_ROTATION_SCALE, 0 ),
538 : // RES_CHRATR_EMPHASIS_MARK
539 : MT_E( "CharEmphasis", STYLE, TEXT_EMPHASIZE, XML_TYPE_TEXT_EMPHASIZE, 0 ),
540 : // RES_CHRATR_TWO_LINES
541 : MT_E( "CharCombineIsOn", STYLE, TEXT_COMBINE, XML_TYPE_TEXT_COMBINE|MID_FLAG_MULTI_PROPERTY, 0 ),
542 : MT_E( "CharCombinePrefix", STYLE, TEXT_COMBINE_START_CHAR, XML_TYPE_TEXT_COMBINECHAR, 0 ),
543 : MT_E( "CharCombineSuffix", STYLE, TEXT_COMBINE_END_CHAR, XML_TYPE_TEXT_COMBINECHAR, 0 ),
544 : // RES_CHRATR_SCALEW
545 : MT_E( "CharScaleWidth", STYLE, TEXT_SCALE, XML_TYPE_PERCENT16, 0 ),
546 : // combined characters field, does not correspond to a property
547 : MT_E( "", STYLE, TEXT_COMBINE, XML_TYPE_TEXT_COMBINE_CHARACTERS|MID_FLAG_NO_PROPERTY, CTF_COMBINED_CHARACTERS_FIELD ),
548 : //RES_CHRATR_RELIEF
549 : MT_E( "CharRelief", STYLE, FONT_RELIEF, XML_TYPE_TEXT_FONT_RELIEF, 0 ),
550 : // RES_CHRATR_HIDDEN
551 : MT_E( "CharHidden", TEXT, DISPLAY, XML_TYPE_TEXT_HIDDEN_AS_DISPLAY|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_TEXT_DISPLAY ),
552 : // RES_CHRATR_OVERLINE
553 : MT_E( "CharOverline", STYLE, TEXT_OVERLINE_STYLE, XML_TYPE_TEXT_OVERLINE_STYLE|MID_FLAG_MERGE_PROPERTY, 0 ),
554 : MT_E( "CharOverline", STYLE, TEXT_OVERLINE_TYPE, XML_TYPE_TEXT_OVERLINE_TYPE|MID_FLAG_MERGE_PROPERTY, 0 ),
555 : MT_E( "CharOverline", STYLE, TEXT_OVERLINE_WIDTH, XML_TYPE_TEXT_OVERLINE_WIDTH|MID_FLAG_MERGE_PROPERTY, 0 ),
556 : MT_E( "CharOverlineColor", STYLE, TEXT_OVERLINE_COLOR, XML_TYPE_TEXT_OVERLINE_COLOR|MID_FLAG_MULTI_PROPERTY, 0 ),
557 : MT_E( "CharOverlineHasColor", STYLE, TEXT_OVERLINE_COLOR, XML_TYPE_TEXT_OVERLINE_HASCOLOR|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
558 : // RES_CHRATR_BOX
559 : MT_EV( "CharLeftBorder", STYLE, BORDER_LINE_WIDTH, XML_TYPE_BORDER_WIDTH, CTF_CHARALLBORDERWIDTH, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
560 : MT_EV( "CharLeftBorder", STYLE, BORDER_LINE_WIDTH_LEFT, XML_TYPE_BORDER_WIDTH, CTF_CHARLEFTBORDERWIDTH, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
561 : MT_EV( "CharRightBorder", STYLE, BORDER_LINE_WIDTH_RIGHT, XML_TYPE_BORDER_WIDTH, CTF_CHARRIGHTBORDERWIDTH, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
562 : MT_EV( "CharTopBorder", STYLE, BORDER_LINE_WIDTH_TOP, XML_TYPE_BORDER_WIDTH, CTF_CHARTOPBORDERWIDTH, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
563 : MT_EV( "CharBottomBorder", STYLE, BORDER_LINE_WIDTH_BOTTOM, XML_TYPE_BORDER_WIDTH, CTF_CHARBOTTOMBORDERWIDTH, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
564 :
565 : MT_EV( "CharLeftBorderDistance", FO, PADDING, XML_TYPE_MEASURE, CTF_CHARALLBORDERDISTANCE, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
566 : MT_EV( "CharLeftBorderDistance", FO, PADDING_LEFT, XML_TYPE_MEASURE, CTF_CHARLEFTBORDERDISTANCE, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
567 : MT_EV( "CharRightBorderDistance", FO, PADDING_RIGHT, XML_TYPE_MEASURE, CTF_CHARRIGHTBORDERDISTANCE, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
568 : MT_EV( "CharTopBorderDistance", FO, PADDING_TOP, XML_TYPE_MEASURE, CTF_CHARTOPBORDERDISTANCE, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
569 : MT_EV( "CharBottomBorderDistance",FO, PADDING_BOTTOM, XML_TYPE_MEASURE, CTF_CHARBOTTOMBORDERDISTANCE, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
570 :
571 : MT_EV( "CharLeftBorder", FO, BORDER, XML_TYPE_BORDER, CTF_CHARALLBORDER, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
572 : MT_EV( "CharLeftBorder", FO, BORDER_LEFT, XML_TYPE_BORDER, CTF_CHARLEFTBORDER, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
573 : MT_EV( "CharRightBorder", FO, BORDER_RIGHT, XML_TYPE_BORDER, CTF_CHARRIGHTBORDER, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
574 : MT_EV( "CharTopBorder", FO, BORDER_TOP, XML_TYPE_BORDER, CTF_CHARTOPBORDER, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
575 : MT_EV( "CharBottomBorder", FO, BORDER_BOTTOM, XML_TYPE_BORDER, CTF_CHARBOTTOMBORDER, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
576 : // RES_CHRATR_SHADOW
577 : MT_EV( "CharShadowFormat", STYLE, SHADOW, XML_TYPE_TEXT_SHADOW, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT ),
578 : // RES_TXTATR_INETFMT
579 : MT_E( "HyperLinkURL", TEXT, XMLNS, XML_TYPE_STRING|MID_FLAG_NO_PROPERTY_IMPORT, CTF_HYPERLINK_URL ),
580 : // RES_TXTATR_REFMARK
581 : // TODO
582 : // RES_TXTATR_TOXMARK
583 : // TODO
584 : // RES_TXTATR_CHARFMT
585 : MT_E( "CharStyleName", TEXT, STYLE_NAME, XML_TYPE_STRING|MID_FLAG_NO_PROPERTY_IMPORT, CTF_CHAR_STYLE_NAME ),
586 : // RES_TXTATR_CJK_RUBY
587 : // TODO
588 : // RES_TXTATR_FIELD
589 : // TODO
590 : // RES_TXTATR_FLYCNT
591 : // TODO
592 : // RES_TXTATR_FTN
593 : // TODO
594 : // RES_TXTATR_SOFTHYPH
595 : // TODO
596 : // RES_TXTATR_HARDBLANK
597 : // TODO
598 : // RES_UNKNOWNATR_CONTAINER
599 : MT_E( "TextUserDefinedAttributes", TEXT, XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
600 : MT_ED( "ParaIsCharacterDistance", STYLE, TEXT_AUTOSPACE, XML_TYPE_TEXT_AUTOSPACE, 0 ),
601 : MT_ED( "ParaIsHangingPunctuation", STYLE, PUNCTUATION_WRAP, XML_TYPE_TEXT_PUNCTUATION_WRAP, 0 ),
602 : MT_ED( "ParaIsForbiddenRules", STYLE, LINE_BREAK, XML_TYPE_TEXT_LINE_BREAK, 0 ),
603 : MT_E( "TabStopDistance", STYLE, TAB_STOP_DISTANCE, XML_TYPE_MEASURE, 0 ),
604 :
605 : M_END()
606 : };
607 :
608 : XMLPropertyMapEntry aXMLFramePropMap[] =
609 : {
610 : // RES_FILL_ORDER
611 : // TODO: not required???
612 : // RES_FRM_SIZE
613 : MG_ED( "Width", SVG, WIDTH, XML_TYPE_MEASURE, CTF_FRAMEWIDTH_ABS ),
614 : MG_ED( "Width", FO, MIN_WIDTH, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_FRAMEWIDTH_MIN_ABS ),
615 : MG_ED( "RelativeWidth", FO, MIN_WIDTH, XML_TYPE_TEXT_REL_WIDTH_HEIGHT, CTF_FRAMEWIDTH_MIN_REL ),
616 : MG_ED( "RelativeWidth", STYLE, REL_WIDTH, XML_TYPE_TEXT_REL_WIDTH_HEIGHT, CTF_FRAMEWIDTH_REL ),
617 : MG_ED( "WidthType", FO, TEXT_BOX, XML_TYPE_NUMBER16|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FRAMEWIDTH_TYPE ),
618 : // M_ED( "RelativeWidth", STYLE, REL_WIDTH, XML_TYPE_TEXT_REL_WIDTH_HEIGHT|MID_FLAG_MULTI_PROPERTY, 0 ),
619 : // M_ED( "IsSyncWidthToHeight",STYLE, REL_WIDTH, XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT|MID_FLAG_MULTI_PROPERTY, 0 ),
620 :
621 : MG_ED( "Height", SVG, HEIGHT, XML_TYPE_MEASURE, CTF_FRAMEHEIGHT_ABS ),
622 : MG_ED( "Height", FO, MIN_HEIGHT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_FRAMEHEIGHT_MIN_ABS ),
623 : MG_ED( "RelativeHeight", FO, MIN_HEIGHT, XML_TYPE_TEXT_REL_WIDTH_HEIGHT, CTF_FRAMEHEIGHT_MIN_REL ),
624 : MG_ED( "RelativeHeight", STYLE, REL_HEIGHT, XML_TYPE_TEXT_REL_WIDTH_HEIGHT, CTF_FRAMEHEIGHT_REL ),
625 : // M_ED( "RelativeHeight", STYLE, REL_HEIGHT, XML_TYPE_TEXT_REL_WIDTH_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_FRAMEHEIGHT_REL ),
626 : // M_ED( "IsSyncHeightToWidth",STYLE, REL_HEIGHT, XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_SYNCHEIGHT ),
627 : // M_ED( "IsSyncHeightToWidth",STYLE, REL_HEIGHT, XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT_MIN, CTF_SYNCHEIGHT_MIN ),
628 : MG_ED( "SizeType", FO, TEXT_BOX, XML_TYPE_NUMBER16|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_SIZETYPE ),
629 : // RES_PAPER_BIN
630 : // not required
631 : // RES_ANCHOR
632 : // moved to here because it is not used for automatic styles
633 : MG_ED( "AnchorType", TEXT, ANCHOR_TYPE, XML_TYPE_TEXT_ANCHOR_TYPE, CTF_ANCHORTYPE ),
634 : // AnchorPage number is not required for styles!
635 : MG_ED( "HoriOrientPosition", SVG, X, XML_TYPE_MEASURE, 0 ),
636 : MG_ED( "VertOrientPosition", SVG, Y, XML_TYPE_MEASURE, 0 ),
637 : // ***** The map for automatic styles starts here *****
638 : // RES_LR_SPACE
639 : MG_E( "LeftMargin", FO, MARGIN, XML_TYPE_MEASURE, CTF_MARGINALL ),
640 : MG_E( "LeftMargin", FO, MARGIN_LEFT, XML_TYPE_MEASURE, CTF_MARGINLEFT ),
641 : MG_E( "RightMargin", FO, MARGIN_RIGHT, XML_TYPE_MEASURE, CTF_MARGINRIGHT ),
642 : // RES_UL_SPACE
643 : MG_E( "TopMargin", FO, MARGIN_TOP, XML_TYPE_MEASURE, CTF_MARGINTOP ),
644 : MG_E( "BottomMargin", FO, MARGIN_BOTTOM, XML_TYPE_MEASURE, CTF_MARGINBOTTOM ),
645 : // RES_PAGEDESC
646 : // not required
647 : // RES_BREAK
648 : // not required
649 : // RES_CNTNT
650 : // not required (accessed using API)
651 : // RES_HEADER
652 : // not required
653 : // RES_FOOTER
654 : // not required
655 : // RES_PRINT
656 : MG_E( "Print", STYLE, PRINT_CONTENT, XML_TYPE_BOOL, 0 ),
657 : // RES_OPAQUE
658 : MG_ED( "Opaque", STYLE, RUN_THROUGH, XML_TYPE_TEXT_OPAQUE, 0 ),
659 : // RES_PROTECT
660 : MG_E( "ContentProtected", STYLE, PROTECT, XML_TYPE_TEXT_PROTECT_CONTENT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
661 : MG_E( "SizeProtected", STYLE, PROTECT, XML_TYPE_TEXT_PROTECT_SIZE|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
662 : MG_E( "PositionProtected", STYLE, PROTECT, XML_TYPE_TEXT_PROTECT_POSITION|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
663 : // RES_SURROUND
664 : MG_ED( "TextWrap", STYLE, WRAP, XML_TYPE_TEXT_WRAP, CTF_WRAP ),
665 : MG_ED( "SurroundAnchorOnly", STYLE, NUMBER_WRAPPED_PARAGRAPHS, XML_TYPE_TEXT_PARAGRAPH_ONLY, CTF_WRAP_PARAGRAPH_ONLY ),
666 : MG_E( "SurroundContour", STYLE, WRAP_CONTOUR, XML_TYPE_BOOL, CTF_WRAP_CONTOUR ),
667 : MG_E( "ContourOutside", STYLE, WRAP_CONTOUR_MODE, XML_TYPE_TEXT_WRAP_OUTSIDE, CTF_WRAP_CONTOUR_MODE ),
668 : // RES_VERT_ORIENT
669 : MG_ED( "VertOrient", STYLE, VERTICAL_POS, XML_TYPE_TEXT_VERTICAL_POS, CTF_VERTICALPOS ),
670 : MG_ED( "VertOrient", STYLE, VERTICAL_POS, XML_TYPE_TEXT_VERTICAL_POS_AT_CHAR, CTF_VERTICALPOS_ATCHAR ),
671 : MG_ED( "VertOrient", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_AS_CHAR|MID_FLAG_MULTI_PROPERTY, CTF_VERTICALREL_ASCHAR ),
672 : MG_ED( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL, CTF_VERTICALREL ),
673 : MG_ED( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_PAGE|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_VERTICALREL_PAGE ),
674 : MG_ED( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_VERTICALREL_FRAME ),
675 : // RES_HORI_ORIENT
676 : MG_ED( "HoriOrient", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_POS|MID_FLAG_MULTI_PROPERTY, CTF_HORIZONTALPOS ),
677 : MG_ED( "PageToggle", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_MIRROR, CTF_HORIZONTALMIRROR ),
678 : MG_ED( "HoriOrient", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_POS_MIRRORED|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_HORIZONTALPOS_MIRRORED ),
679 : MG_ED( "HoriOrientRelation", STYLE, HORIZONTAL_REL, XML_TYPE_TEXT_HORIZONTAL_REL, CTF_HORIZONTALREL ),
680 : MG_ED( "HoriOrientRelation", STYLE, HORIZONTAL_REL, XML_TYPE_TEXT_HORIZONTAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_HORIZONTALREL_FRAME ),
681 : // RES_ANCHOR
682 : // see above
683 : // RES_BACKGROUND
684 : MG_ED( "BackColorRGB", FO, BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
685 : MG_ED( "BackTransparent", FO, BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, CTF_BACKGROUND_TRANSPARENT ),
686 : MG_ED( "BackColorTransparency", STYLE, BACKGROUND_TRANSPARENCY, XML_TYPE_PERCENT8, CTF_BACKGROUND_TRANSPARENCY ),
687 :
688 : MG_E( "BackGraphicTransparency", STYLE, BACKGROUND_IMAGE_TRANSPARENCY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_PERCENT8, CTF_BACKGROUND_TRANSPARENCY ),
689 : MG_E( "BackGraphicLocation", STYLE, POSITION, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BUILDIN_CMP_ONLY, CTF_BACKGROUND_POS ),
690 : MG_E( "BackGraphicFilter",STYLE, FILTER_NAME, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_FILTER ),
691 : MG_E( "BackGraphicURL", STYLE, BACKGROUND_IMAGE, MID_FLAG_ELEMENT_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_URL ),
692 :
693 : //UUUU fill attributes
694 : GMAP( "FillStyle", XML_NAMESPACE_DRAW, XML_FILL, XML_SW_TYPE_FILLSTYLE, 0 ),
695 : GMAP( "FillColor", XML_NAMESPACE_DRAW, XML_FILL_COLOR, XML_TYPE_COLOR, 0 ),
696 : GMAP( "FillColor2", XML_NAMESPACE_DRAW, XML_SECONDARY_FILL_COLOR, XML_TYPE_COLOR, 0 ),
697 : GMAP( "FillGradientName", XML_NAMESPACE_DRAW, XML_FILL_GRADIENT_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_SW_FILLGRADIENTNAME ),
698 : GMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT, XML_TYPE_NUMBER16, 0 ),
699 : GMAP( "FillHatchName", XML_NAMESPACE_DRAW, XML_FILL_HATCH_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_SW_FILLHATCHNAME ),
700 : GMAP( "FillBackground", XML_NAMESPACE_DRAW, XML_FILL_HATCH_SOLID, XML_TYPE_BOOL, 0 ),
701 : GMAP( "FillBitmapName", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_SW_FILLBITMAPNAME ),
702 : GMAP( "FillTransparence", XML_NAMESPACE_DRAW, XML_OPACITY, XML_TYPE_NEG_PERCENT16|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too
703 : GMAP( "FillTransparenceGradientName", XML_NAMESPACE_DRAW, XML_OPACITY_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_SW_FILLTRANSNAME ),
704 : GMAP( "FillBitmapSizeX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH, XML_SW_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
705 : GMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH, XML_SW_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
706 : GMAP( "FillBitmapSizeY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT, XML_SW_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
707 : GMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT, XML_SW_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
708 : GMAP( "FillBitmapMode", XML_NAMESPACE_STYLE,XML_REPEAT, XML_SW_TYPE_BITMAP_MODE|MID_FLAG_MULTI_PROPERTY, 0 ),
709 : GMAP( "FillBitmapPositionOffsetX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_X, XML_TYPE_PERCENT, 0 ),
710 : GMAP( "FillBitmapPositionOffsetY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_Y, XML_TYPE_PERCENT, 0 ),
711 : GMAP( "FillBitmapRectanglePoint", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT, XML_SW_TYPE_BITMAP_REFPOINT, 0 ),
712 : GMAP( "FillBitmapOffsetX", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SW_TYPE_BITMAPREPOFFSETX|MID_FLAG_MULTI_PROPERTY, CTF_SW_REPEAT_OFFSET_X ),
713 : GMAP( "FillBitmapOffsetY", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SW_TYPE_BITMAPREPOFFSETY|MID_FLAG_MULTI_PROPERTY, CTF_SW_REPEAT_OFFSET_Y ),
714 :
715 : // RES_BOX
716 : MG_ED( "LeftBorder", STYLE, BORDER_LINE_WIDTH, XML_TYPE_BORDER_WIDTH, CTF_ALLBORDERWIDTH ),
717 : MG_ED( "LeftBorder", STYLE, BORDER_LINE_WIDTH_LEFT, XML_TYPE_BORDER_WIDTH, CTF_LEFTBORDERWIDTH ),
718 : MG_ED( "RightBorder", STYLE, BORDER_LINE_WIDTH_RIGHT, XML_TYPE_BORDER_WIDTH, CTF_RIGHTBORDERWIDTH ),
719 : MG_ED( "TopBorder", STYLE, BORDER_LINE_WIDTH_TOP, XML_TYPE_BORDER_WIDTH, CTF_TOPBORDERWIDTH ),
720 : MG_ED( "BottomBorder", STYLE, BORDER_LINE_WIDTH_BOTTOM, XML_TYPE_BORDER_WIDTH, CTF_BOTTOMBORDERWIDTH ),
721 :
722 : MG_ED( "LeftBorderDistance", FO, PADDING, XML_TYPE_MEASURE, CTF_ALLBORDERDISTANCE ), // need special import filtering
723 : MG_ED( "LeftBorderDistance", FO, PADDING_LEFT, XML_TYPE_MEASURE, CTF_LEFTBORDERDISTANCE ),
724 : MG_ED( "RightBorderDistance", FO, PADDING_RIGHT, XML_TYPE_MEASURE, CTF_RIGHTBORDERDISTANCE ),
725 : MG_ED( "TopBorderDistance", FO, PADDING_TOP, XML_TYPE_MEASURE, CTF_TOPBORDERDISTANCE ),
726 : MG_ED( "BottomBorderDistance",FO, PADDING_BOTTOM, XML_TYPE_MEASURE, CTF_BOTTOMBORDERDISTANCE ),
727 :
728 : // There is an additional property for controls!
729 : MG_ED( "LeftBorder", FO, BORDER, XML_TYPE_BORDER|MID_FLAG_MULTI_PROPERTY, CTF_ALLBORDER ),
730 : MG_ED( "LeftBorder", FO, BORDER_LEFT, XML_TYPE_BORDER, CTF_LEFTBORDER ),
731 : MG_ED( "RightBorder", FO, BORDER_RIGHT, XML_TYPE_BORDER, CTF_RIGHTBORDER ),
732 : MG_ED( "TopBorder", FO, BORDER_TOP, XML_TYPE_BORDER, CTF_TOPBORDER ),
733 : MG_ED( "BottomBorder", FO, BORDER_BOTTOM, XML_TYPE_BORDER, CTF_BOTTOMBORDER ),
734 : // RES_SHADOW
735 : MG_E( "ShadowFormat", STYLE, SHADOW, XML_TYPE_TEXT_SHADOW, 0 ),
736 : MG_E( "ShadowTransparence", DRAW, SHADOW_OPACITY, XML_TYPE_NEG_PERCENT, 0 ),
737 : // RES_FRMMACRO
738 : // TODO
739 : // RES_COL
740 : MG_E( "TextColumns", STYLE, COLUMNS, MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_COLUMNS, CTF_TEXTCOLUMNS ),
741 : // RES_KEEP
742 : // not required
743 : // RES_URL
744 : // not required (exprted as draw:a element)
745 : // RES_EDIT_IN_READONLY
746 : MG_ED( "EditInReadonly", STYLE, EDITABLE, XML_TYPE_BOOL, 0 ),
747 : // RES_LAYOUT_SPLIT
748 : // not required
749 : // RES_CHAIN
750 : // not required (exported at text:text-box element)
751 : // RES_LINENUMBER
752 : // not required
753 : // RES_FTN_AT_TXTEND
754 : // not required
755 : // RES_END_AT_TXTEND
756 : // not required
757 : // RES_COLUMNBALANCE
758 : // TODO
759 : // RES_UNKNOWNATR_CONTAINER
760 : // M_E_SE( TEXT, xmlns, RES_UNKNOWNATR_CONTAINER, 0 ),
761 : // RES_GRFATR_MIRRORGRF (vertical MUST be processed after horizontal!)
762 : MG_E( "HoriMirroredOnEvenPages", STYLE, MIRROR, XML_TYPE_TEXT_MIRROR_HORIZONTAL_LEFT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
763 : MG_E( "HoriMirroredOnOddPages", STYLE, MIRROR, XML_TYPE_TEXT_MIRROR_HORIZONTAL_RIGHT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
764 : MG_E( "VertMirrored", STYLE, MIRROR, XML_TYPE_TEXT_MIRROR_VERTICAL|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
765 : // RES_GRFATR_CROPGRF
766 : MG_EV( "GraphicCrop", FO, CLIP, XML_TYPE_TEXT_CLIP, CTF_TEXT_CLIP, SvtSaveOptions::ODFVER_012 ),
767 : MG_E( "GraphicCrop", FO, CLIP, XML_TYPE_TEXT_CLIP11, CTF_TEXT_CLIP11 ),
768 : // RES_GRFATR_ROTATION
769 : // not required (exported as svg:transform attribute)
770 : // RES_GRFATR_LUMINANCE
771 : MG_E( "AdjustLuminance", DRAW, LUMINANCE, XML_TYPE_PERCENT16, 0 ), // signed?
772 : // RES_GRFATR_CONTRAST
773 : MG_E( "AdjustContrast", DRAW, CONTRAST, XML_TYPE_PERCENT16, 0 ), // signed?
774 : // RES_GRFATR_CHANNELR
775 : MG_E( "AdjustRed", DRAW, RED, XML_TYPE_PERCENT16, 0 ), // signed?
776 : // RES_GRFATR_CHANNELG
777 : MG_E( "AdjustGreen", DRAW, GREEN, XML_TYPE_PERCENT16, 0 ), // signed?
778 : // RES_GRFATR_CHANNELB
779 : MG_E( "AdjustBlue", DRAW, BLUE, XML_TYPE_PERCENT16, 0 ), // signed?
780 : // RES_GRFATR_GAMMA
781 : MG_E( "Gamma", DRAW, GAMMA, XML_TYPE_DOUBLE_PERCENT, 0 ), // signed?
782 : // RES_GRFATR_INVERT
783 : MG_E( "GraphicIsInverted", DRAW, COLOR_INVERSION, XML_TYPE_BOOL, 0 ),
784 : // RES_GRFATR_TRANSPARENCY
785 : MG_E( "Transparency", DRAW, IMAGE_OPACITY, XML_TYPE_NEG_PERCENT16|MID_FLAG_MULTI_PROPERTY, 0 ), // #i25616#
786 : // RES_GRFATR_DRAWMODE
787 : MG_E( "GraphicColorMode", DRAW, COLOR_MODE, XML_TYPE_COLOR_MODE, 0 ),
788 : MG_E( "WritingMode", STYLE, WRITING_MODE, XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT, 0 ),
789 : // RES_FOLLOW_TEXT_FLOW - DVO, OD 01.10.2003 #i18732#
790 : MG_E( "IsFollowingTextFlow", DRAW, FLOW_WITH_TEXT, XML_TYPE_BOOL|MID_FLAG_SPECIAL_ITEM_EXPORT, CTF_OLD_FLOW_WITH_TEXT ),
791 : MG_E( "IsFollowingTextFlow", STYLE, FLOW_WITH_TEXT, XML_TYPE_BOOL, 0 ),
792 : // OD 2004-05-05 #i28701# - RES_WRAP_INFLUENCE_ON_OBJPOS
793 : MG_E( "WrapInfluenceOnPosition", DRAW, WRAP_INFLUENCE_ON_POSITION, XML_TYPE_WRAP_INFLUENCE_ON_POSITION, 0 ),
794 :
795 : // special entries for floating frames
796 : MG_E( "", DRAW, FRAME_DISPLAY_SCROLLBAR, XML_TYPE_BOOL|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_DISPLAY_SCROLLBAR ),
797 : MG_E( "", DRAW, FRAME_DISPLAY_BORDER, XML_TYPE_BOOL|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_DISPLAY_BORDER ),
798 : MG_E( "", DRAW, FRAME_MARGIN_HORIZONTAL, XML_TYPE_MEASURE_PX|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_MARGIN_HORI ),
799 : MG_E( "", DRAW, FRAME_MARGIN_VERTICAL, XML_TYPE_MEASURE_PX|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_MARGIN_VERT ),
800 : MG_E( "", DRAW, VISIBLE_AREA_LEFT, XML_TYPE_MEASURE|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_OLE_VIS_AREA_LEFT ),
801 : MG_E( "", DRAW, VISIBLE_AREA_TOP, XML_TYPE_MEASURE|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_OLE_VIS_AREA_TOP ),
802 : MG_E( "", DRAW, VISIBLE_AREA_WIDTH, XML_TYPE_MEASURE|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_OLE_VIS_AREA_WIDTH ),
803 : MG_E( "", DRAW, VISIBLE_AREA_HEIGHT, XML_TYPE_MEASURE|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_OLE_VIS_AREA_HEIGHT ),
804 : MG_E( "", DRAW, DRAW_ASPECT, XML_TYPE_TEXT_DRAW_ASPECT|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_OLE_DRAW_ASPECT ),
805 : MG_E( "UserDefinedAttributes", TEXT, XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
806 : MAP_EXT("RelativeWidthRelation", XML_NAMESPACE_LO_EXT, XML_REL_WIDTH_REL, XML_TYPE_TEXT_HORIZONTAL_REL|XML_TYPE_PROP_GRAPHIC, CTF_RELWIDTHREL),
807 : MAP_EXT("RelativeHeightRelation", XML_NAMESPACE_LO_EXT, XML_REL_HEIGHT_REL, XML_TYPE_TEXT_VERTICAL_REL|XML_TYPE_PROP_GRAPHIC, CTF_RELHEIGHTREL),
808 : MG_E("TextVerticalAdjust", DRAW, TEXTAREA_VERTICAL_ALIGN, XML_TYPE_VERTICAL_ALIGN, 0),
809 :
810 : M_END()
811 : };
812 :
813 : XMLPropertyMapEntry aXMLShapePropMap[] =
814 : {
815 : // RES_LR_SPACE
816 : MG_E( "LeftMargin", FO, MARGIN_LEFT, XML_TYPE_MEASURE, 0),
817 : MG_E( "RightMargin", FO, MARGIN_RIGHT, XML_TYPE_MEASURE, 0 ),
818 : // RES_UL_SPACE
819 : MG_E( "TopMargin", FO, MARGIN_TOP, XML_TYPE_MEASURE, 0 ),
820 : MG_E( "BottomMargin", FO, MARGIN_BOTTOM, XML_TYPE_MEASURE, 0 ),
821 : // RES_OPAQUE
822 : MG_ED( "Opaque", STYLE, RUN_THROUGH, XML_TYPE_TEXT_OPAQUE, 0 ),
823 : // RES_SURROUND
824 : MG_E( "TextWrap", STYLE, WRAP, XML_TYPE_TEXT_WRAP, CTF_WRAP ),
825 : MG_E( "SurroundAnchorOnly", STYLE, NUMBER_WRAPPED_PARAGRAPHS, XML_TYPE_TEXT_PARAGRAPH_ONLY, CTF_WRAP_PARAGRAPH_ONLY ),
826 : MG_E( "SurroundContour", STYLE, WRAP_CONTOUR, XML_TYPE_BOOL, CTF_WRAP_CONTOUR ),
827 : MG_E( "ContourOutside", STYLE, WRAP_CONTOUR_MODE, XML_TYPE_TEXT_WRAP_OUTSIDE, CTF_WRAP_CONTOUR_MODE ),
828 : // Use own CTF ids for positioning attributes (#i28749#)
829 : // RES_VERT_ORIENT
830 : MG_E( "VertOrient", STYLE, VERTICAL_POS, XML_TYPE_TEXT_VERTICAL_POS, CTF_SHAPE_VERTICALPOS ),
831 : // Add property for at-character anchored shapes (#i26791#)
832 : MG_E( "VertOrient", STYLE, VERTICAL_POS, XML_TYPE_TEXT_VERTICAL_POS_AT_CHAR, CTF_SHAPE_VERTICALPOS_ATCHAR ),
833 : MG_E( "VertOrient", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_AS_CHAR|MID_FLAG_MULTI_PROPERTY, CTF_VERTICALREL_ASCHAR ),
834 : MG_E( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL, CTF_SHAPE_VERTICALREL ),
835 : MG_E( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_PAGE|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_SHAPE_VERTICALREL_PAGE ),
836 : MG_E( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_SHAPE_VERTICALREL_FRAME ),
837 : // RES_HORI_ORIENT
838 : MG_E( "HoriOrient", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_POS|MID_FLAG_MULTI_PROPERTY, CTF_SHAPE_HORIZONTALPOS ),
839 : MG_E( "PageToggle", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_MIRROR, CTF_SHAPE_HORIZONTALMIRROR ),
840 : MG_E( "HoriOrient", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_POS_MIRRORED|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_SHAPE_HORIZONTALPOS_MIRRORED ),
841 : MG_E( "HoriOrientRelation", STYLE, HORIZONTAL_REL, XML_TYPE_TEXT_HORIZONTAL_REL, CTF_SHAPE_HORIZONTALREL ),
842 : MG_E( "HoriOrientRelation", STYLE, HORIZONTAL_REL, XML_TYPE_TEXT_HORIZONTAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_SHAPE_HORIZONTALREL_FRAME ),
843 : // RES_WRAP_INFLUENCE_ON_OBJPOS (#i28701#)
844 : MG_ED( "WrapInfluenceOnPosition", DRAW, WRAP_INFLUENCE_ON_POSITION, XML_TYPE_WRAP_INFLUENCE_ON_POSITION, 0 ),
845 : // UserDefinedAttributes is already contained in the map this one is
846 : // chained to.
847 :
848 : // RES_FOLLOW_TEXT_FLOW (#i26791#)
849 : MG_ED( "IsFollowingTextFlow", STYLE, FLOW_WITH_TEXT, XML_TYPE_BOOL, 0 ),
850 :
851 : // RES_FRM_SIZE
852 : MAP_EXT("RelativeWidthRelation", XML_NAMESPACE_LO_EXT, XML_REL_WIDTH_REL, XML_TYPE_TEXT_HORIZONTAL_REL|XML_TYPE_PROP_GRAPHIC, CTF_RELWIDTHREL),
853 : MAP_EXT("RelativeHeightRelation", XML_NAMESPACE_LO_EXT, XML_REL_HEIGHT_REL, XML_TYPE_TEXT_VERTICAL_REL|XML_TYPE_PROP_GRAPHIC, CTF_RELHEIGHTREL),
854 :
855 : M_END()
856 : };
857 :
858 : XMLPropertyMapEntry aXMLSectionPropMap[] =
859 : {
860 : // RES_COL
861 : MS_E( "TextColumns", STYLE, COLUMNS, MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_COLUMNS, CTF_TEXTCOLUMNS ),
862 :
863 : // RES_BACKGROUND
864 : MS_E( "BackColor", FO, BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
865 : MS_E( "BackTransparent", FO, BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
866 : MS_E( "BackGraphicLocation", STYLE, POSITION, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BUILDIN_CMP_ONLY, CTF_BACKGROUND_POS ),
867 : MS_E( "BackGraphicFilter",STYLE, FILTER_NAME, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_FILTER ),
868 : MS_E( "BackGraphicURL", STYLE, BACKGROUND_IMAGE, MID_FLAG_ELEMENT_ITEM|XML_TYPE_STRING, CTF_BACKGROUND_URL ),
869 :
870 : // move protect-flag into section element
871 : // M_E( "IsProtected", STYLE, PROTECT, XML_TYPE_BOOL, 0 ),
872 :
873 : MS_E( "DontBalanceTextColumns", TEXT, DONT_BALANCE_TEXT_COLUMNS, XML_TYPE_BOOL, 0 ),
874 :
875 : MS_E( "WritingMode", STYLE, WRITING_MODE, XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT, 0 ),
876 :
877 : MS_E( "SectionLeftMargin", FO, MARGIN_LEFT, XML_TYPE_MEASURE, 0),
878 : MS_E( "SectionRightMargin", FO, MARGIN_RIGHT, XML_TYPE_MEASURE, 0),
879 :
880 : // section footnote settings
881 : MS_E( "FootnoteIsOwnNumbering", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_SECTION_FOOTNOTE_NUM_OWN ),
882 : MS_E( "FootnoteIsRestartNumbering", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_SECTION_FOOTNOTE_NUM_RESTART ),
883 : MS_E( "FootnoteRestartNumberingAt", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_NUMBER16,CTF_SECTION_FOOTNOTE_NUM_RESTART_AT ),
884 : MS_E( "FootnoteNumberingType", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_NUMBER16,CTF_SECTION_FOOTNOTE_NUM_TYPE ),
885 : MS_E( "FootnoteNumberingPrefix", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_SECTION_FOOTNOTE_NUM_PREFIX ),
886 : MS_E( "FootnoteNumberingSuffix", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_SECTION_FOOTNOTE_NUM_SUFFIX ),
887 : MS_E( "FootnoteIsCollectAtTextEnd", TEXT, NOTES_CONFIGURATION, MID_FLAG_ELEMENT_ITEM|XML_TYPE_BOOL, CTF_SECTION_FOOTNOTE_END ),
888 :
889 : // section footnote settings
890 : MS_E( "EndnoteIsOwnNumbering", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_SECTION_ENDNOTE_NUM_OWN ),
891 : MS_E( "EndnoteIsRestartNumbering", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_SECTION_ENDNOTE_NUM_RESTART ),
892 : MS_E( "EndnoteRestartNumberingAt", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_NUMBER16,CTF_SECTION_ENDNOTE_NUM_RESTART_AT ),
893 : MS_E( "EndnoteNumberingType", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_NUMBER16,CTF_SECTION_ENDNOTE_NUM_TYPE ),
894 : MS_E( "EndnoteNumberingPrefix", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_SECTION_ENDNOTE_NUM_PREFIX ),
895 : MS_E( "EndnoteNumberingSuffix", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_SECTION_ENDNOTE_NUM_SUFFIX ),
896 : MS_E( "EndnoteIsCollectAtTextEnd", TEXT, NOTES_CONFIGURATION, MID_FLAG_ELEMENT_ITEM|XML_TYPE_BOOL, CTF_SECTION_ENDNOTE_END ),
897 : MS_E( "UserDefinedAttributes", TEXT, XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
898 : // RES_EDIT_IN_READONLY
899 : MS_E( "EditInReadonly", STYLE, EDITABLE, XML_TYPE_BOOL, 0 ),
900 : M_END()
901 : };
902 :
903 : XMLPropertyMapEntry aXMLRubyPropMap[] =
904 : {
905 : MR_E( "RubyAdjust", STYLE, RUBY_ALIGN, XML_TYPE_TEXT_RUBY_ADJUST, 0 ),
906 : MR_E( "RubyIsAbove", STYLE, RUBY_POSITION, XML_TYPE_TEXT_RUBY_POSITION, 0 ),
907 : M_END()
908 : };
909 :
910 :
911 : XMLPropertyMapEntry aXMLTableDefaultsMap[] =
912 : {
913 : // RES_COLLAPSING_BORDERS: only occurs in tables, but we need to
914 : // read/write the default for this item
915 : _M_ED( "CollapsingBorders", TABLE, BORDER_MODEL, XML_TYPE_PROP_TABLE | XML_TYPE_BORDER_MODEL | MID_FLAG_NO_PROPERTY_IMPORT, CTF_BORDER_MODEL ),
916 :
917 : M_END()
918 : };
919 :
920 : XMLPropertyMapEntry aXMLTableRowDefaultsMap[] =
921 : {
922 : // RES_ROW_SPLIT: only occurs in table rows, but we need to
923 : // read/write the default for this item
924 : _M_ED( "IsSplitAllowed", FO, KEEP_TOGETHER, XML_TYPE_PROP_TABLE_ROW | XML_TYPE_TEXT_NKEEP | MID_FLAG_NO_PROPERTY_IMPORT, CTF_KEEP_TOGETHER ),
925 :
926 : M_END()
927 : };
928 :
929 0 : static XMLPropertyMapEntry *lcl_txtprmap_getMap( sal_uInt16 nType )
930 : {
931 0 : XMLPropertyMapEntry *pMap = 0;
932 0 : switch( nType )
933 : {
934 : case TEXT_PROP_MAP_TEXT:
935 0 : pMap = aXMLTextPropMap;
936 0 : break;
937 : case TEXT_PROP_MAP_SHAPE_PARA:
938 0 : pMap = &(aXMLParaPropMap[1]);
939 : OSL_ENSURE( pMap->meXMLName == XML_MARGIN, "shape para map changed" );
940 0 : break;
941 : case TEXT_PROP_MAP_PARA:
942 0 : pMap = aXMLParaPropMap;
943 0 : break;
944 : case TEXT_PROP_MAP_FRAME:
945 0 : pMap = aXMLFramePropMap;
946 0 : break;
947 : case TEXT_PROP_MAP_AUTO_FRAME:
948 0 : pMap = &(aXMLFramePropMap[13]);
949 : OSL_ENSURE( pMap->meXMLName == XML_MARGIN, "frame map changed" );
950 0 : break;
951 : case TEXT_PROP_MAP_SHAPE:
952 0 : pMap = aXMLShapePropMap;
953 0 : break;
954 : case TEXT_PROP_MAP_SECTION:
955 0 : pMap = aXMLSectionPropMap;
956 0 : break;
957 : case TEXT_PROP_MAP_RUBY:
958 0 : pMap = aXMLRubyPropMap;
959 0 : break;
960 : case TEXT_PROP_MAP_TEXT_ADDITIONAL_DEFAULTS:
961 0 : pMap = aXMLAdditionalTextDefaultsMap;
962 0 : break;
963 : case TEXT_PROP_MAP_TABLE_DEFAULTS:
964 0 : pMap = aXMLTableDefaultsMap;
965 0 : break;
966 : case TEXT_PROP_MAP_TABLE_ROW_DEFAULTS:
967 0 : pMap = aXMLTableRowDefaultsMap;
968 0 : break;
969 : }
970 : DBG_ASSERT( pMap, "illegal map type" );
971 0 : return pMap;
972 : }
973 :
974 0 : const XMLPropertyMapEntry* XMLTextPropertySetMapper::getPropertyMapForType( sal_uInt16 _nType )
975 : {
976 0 : return lcl_txtprmap_getMap( _nType );
977 : }
978 :
979 0 : XMLTextPropertySetMapper::XMLTextPropertySetMapper( sal_uInt16 nType, bool bForExport ) :
980 0 : XMLPropertySetMapper( lcl_txtprmap_getMap( nType ),
981 0 : new XMLTextPropertyHandlerFactory, bForExport )
982 : {
983 0 : }
984 :
985 0 : XMLTextPropertySetMapper::~XMLTextPropertySetMapper()
986 : {
987 0 : }
988 :
989 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|