diff options
author | Christian Lippka <cl@openoffice.org> | 2001-10-16 08:07:08 +0000 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2001-10-16 08:07:08 +0000 |
commit | d615f1b84d076ecbb2564ea624a0eb00b584552f (patch) | |
tree | 1a20d52d5b081c8df7b44e3cefba017fe793801e /xmloff/source/draw | |
parent | 65b74c215227513170d3ff63a11a4a83efee921a (diff) |
#91486# added ShapePropertyMapper for chart without ShapeUserDefinedAttributes
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r-- | xmloff/source/draw/sdpropls.cxx | 10 | ||||
-rw-r--r-- | xmloff/source/draw/sdpropls.hxx | 5 | ||||
-rw-r--r-- | xmloff/source/draw/shapeimport.cxx | 17 |
3 files changed, 26 insertions, 6 deletions
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index eb37ca1b02df..195abba1cac4 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -2,9 +2,9 @@ * * $RCSfile: sdpropls.cxx,v $ * - * $Revision: 1.52 $ + * $Revision: 1.53 $ * - * last change: $Author: cl $ $Date: 2001-10-12 16:12:57 $ + * last change: $Author: cl $ $Date: 2001-10-16 09:07:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -228,6 +228,7 @@ using namespace ::xmloff::token; const XMLPropertyMapEntry aXMLSDProperties[] = { + // this entry must be first! this is needed for XMLShapeImportHelper::CreateExternalShapePropMapper MAP( "ShapeUserDefinedAttributes", XML_NAMESPACE_TEXT, XML_XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ), // stroke attributes @@ -1057,6 +1058,11 @@ XMLShapePropertySetMapper::XMLShapePropertySetMapper(const UniReference< XMLProp { } +XMLShapePropertySetMapper::XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef, sal_uInt16 nOffset) +: XMLPropertySetMapper( &aXMLSDProperties[nOffset], rFactoryRef ) +{ +} + XMLShapePropertySetMapper::~XMLShapePropertySetMapper() { } diff --git a/xmloff/source/draw/sdpropls.hxx b/xmloff/source/draw/sdpropls.hxx index b17face4bce4..27bb52e9058c 100644 --- a/xmloff/source/draw/sdpropls.hxx +++ b/xmloff/source/draw/sdpropls.hxx @@ -2,9 +2,9 @@ * * $RCSfile: sdpropls.hxx,v $ * - * $Revision: 1.23 $ + * $Revision: 1.24 $ * - * last change: $Author: fs $ $Date: 2001-05-28 15:11:42 $ + * last change: $Author: cl $ $Date: 2001-10-16 09:07:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -251,6 +251,7 @@ class XMLShapePropertySetMapper : public XMLPropertySetMapper { public: XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef); + XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef, sal_uInt16 nOffset); ~XMLShapePropertySetMapper(); }; diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 131841e93184..d00a3176987c 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -2,9 +2,9 @@ * * $RCSfile: shapeimport.cxx,v $ * - * $Revision: 1.43 $ + * $Revision: 1.44 $ * - * last change: $Author: dvo $ $Date: 2001-09-21 16:27:53 $ + * last change: $Author: cl $ $Date: 2001-10-16 09:07:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1186,6 +1186,19 @@ SvXMLImportPropertyMapper* XMLShapeImportHelper::CreateShapePropMapper( const un return pResult; } +/** creates a shape property set mapper that can be used for non shape elements. + Only current feature is that the ShapeUserDefinedAttributes property is not included in this one. */ +SvXMLImportPropertyMapper* XMLShapeImportHelper::CreateExternalShapePropMapper( const uno::Reference< frame::XModel>& rModel, SvXMLImport& rImport ) +{ + UniReference< XMLPropertyHandlerFactory > xFactory = new XMLSdPropHdlFactory( rModel ); + UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( xFactory, 1 ); + SvXMLImportPropertyMapper* pResult = new SvXMLImportPropertyMapper( xMapper, rImport ); + + // chain text attributes + pResult->ChainImportMapper( XMLTextImportHelper::CreateParaExtPropMapper( rImport ) ); + return pResult; +} + /** adds a mapping for a glue point identifier from an xml file to the identifier created after inserting the new glue point into the core. The saved mappings can be retrieved by getGluePointId() */ void XMLShapeImportHelper::addGluePointMapping( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, |