diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-24 11:02:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-05-24 11:02:42 +0200 |
commit | 95d20a3799998b9816bd2e8aebdbc96c61cead3e (patch) | |
tree | 8206ecc848631432cb8b027d5e780483734f808a /xmloff | |
parent | 3caf31b05d7bbf3d50a1bbda6c8b95982cb5c2b5 (diff) |
Revert "remove some manual ref-counting"
until I have a better understanding of the UNO reference
counting.
This reverts commit 111de438ea3e512a541281dc0716cc728ea8d152.
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/animationexport.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx index 9d6a5d92fa10..97ae81c7b97a 100644 --- a/xmloff/source/draw/animationexport.cxx +++ b/xmloff/source/draw/animationexport.cxx @@ -531,7 +531,7 @@ private: SvXMLExport& mrExport; Reference< XInterface > mxExport; Reference< XPropertySet > mxPageProps; - rtl::Reference<XMLSdPropHdlFactory> mxSdPropHdlFactory; + XMLSdPropHdlFactory* mpSdPropHdlFactory; }; AnimationsExporterImpl::AnimationsExporterImpl( SvXMLExport& rExport, const Reference< XPropertySet >& xPageProps ) @@ -548,11 +548,19 @@ AnimationsExporterImpl::AnimationsExporterImpl( SvXMLExport& rExport, const Refe OSL_FAIL( "xmloff::AnimationsExporterImpl::AnimationsExporterImpl(), RuntimeException caught!" ); } - mxSdPropHdlFactory = new XMLSdPropHdlFactory( mrExport.GetModel(), mrExport ); + mpSdPropHdlFactory = new XMLSdPropHdlFactory( mrExport.GetModel(), mrExport ); + // set lock to avoid deletion + mpSdPropHdlFactory->acquire(); } AnimationsExporterImpl::~AnimationsExporterImpl() { + // cleanup factory, decrease refcount. Should lead to destruction. + if(mpSdPropHdlFactory) + { + mpSdPropHdlFactory->release(); + mpSdPropHdlFactory = nullptr; + } } void AnimationsExporterImpl::exportTransitionNode() @@ -1519,7 +1527,7 @@ void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUString } //const XMLPropertyHandler* pHandler = static_cast<SdXMLExport*>(&mrExport)->GetSdPropHdlFactory()->GetPropertyHandler( nType ); - const XMLPropertyHandler* pHandler = mxSdPropHdlFactory->GetPropertyHandler( nType ); + const XMLPropertyHandler* pHandler = mpSdPropHdlFactory->GetPropertyHandler( nType ); if( pHandler ) { pHandler->exportXML( aString, rValue, mrExport.GetMM100UnitConverter() ); |