LCOV - code coverage report
Current view: top level - xmloff/source/text - txtprmap.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 32 34 94.1 %
Date: 2015-06-13 12:38:46 Functions: 4 5 80.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.11