summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorChristian Lippka <cl@openoffice.org>2000-11-15 09:05:02 +0000
committerChristian Lippka <cl@openoffice.org>2000-11-15 09:05:02 +0000
commit7ebfded1674c345b09bad4abbe4145ad99cb91b5 (patch)
tree7382dcf2dca5b0bf5e32293bc1e55bc733f15991 /xmloff
parenta54d1e6716e6b1e48ba495892fe021adbaf7c7dd (diff)
added finishShape method for post import shape modifikation
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/shapeimport.cxx22
-rw-r--r--xmloff/source/draw/ximpshap.cxx15
-rw-r--r--xmloff/source/draw/ximpshap.hxx5
3 files changed, 35 insertions, 7 deletions
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index 33900440cff7..9eba9a8397f4 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: shapeimport.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: mib $ $Date: 2000-11-07 13:33:05 $
+ * last change: $Author: cl $ $Date: 2000-11-15 10:05:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -596,7 +596,12 @@ SvXMLImportContext* XMLShapeImportHelper::CreateGroupChildContext(
}
-void XMLShapeImportHelper::addShape( uno::Reference< drawing::XShape >& rShape, const uno::Reference< xml::sax::XAttributeList >& xAttrList, uno::Reference< drawing::XShapes >& rShapes)
+/** this function is called whenever the implementation classes like to add this new
+ shape to the given XShapes.
+*/
+void XMLShapeImportHelper::addShape( uno::Reference< drawing::XShape >& rShape,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes)
{
if( rShape.is() && rShapes.is() )
{
@@ -604,3 +609,14 @@ void XMLShapeImportHelper::addShape( uno::Reference< drawing::XShape >& rShape,
rShapes->add( rShape );
}
}
+
+/** this function is called whenever the implementation classes have finished importing
+ a shape to the given XShapes. The shape is already inserted into its XShapes and
+ all properties and styles are set.
+*/
+void XMLShapeImportHelper::finishShape(
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rShape,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes)
+{
+}
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 7263b033ae35..65534eb48819 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ximpshap.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: cl $ $Date: 2000-11-08 12:24:09 $
+ * last change: $Author: cl $ $Date: 2000-11-15 10:05:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -267,6 +267,15 @@ void SdXMLShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeL
//////////////////////////////////////////////////////////////////////////////
+void SdXMLShapeContext::EndElement()
+{
+ SvXMLImportContext::EndElement();
+
+ GetImport().GetShapeImport()->finishShape( mxShape, mxAttrList, mxShapes );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
void SdXMLShapeContext::AddShape(uno::Reference< drawing::XShape >& xShape)
{
if(xShape.is())
@@ -1565,6 +1574,8 @@ void SdXMLChartShapeContext::EndElement()
{
if( mpChartContext )
mpChartContext->EndElement();
+
+ SdXMLShapeContext::EndElement();
}
void SdXMLChartShapeContext::Characters( const ::rtl::OUString& rChars )
diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx
index 7af98b3bdb9b..50322b4c684d 100644
--- a/xmloff/source/draw/ximpshap.hxx
+++ b/xmloff/source/draw/ximpshap.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ximpshap.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: cl $ $Date: 2000-11-06 12:08:07 $
+ * last change: $Author: cl $ $Date: 2000-11-15 10:05:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -120,6 +120,7 @@ public:
virtual ~SdXMLShapeContext();
virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+ virtual void EndElement();
virtual SvXMLImportContext * CreateChildContext( USHORT nPrefix, const ::rtl::OUString& rLocalName,
const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList );