Update ooo320-m1
[ooovba.git] / oox / source / drawingml / customshapegeometry.cxx
blob7de6adb0b17a3256691048c006259d2064cc1a67
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: customshapegeometry.cxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #include "oox/drawingml/customshapegeometry.hxx"
32 #include "oox/drawingml/customshapeproperties.hxx"
34 #include <com/sun/star/xml/sax/FastToken.hpp>
35 #include <comphelper/stl_types.hxx>
36 #include <hash_map>
37 #include <basegfx/polygon/b2dpolygon.hxx>
39 #include "oox/helper/helper.hxx"
40 #include "oox/helper/propertymap.hxx"
41 #include "oox/core/namespaces.hxx"
42 #include "tokens.hxx"
44 using ::rtl::OUString;
45 using namespace ::basegfx;
46 using namespace ::oox::core;
47 using namespace ::com::sun::star::uno;
48 using namespace ::com::sun::star::xml::sax;
50 namespace oox { namespace drawingml {
52 enum FormularCommand
54 FC_MULDIV = 0,
55 FC_PLUSMINUS,
56 FC_PLUSDIV,
57 FC_IFELSE,
58 FC_ABS,
59 FC_AT2,
60 FC_CAT2,
61 FC_COS,
62 FC_MAX,
63 FC_MIN,
64 FC_MOD,
65 FC_PIN,
66 FC_SAT2,
67 FC_SIN,
68 FC_SQRT,
69 FC_TAN,
70 FC_VAL,
71 FC_LAST
73 struct FormularCommandNameTable
75 const char* pS;
76 FormularCommand pE;
78 static FormularCommandNameTable pFormularCommandNameTable[] =
80 { "*/", FC_MULDIV },
81 { "+-", FC_PLUSMINUS },
82 { "+/", FC_PLUSDIV },
83 { "ifelse", FC_IFELSE },
84 { "abs", FC_ABS },
85 { "at2", FC_AT2 },
86 { "cat2", FC_CAT2 },
87 { "cos", FC_COS },
88 { "max", FC_MAX },
89 { "min", FC_MIN },
90 { "mod", FC_MOD },
91 { "pin", FC_PIN },
92 { "sat2", FC_SAT2 },
93 { "sin", FC_SIN },
94 { "sqrt", FC_SQRT },
95 { "tan", FC_TAN },
96 { "val", FC_VAL }
99 typedef std::hash_map< rtl::OUString, FormularCommand, comphelper::UStringHash, comphelper::UStringEqual > FormulaCommandHMap;
101 static const FormulaCommandHMap* pCommandHashMap;
103 // ---------------------------------------------------------------------
104 // CT_GeomGuideList
105 class AdjustmentValueContext : public ContextHandler
107 public:
108 AdjustmentValueContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties );
109 virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
111 protected:
112 CustomShapeProperties& mrCustomShapeProperties;
115 AdjustmentValueContext::AdjustmentValueContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties )
116 : ContextHandler( rParent )
117 , mrCustomShapeProperties( rCustomShapeProperties )
121 static rtl::OUString convertToOOEquation( const rtl::OUString& rSource )
123 if ( !pCommandHashMap )
125 FormulaCommandHMap* pHM = new FormulaCommandHMap();
126 for( sal_Int32 i = 0; i < FC_LAST; i++ )
127 (*pHM)[ OUString::createFromAscii( pFormularCommandNameTable[ i ].pS ) ] = pFormularCommandNameTable[ i ].pE;
128 pCommandHashMap = pHM;
131 std::vector< rtl::OUString > aTokens;
132 sal_Int32 nIndex = 0;
135 rtl::OUString aToken( rSource.getToken( 0, ' ', nIndex ) );
136 if ( aToken.getLength() )
137 aTokens.push_back( aToken );
139 while ( nIndex >= 0 );
141 rtl::OUString aEquation;
142 if ( aTokens.size() )
144 const FormulaCommandHMap::const_iterator aIter( pCommandHashMap->find( aTokens[ 0 ] ) );
145 if ( aIter != pCommandHashMap->end() )
147 switch( aIter->second )
149 case FC_MULDIV :
150 case FC_PLUSMINUS :
151 case FC_PLUSDIV :
152 case FC_IFELSE :
153 case FC_ABS :
154 case FC_AT2 :
155 case FC_CAT2 :
156 case FC_COS :
157 case FC_MAX :
158 case FC_MIN :
159 case FC_MOD :
160 case FC_PIN :
161 case FC_SAT2 :
162 case FC_SIN :
163 case FC_SQRT :
164 case FC_TAN :
165 case FC_VAL :
166 default :
167 break;
171 return aEquation;
174 Reference< XFastContextHandler > AdjustmentValueContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
176 if ( aElementToken == ( NMSP_DRAWINGML | XML_gd ) ) // CT_GeomGuide
178 CustomShapeGuide aGuide;
179 aGuide.maName = xAttribs->getOptionalValue( XML_name );
180 aGuide.maFormula = convertToOOEquation( xAttribs->getOptionalValue( XML_fmla ) );
181 std::vector< CustomShapeGuide >& rAdjustmentValues( mrCustomShapeProperties.getAdjustmentValues() );
182 rAdjustmentValues.push_back( aGuide );
184 return this;
187 // ---------------------------------------------------------------------
189 class PathListContext : public ContextHandler
191 public:
192 PathListContext( ContextHandler& rParent, Shape& rShape );
193 virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
194 virtual void SAL_CALL endFastElement( sal_Int32 aElementToken ) throw (SAXException, RuntimeException);
196 protected:
197 Shape& mrShape;
198 sal_Int32 maPointToken;
199 ::basegfx::B2DPolygon maPolygon;
202 PathListContext::PathListContext( ContextHandler& rParent, Shape& rShape )
203 : ContextHandler( rParent )
204 , mrShape( rShape )
208 Reference< XFastContextHandler > PathListContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
210 switch( aElementToken ) {
211 case NMSP_DRAWINGML | XML_path:
212 maPolygon.clear();
213 break;
214 case NMSP_DRAWINGML | XML_close:
215 maPolygon.setClosed( true );
216 break;
217 case NMSP_DRAWINGML | XML_pt:
219 OUString sX, sY;
221 sX = xAttribs->getOptionalValue( XML_x );
222 sY = xAttribs->getOptionalValue( XML_y );
224 double dX, dY;
226 dX = sX.toDouble();
227 dY = sY.toDouble();
229 maPolygon.append( B2DPoint ( dX, dY ) );
230 break;
232 case NMSP_DRAWINGML | XML_lnTo:
233 case NMSP_DRAWINGML | XML_moveTo:
234 maPointToken = aElementToken;
235 break;
238 return this;
241 void PathListContext::endFastElement( sal_Int32 aElementToken ) throw (SAXException, RuntimeException)
243 switch( aElementToken ) {
244 case NMSP_DRAWINGML|XML_pathLst:
246 B2DPolyPolygon& rPoly = mrShape.getCustomShapeProperties()->getPolygon();
247 if( rPoly.count() ) {
248 if( rPoly.areControlPointsUsed() ) {
249 if( rPoly.isClosed() )
250 mrShape.setServiceName( "com.sun.star.drawing.ClosedBezierShape" );
251 else
252 mrShape.setServiceName( "com.sun.star.drawing.OpenBezierShape" );
253 } else {
254 if( rPoly.isClosed() )
255 mrShape.setServiceName( "com.sun.star.drawing.PolyPolygonPathShape" );
256 else
257 mrShape.setServiceName( "com.sun.star.drawing.PolyLinePathShape" );
260 break;
262 case NMSP_DRAWINGML|XML_path:
263 if( maPolygon.count() > 0 )
264 mrShape.getCustomShapeProperties()->getPolygon().append( maPolygon );
265 break;
269 // ---------------------------------------------------------------------
271 OUString GetShapeType( sal_Int32 nType )
273 OUString sType;
274 switch( nType )
276 case XML_lineInv: // TODO
277 case XML_line: {
278 static const OUString sLine = CREATE_OUSTRING( "mso-spt20" );
279 sType = sLine;
280 } break;
281 case XML_triangle: {
282 static const OUString sTriangle = CREATE_OUSTRING( "isosceles-triangle" );
283 sType = sTriangle;
284 } break;
285 case XML_rtTriangle: {
286 static const OUString sRtTriangle = CREATE_OUSTRING( "right-triangle" );
287 sType = sRtTriangle;
288 } break;
289 case XML_rect: {
290 static const OUString sRectangle = CREATE_OUSTRING( "rectangle" );
291 sType = sRectangle;
292 } break;
293 case XML_diamond: {
294 static const OUString sDiamond = CREATE_OUSTRING( "diamond" );
295 sType = sDiamond;
296 } break;
297 case XML_parallelogram: {
298 static const OUString sParallelogram = CREATE_OUSTRING( "parallelogram" );
299 sType = sParallelogram;
300 } break;
301 case XML_nonIsoscelesTrapezoid: // TODO
302 case XML_trapezoid: {
303 static const OUString sTrapezoid = CREATE_OUSTRING( "trapezoid" );
304 sType = sTrapezoid;
305 } break;
306 case XML_pentagon: {
307 static const OUString sPentagon = CREATE_OUSTRING( "pentagon" );
308 sType = sPentagon;
309 } break;
310 case XML_heptagon: // TODO
311 case XML_hexagon: {
312 static const OUString sHexagon = CREATE_OUSTRING( "hexagon" );
313 sType = sHexagon;
314 } break;
315 case XML_decagon: // TODO
316 case XML_dodecagon: // TODO
317 case XML_octagon: {
318 static const OUString sOctagon = CREATE_OUSTRING( "octagon" );
319 sType = sOctagon;
320 } break;
321 case XML_star4: {
322 static const OUString sStar4 = CREATE_OUSTRING( "star4" );
323 sType = sStar4;
324 } break;
325 case XML_star6: // TODO
326 case XML_star7: // TODO
327 case XML_star5: {
328 static const OUString sStar5 = CREATE_OUSTRING( "star5" );
329 sType = sStar5;
330 } break;
331 case XML_star10: // TODO
332 case XML_star12: // TODO
333 case XML_star16: // TODO
334 case XML_star8: {
335 static const OUString sStar8 = CREATE_OUSTRING( "star8" );
336 sType = sStar8;
337 } break;
338 case XML_star32: // TODO
339 case XML_star24: {
340 static const OUString sStar24 = CREATE_OUSTRING( "star24" );
341 sType = sStar24;
342 } break;
343 case XML_round1Rect: // TODO
344 case XML_round2SameRect: // TODO
345 case XML_round2DiagRect: // TODO
346 case XML_snipRoundRect: // TODO
347 case XML_snip1Rect: // TODO
348 case XML_snip2SameRect: // TODO
349 case XML_snip2DiagRect: // TODO
350 case XML_roundRect: {
351 static const OUString sRoundRect = CREATE_OUSTRING( "round-rectangle" );
352 sType = sRoundRect;
353 } break;
354 case XML_plaque: {
355 static const OUString sPlaque = CREATE_OUSTRING( "mso-spt21" );
356 sType = sPlaque;
357 } break;
358 case XML_teardrop: // TODO
359 case XML_ellipse: {
360 static const OUString sEllipse = CREATE_OUSTRING( "ellipse" );
361 sType = sEllipse;
362 } break;
363 case XML_homePlate: {
364 static const OUString sHomePlate = CREATE_OUSTRING( "pentagon-right" );
365 sType = sHomePlate;
366 } break;
367 case XML_chevron: {
368 static const OUString sChevron = CREATE_OUSTRING( "chevron" );
369 sType = sChevron;
370 } break;
371 case XML_pieWedge: // TODO
372 case XML_pie: // TODO
373 case XML_blockArc: {
374 static const OUString sBlockArc = CREATE_OUSTRING( "block-arc" );
375 sType = sBlockArc;
376 } break;
377 case XML_donut: {
378 static const OUString sDonut = CREATE_OUSTRING( "ring" );
379 sType = sDonut;
380 } break;
381 case XML_noSmoking: {
382 static const OUString sNoSmoking = CREATE_OUSTRING( "forbidden" );
383 sType = sNoSmoking;
384 } break;
385 case XML_rightArrow: {
386 static const OUString sRightArrow = CREATE_OUSTRING( "right-arrow" );
387 sType = sRightArrow;
388 } break;
389 case XML_leftArrow: {
390 static const OUString sLeftArrow = CREATE_OUSTRING( "left-arrow" );
391 sType = sLeftArrow;
392 } break;
393 case XML_upArrow: {
394 static const OUString sUpArrow = CREATE_OUSTRING( "up-arrow" );
395 sType = sUpArrow;
396 } break;
397 case XML_downArrow: {
398 static const OUString sDownArrow = CREATE_OUSTRING( "down-arrow" );
399 sType = sDownArrow;
400 } break;
401 case XML_stripedRightArrow: {
402 static const OUString sStripedRightArrow = CREATE_OUSTRING( "striped-right-arrow" );
403 sType = sStripedRightArrow;
404 } break;
405 case XML_notchedRightArrow: {
406 static const OUString sNotchedRightArrow = CREATE_OUSTRING( "notched-right-arrow" );
407 sType = sNotchedRightArrow;
408 } break;
409 case XML_bentUpArrow: {
410 static const OUString sBentUpArrow = CREATE_OUSTRING( "mso-spt90" );
411 sType = sBentUpArrow;
412 } break;
413 case XML_leftRightArrow: {
414 static const OUString sLeftRightArrow = CREATE_OUSTRING( "left-right-arrow" );
415 sType = sLeftRightArrow;
416 } break;
417 case XML_upDownArrow: {
418 static const OUString sUpDownArrow = CREATE_OUSTRING( "up-down-arrow" );
419 sType = sUpDownArrow;
420 } break;
421 case XML_leftUpArrow: {
422 static const OUString sLeftUpArrow = CREATE_OUSTRING( "mso-spt89" );
423 sType = sLeftUpArrow;
424 } break;
425 case XML_leftRightUpArrow: {
426 static const OUString sLeftRightUpArrow = CREATE_OUSTRING( "mso-spt182" );
427 sType = sLeftRightUpArrow;
428 } break;
429 case XML_quadArrow: {
430 static const OUString sQuadArrow = CREATE_OUSTRING( "quad-arrow" );
431 sType = sQuadArrow;
432 } break;
433 case XML_leftArrowCallout: {
434 static const OUString sLeftArrowCallout = CREATE_OUSTRING( "left-arrow-callout" );
435 sType = sLeftArrowCallout;
436 } break;
437 case XML_rightArrowCallout: {
438 static const OUString sRightArrowCallout = CREATE_OUSTRING( "right-arrow-callout" );
439 sType = sRightArrowCallout;
440 } break;
441 case XML_upArrowCallout: {
442 static const OUString sUpArrowCallout = CREATE_OUSTRING( "up-arrow-callout" );
443 sType = sUpArrowCallout;
444 } break;
445 case XML_downArrowCallout: {
446 static const OUString sDownArrowCallout = CREATE_OUSTRING( "down-arrow-callout" );
447 sType = sDownArrowCallout;
448 } break;
449 case XML_leftRightArrowCallout: {
450 static const OUString sLeftRightArrowCallout = CREATE_OUSTRING( "left-right-arrow-callout" );
451 sType = sLeftRightArrowCallout;
452 } break;
453 case XML_upDownArrowCallout: {
454 static const OUString sUpDownArrowCallout = CREATE_OUSTRING( "up-down-arrow-callout" );
455 sType = sUpDownArrowCallout;
456 } break;
457 case XML_quadArrowCallout: {
458 static const OUString sQuadArrowCallout = CREATE_OUSTRING( "quad-arrow-callout" );
459 sType = sQuadArrowCallout;
460 } break;
461 case XML_bentArrow: {
462 static const OUString sBentArrow = CREATE_OUSTRING( "mso-spt91" );
463 sType = sBentArrow;
464 } break;
465 case XML_uturnArrow: {
466 static const OUString sUTurnArrow = CREATE_OUSTRING( "mso-spt101" );
467 sType = sUTurnArrow;
468 } break;
469 case XML_leftCircularArrow: // TODO
470 case XML_leftRightCircularArrow: // TODO
471 case XML_circularArrow: {
472 static const OUString sCircularArrow = CREATE_OUSTRING( "circular-arrow" );
473 sType = sCircularArrow;
474 } break;
475 case XML_curvedRightArrow: {
476 static const OUString sCurvedRightArrow = CREATE_OUSTRING( "mso-spt102" );
477 sType = sCurvedRightArrow;
478 } break;
479 case XML_curvedLeftArrow: {
480 static const OUString sCurvedLeftArrow = CREATE_OUSTRING( "mso-spt103" );
481 sType = sCurvedLeftArrow;
482 } break;
483 case XML_curvedUpArrow: {
484 static const OUString sCurvedUpArrow = CREATE_OUSTRING( "mso-spt104" );
485 sType = sCurvedUpArrow;
486 } break;
487 case XML_swooshArrow: // TODO
488 case XML_curvedDownArrow: {
489 static const OUString sCurvedDownArrow = CREATE_OUSTRING( "mso-spt105" );
490 sType = sCurvedDownArrow;
491 } break;
492 case XML_cube: {
493 static const OUString sCube = CREATE_OUSTRING( "cube" );
494 sType = sCube;
495 } break;
496 case XML_can: {
497 static const OUString sCan = CREATE_OUSTRING( "can" );
498 sType = sCan;
499 } break;
500 case XML_lightningBolt: {
501 static const OUString sLightningBolt = CREATE_OUSTRING( "lightning" );
502 sType = sLightningBolt;
503 } break;
504 case XML_heart: {
505 static const OUString sHeart = CREATE_OUSTRING( "heart" );
506 sType = sHeart;
507 } break;
508 case XML_sun: {
509 static const OUString sSun = CREATE_OUSTRING( "sun" );
510 sType = sSun;
511 } break;
512 case XML_moon: {
513 static const OUString sMoon = CREATE_OUSTRING( "moon" );
514 sType = sMoon;
515 } break;
516 case XML_smileyFace: {
517 static const OUString sSmileyFace = CREATE_OUSTRING( "smiley" );
518 sType = sSmileyFace;
519 } break;
520 case XML_irregularSeal1: {
521 static const OUString sIrregularSeal1 = CREATE_OUSTRING( "mso-spt71" );
522 sType = sIrregularSeal1;
523 } break;
524 case XML_irregularSeal2: {
525 static const OUString sIrregularSeal2 = CREATE_OUSTRING( "bang" );
526 sType = sIrregularSeal2;
527 } break;
528 case XML_foldedCorner: {
529 static const OUString sFoldedCorner = CREATE_OUSTRING( "paper" );
530 sType = sFoldedCorner;
531 } break;
532 case XML_bevel: {
533 static const OUString sBevel = CREATE_OUSTRING( "quad-bevel" );
534 sType = sBevel;
535 } break;
536 case XML_halfFrame: // TODO
537 case XML_corner: // TODO
538 case XML_diagStripe: // TODO
539 case XML_chord: // TODO
540 case XML_frame: {
541 static const OUString sFrame = CREATE_OUSTRING( "mso-spt75" );
542 sType = sFrame;
543 } break;
544 case XML_arc: {
545 static const OUString sArc = CREATE_OUSTRING( "mso-spt19" );
546 sType = sArc;
547 } break;
548 case XML_leftBracket: {
549 static const OUString sLeftBracket = CREATE_OUSTRING( "left-bracket" );
550 sType = sLeftBracket;
551 } break;
552 case XML_rightBracket: {
553 static const OUString sRightBracket = CREATE_OUSTRING( "right-bracket" );
554 sType = sRightBracket;
555 } break;
556 case XML_leftBrace: {
557 static const OUString sLeftBrace = CREATE_OUSTRING( "left-brace" );
558 sType = sLeftBrace;
559 } break;
560 case XML_rightBrace: {
561 static const OUString sRightBrace = CREATE_OUSTRING( "right-brace" );
562 sType = sRightBrace;
563 } break;
564 case XML_bracketPair: {
565 static const OUString sBracketPair = CREATE_OUSTRING( "bracket-pair" );
566 sType = sBracketPair;
567 } break;
568 case XML_bracePair: {
569 static const OUString sBracePair = CREATE_OUSTRING( "brace-pair" );
570 sType = sBracePair;
571 } break;
572 case XML_straightConnector1: {
573 static const OUString sStraightConnector1 = CREATE_OUSTRING( "mso-spt32" );
574 sType = sStraightConnector1;
575 } break;
576 case XML_bentConnector2: {
577 static const OUString sBentConnector2 = CREATE_OUSTRING( "mso-spt33" );
578 sType = sBentConnector2;
579 } break;
580 case XML_bentConnector3: {
581 static const OUString sBentConnector3 = CREATE_OUSTRING( "mso-spt34" );
582 sType = sBentConnector3;
583 } break;
584 case XML_bentConnector4: {
585 static const OUString sBentConnector4 = CREATE_OUSTRING( "mso-spt35" );
586 sType = sBentConnector4;
587 } break;
588 case XML_bentConnector5: {
589 static const OUString sBentConnector5 = CREATE_OUSTRING( "mso-spt36" );
590 sType = sBentConnector5;
591 } break;
592 case XML_curvedConnector2: {
593 static const OUString sCurvedConnector2 = CREATE_OUSTRING( "mso-spt37" );
594 sType = sCurvedConnector2;
595 } break;
596 case XML_curvedConnector3: {
597 static const OUString sCurvedConnector3 = CREATE_OUSTRING( "mso-spt38" );
598 sType = sCurvedConnector3;
599 } break;
600 case XML_curvedConnector4: {
601 static const OUString sCurvedConnector4 = CREATE_OUSTRING( "mso-spt39" );
602 sType = sCurvedConnector4;
603 } break;
604 case XML_curvedConnector5: {
605 static const OUString sCurvedConnector5 = CREATE_OUSTRING( "mso-spt40" );
606 sType = sCurvedConnector5;
607 } break;
608 case XML_callout1: {
609 static const OUString sCallout1 = CREATE_OUSTRING( "mso-spt41" );
610 sType = sCallout1;
611 } break;
612 case XML_callout2: {
613 static const OUString sCallout2 = CREATE_OUSTRING( "mso-spt42" );
614 sType = sCallout2;
615 } break;
616 case XML_callout3: {
617 static const OUString sCallout3 = CREATE_OUSTRING( "mso-spt43" );
618 sType = sCallout3;
619 } break;
620 case XML_accentCallout1: {
621 static const OUString sAccentCallout1 = CREATE_OUSTRING( "mso-spt44" );
622 sType = sAccentCallout1;
623 } break;
624 case XML_accentCallout2: {
625 static const OUString sAccentCallout2 = CREATE_OUSTRING( "mso-spt45" );
626 sType = sAccentCallout2;
627 } break;
628 case XML_accentCallout3: {
629 static const OUString sAccentCallout3 = CREATE_OUSTRING( "mso-spt46" );
630 sType = sAccentCallout3;
631 } break;
632 case XML_borderCallout1: {
633 static const OUString sBorderCallout1 = CREATE_OUSTRING( "line-callout-1" );
634 sType = sBorderCallout1;
635 } break;
636 case XML_borderCallout2: {
637 static const OUString sBorderCallout2 = CREATE_OUSTRING( "line-callout-2" );
638 sType = sBorderCallout2;
639 } break;
640 case XML_borderCallout3: {
641 static const OUString sBorderCallout3 = CREATE_OUSTRING( "mso-spt49" );
642 sType = sBorderCallout3;
643 } break;
644 case XML_accentBorderCallout1: {
645 static const OUString sAccentBorderCallout1 = CREATE_OUSTRING( "mso-spt50" );
646 sType = sAccentBorderCallout1;
647 } break;
648 case XML_accentBorderCallout2: {
649 static const OUString sAccentBorderCallout2 = CREATE_OUSTRING( "mso-spt51" );
650 sType = sAccentBorderCallout2;
651 } break;
652 case XML_accentBorderCallout3: {
653 static const OUString sAccentBorderCallout3 = CREATE_OUSTRING( "mso-spt52" );
654 sType = sAccentBorderCallout3;
655 } break;
656 case XML_wedgeRectCallout: {
657 static const OUString sWedgeRectCallout = CREATE_OUSTRING( "rectangular-callout" );
658 sType = sWedgeRectCallout;
659 } break;
660 case XML_wedgeRoundRectCallout: {
661 static const OUString sWedgeRoundRectCallout = CREATE_OUSTRING( "round-rectangular-callout" );
662 sType = sWedgeRoundRectCallout;
663 } break;
664 case XML_wedgeEllipseCallout: {
665 static const OUString sWedgeEllipseCallout = CREATE_OUSTRING( "round-callout" );
666 sType = sWedgeEllipseCallout;
667 } break;
668 case XML_cloud: // TODO
669 case XML_cloudCallout: {
670 static const OUString sCloudCallout = CREATE_OUSTRING( "cloud-callout" );
671 sType = sCloudCallout;
672 } break;
673 case XML_ribbon: {
674 static const OUString sRibbon = CREATE_OUSTRING( "mso-spt53" );
675 sType = sRibbon;
676 } break;
677 case XML_ribbon2: {
678 static const OUString sRibbon2 = CREATE_OUSTRING( "mso-spt54" );
679 sType = sRibbon2;
680 } break;
681 case XML_ellipseRibbon: {
682 static const OUString sEllipseRibbon = CREATE_OUSTRING( "mso-spt107" );
683 sType = sEllipseRibbon;
684 } break;
685 case XML_leftRightRibbon: // TODO
686 case XML_ellipseRibbon2: {
687 static const OUString sEllipseRibbon2 = CREATE_OUSTRING( "mso-spt108" );
688 sType = sEllipseRibbon2;
689 } break;
690 case XML_verticalScroll: {
691 static const OUString sVerticalScroll = CREATE_OUSTRING( "vertical-scroll" );
692 sType = sVerticalScroll;
693 } break;
694 case XML_horizontalScroll: {
695 static const OUString sHorizontalScroll = CREATE_OUSTRING( "horizontal-scroll" );
696 sType = sHorizontalScroll;
697 } break;
698 case XML_wave: {
699 static const OUString sWave = CREATE_OUSTRING( "mso-spt64" );
700 sType = sWave;
701 } break;
702 case XML_doubleWave: {
703 static const OUString sDoubleWave = CREATE_OUSTRING( "mso-spt188" );
704 sType = sDoubleWave;
705 } break;
706 case XML_plus: {
707 static const OUString sPlus = CREATE_OUSTRING( "cross" );
708 sType = sPlus;
709 } break;
710 case XML_flowChartProcess: {
711 static const OUString sFlowChartProcess = CREATE_OUSTRING( "flowchart-process" );
712 sType = sFlowChartProcess;
713 } break;
714 case XML_flowChartDecision: {
715 static const OUString sFlowChartDecision = CREATE_OUSTRING( "flowchart-decision" );
716 sType = sFlowChartDecision;
717 } break;
718 case XML_flowChartInputOutput: {
719 static const OUString sFlowChartInputOutput = CREATE_OUSTRING( "flowchart-data" );
720 sType = sFlowChartInputOutput;
721 } break;
722 case XML_flowChartPredefinedProcess: {
723 static const OUString sFlowChartPredefinedProcess = CREATE_OUSTRING( "flowchart-predefined-process" );
724 sType = sFlowChartPredefinedProcess;
725 } break;
726 case XML_flowChartInternalStorage: {
727 static const OUString sFlowChartInternalStorage = CREATE_OUSTRING( "flowchart-internal-storage" );
728 sType = sFlowChartInternalStorage;
729 } break;
730 case XML_flowChartDocument: {
731 static const OUString sFlowChartDocument = CREATE_OUSTRING( "flowchart-document" );
732 sType = sFlowChartDocument;
733 } break;
734 case XML_flowChartMultidocument: {
735 static const OUString sFlowChartMultidocument = CREATE_OUSTRING( "flowchart-multidocument" );
736 sType = sFlowChartMultidocument;
737 } break;
738 case XML_flowChartTerminator: {
739 static const OUString sFlowChartTerminator = CREATE_OUSTRING( "flowchart-terminator" );
740 sType = sFlowChartTerminator;
741 } break;
742 case XML_flowChartPreparation : {
743 static const OUString sFlowChartPreparation = CREATE_OUSTRING( "flowchart-preparation" );
744 sType = sFlowChartPreparation;
745 } break;
746 case XML_flowChartManualInput: {
747 static const OUString sFlowChartManualInput = CREATE_OUSTRING( "flowchart-manual-input" );
748 sType = sFlowChartManualInput;
749 } break;
750 case XML_flowChartManualOperation: {
751 static const OUString sFlowChartManualOperation = CREATE_OUSTRING( "flowchart-manual-operation" );
752 sType = sFlowChartManualOperation;
753 } break;
754 case XML_flowChartConnector: {
755 static const OUString sFlowChartConnector = CREATE_OUSTRING( "flowchart-connector" );
756 sType = sFlowChartConnector;
757 } break;
758 case XML_flowChartPunchedCard: {
759 static const OUString sFlowChartPunchedCard = CREATE_OUSTRING( "flowchart-card" );
760 sType = sFlowChartPunchedCard;
761 } break;
762 case XML_flowChartPunchedTape: {
763 static const OUString sFlowChartPunchedTape = CREATE_OUSTRING( "flowchart-punched-tape" );
764 sType = sFlowChartPunchedTape;
765 } break;
766 case XML_flowChartSummingJunction: {
767 static const OUString sFlowChartSummingJunction = CREATE_OUSTRING( "flowchart-summing-junction" );
768 sType = sFlowChartSummingJunction;
769 } break;
770 case XML_flowChartOr: {
771 static const OUString sFlowChartOr = CREATE_OUSTRING( "flowchart-or" );
772 sType = sFlowChartOr;
773 } break;
774 case XML_flowChartCollate: {
775 static const OUString sFlowChartCollate = CREATE_OUSTRING( "flowchart-collate" );
776 sType = sFlowChartCollate;
777 } break;
778 case XML_flowChartSort: {
779 static const OUString sFlowChartSort = CREATE_OUSTRING( "flowchart-sort" );
780 sType = sFlowChartSort;
781 } break;
782 case XML_flowChartExtract: {
783 static const OUString sFlowChartExtract = CREATE_OUSTRING( "flowchart-extract" );
784 sType = sFlowChartExtract;
785 } break;
786 case XML_flowChartMerge: {
787 static const OUString sFlowChartMerge = CREATE_OUSTRING( "flowchart-merge" );
788 sType = sFlowChartMerge;
789 } break;
790 case XML_flowChartOfflineStorage: {
791 static const OUString sFlowChartOfflineStorage = CREATE_OUSTRING( "mso-spt129" );
792 sType = sFlowChartOfflineStorage;
793 } break;
794 case XML_flowChartOnlineStorage: {
795 static const OUString sFlowChartOnlineStorage = CREATE_OUSTRING( "flowchart-stored-data" );
796 sType = sFlowChartOnlineStorage;
797 } break;
798 case XML_flowChartMagneticTape: {
799 static const OUString sFlowChartMagneticTape = CREATE_OUSTRING( "flowchart-sequential-access" );
800 sType = sFlowChartMagneticTape;
801 } break;
802 case XML_flowChartMagneticDisk: {
803 static const OUString sFlowChartMagneticDisk = CREATE_OUSTRING( "flowchart-magnetic-disk" );
804 sType = sFlowChartMagneticDisk;
805 } break;
806 case XML_flowChartMagneticDrum: {
807 static const OUString sFlowChartMagneticDrum = CREATE_OUSTRING( "flowchart-direct-access-storage" );
808 sType = sFlowChartMagneticDrum;
809 } break;
810 case XML_flowChartDisplay: {
811 static const OUString sFlowChartDisplay = CREATE_OUSTRING( "flowchart-display" );
812 sType = sFlowChartDisplay;
813 } break;
814 case XML_flowChartDelay: {
815 static const OUString sFlowChartDelay = CREATE_OUSTRING( "flowchart-delay" );
816 sType = sFlowChartDelay;
817 } break;
818 case XML_flowChartAlternateProcess: {
819 static const OUString sFlowChartAlternateProcess = CREATE_OUSTRING( "flowchart-alternate-process" );
820 sType = sFlowChartAlternateProcess;
821 } break;
822 case XML_flowChartOffpageConnector: {
823 static const OUString sFlowChartOffpageConnector = CREATE_OUSTRING( "flowchart-off-page-connector" );
824 sType = sFlowChartOffpageConnector;
825 } break;
826 case XML_actionButtonBlank: {
827 static const OUString sActionButtonBlank = CREATE_OUSTRING( "mso-spt189" );
828 sType = sActionButtonBlank;
829 } break;
830 case XML_actionButtonHome: {
831 static const OUString sActionButtonHome = CREATE_OUSTRING( "mso-spt190" );
832 sType = sActionButtonHome;
833 } break;
834 case XML_actionButtonHelp: {
835 static const OUString sActionButtonHelp = CREATE_OUSTRING( "mso-spt191" );
836 sType = sActionButtonHelp;
837 } break;
838 case XML_actionButtonInformation: {
839 static const OUString sActionButtonInformation = CREATE_OUSTRING( "mso-spt192" );
840 sType = sActionButtonInformation;
841 } break;
842 case XML_actionButtonForwardNext: {
843 static const OUString sActionButtonForwardNext = CREATE_OUSTRING( "mso-spt193" );
844 sType = sActionButtonForwardNext;
845 } break;
846 case XML_actionButtonBackPrevious: {
847 static const OUString sActionButtonBackPrevious = CREATE_OUSTRING( "mso-spt194" );
848 sType = sActionButtonBackPrevious;
849 } break;
850 case XML_actionButtonEnd: {
851 static const OUString sActionButtonEnd = CREATE_OUSTRING( "mso-spt195" );
852 sType = sActionButtonEnd;
853 } break;
854 case XML_actionButtonBeginning: {
855 static const OUString sActionButtonBeginning = CREATE_OUSTRING( "mso-spt196" );
856 sType = sActionButtonBeginning;
857 } break;
858 case XML_actionButtonReturn: {
859 static const OUString sActionButtonReturn = CREATE_OUSTRING( "mso-spt197" );
860 sType = sActionButtonReturn;
861 } break;
862 case XML_actionButtonDocument: {
863 static const OUString sActionButtonDocument = CREATE_OUSTRING( "mso-spt198" );
864 sType = sActionButtonDocument;
865 } break;
866 case XML_actionButtonSound: {
867 static const OUString sActionButtonSound = CREATE_OUSTRING( "mso-spt199" );
868 sType = sActionButtonSound;
869 } break;
870 case XML_actionButtonMovie: {
871 static const OUString sActionButtonMovie = CREATE_OUSTRING( "mso-spt200" );
872 sType = sActionButtonMovie;
873 } break;
874 case XML_gear6: // TODO
875 case XML_gear9: // TODO
876 case XML_funnel: // TODO
877 case XML_mathPlus: // TODO
878 case XML_mathMinus: // TODO
879 case XML_mathMultiply: // TODO
880 case XML_mathDivide: // TODO
881 case XML_mathEqual: // TODO
882 case XML_mathNotEqual: // TODO
883 case XML_cornerTabs: // TODO
884 case XML_squareTabs: // TODO
885 case XML_plaqueTabs: // TODO
886 case XML_chartX: // TODO
887 case XML_chartStar: // TODO
888 case XML_chartPlus: { // TODO
889 static const OUString sRectangle = CREATE_OUSTRING( "rectangle" );
890 sType = sRectangle;
891 } break;
892 default:
893 break;
895 return sType;
898 static OUString GetTextShapeType( sal_Int32 nType )
900 OUString sType;
901 switch( nType )
903 case XML_textNoShape: // TODO
904 case XML_textPlain: {
905 static const OUString sTextPlain = CREATE_OUSTRING( "fontwork-plain-text" );
906 sType = sTextPlain;
907 } break;
908 case XML_textStop: {
909 static const OUString sTextStop = CREATE_OUSTRING( "fontwork-stop" );
910 sType = sTextStop;
911 } break;
912 case XML_textTriangle: {
913 static const OUString sTextTriangle = CREATE_OUSTRING( "fontwork-triangle-up" );
914 sType = sTextTriangle;
915 } break;
916 case XML_textTriangleInverted: {
917 static const OUString sTextTriangleInverted = CREATE_OUSTRING( "fontwork-triangle-down" );
918 sType = sTextTriangleInverted;
919 } break;
920 case XML_textChevron: {
921 static const OUString sTextChevron = CREATE_OUSTRING( "fontwork-chevron-up" );
922 sType = sTextChevron;
923 } break;
924 case XML_textChevronInverted: {
925 static const OUString sTextChevronInverted = CREATE_OUSTRING( "fontwork-chevron-down" );
926 sType = sTextChevronInverted;
927 } break;
928 case XML_textRingInside: {
929 static const OUString sTextRingInside = CREATE_OUSTRING( "mso-spt142" );
930 sType = sTextRingInside;
931 } break;
932 case XML_textRingOutside: {
933 static const OUString sTextRingOutside = CREATE_OUSTRING( "mso-spt143" );
934 sType = sTextRingOutside;
935 } break;
936 case XML_textArchUp: {
937 static const OUString sTextArchUp = CREATE_OUSTRING( "fontwork-arch-up-curve" );
938 sType = sTextArchUp;
939 } break;
940 case XML_textArchDown: {
941 static const OUString sTextArchDown = CREATE_OUSTRING( "fontwork-arch-down-curve" );
942 sType = sTextArchDown;
943 } break;
944 case XML_textCircle: {
945 static const OUString sTextCircle = CREATE_OUSTRING( "fontwork-circle-curve" );
946 sType = sTextCircle;
947 } break;
948 case XML_textButton: {
949 static const OUString sTextButton = CREATE_OUSTRING( "fontwork-open-circle-curve" );
950 sType = sTextButton;
951 } break;
952 case XML_textArchUpPour: {
953 static const OUString sTextArchUpPour = CREATE_OUSTRING( "fontwork-arch-up-pour" );
954 sType = sTextArchUpPour;
955 } break;
956 case XML_textArchDownPour: {
957 static const OUString sTextArchDownPour = CREATE_OUSTRING( "fontwork-arch-down-pour" );
958 sType = sTextArchDownPour;
959 } break;
960 case XML_textCirclePour: {
961 static const OUString sTextCirclePour = CREATE_OUSTRING( "fontwork-circle-pour" );
962 sType = sTextCirclePour;
963 } break;
964 case XML_textButtonPour: {
965 static const OUString sTextButtonPour = CREATE_OUSTRING( "fontwork-open-circle-pour" );
966 sType = sTextButtonPour;
967 } break;
968 case XML_textCurveUp: {
969 static const OUString sTextCurveUp = CREATE_OUSTRING( "fontwork-curve-up" );
970 sType = sTextCurveUp;
971 } break;
972 case XML_textCurveDown: {
973 static const OUString sTextCurveDown = CREATE_OUSTRING( "fontwork-curve-down" );
974 sType = sTextCurveDown;
975 } break;
976 case XML_textCanUp: {
977 static const OUString sTextCanUp = CREATE_OUSTRING( "mso-spt174" );
978 sType = sTextCanUp;
979 } break;
980 case XML_textCanDown: {
981 static const OUString sTextCanDown = CREATE_OUSTRING( "mso-spt175" );
982 sType = sTextCanDown;
983 } break;
984 case XML_textWave1: {
985 static const OUString sTextWave1 = CREATE_OUSTRING( "fontwork-wave" );
986 sType = sTextWave1;
987 } break;
988 case XML_textWave2: {
989 static const OUString sTextWave2 = CREATE_OUSTRING( "mso-spt157" );
990 sType = sTextWave2;
991 } break;
992 case XML_textDoubleWave1: {
993 static const OUString sTextDoubleWave1 = CREATE_OUSTRING( "mso-spt158" );
994 sType = sTextDoubleWave1;
995 } break;
996 case XML_textWave4: {
997 static const OUString sTextWave4 = CREATE_OUSTRING( "mso-spt159" );
998 sType = sTextWave4;
999 } break;
1000 case XML_textInflate: {
1001 static const OUString sTextInflate = CREATE_OUSTRING( "fontwork-inflate" );
1002 sType = sTextInflate;
1003 } break;
1004 case XML_textDeflate: {
1005 static const OUString sTextDeflate = CREATE_OUSTRING( "mso-spt161" );
1006 sType = sTextDeflate;
1007 } break;
1008 case XML_textInflateBottom: {
1009 static const OUString sTextInflateBottom = CREATE_OUSTRING( "mso-spt162" );
1010 sType = sTextInflateBottom;
1011 } break;
1012 case XML_textDeflateBottom: {
1013 static const OUString sTextDeflateBottom = CREATE_OUSTRING( "mso-spt163" );
1014 sType = sTextDeflateBottom;
1015 } break;
1016 case XML_textInflateTop: {
1017 static const OUString sTextInflateTop = CREATE_OUSTRING( "mso-spt164" );
1018 sType = sTextInflateTop;
1019 } break;
1020 case XML_textDeflateTop: {
1021 static const OUString sTextDeflateTop = CREATE_OUSTRING( "mso-spt165" );
1022 sType = sTextDeflateTop;
1023 } break;
1024 case XML_textDeflateInflate: {
1025 static const OUString sTextDeflateInflate = CREATE_OUSTRING( "mso-spt166" );
1026 sType = sTextDeflateInflate;
1027 } break;
1028 case XML_textDeflateInflateDeflate: {
1029 static const OUString sTextDeflateInflateDeflate = CREATE_OUSTRING( "mso-spt167" );
1030 sType = sTextDeflateInflateDeflate;
1031 } break;
1032 case XML_textFadeRight: {
1033 static const OUString sTextFadeRight = CREATE_OUSTRING( "fontwork-fade-right" );
1034 sType = sTextFadeRight;
1035 } break;
1036 case XML_textFadeLeft: {
1037 static const OUString sTextFadeLeft = CREATE_OUSTRING( "fontwork-fade-left" );
1038 sType = sTextFadeLeft;
1039 } break;
1040 case XML_textFadeUp: {
1041 static const OUString sTextFadeUp = CREATE_OUSTRING( "fontwork-fade-up" );
1042 sType = sTextFadeUp;
1043 } break;
1044 case XML_textFadeDown: {
1045 static const OUString sTextFadeDown = CREATE_OUSTRING( "fontwork-fade-down" );
1046 sType = sTextFadeDown;
1047 } break;
1048 case XML_textSlantUp: {
1049 static const OUString sTextSlantUp = CREATE_OUSTRING( "fontwork-slant-up" );
1050 sType = sTextSlantUp;
1051 } break;
1052 case XML_textSlantDown: {
1053 static const OUString sTextSlantDown = CREATE_OUSTRING( "fontwork-slant-down" );
1054 sType = sTextSlantDown;
1055 } break;
1056 case XML_textCascadeUp: {
1057 static const OUString sTextCascadeUp = CREATE_OUSTRING( "fontwork-fade-up-and-right" );
1058 sType = sTextCascadeUp;
1059 } break;
1060 case XML_textCascadeDown: {
1061 static const OUString sTextCascadeDown = CREATE_OUSTRING( "fontwork-fade-up-and-left" );
1062 sType = sTextCascadeDown;
1063 } break;
1064 default:
1065 break;
1067 return sType;
1070 // ---------------------------------------------------------------------
1071 // CT_CustomGeometry2D
1072 CustomShapeGeometryContext::CustomShapeGeometryContext( ContextHandler& rParent, const Reference< XFastAttributeList >& /* xAttribs */, Shape& rShape )
1073 : ContextHandler( rParent )
1074 , mrShape( rShape )
1078 Reference< XFastContextHandler > CustomShapeGeometryContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& ) throw (SAXException, RuntimeException)
1080 switch( aElementToken )
1082 // todo
1083 case NMSP_DRAWINGML|XML_avLst: // CT_GeomGuideList adjust value list
1084 case NMSP_DRAWINGML|XML_gdLst: // CT_GeomGuideList guide list
1085 case NMSP_DRAWINGML|XML_ahLst: // CT_AdjustHandleList adjust handle list
1086 case NMSP_DRAWINGML|XML_cxnLst: // CT_ConnectionSiteList connection site list
1087 case NMSP_DRAWINGML|XML_rect: // CT_GeomRectList geometry rect list
1088 break;
1089 case NMSP_DRAWINGML|XML_pathLst: // CT_Path2DList 2d path list
1090 return new PathListContext( *this, mrShape );
1093 Reference< XFastContextHandler > xEmpty;
1094 return xEmpty;
1097 // ---------------------------------------------------------------------
1098 // CT_PresetGeometry2D
1099 PresetShapeGeometryContext::PresetShapeGeometryContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties )
1100 : ContextHandler( rParent )
1101 , mrCustomShapeProperties( rCustomShapeProperties )
1103 OUString sShapeType;
1104 sal_Int32 nShapeType = xAttribs->getOptionalValueToken( XML_prst, FastToken::DONTKNOW );
1105 if ( nShapeType != FastToken::DONTKNOW )
1106 sShapeType = GetShapeType( nShapeType );
1107 OSL_ENSURE( sShapeType.getLength(), "oox::drawingml::CustomShapeCustomGeometryContext::CustomShapeCustomGeometryContext(), unknown shape type" );
1108 mrCustomShapeProperties.setShapePresetType( sShapeType );
1111 Reference< XFastContextHandler > PresetShapeGeometryContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& ) throw (SAXException, RuntimeException)
1113 if ( aElementToken == ( NMSP_DRAWINGML | XML_avLst ) )
1114 return new AdjustmentValueContext( *this, mrCustomShapeProperties );
1115 else
1116 return this;
1119 // ---------------------------------------------------------------------
1120 // CT_PresetTextShape
1121 PresetTextShapeContext::PresetTextShapeContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties )
1122 : ContextHandler( rParent )
1123 , mrCustomShapeProperties( rCustomShapeProperties )
1125 OUString sShapeType;
1126 sal_Int32 nShapeType = xAttribs->getOptionalValueToken( XML_prst, FastToken::DONTKNOW );
1127 if ( nShapeType != FastToken::DONTKNOW )
1128 sShapeType = GetTextShapeType( nShapeType );
1129 OSL_ENSURE( sShapeType.getLength(), "oox::drawingml::CustomShapeCustomGeometryContext::CustomShapeCustomGeometryContext(), unknown shape type" );
1130 mrCustomShapeProperties.setShapePresetType( sShapeType );
1133 Reference< XFastContextHandler > PresetTextShapeContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& ) throw (SAXException, RuntimeException)
1135 switch( aElementToken )
1137 // todo
1138 case NMSP_DRAWINGML|XML_avLst: // CT_GeomGuideList adjust value list
1139 case NMSP_DRAWINGML|XML_gdLst: // CT_GeomGuideList guide list
1140 case NMSP_DRAWINGML|XML_ahLst: // CT_AdjustHandleList adjust handle list
1141 case NMSP_DRAWINGML|XML_cxnLst: // CT_ConnectionSiteList connection site list
1142 case NMSP_DRAWINGML|XML_rect: // CT_GeomRectList geometry rect list
1143 case NMSP_DRAWINGML|XML_pathLst: // CT_Path2DList 2d path list
1144 break;
1147 Reference< XFastContextHandler > xEmpty;
1148 return xEmpty;