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