summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lippka <cl@openoffice.org>2001-10-16 08:07:08 +0000
committerChristian Lippka <cl@openoffice.org>2001-10-16 08:07:08 +0000
commitd615f1b84d076ecbb2564ea624a0eb00b584552f (patch)
tree1a20d52d5b081c8df7b44e3cefba017fe793801e
parent65b74c215227513170d3ff63a11a4a83efee921a (diff)
#91486# added ShapePropertyMapper for chart without ShapeUserDefinedAttributes
-rw-r--r--xmloff/source/chart/PropertyMaps.cxx6
-rw-r--r--xmloff/source/draw/sdpropls.cxx10
-rw-r--r--xmloff/source/draw/sdpropls.hxx5
-rw-r--r--xmloff/source/draw/shapeimport.cxx17
4 files changed, 29 insertions, 9 deletions
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index 3b475d5448fa..2db5128ece77 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -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
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,