#91486# added ShapePropertyMapper for chart without ShapeUserDefinedAttributes

This commit is contained in:
Christian Lippka 2001-10-16 08:07:08 +00:00
parent 65b74c2152
commit d615f1b84d
4 changed files with 29 additions and 9 deletions

View file

@ -2,9 +2,9 @@
*
* $RCSfile: PropertyMaps.cxx,v $
*
* $Revision: 1.31 $
* $Revision: 1.32 $
*
* last change: $Author: dvo $ $Date: 2001-09-21 16:27:53 $
* last change: $Author: cl $ $Date: 2001-10-16 09:06:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -461,7 +461,7 @@ XMLChartImportPropertyMapper::XMLChartImportPropertyMapper( const UniReference<
// give an empty model. It is only used for numbering rules that don't exist in chart
uno::Reference< frame::XModel > xEmptyModel;
ChainImportMapper( XMLShapeImportHelper::CreateShapePropMapper( xEmptyModel, mrImport ));
ChainImportMapper( XMLShapeImportHelper::CreateExternalShapePropMapper( xEmptyModel, mrImport ));
// do not chain text properties: on import this is done by shape mapper
// to import old documents

View file

@ -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()
{
}

View file

@ -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();
};

View file

@ -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,