diff options
-rw-r--r-- | xmloff/source/draw/animationexport.cxx | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx index b66ec8873993..851209b13a8a 100644 --- a/xmloff/source/draw/animationexport.cxx +++ b/xmloff/source/draw/animationexport.cxx @@ -515,6 +515,7 @@ class AnimationsExporterImpl { public: AnimationsExporterImpl( SvXMLExport& rExport, const Reference< XPropertySet >& xPageProps ); + virtual ~AnimationsExporterImpl(); void prepareNode( const Reference< XAnimationNode >& xNode ); void exportNode( const Reference< XAnimationNode >& xNode ); @@ -542,6 +543,7 @@ private: SvXMLExport& mrExport; Reference< XInterface > mxExport; Reference< XPropertySet > mxPageProps; + XMLSdPropHdlFactory* mpSdPropHdlFactory; }; AnimationsExporterImpl::AnimationsExporterImpl( SvXMLExport& rExport, const Reference< XPropertySet >& xPageProps ) @@ -557,6 +559,24 @@ AnimationsExporterImpl::AnimationsExporterImpl( SvXMLExport& rExport, const Refe { OSL_FAIL( "xmloff::AnimationsExporterImpl::AnimationsExporterImpl(), RuntimeException catched!" ); } + + mpSdPropHdlFactory = new XMLSdPropHdlFactory( mrExport.GetModel(), mrExport ); + if( mpSdPropHdlFactory ) + { + // set lock to avoid deletion + mpSdPropHdlFactory->acquire(); + } + +} + +AnimationsExporterImpl::~AnimationsExporterImpl() +{ + // cleanup factory, decrease refcount. Should lead to destruction. + if(mpSdPropHdlFactory) + { + mpSdPropHdlFactory->release(); + mpSdPropHdlFactory = 0L; + } } void AnimationsExporterImpl::exportTransitionNode() @@ -1526,7 +1546,8 @@ void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUString nType = XML_TYPE_STRING; } - const XMLPropertyHandler* pHandler = static_cast<SdXMLExport*>(&mrExport)->GetSdPropHdlFactory()->GetPropertyHandler( nType ); + //const XMLPropertyHandler* pHandler = static_cast<SdXMLExport*>(&mrExport)->GetSdPropHdlFactory()->GetPropertyHandler( nType ); + const XMLPropertyHandler* pHandler = mpSdPropHdlFactory->GetPropertyHandler( nType ); if( pHandler ) { pHandler->exportXML( aString, rValue, mrExport.GetMM100UnitConverter() ); |