summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-11-21 22:38:02 +0100
committerMichael Stahl <mstahl@redhat.com>2014-11-24 21:16:37 +0100
commit0b47dcdce3642e550cdf309b9d46431233cee41b (patch)
treec92f109209d1df3bf12e88d7b1fe78143cc46a37 /sw/source/uibase
parent911b5cf0956bfad320bceee8b2942672a1cbd964 (diff)
fdo#86494: sw: fix crash on exit from SwAutoCorrect
5bff4b016c4b44f4123e0e6a4fd4c0c4dc0cfa2d was not enough to fix it, so move it to SwDLL so it gets deleted earlier, before the global pool items. (regression from 4404b718bdb547cb9b7b17c73a53574724cdeeb7) Change-Id: I4f88047852ea71f07ffa1f272ea66743f9797327 (cherry picked from commit d47b674951aedd03815a3f27591b1791f7dfb52d)
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/swdll.cxx11
-rw-r--r--sw/source/uibase/app/swmodule.cxx10
2 files changed, 11 insertions, 10 deletions
diff --git a/sw/source/uibase/app/swdll.cxx b/sw/source/uibase/app/swdll.cxx
index cb6d19e079e1..1e598ef029b4 100644
--- a/sw/source/uibase/app/swdll.cxx
+++ b/sw/source/uibase/app/swdll.cxx
@@ -41,7 +41,9 @@
#include <svx/fmobjfac.hxx>
#include <svx/svdfield.hxx>
#include <svx/objfac3d.hxx>
+#include <editeng/acorrcfg.hxx>
+#include <swacorr.hxx>
#include <unomid.h>
#include "swdllimpl.hxx"
@@ -135,10 +137,19 @@ SwDLL::SwDLL()
// register your controllers here
RegisterControls();
#endif
+
+ // replace SvxAutocorrect with SwAutocorrect
+ SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get();
+ const SvxAutoCorrect* pOld = rACfg.GetAutoCorrect();
+ rACfg.SetAutoCorrect(new SwAutoCorrect( *pOld ));
}
SwDLL::~SwDLL()
{
+ // fdo#86494 SwAutoCorrect must be deleted before _FinitCore
+ SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get();
+ rACfg.SetAutoCorrect(0); // delete SwAutoCorrect before exit handlers
+
// Pool has to be deleted before statics are
SW_MOD()->RemoveAttrPool();
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index e3817b1061b5..ce4339af8458 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -60,7 +60,6 @@
#include <docsh.hxx>
#include <swmodule.hxx>
#include <swevent.hxx>
-#include <swacorr.hxx>
#include <cmdid.h>
#include <dobjfac.hxx>
#include <init.hxx>
@@ -118,7 +117,6 @@
#include <svx/rubydialog.hxx>
#include <svtools/colorcfg.hxx>
-#include <editeng/acorrcfg.hxx>
#include <unotools/moduleoptions.hxx>
#include <avmedia/mediaplayer.hxx>
@@ -192,11 +190,6 @@ SwModule::SwModule( SfxObjectFactory* pWebFact,
pAuthorNames = new std::vector<OUString>; // All Redlining-Authors
- // replace SvxAutocorrect with SwAutocorrect
- SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get();
- const SvxAutoCorrect* pOld = rACfg.GetAutoCorrect();
- rACfg.SetAutoCorrect(new SwAutoCorrect( *pOld ));
-
StartListening( *SfxGetpApp() );
// OD 14.02.2003 #107424# - init color configuration
@@ -227,9 +220,6 @@ SwModule::~SwModule()
{
delete pErrorHdl;
EndListening( *SfxGetpApp() );
-
- SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get();
- rACfg.SetAutoCorrect(0); // delete SwAutCorrect before exit handlers
}
void SwModule::CreateLngSvcEvtListener()