summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-07-04 15:51:02 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-07-04 23:04:00 +0200
commita9303d85a4f201a42322e8e4ce5ebe6e6ca728b0 (patch)
treedd55c9ce5d9d59d92fcc93130316f5a4e96810ea /sw
parent8d69ca2d310de2e6275b93b4fd6cd40f05e9e84e (diff)
Make brittle SortedAutoCompleteStrings ownership handling more explicit
Change-Id: Ieaf2231a84d97528bb1b9a410c4ee0c38966dd27 Reviewed-on: https://gerrit.libreoffice.org/56950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/app/docsh2.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 1d1972da0f04..ab4c22a5b718 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -421,7 +421,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
rACW.SetLockWordLstLocked( true );
- editeng::SortedAutoCompleteStrings aTmpLst( rACW.GetWordList() );
+ editeng::SortedAutoCompleteStrings aTmpLst( rACW.GetWordList().createNonOwningCopy() );
pAFlags->m_pAutoCompleteList = &aTmpLst;
SfxApplication* pApp = SfxGetpApp();
@@ -455,8 +455,6 @@ void SwDocShell::Execute(SfxRequest& rReq)
// clear the temp WordList pointer
pAFlags->m_pAutoCompleteList = nullptr;
}
- // remove all pointer we never delete the strings
- aTmpLst.clear();
if( !bOldAutoCmpltCollectWords && bOldAutoCmpltCollectWords !=
pAFlags->bAutoCmpltCollectWords )