diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2016-04-22 17:54:14 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2016-04-26 10:34:04 +0000 |
commit | e6adb3e8b4de3c0f78d249b83de19b849ef65b59 (patch) | |
tree | b9db8d5a0dbb002cceef69180106828df7849dca /xmloff | |
parent | ed42a984099b8847aedbdd638c7e20e0b68a9290 (diff) |
tdf#98163 Flush ressources at CustomShapes during import
During ODF import using API for CustomShapes Outliners and
VirtualDevioces get created and not destroyed due to referencing.
This makes the ressources blow up, even under 64bit windows.
Also see tdf#93994 where this was already fixed on page base,
but this is not sufficient for this case.
Change-Id: If9b37d341fcfa4e65485c54054d47964ee2fff5f
Reviewed-on: https://gerrit.libreoffice.org/24305
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/ximpbody.cxx | 23 | ||||
-rw-r--r-- | xmloff/source/draw/ximpshap.cxx | 23 |
2 files changed, 23 insertions, 23 deletions
diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx index c9fee0cf8656..7bd66b69397c 100644 --- a/xmloff/source/draw/ximpbody.cxx +++ b/xmloff/source/draw/ximpbody.cxx @@ -279,29 +279,6 @@ void SdXMLDrawPageContext::EndElement() if(xNodeSupplier.is()) xmloff::AnimationNodeContext::postProcessRootNode( GetSdImport(), xNodeSupplier->getAnimationNode(), xPageProps ); } - - // tdf#93994 call a custom slot to be able to reset the UNO API - // implementations held on the SdrObjects of type - // SdrObjCustomShape - those tend to linger until the entire file - // is loaded. For large files with a lot of these 32bit systems - // may crash due to being out of ressources after ca. 4200 - // Outliners and VirtualDevices used there as RefDevice - try - { - uno::Reference< beans::XPropertySet > xPropSet(GetLocalShapesContext(), uno::UNO_QUERY); - - if(xPropSet.is()) - { - const OUString sFlushCustomShapeUnoApiObjects("FlushCustomShapeUnoApiObjects"); - uno::Any aAny; - aAny <<= true; - xPropSet->setPropertyValue(sFlushCustomShapeUnoApiObjects, aAny); - } - } - catch(const uno::Exception&) - { - OSL_FAIL("could not flush after load"); - } } SdXMLBodyContext::SdXMLBodyContext( SdXMLImport& rImport, diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index fd684a60326a..ddc184108bb0 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -3891,6 +3891,29 @@ void SdXMLCustomShapeContext::EndElement() } SdXMLShapeContext::EndElement(); + + // tdf#98163 call a custom slot to be able to reset the UNO API + // implementations held on the SdrObjects of type + // SdrObjCustomShape - those tend to linger until the entire file + // is loaded. For large files with a lot of these, 32bit systems + // may crash due to being out of ressources after ca. 4200 + // Outliners and VirtualDevices used there as RefDevice + try + { + uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY); + + if(xPropSet.is()) + { + const OUString sFlushCustomShapeUnoApiObjects("FlushCustomShapeUnoApiObjects"); + uno::Any aAny; + aAny <<= sal_True; + xPropSet->setPropertyValue(sFlushCustomShapeUnoApiObjects, aAny); + } + } + catch(const uno::Exception&) + { + OSL_FAIL("could not flush after load"); + } } SvXMLImportContext* SdXMLCustomShapeContext::CreateChildContext( |