diff options
author | Christian Lippka <cl@openoffice.org> | 2000-12-13 18:16:42 +0000 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2000-12-13 18:16:42 +0000 |
commit | 38868cce5ec853d4bb242c9bff2695e659da6353 (patch) | |
tree | adc872f6acf1f2d90dd2d9dadcbad531ee304ed7 /xmloff/source/draw/ximpgrp.cxx | |
parent | 5fb34d9ceb8bdb374e796cc44261553f85c80071 (diff) |
#80699# reworked shape id creation and fixed import for all shapes
Diffstat (limited to 'xmloff/source/draw/ximpgrp.cxx')
-rw-r--r-- | xmloff/source/draw/ximpgrp.cxx | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/xmloff/source/draw/ximpgrp.cxx b/xmloff/source/draw/ximpgrp.cxx index 2a7dbb1161a4..fc3332e1452c 100644 --- a/xmloff/source/draw/ximpgrp.cxx +++ b/xmloff/source/draw/ximpgrp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ximpgrp.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: cl $ $Date: 2000-11-23 18:25:49 $ + * last change: $Author: cl $ $Date: 2000-12-13 19:13:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -81,10 +81,8 @@ SdXMLGroupShapeContext::SdXMLGroupShapeContext( USHORT nPrfx, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& xAttrList, uno::Reference< drawing::XShapes >& rShapes) -: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ), - mxShapes( rShapes ) +: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ) { - GetImport().GetShapeImport()->pushGroupForSorting( rShapes ); } ////////////////////////////////////////////////////////////////////////////// @@ -103,7 +101,7 @@ SvXMLImportContext* SdXMLGroupShapeContext::CreateChildContext( USHORT nPrefix, // call GroupChildContext function at common ShapeImport pContext = GetImport().GetShapeImport()->CreateGroupChildContext( - GetImport(), nPrefix, rLocalName, xAttrList, mxShapes); + GetImport(), nPrefix, rLocalName, xAttrList, mxChilds); // call parent when no own context was created if(!pContext) @@ -115,9 +113,30 @@ SvXMLImportContext* SdXMLGroupShapeContext::CreateChildContext( USHORT nPrefix, ////////////////////////////////////////////////////////////////////////////// +void SdXMLGroupShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList) +{ + // create new group shape and add it to rShapes, use it + // as base for the new group import + AddShape( "com.sun.star.drawing.GroupShape" ); + SdXMLShapeContext::StartElement(xAttrList); + + if(mxShape.is()) + { + SdXMLShapeContext::StartElement(xAttrList); + mxChilds = uno::Reference< drawing::XShapes >::query( mxShape ); + if( mxChilds.is() ) + GetImport().GetShapeImport()->pushGroupForSorting( mxChilds ); + } + + GetImport().GetShapeImport()->finishShape( mxShape, mxAttrList, mxShapes ); +} + +////////////////////////////////////////////////////////////////////////////// + void SdXMLGroupShapeContext::EndElement() { - GetImport().GetShapeImport()->popGroupAndSort(); + if( mxChilds.is() ) + GetImport().GetShapeImport()->popGroupAndSort(); } |