From 3a9e1e71d9a28b2c6bc96757e629b231d2276d9d Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 14 Dec 2012 21:46:49 +0100 Subject: Do not defer ~XMLRedlineImportHelper activity to ~SwXMLImport At least with one Clang build, executing sw_unoapi test aborts at shutdown of soffice.bin with 20 __cxxabiv1::__cxa_call_unexpected 21 XMLRedlineImportHelper::~XMLRedlineImportHelper 22 XMLRedlineImportHelper::~XMLRedlineImportHelper 23 SwXMLTextImportHelper::~SwXMLTextImportHelper 24 SwXMLTextImportHelper::~SwXMLTextImportHelper 25 UniRefBase::release 26 UniReference::~UniReference 27 UniReference::~UniReference 28 SvXMLImport::~SvXMLImport 29 SwXMLImport::~SwXMLImport 30 SwXMLImport::~SwXMLImport 31 cppu::OWeakObject::release [...] 79 binaryurp::Bridge::dispose [...] 98 desktop::Desktop::DeregisterServices 99 desktop::Desktop::doShutdown 100 desktop::Desktop::Main due to ~XMLRedlineImportHelper calling setPropertyValue on an SwXTextDocument that is !IsValid() and thus throws a RuntimeException. SwXMLImport::endOocument already contains ClearShapeImport with a comment that indicates it is necessary for a similar reason, so add a ClearTextImport that ensures any ~XMLRedlineImportHelper activity is done before the SwXTextDocument becomes invalid, and not only at shutdown of the remote bridge that still holds a (Java) reference to SwXMLImport. Change-Id: I9891879c91bfea79fa9e22691be1826f61fdd70a --- xmloff/inc/xmloff/xmlimp.hxx | 1 + 1 file changed, 1 insertion(+) (limited to 'xmloff') diff --git a/xmloff/inc/xmloff/xmlimp.hxx b/xmloff/inc/xmloff/xmlimp.hxx index 125728fbb726..4fac73753165 100644 --- a/xmloff/inc/xmloff/xmlimp.hxx +++ b/xmloff/inc/xmloff/xmlimp.hxx @@ -155,6 +155,7 @@ protected: const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); virtual XMLTextImportHelper* CreateTextImport(); + inline void ClearTextImport() { mxTextImport = 0; } virtual XMLShapeImportHelper* CreateShapeImport(); inline sal_Bool HasShapeImport() const { return mxShapeImport.is(); } inline void ClearShapeImport() { mxShapeImport = 0; } -- cgit