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