summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/xmloff/xmlimp.hxx2
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx7
-rw-r--r--xmloff/source/core/xmlimp.cxx7
3 files changed, 13 insertions, 3 deletions
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index 390c3d511349..b6552a297843 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -281,6 +281,8 @@ public:
OUString const & implementationName,
SvXMLImportFlags nImportFlags = SvXMLImportFlags::ALL );
+ void cleanup() throw();
+
virtual ~SvXMLImport() throw() override;
// css::xml::sax::XDocumentHandler
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 188a687d20cf..7bc07d66abb4 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -782,12 +782,15 @@ ScXMLImport::~ScXMLImport() throw()
delete pStyleNumberFormats;
delete pStylesImportHelper;
- delete pSolarMutexGuard;
-
delete m_pMyNamedExpressions;
delete pMyLabelRanges;
delete pValidations;
delete pDetectiveOpArray;
+
+ //call SvXMLImport dtor contents before deleting pSolarMutexGuard
+ cleanup();
+
+ delete pSolarMutexGuard;
}
void ScXMLImport::initialize( const css::uno::Sequence<css::uno::Any>& aArguments )
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 724dd5c88e80..883e471b3d9a 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -408,7 +408,7 @@ SvXMLImport::SvXMLImport(
registerNamespaces();
}
-SvXMLImport::~SvXMLImport() throw ()
+void SvXMLImport::cleanup() throw ()
{
if (mxEventListener.is() && mxModel.is())
mxModel->removeEventListener(mxEventListener);
@@ -419,6 +419,11 @@ SvXMLImport::~SvXMLImport() throw ()
DisposingModel();
}
+SvXMLImport::~SvXMLImport() throw ()
+{
+ cleanup();
+}
+
namespace
{
class theSvXMLImportUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSvXMLImportUnoTunnelId> {};