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