diff options
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/ximpbody.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx index 97814fc16a64..c574d4ef4101 100644 --- a/xmloff/source/draw/ximpbody.cxx +++ b/xmloff/source/draw/ximpbody.cxx @@ -37,6 +37,7 @@ #include "PropertySetMerger.hxx" #include "animationimport.hxx" #include <tools/debug.hxx> +#include <osl/diagnose.hxx> using namespace ::com::sun::star; @@ -277,6 +278,29 @@ 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 <<= sal_True; + xPropSet->setPropertyValue(sFlushCustomShapeUnoApiObjects, aAny); + } + } + catch(const uno::Exception&) + { + OSL_FAIL("could not flush after load"); + } } SdXMLBodyContext::SdXMLBodyContext( SdXMLImport& rImport, |