1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_xmloff.hxx" 26 #include <comphelper/extract.hxx> 27 #include "ximp3dobject.hxx" 28 #include <xmloff/XMLShapeStyleContext.hxx> 29 #include <xmloff/xmluconv.hxx> 30 #include <com/sun/star/beans/XPropertySet.hpp> 31 #include <com/sun/star/drawing/PointSequenceSequence.hpp> 32 #include <com/sun/star/drawing/PointSequence.hpp> 33 #include "xexptran.hxx" 34 #include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp> 35 #include <xmloff/families.hxx> 36 #include "ximpstyl.hxx" 37 #include <xmloff/xmltoken.hxx> 38 #include <com/sun/star/drawing/PolyPolygonShape3D.hpp> 39 #include <com/sun/star/drawing/DoubleSequence.hpp> 40 41 using ::rtl::OUString; 42 using ::rtl::OUStringBuffer; 43 44 using namespace ::com::sun::star; 45 46 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 47 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 48 49 TYPEINIT1( SdXML3DObjectContext, SdXMLShapeContext ); 50 51 SdXML3DObjectContext::SdXML3DObjectContext( 52 SvXMLImport& rImport, 53 sal_uInt16 nPrfx, 54 const OUString& rLocalName, 55 const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 56 uno::Reference< drawing::XShapes >& rShapes, 57 sal_Bool bTemporaryShape) 58 : SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ), 59 mbSetTransform( sal_False ) 60 { 61 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; 62 for(sal_Int16 i=0; i < nAttrCount; i++) 63 { 64 OUString sAttrName = xAttrList->getNameByIndex( i ); 65 OUString aLocalName; 66 sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); 67 OUString sValue = xAttrList->getValueByIndex( i ); 68 const SvXMLTokenMap& rAttrTokenMap = GetImport().GetShapeImport()->Get3DObjectAttrTokenMap(); 69 70 switch(rAttrTokenMap.Get(nPrefix, aLocalName)) 71 { 72 case XML_TOK_3DOBJECT_DRAWSTYLE_NAME: 73 { 74 maDrawStyleName = sValue; 75 break; 76 } 77 case XML_TOK_3DOBJECT_TRANSFORM: 78 { 79 SdXMLImExTransform3D aTransform(sValue, GetImport().GetMM100UnitConverter()); 80 if(aTransform.NeedsAction()) 81 mbSetTransform = aTransform.GetFullHomogenTransform(mxHomMat); 82 break; 83 } 84 } 85 } 86 } 87 88 ////////////////////////////////////////////////////////////////////////////// 89 90 SdXML3DObjectContext::~SdXML3DObjectContext() 91 { 92 } 93 94 ////////////////////////////////////////////////////////////////////////////// 95 96 void SdXML3DObjectContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList) 97 { 98 uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY); 99 if(xPropSet.is()) 100 { 101 // set parameters 102 if(mbSetTransform) 103 { 104 uno::Any aAny; 105 aAny <<= mxHomMat; 106 xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DTransformMatrix")), aAny); 107 } 108 109 // call parent 110 SdXMLShapeContext::StartElement(xAttrList); 111 } 112 } 113 114 ////////////////////////////////////////////////////////////////////////////// 115 116 void SdXML3DObjectContext::EndElement() 117 { 118 // call parent 119 SdXMLShapeContext::EndElement(); 120 } 121 122 ////////////////////////////////////////////////////////////////////////////// 123 /* 124 void SdXML3DObjectContext::AddShape(uno::Reference< drawing::XShape >& xShape) 125 { 126 if(xShape.is() && mxShapes.is()) 127 { 128 // set shape local 129 mxShape = xShape; 130 131 // add new shape to parent 132 mxShapes->add( xShape ); 133 } 134 } 135 */ 136 ////////////////////////////////////////////////////////////////////////////// 137 /* 138 void SdXML3DObjectContext::SetStyle() 139 { 140 // set style on shape 141 if(maDrawStyleName.getLength() && mxShape.is()) 142 { 143 const SvXMLStyleContext* pStyle = 0L; 144 sal_Bool bAutoStyle(sal_False); 145 146 if(GetImport().GetShapeImport()->GetAutoStylesContext()) 147 pStyle = GetImport().GetShapeImport()->GetAutoStylesContext()->FindStyleChildContext( 148 XML_STYLE_FAMILY_SD_GRAPHICS_ID, maDrawStyleName); 149 150 if(pStyle) 151 bAutoStyle = sal_True; 152 153 if(!pStyle && GetImport().GetShapeImport()->GetStylesContext()) 154 pStyle = GetImport().GetShapeImport()->GetStylesContext()-> 155 FindStyleChildContext(XML_STYLE_FAMILY_SD_GRAPHICS_ID, maDrawStyleName); 156 157 if(pStyle && pStyle->ISA(XMLShapeStyleContext)) 158 { 159 uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY); 160 if(xPropSet.is()) 161 { 162 XMLShapeStyleContext* pDocStyle = (XMLShapeStyleContext*)pStyle; 163 164 if(pDocStyle->GetStyle().is()) 165 { 166 // set style on object 167 uno::Any aAny; 168 aAny <<= pDocStyle->GetStyle(); 169 xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Style")), aAny); 170 } 171 172 if(bAutoStyle) 173 { 174 // set PropertySet on object 175 pDocStyle->FillPropertySet(xPropSet); 176 } 177 } 178 } 179 } 180 } 181 */ 182 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 183 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 184 185 TYPEINIT1( SdXML3DCubeObjectShapeContext, SdXML3DObjectContext); 186 187 SdXML3DCubeObjectShapeContext::SdXML3DCubeObjectShapeContext( 188 SvXMLImport& rImport, 189 sal_uInt16 nPrfx, 190 const OUString& rLocalName, 191 const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 192 uno::Reference< drawing::XShapes >& rShapes, 193 sal_Bool bTemporaryShape) 194 : SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ), 195 maMinEdge(-2500.0, -2500.0, -2500.0), 196 maMaxEdge(2500.0, 2500.0, 2500.0), 197 mbMinEdgeUsed(sal_False), 198 mbMaxEdgeUsed(sal_False) 199 { 200 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; 201 for(sal_Int16 i=0; i < nAttrCount; i++) 202 { 203 OUString sAttrName = xAttrList->getNameByIndex( i ); 204 OUString aLocalName; 205 sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); 206 OUString sValue = xAttrList->getValueByIndex( i ); 207 const SvXMLTokenMap& rAttrTokenMap = GetImport().GetShapeImport()->Get3DCubeObjectAttrTokenMap(); 208 209 switch(rAttrTokenMap.Get(nPrefix, aLocalName)) 210 { 211 case XML_TOK_3DCUBEOBJ_MINEDGE: 212 { 213 ::basegfx::B3DVector aNewVec; 214 GetImport().GetMM100UnitConverter().convertB3DVector(aNewVec, sValue); 215 216 if(aNewVec != maMinEdge) 217 { 218 maMinEdge = aNewVec; 219 mbMinEdgeUsed = sal_True; 220 } 221 break; 222 } 223 case XML_TOK_3DCUBEOBJ_MAXEDGE: 224 { 225 ::basegfx::B3DVector aNewVec; 226 GetImport().GetMM100UnitConverter().convertB3DVector(aNewVec, sValue); 227 228 if(aNewVec != maMaxEdge) 229 { 230 maMaxEdge = aNewVec; 231 mbMaxEdgeUsed = sal_True; 232 } 233 break; 234 } 235 } 236 } 237 } 238 239 ////////////////////////////////////////////////////////////////////////////// 240 241 SdXML3DCubeObjectShapeContext::~SdXML3DCubeObjectShapeContext() 242 { 243 } 244 245 ////////////////////////////////////////////////////////////////////////////// 246 247 void SdXML3DCubeObjectShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList) 248 { 249 // create shape 250 AddShape( "com.sun.star.drawing.Shape3DCubeObject" ); 251 if(mxShape.is()) 252 { 253 // add, set style and properties from base shape 254 SetStyle(); 255 SdXML3DObjectContext::StartElement(xAttrList); 256 257 // set local parameters on shape 258 uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY); 259 if(xPropSet.is()) 260 { 261 // set parameters 262 drawing::Position3D aPosition3D; 263 drawing::Direction3D aDirection3D; 264 265 // convert from min, max to size to be set 266 maMaxEdge = maMaxEdge - maMinEdge; 267 268 aPosition3D.PositionX = maMinEdge.getX(); 269 aPosition3D.PositionY = maMinEdge.getY(); 270 aPosition3D.PositionZ = maMinEdge.getZ(); 271 272 aDirection3D.DirectionX = maMaxEdge.getX(); 273 aDirection3D.DirectionY = maMaxEdge.getY(); 274 aDirection3D.DirectionZ = maMaxEdge.getZ(); 275 276 uno::Any aAny; 277 aAny <<= aPosition3D; 278 xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DPosition")), aAny); 279 aAny <<= aDirection3D; 280 xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DSize")), aAny); 281 } 282 } 283 } 284 285 ////////////////////////////////////////////////////////////////////////////// 286 287 void SdXML3DCubeObjectShapeContext::EndElement() 288 { 289 // call parent 290 SdXML3DObjectContext::EndElement(); 291 } 292 293 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 294 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 295 296 TYPEINIT1( SdXML3DSphereObjectShapeContext, SdXML3DObjectContext); 297 298 SdXML3DSphereObjectShapeContext::SdXML3DSphereObjectShapeContext( 299 SvXMLImport& rImport, 300 sal_uInt16 nPrfx, 301 const OUString& rLocalName, 302 const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 303 uno::Reference< drawing::XShapes >& rShapes, 304 sal_Bool bTemporaryShape) 305 : SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ), 306 maCenter(0.0, 0.0, 0.0), 307 maSize(5000.0, 5000.0, 5000.0), 308 mbCenterUsed(sal_False), 309 mbSizeUsed(sal_False) 310 { 311 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; 312 for(sal_Int16 i=0; i < nAttrCount; i++) 313 { 314 OUString sAttrName = xAttrList->getNameByIndex( i ); 315 OUString aLocalName; 316 sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); 317 OUString sValue = xAttrList->getValueByIndex( i ); 318 const SvXMLTokenMap& rAttrTokenMap = GetImport().GetShapeImport()->Get3DSphereObjectAttrTokenMap(); 319 320 switch(rAttrTokenMap.Get(nPrefix, aLocalName)) 321 { 322 case XML_TOK_3DSPHEREOBJ_CENTER: 323 { 324 ::basegfx::B3DVector aNewVec; 325 GetImport().GetMM100UnitConverter().convertB3DVector(aNewVec, sValue); 326 327 if(aNewVec != maCenter) 328 { 329 maCenter = aNewVec; 330 mbCenterUsed = sal_True; 331 } 332 break; 333 } 334 case XML_TOK_3DSPHEREOBJ_SIZE: 335 { 336 ::basegfx::B3DVector aNewVec; 337 GetImport().GetMM100UnitConverter().convertB3DVector(aNewVec, sValue); 338 339 if(aNewVec != maSize) 340 { 341 maSize = aNewVec; 342 mbSizeUsed = sal_True; 343 } 344 break; 345 } 346 } 347 } 348 } 349 350 ////////////////////////////////////////////////////////////////////////////// 351 352 SdXML3DSphereObjectShapeContext::~SdXML3DSphereObjectShapeContext() 353 { 354 } 355 356 ////////////////////////////////////////////////////////////////////////////// 357 358 void SdXML3DSphereObjectShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList) 359 { 360 // create shape 361 AddShape( "com.sun.star.drawing.Shape3DSphereObject" ); 362 if(mxShape.is()) 363 { 364 // add, set style and properties from base shape 365 SetStyle(); 366 SdXML3DObjectContext::StartElement(xAttrList); 367 368 // set local parameters on shape 369 uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY); 370 if(xPropSet.is()) 371 { 372 // set parameters 373 drawing::Position3D aPosition3D; 374 drawing::Direction3D aDirection3D; 375 376 aPosition3D.PositionX = maCenter.getX(); 377 aPosition3D.PositionY = maCenter.getY(); 378 aPosition3D.PositionZ = maCenter.getZ(); 379 380 aDirection3D.DirectionX = maSize.getX(); 381 aDirection3D.DirectionY = maSize.getY(); 382 aDirection3D.DirectionZ = maSize.getZ(); 383 384 uno::Any aAny; 385 aAny <<= aPosition3D; 386 xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DPosition")), aAny); 387 aAny <<= aDirection3D; 388 xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DSize")), aAny); 389 } 390 } 391 } 392 393 ////////////////////////////////////////////////////////////////////////////// 394 395 void SdXML3DSphereObjectShapeContext::EndElement() 396 { 397 // call parent 398 SdXML3DObjectContext::EndElement(); 399 } 400 401 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 402 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 403 404 TYPEINIT1( SdXML3DPolygonBasedShapeContext, SdXML3DObjectContext ); 405 406 SdXML3DPolygonBasedShapeContext::SdXML3DPolygonBasedShapeContext( 407 SvXMLImport& rImport, 408 sal_uInt16 nPrfx, 409 const OUString& rLocalName, 410 const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 411 uno::Reference< drawing::XShapes >& rShapes, 412 sal_Bool bTemporaryShape) 413 : SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ) 414 { 415 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; 416 for(sal_Int16 i=0; i < nAttrCount; i++) 417 { 418 OUString sAttrName = xAttrList->getNameByIndex( i ); 419 OUString aLocalName; 420 sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); 421 OUString sValue = xAttrList->getValueByIndex( i ); 422 const SvXMLTokenMap& rAttrTokenMap = GetImport().GetShapeImport()->Get3DPolygonBasedAttrTokenMap(); 423 424 switch(rAttrTokenMap.Get(nPrefix, aLocalName)) 425 { 426 case XML_TOK_3DPOLYGONBASED_VIEWBOX: 427 { 428 maViewBox = sValue; 429 break; 430 } 431 case XML_TOK_3DPOLYGONBASED_D: 432 { 433 maPoints = sValue; 434 break; 435 } 436 } 437 } 438 } 439 440 ////////////////////////////////////////////////////////////////////////////// 441 442 SdXML3DPolygonBasedShapeContext::~SdXML3DPolygonBasedShapeContext() 443 { 444 } 445 446 ////////////////////////////////////////////////////////////////////////////// 447 448 void SdXML3DPolygonBasedShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList) 449 { 450 uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY); 451 if(xPropSet.is()) 452 { 453 // set parameters 454 if(maPoints.getLength() && maViewBox.getLength()) 455 { 456 SdXMLImExViewBox aViewBox(maViewBox, GetImport().GetMM100UnitConverter()); 457 awt::Point aMinPoint(aViewBox.GetX(), aViewBox.GetY()); 458 awt::Size aMaxSize(aViewBox.GetWidth(), aViewBox.GetHeight()); 459 SdXMLImExSvgDElement aPoints(maPoints, aViewBox, 460 aMinPoint, aMaxSize, GetImport().GetMM100UnitConverter()); 461 462 // convert to double sequences 463 drawing::PointSequenceSequence& xPoSeSe = 464 (drawing::PointSequenceSequence&)aPoints.GetPointSequenceSequence(); 465 sal_Int32 nOuterSequenceCount = xPoSeSe.getLength(); 466 drawing::PointSequence* pInnerSequence = xPoSeSe.getArray(); 467 468 drawing::PolyPolygonShape3D xPolyPolygon3D; 469 xPolyPolygon3D.SequenceX.realloc(nOuterSequenceCount); 470 xPolyPolygon3D.SequenceY.realloc(nOuterSequenceCount); 471 xPolyPolygon3D.SequenceZ.realloc(nOuterSequenceCount); 472 drawing::DoubleSequence* pOuterSequenceX = xPolyPolygon3D.SequenceX.getArray(); 473 drawing::DoubleSequence* pOuterSequenceY = xPolyPolygon3D.SequenceY.getArray(); 474 drawing::DoubleSequence* pOuterSequenceZ = xPolyPolygon3D.SequenceZ.getArray(); 475 476 for(sal_Int32 a(0L); a < nOuterSequenceCount; a++) 477 { 478 sal_Int32 nInnerSequenceCount(pInnerSequence->getLength()); 479 awt::Point* pArray = pInnerSequence->getArray(); 480 481 pOuterSequenceX->realloc(nInnerSequenceCount); 482 pOuterSequenceY->realloc(nInnerSequenceCount); 483 pOuterSequenceZ->realloc(nInnerSequenceCount); 484 double* pInnerSequenceX = pOuterSequenceX->getArray(); 485 double* pInnerSequenceY = pOuterSequenceY->getArray(); 486 double* pInnerSequenceZ = pOuterSequenceZ->getArray(); 487 488 for(sal_Int32 b(0L); b < nInnerSequenceCount; b++) 489 { 490 *pInnerSequenceX++ = pArray->X; 491 *pInnerSequenceY++ = pArray->Y; 492 *pInnerSequenceZ++ = 0.0; 493 pArray++; 494 } 495 pInnerSequence++; 496 497 pOuterSequenceX++; 498 pOuterSequenceY++; 499 pOuterSequenceZ++; 500 } 501 502 // set poly 503 uno::Any aAny; 504 aAny <<= xPolyPolygon3D; 505 xPropSet->setPropertyValue( 506 OUString(RTL_CONSTASCII_USTRINGPARAM("D3DPolyPolygon3D")), aAny); 507 } 508 509 // call parent 510 SdXML3DObjectContext::StartElement(xAttrList); 511 } 512 } 513 514 ////////////////////////////////////////////////////////////////////////////// 515 516 void SdXML3DPolygonBasedShapeContext::EndElement() 517 { 518 // call parent 519 SdXML3DObjectContext::EndElement(); 520 } 521 522 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 523 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 524 525 TYPEINIT1( SdXML3DLatheObjectShapeContext, SdXML3DPolygonBasedShapeContext); 526 527 SdXML3DLatheObjectShapeContext::SdXML3DLatheObjectShapeContext( 528 SvXMLImport& rImport, 529 sal_uInt16 nPrfx, 530 const OUString& rLocalName, 531 const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 532 uno::Reference< drawing::XShapes >& rShapes, 533 sal_Bool bTemporaryShape) 534 : SdXML3DPolygonBasedShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ) 535 { 536 } 537 538 ////////////////////////////////////////////////////////////////////////////// 539 540 SdXML3DLatheObjectShapeContext::~SdXML3DLatheObjectShapeContext() 541 { 542 } 543 544 ////////////////////////////////////////////////////////////////////////////// 545 546 void SdXML3DLatheObjectShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList) 547 { 548 // create shape 549 AddShape( "com.sun.star.drawing.Shape3DLatheObject" ); 550 if(mxShape.is()) 551 { 552 // add, set style and properties from base shape 553 SetStyle(); 554 SdXML3DPolygonBasedShapeContext::StartElement(xAttrList); 555 } 556 } 557 558 ////////////////////////////////////////////////////////////////////////////// 559 560 void SdXML3DLatheObjectShapeContext::EndElement() 561 { 562 // call parent 563 SdXML3DPolygonBasedShapeContext::EndElement(); 564 } 565 566 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 567 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 568 569 TYPEINIT1( SdXML3DExtrudeObjectShapeContext, SdXML3DPolygonBasedShapeContext); 570 571 SdXML3DExtrudeObjectShapeContext::SdXML3DExtrudeObjectShapeContext( 572 SvXMLImport& rImport, 573 sal_uInt16 nPrfx, 574 const OUString& rLocalName, 575 const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 576 uno::Reference< drawing::XShapes >& rShapes, 577 sal_Bool bTemporaryShape) 578 : SdXML3DPolygonBasedShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ) 579 { 580 } 581 582 ////////////////////////////////////////////////////////////////////////////// 583 584 SdXML3DExtrudeObjectShapeContext::~SdXML3DExtrudeObjectShapeContext() 585 { 586 } 587 588 ////////////////////////////////////////////////////////////////////////////// 589 590 void SdXML3DExtrudeObjectShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList) 591 { 592 AddShape( "com.sun.star.drawing.Shape3DExtrudeObject" ); 593 if(mxShape.is()) 594 { 595 // add, set style and properties from base shape 596 SetStyle(); 597 SdXML3DPolygonBasedShapeContext::StartElement(xAttrList); 598 } 599 } 600 601 ////////////////////////////////////////////////////////////////////////////// 602 603 void SdXML3DExtrudeObjectShapeContext::EndElement() 604 { 605 // call parent 606 SdXML3DPolygonBasedShapeContext::EndElement(); 607 } 608 609 // EOF 610