1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_xmloff.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include <com/sun/star/drawing/ColorMode.hpp> 32*cdf0e10cSrcweir #include <com/sun/star/text/HorizontalAdjust.hpp> 33*cdf0e10cSrcweir #include <com/sun/star/text/WritingMode2.hpp> 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir #include <tools/debug.hxx> 36*cdf0e10cSrcweir 37*cdf0e10cSrcweir #include <xmloff/prhdlfac.hxx> 38*cdf0e10cSrcweir #include <xmloff/xmltypes.hxx> 39*cdf0e10cSrcweir #include <xmloff/xmltoken.hxx> 40*cdf0e10cSrcweir #include "xmlbahdl.hxx" 41*cdf0e10cSrcweir #include <xmloff/NamedBoolPropertyHdl.hxx> 42*cdf0e10cSrcweir #include <xmloff/XMLConstantsPropertyHandler.hxx> 43*cdf0e10cSrcweir #include "cdouthdl.hxx" 44*cdf0e10cSrcweir #include "csmaphdl.hxx" 45*cdf0e10cSrcweir #include "fonthdl.hxx" 46*cdf0e10cSrcweir #include "kernihdl.hxx" 47*cdf0e10cSrcweir #include <postuhdl.hxx> 48*cdf0e10cSrcweir #include "shadwhdl.hxx" 49*cdf0e10cSrcweir #include "shdwdhdl.hxx" 50*cdf0e10cSrcweir #include "undlihdl.hxx" 51*cdf0e10cSrcweir #include "weighhdl.hxx" 52*cdf0e10cSrcweir #include "breakhdl.hxx" 53*cdf0e10cSrcweir #include <adjushdl.hxx> 54*cdf0e10cSrcweir #include <escphdl.hxx> 55*cdf0e10cSrcweir #include <chrhghdl.hxx> 56*cdf0e10cSrcweir #include <chrlohdl.hxx> 57*cdf0e10cSrcweir #include <lspachdl.hxx> 58*cdf0e10cSrcweir #include <bordrhdl.hxx> 59*cdf0e10cSrcweir #include <tabsthdl.hxx> 60*cdf0e10cSrcweir #include <xmloff/EnumPropertyHdl.hxx> 61*cdf0e10cSrcweir #include "AttributeContainerHandler.hxx" 62*cdf0e10cSrcweir #include "durationhdl.hxx" 63*cdf0e10cSrcweir #include "XMLRectangleMembersHandler.hxx" 64*cdf0e10cSrcweir #include "DrawAspectHdl.hxx" 65*cdf0e10cSrcweir 66*cdf0e10cSrcweir using namespace ::com::sun::star; 67*cdf0e10cSrcweir using namespace ::xmloff::token; 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir SvXMLEnumMapEntry aXML_ColorMode_EnumMap[] = 70*cdf0e10cSrcweir { 71*cdf0e10cSrcweir { XML_GREYSCALE, drawing::ColorMode_GREYS }, 72*cdf0e10cSrcweir { XML_MONO, drawing::ColorMode_MONO }, 73*cdf0e10cSrcweir { XML_WATERMARK, drawing::ColorMode_WATERMARK }, 74*cdf0e10cSrcweir { XML_STANDARD, drawing::ColorMode_STANDARD }, 75*cdf0e10cSrcweir { XML_TOKEN_INVALID, 0 } 76*cdf0e10cSrcweir }; 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir SvXMLEnumMapEntry __READONLY_DATA aXML_HorizontalAdjust_Enum[] = 79*cdf0e10cSrcweir { 80*cdf0e10cSrcweir { XML_LEFT, text::HorizontalAdjust_LEFT }, 81*cdf0e10cSrcweir { XML_CENTER, text::HorizontalAdjust_CENTER }, 82*cdf0e10cSrcweir { XML_RIGHT, text::HorizontalAdjust_RIGHT }, 83*cdf0e10cSrcweir { XML_TOKEN_INVALID, 0 } 84*cdf0e10cSrcweir }; 85*cdf0e10cSrcweir 86*cdf0e10cSrcweir // aXML_WritingDirection_Enum is used with and without 'page' 87*cdf0e10cSrcweir // attribute, so you'll find uses of aXML_WritingDirection_Enum 88*cdf0e10cSrcweir // directly, as well as &(aXML_WritingDirection_Enum[1]) 89*cdf0e10cSrcweir SvXMLEnumMapEntry __READONLY_DATA aXML_WritingDirection_Enum[] = 90*cdf0e10cSrcweir { 91*cdf0e10cSrcweir // aXML_WritingDirection_Enum 92*cdf0e10cSrcweir { XML_PAGE, text::WritingMode2::PAGE }, 93*cdf0e10cSrcweir 94*cdf0e10cSrcweir // &(aXML_WritingDirection_Enum[1]) 95*cdf0e10cSrcweir { XML_LR_TB, text::WritingMode2::LR_TB }, 96*cdf0e10cSrcweir { XML_RL_TB, text::WritingMode2::RL_TB }, 97*cdf0e10cSrcweir { XML_TB_RL, text::WritingMode2::TB_RL }, 98*cdf0e10cSrcweir { XML_TB_LR, text::WritingMode2::TB_LR }, 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir // alternative names of the above, as accepted by XSL 101*cdf0e10cSrcweir { XML_LR, text::WritingMode2::LR_TB }, 102*cdf0e10cSrcweir { XML_RL, text::WritingMode2::RL_TB }, 103*cdf0e10cSrcweir { XML_TB, text::WritingMode2::TB_RL }, 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir { XML_TOKEN_INVALID, 0 } 106*cdf0e10cSrcweir }; 107*cdf0e10cSrcweir 108*cdf0e10cSrcweir 109*cdf0e10cSrcweir /////////////////////////////////////////////////////////////////////////// 110*cdf0e10cSrcweir // 111*cdf0e10cSrcweir // Dtor 112*cdf0e10cSrcweir // 113*cdf0e10cSrcweir XMLPropertyHandlerFactory::~XMLPropertyHandlerFactory() 114*cdf0e10cSrcweir { 115*cdf0e10cSrcweir for( CacheMap::iterator pPos = maHandlerCache.begin(); pPos != maHandlerCache.end(); pPos++ ) 116*cdf0e10cSrcweir delete pPos->second; 117*cdf0e10cSrcweir } 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir /////////////////////////////////////////////////////////////////////////// 120*cdf0e10cSrcweir // 121*cdf0e10cSrcweir // Interface 122*cdf0e10cSrcweir // 123*cdf0e10cSrcweir const XMLPropertyHandler* XMLPropertyHandlerFactory::GetPropertyHandler( sal_Int32 nType ) const 124*cdf0e10cSrcweir { 125*cdf0e10cSrcweir DBG_ASSERT( (nType & ~((sal_uInt32)MID_FLAG_MASK)) == 0, 126*cdf0e10cSrcweir "GetPropertyHandler called with flags in type" ); 127*cdf0e10cSrcweir return GetBasicHandler( nType ); 128*cdf0e10cSrcweir } 129*cdf0e10cSrcweir 130*cdf0e10cSrcweir /////////////////////////////////////////////////////////////////////////// 131*cdf0e10cSrcweir // 132*cdf0e10cSrcweir // Helper-methods to create and cache PropertyHandler 133*cdf0e10cSrcweir // 134*cdf0e10cSrcweir XMLPropertyHandler* XMLPropertyHandlerFactory::GetHdlCache( sal_Int32 nType ) const 135*cdf0e10cSrcweir { 136*cdf0e10cSrcweir XMLPropertyHandler* pRet = NULL; 137*cdf0e10cSrcweir 138*cdf0e10cSrcweir if( maHandlerCache.find( nType ) != maHandlerCache.end() ) 139*cdf0e10cSrcweir pRet = maHandlerCache.find( nType )->second; 140*cdf0e10cSrcweir 141*cdf0e10cSrcweir return pRet; 142*cdf0e10cSrcweir } 143*cdf0e10cSrcweir 144*cdf0e10cSrcweir void XMLPropertyHandlerFactory::PutHdlCache( sal_Int32 nType, const XMLPropertyHandler* pHdl ) const 145*cdf0e10cSrcweir { 146*cdf0e10cSrcweir // Don't be wondered about the following construct. The sense is to be able to provide a const- 147*cdf0e10cSrcweir // method as class-interface. 148*cdf0e10cSrcweir ((XMLPropertyHandlerFactory*)this)->maHandlerCache[ nType ] = (XMLPropertyHandler*)pHdl; 149*cdf0e10cSrcweir } 150*cdf0e10cSrcweir 151*cdf0e10cSrcweir const XMLPropertyHandler* XMLPropertyHandlerFactory::GetBasicHandler( sal_Int32 nType ) const 152*cdf0e10cSrcweir { 153*cdf0e10cSrcweir const XMLPropertyHandler* pPropHdl = GetHdlCache( nType ); 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir if( !pPropHdl ) 156*cdf0e10cSrcweir { 157*cdf0e10cSrcweir pPropHdl = CreatePropertyHandler( nType ); 158*cdf0e10cSrcweir 159*cdf0e10cSrcweir if( pPropHdl ) 160*cdf0e10cSrcweir PutHdlCache( nType, pPropHdl ); 161*cdf0e10cSrcweir } 162*cdf0e10cSrcweir 163*cdf0e10cSrcweir return pPropHdl; 164*cdf0e10cSrcweir } 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir const XMLPropertyHandler* XMLPropertyHandlerFactory::CreatePropertyHandler( sal_Int32 nType ) 167*cdf0e10cSrcweir { 168*cdf0e10cSrcweir XMLPropertyHandler* pPropHdl = NULL; 169*cdf0e10cSrcweir 170*cdf0e10cSrcweir switch( nType ) 171*cdf0e10cSrcweir { 172*cdf0e10cSrcweir case XML_TYPE_BOOL : 173*cdf0e10cSrcweir pPropHdl = new XMLBoolPropHdl; 174*cdf0e10cSrcweir break; 175*cdf0e10cSrcweir case XML_TYPE_MEASURE : 176*cdf0e10cSrcweir pPropHdl = new XMLMeasurePropHdl( 4 ); 177*cdf0e10cSrcweir break; 178*cdf0e10cSrcweir case XML_TYPE_MEASURE8 : 179*cdf0e10cSrcweir pPropHdl = new XMLMeasurePropHdl( 1 ); 180*cdf0e10cSrcweir break; 181*cdf0e10cSrcweir case XML_TYPE_MEASURE16: 182*cdf0e10cSrcweir pPropHdl = new XMLMeasurePropHdl( 2 ); 183*cdf0e10cSrcweir break; 184*cdf0e10cSrcweir case XML_TYPE_PERCENT : 185*cdf0e10cSrcweir pPropHdl = new XMLPercentPropHdl( 4 ); 186*cdf0e10cSrcweir break; 187*cdf0e10cSrcweir case XML_TYPE_PERCENT8 : 188*cdf0e10cSrcweir pPropHdl = new XMLPercentPropHdl( 1 ); 189*cdf0e10cSrcweir break; 190*cdf0e10cSrcweir case XML_TYPE_PERCENT16 : 191*cdf0e10cSrcweir pPropHdl = new XMLPercentPropHdl( 2 ); 192*cdf0e10cSrcweir break; 193*cdf0e10cSrcweir case XML_TYPE_DOUBLE_PERCENT : 194*cdf0e10cSrcweir pPropHdl = new XMLDoublePercentPropHdl(); 195*cdf0e10cSrcweir break; 196*cdf0e10cSrcweir case XML_TYPE_NEG_PERCENT : 197*cdf0e10cSrcweir pPropHdl = new XMLNegPercentPropHdl( 4 ); 198*cdf0e10cSrcweir break; 199*cdf0e10cSrcweir case XML_TYPE_NEG_PERCENT8 : 200*cdf0e10cSrcweir pPropHdl = new XMLNegPercentPropHdl( 1 ); 201*cdf0e10cSrcweir break; 202*cdf0e10cSrcweir case XML_TYPE_NEG_PERCENT16 : 203*cdf0e10cSrcweir pPropHdl = new XMLNegPercentPropHdl( 2 ); 204*cdf0e10cSrcweir break; 205*cdf0e10cSrcweir case XML_TYPE_MEASURE_PX : 206*cdf0e10cSrcweir pPropHdl = new XMLMeasurePxPropHdl( 4 ); 207*cdf0e10cSrcweir break; 208*cdf0e10cSrcweir case XML_TYPE_STRING : 209*cdf0e10cSrcweir pPropHdl = new XMLStringPropHdl; 210*cdf0e10cSrcweir break; 211*cdf0e10cSrcweir case XML_TYPE_COLOR : 212*cdf0e10cSrcweir pPropHdl = new XMLColorPropHdl; 213*cdf0e10cSrcweir break; 214*cdf0e10cSrcweir case XML_TYPE_NUMBER : 215*cdf0e10cSrcweir pPropHdl = new XMLNumberPropHdl( 4 ); 216*cdf0e10cSrcweir break; 217*cdf0e10cSrcweir case XML_TYPE_NUMBER8 : 218*cdf0e10cSrcweir pPropHdl = new XMLNumberPropHdl( 1 ); 219*cdf0e10cSrcweir break; 220*cdf0e10cSrcweir case XML_TYPE_NUMBER16: 221*cdf0e10cSrcweir pPropHdl = new XMLNumberPropHdl( 2 ); 222*cdf0e10cSrcweir break; 223*cdf0e10cSrcweir case XML_TYPE_NUMBER_NONE : 224*cdf0e10cSrcweir pPropHdl = new XMLNumberNonePropHdl; 225*cdf0e10cSrcweir break; 226*cdf0e10cSrcweir case XML_TYPE_NUMBER8_NONE : 227*cdf0e10cSrcweir pPropHdl = new XMLNumberNonePropHdl( 1 ); 228*cdf0e10cSrcweir break; 229*cdf0e10cSrcweir case XML_TYPE_NUMBER16_NONE : 230*cdf0e10cSrcweir pPropHdl = new XMLNumberNonePropHdl( 2 ); 231*cdf0e10cSrcweir break; 232*cdf0e10cSrcweir case XML_TYPE_DOUBLE : 233*cdf0e10cSrcweir pPropHdl = new XMLDoublePropHdl; 234*cdf0e10cSrcweir break; 235*cdf0e10cSrcweir case XML_TYPE_NBOOL : 236*cdf0e10cSrcweir pPropHdl = new XMLNBoolPropHdl; 237*cdf0e10cSrcweir break; 238*cdf0e10cSrcweir case XML_TYPE_COLORTRANSPARENT : 239*cdf0e10cSrcweir pPropHdl = new XMLColorTransparentPropHdl; 240*cdf0e10cSrcweir break; 241*cdf0e10cSrcweir case XML_TYPE_ISTRANSPARENT : 242*cdf0e10cSrcweir pPropHdl = new XMLIsTransparentPropHdl; 243*cdf0e10cSrcweir break; 244*cdf0e10cSrcweir case XML_TYPE_COLORAUTO : 245*cdf0e10cSrcweir pPropHdl = new XMLColorAutoPropHdl; 246*cdf0e10cSrcweir break; 247*cdf0e10cSrcweir case XML_TYPE_ISAUTOCOLOR : 248*cdf0e10cSrcweir pPropHdl = new XMLIsAutoColorPropHdl; 249*cdf0e10cSrcweir break; 250*cdf0e10cSrcweir case XML_TYPE_BUILDIN_CMP_ONLY : 251*cdf0e10cSrcweir pPropHdl = new XMLCompareOnlyPropHdl; 252*cdf0e10cSrcweir break; 253*cdf0e10cSrcweir 254*cdf0e10cSrcweir case XML_TYPE_RECTANGLE_LEFT : 255*cdf0e10cSrcweir case XML_TYPE_RECTANGLE_TOP : 256*cdf0e10cSrcweir case XML_TYPE_RECTANGLE_WIDTH : 257*cdf0e10cSrcweir case XML_TYPE_RECTANGLE_HEIGHT : 258*cdf0e10cSrcweir pPropHdl = new XMLRectangleMembersHdl( nType ); 259*cdf0e10cSrcweir break; 260*cdf0e10cSrcweir 261*cdf0e10cSrcweir case XML_TYPE_TEXT_CROSSEDOUT_TYPE: 262*cdf0e10cSrcweir pPropHdl = new XMLCrossedOutTypePropHdl ; 263*cdf0e10cSrcweir break; 264*cdf0e10cSrcweir case XML_TYPE_TEXT_CROSSEDOUT_STYLE: 265*cdf0e10cSrcweir pPropHdl = new XMLCrossedOutStylePropHdl ; 266*cdf0e10cSrcweir break; 267*cdf0e10cSrcweir case XML_TYPE_TEXT_CROSSEDOUT_WIDTH: 268*cdf0e10cSrcweir pPropHdl = new XMLCrossedOutWidthPropHdl ; 269*cdf0e10cSrcweir break; 270*cdf0e10cSrcweir case XML_TYPE_TEXT_CROSSEDOUT_TEXT: 271*cdf0e10cSrcweir pPropHdl = new XMLCrossedOutTextPropHdl ; 272*cdf0e10cSrcweir break; 273*cdf0e10cSrcweir case XML_TYPE_TEXT_BOOLCROSSEDOUT: 274*cdf0e10cSrcweir pPropHdl = new XMLNamedBoolPropertyHdl( 275*cdf0e10cSrcweir GetXMLToken(XML_SOLID), 276*cdf0e10cSrcweir GetXMLToken(XML_NONE) ); 277*cdf0e10cSrcweir break; 278*cdf0e10cSrcweir case XML_TYPE_TEXT_ESCAPEMENT: 279*cdf0e10cSrcweir pPropHdl = new XMLEscapementPropHdl; 280*cdf0e10cSrcweir break; 281*cdf0e10cSrcweir case XML_TYPE_TEXT_ESCAPEMENT_HEIGHT: 282*cdf0e10cSrcweir pPropHdl = new XMLEscapementHeightPropHdl; 283*cdf0e10cSrcweir break; 284*cdf0e10cSrcweir case XML_TYPE_TEXT_CASEMAP: 285*cdf0e10cSrcweir pPropHdl = new XMLCaseMapPropHdl; 286*cdf0e10cSrcweir break; 287*cdf0e10cSrcweir case XML_TYPE_TEXT_CASEMAP_VAR: 288*cdf0e10cSrcweir pPropHdl = new XMLCaseMapVariantHdl; 289*cdf0e10cSrcweir break; 290*cdf0e10cSrcweir case XML_TYPE_TEXT_FONTFAMILYNAME: 291*cdf0e10cSrcweir pPropHdl = new XMLFontFamilyNamePropHdl; 292*cdf0e10cSrcweir break; 293*cdf0e10cSrcweir case XML_TYPE_TEXT_FONTFAMILY: 294*cdf0e10cSrcweir pPropHdl = new XMLFontFamilyPropHdl; 295*cdf0e10cSrcweir break; 296*cdf0e10cSrcweir case XML_TYPE_TEXT_FONTENCODING: 297*cdf0e10cSrcweir pPropHdl = new XMLFontEncodingPropHdl; 298*cdf0e10cSrcweir break; 299*cdf0e10cSrcweir case XML_TYPE_TEXT_FONTPITCH: 300*cdf0e10cSrcweir pPropHdl = new XMLFontPitchPropHdl; 301*cdf0e10cSrcweir break; 302*cdf0e10cSrcweir case XML_TYPE_TEXT_KERNING: 303*cdf0e10cSrcweir pPropHdl = new XMLKerningPropHdl; 304*cdf0e10cSrcweir break; 305*cdf0e10cSrcweir case XML_TYPE_TEXT_POSTURE: 306*cdf0e10cSrcweir pPropHdl = new XMLPosturePropHdl; 307*cdf0e10cSrcweir break; 308*cdf0e10cSrcweir case XML_TYPE_TEXT_SHADOWED: 309*cdf0e10cSrcweir pPropHdl = new XMLShadowedPropHdl; 310*cdf0e10cSrcweir break; 311*cdf0e10cSrcweir case XML_TYPE_TEXT_UNDERLINE_TYPE: 312*cdf0e10cSrcweir pPropHdl = new XMLUnderlineTypePropHdl; 313*cdf0e10cSrcweir break; 314*cdf0e10cSrcweir case XML_TYPE_TEXT_UNDERLINE_STYLE: 315*cdf0e10cSrcweir pPropHdl = new XMLUnderlineStylePropHdl; 316*cdf0e10cSrcweir break; 317*cdf0e10cSrcweir case XML_TYPE_TEXT_UNDERLINE_WIDTH: 318*cdf0e10cSrcweir pPropHdl = new XMLUnderlineWidthPropHdl; 319*cdf0e10cSrcweir break; 320*cdf0e10cSrcweir case XML_TYPE_TEXT_UNDERLINE_COLOR: 321*cdf0e10cSrcweir pPropHdl = new XMLColorTransparentPropHdl( XML_FONT_COLOR ); 322*cdf0e10cSrcweir break; 323*cdf0e10cSrcweir case XML_TYPE_TEXT_UNDERLINE_HASCOLOR: 324*cdf0e10cSrcweir pPropHdl = new XMLIsTransparentPropHdl( XML_FONT_COLOR, 325*cdf0e10cSrcweir sal_False ); 326*cdf0e10cSrcweir break; 327*cdf0e10cSrcweir case XML_TYPE_TEXT_OVERLINE_TYPE: 328*cdf0e10cSrcweir pPropHdl = new XMLUnderlineTypePropHdl; 329*cdf0e10cSrcweir break; 330*cdf0e10cSrcweir case XML_TYPE_TEXT_OVERLINE_STYLE: 331*cdf0e10cSrcweir pPropHdl = new XMLUnderlineStylePropHdl; 332*cdf0e10cSrcweir break; 333*cdf0e10cSrcweir case XML_TYPE_TEXT_OVERLINE_WIDTH: 334*cdf0e10cSrcweir pPropHdl = new XMLUnderlineWidthPropHdl; 335*cdf0e10cSrcweir break; 336*cdf0e10cSrcweir case XML_TYPE_TEXT_OVERLINE_COLOR: 337*cdf0e10cSrcweir pPropHdl = new XMLColorTransparentPropHdl( XML_FONT_COLOR ); 338*cdf0e10cSrcweir break; 339*cdf0e10cSrcweir case XML_TYPE_TEXT_OVERLINE_HASCOLOR: 340*cdf0e10cSrcweir pPropHdl = new XMLIsTransparentPropHdl( XML_FONT_COLOR, 341*cdf0e10cSrcweir sal_False ); 342*cdf0e10cSrcweir break; 343*cdf0e10cSrcweir case XML_TYPE_TEXT_WEIGHT: 344*cdf0e10cSrcweir pPropHdl = new XMLFontWeightPropHdl; 345*cdf0e10cSrcweir break; 346*cdf0e10cSrcweir case XML_TYPE_TEXT_SPLIT: 347*cdf0e10cSrcweir pPropHdl = new XMLNamedBoolPropertyHdl( 348*cdf0e10cSrcweir GetXMLToken(XML_AUTO), 349*cdf0e10cSrcweir GetXMLToken(XML_ALWAYS) ); 350*cdf0e10cSrcweir break; 351*cdf0e10cSrcweir case XML_TYPE_TEXT_BREAKBEFORE: 352*cdf0e10cSrcweir pPropHdl = new XMLFmtBreakBeforePropHdl; 353*cdf0e10cSrcweir break; 354*cdf0e10cSrcweir case XML_TYPE_TEXT_BREAKAFTER: 355*cdf0e10cSrcweir pPropHdl = new XMLFmtBreakAfterPropHdl; 356*cdf0e10cSrcweir break; 357*cdf0e10cSrcweir case XML_TYPE_TEXT_SHADOW: 358*cdf0e10cSrcweir pPropHdl = new XMLShadowPropHdl; 359*cdf0e10cSrcweir break; 360*cdf0e10cSrcweir case XML_TYPE_TEXT_ADJUST: 361*cdf0e10cSrcweir pPropHdl = new XMLParaAdjustPropHdl; 362*cdf0e10cSrcweir break; 363*cdf0e10cSrcweir case XML_TYPE_TEXT_ADJUSTLAST: 364*cdf0e10cSrcweir pPropHdl = new XMLLastLineAdjustPropHdl; 365*cdf0e10cSrcweir break; 366*cdf0e10cSrcweir case XML_TYPE_CHAR_HEIGHT: 367*cdf0e10cSrcweir pPropHdl = new XMLCharHeightHdl; 368*cdf0e10cSrcweir break; 369*cdf0e10cSrcweir case XML_TYPE_CHAR_HEIGHT_PROP: 370*cdf0e10cSrcweir pPropHdl = new XMLCharHeightPropHdl; 371*cdf0e10cSrcweir break; 372*cdf0e10cSrcweir case XML_TYPE_CHAR_HEIGHT_DIFF: 373*cdf0e10cSrcweir pPropHdl = new XMLCharHeightDiffHdl; 374*cdf0e10cSrcweir break; 375*cdf0e10cSrcweir case XML_TYPE_CHAR_LANGUAGE: 376*cdf0e10cSrcweir pPropHdl = new XMLCharLanguageHdl; 377*cdf0e10cSrcweir break; 378*cdf0e10cSrcweir case XML_TYPE_CHAR_COUNTRY: 379*cdf0e10cSrcweir pPropHdl = new XMLCharCountryHdl; 380*cdf0e10cSrcweir break; 381*cdf0e10cSrcweir case XML_TYPE_LINE_SPACE_FIXED: 382*cdf0e10cSrcweir pPropHdl = new XMLLineHeightHdl; 383*cdf0e10cSrcweir break; 384*cdf0e10cSrcweir case XML_TYPE_LINE_SPACE_MINIMUM: 385*cdf0e10cSrcweir pPropHdl = new XMLLineHeightAtLeastHdl; 386*cdf0e10cSrcweir break; 387*cdf0e10cSrcweir case XML_TYPE_LINE_SPACE_DISTANCE: 388*cdf0e10cSrcweir pPropHdl = new XMLLineSpacingHdl; 389*cdf0e10cSrcweir break; 390*cdf0e10cSrcweir case XML_TYPE_BORDER_WIDTH: 391*cdf0e10cSrcweir pPropHdl = new XMLBorderWidthHdl; 392*cdf0e10cSrcweir break; 393*cdf0e10cSrcweir case XML_TYPE_BORDER: 394*cdf0e10cSrcweir pPropHdl = new XMLBorderHdl; 395*cdf0e10cSrcweir break; 396*cdf0e10cSrcweir case XML_TYPE_TEXT_TABSTOP: 397*cdf0e10cSrcweir pPropHdl = new XMLTabStopPropHdl; 398*cdf0e10cSrcweir break; 399*cdf0e10cSrcweir case XML_TYPE_ATTRIBUTE_CONTAINER: 400*cdf0e10cSrcweir pPropHdl = new XMLAttributeContainerHandler; 401*cdf0e10cSrcweir break; 402*cdf0e10cSrcweir case XML_TYPE_COLOR_MODE: 403*cdf0e10cSrcweir pPropHdl = new XMLEnumPropertyHdl( aXML_ColorMode_EnumMap, 404*cdf0e10cSrcweir ::getCppuType((const drawing::ColorMode*)0) ); 405*cdf0e10cSrcweir break; 406*cdf0e10cSrcweir case XML_TYPE_DURATION16_MS: 407*cdf0e10cSrcweir pPropHdl = new XMLDurationMS16PropHdl_Impl; 408*cdf0e10cSrcweir break; 409*cdf0e10cSrcweir case XML_TYPE_TEXT_HORIZONTAL_ADJUST: 410*cdf0e10cSrcweir pPropHdl = new XMLEnumPropertyHdl( 411*cdf0e10cSrcweir aXML_HorizontalAdjust_Enum, 412*cdf0e10cSrcweir ::getCppuType((const text::HorizontalAdjust*)0) ); 413*cdf0e10cSrcweir break; 414*cdf0e10cSrcweir case XML_TYPE_TEXT_DRAW_ASPECT: 415*cdf0e10cSrcweir pPropHdl = new DrawAspectHdl; 416*cdf0e10cSrcweir break; 417*cdf0e10cSrcweir case XML_TYPE_TEXT_WRITING_MODE: 418*cdf0e10cSrcweir pPropHdl = new XMLConstantsPropertyHandler( 419*cdf0e10cSrcweir &(aXML_WritingDirection_Enum[1]), 420*cdf0e10cSrcweir XML_LR_TB); 421*cdf0e10cSrcweir break; 422*cdf0e10cSrcweir case XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT: 423*cdf0e10cSrcweir pPropHdl = new XMLConstantsPropertyHandler( 424*cdf0e10cSrcweir aXML_WritingDirection_Enum, 425*cdf0e10cSrcweir XML_PAGE); 426*cdf0e10cSrcweir break; 427*cdf0e10cSrcweir case XML_TYPE_TEXT_HIDDEN_AS_DISPLAY: 428*cdf0e10cSrcweir pPropHdl = new XMLNamedBoolPropertyHdl( 429*cdf0e10cSrcweir GetXMLToken(XML_NONE), 430*cdf0e10cSrcweir GetXMLToken(XML_TRUE) ); 431*cdf0e10cSrcweir break; 432*cdf0e10cSrcweir case XML_TYPE_STYLENAME : 433*cdf0e10cSrcweir pPropHdl = new XMLStyleNamePropHdl; 434*cdf0e10cSrcweir break; 435*cdf0e10cSrcweir case XML_TYPE_NUMBER_NO_ZERO: 436*cdf0e10cSrcweir pPropHdl = new XMLNumberWithoutZeroPropHdl( 4 ); 437*cdf0e10cSrcweir break; 438*cdf0e10cSrcweir case XML_TYPE_NUMBER8_NO_ZERO: 439*cdf0e10cSrcweir pPropHdl = new XMLNumberWithoutZeroPropHdl( 1 ); 440*cdf0e10cSrcweir break; 441*cdf0e10cSrcweir case XML_TYPE_NUMBER16_NO_ZERO: 442*cdf0e10cSrcweir pPropHdl = new XMLNumberWithoutZeroPropHdl( 2 ); 443*cdf0e10cSrcweir break; 444*cdf0e10cSrcweir case XML_TYPE_NUMBER16_AUTO: 445*cdf0e10cSrcweir pPropHdl = new XMLNumberWithAutoInsteadZeroPropHdl(); 446*cdf0e10cSrcweir break; 447*cdf0e10cSrcweir } 448*cdf0e10cSrcweir 449*cdf0e10cSrcweir return pPropHdl; 450*cdf0e10cSrcweir } 451