summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-07-05 15:40:00 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-07-06 09:29:45 +0200
commit6549993b17feb1423c76b5237f086e6f35346a2c (patch)
tree8137a443acf338d2636ded0e2a12fd82f523cb87 /sc
parentad0e7d5734b3b759b1ef4aa794e2a31d79a2ecd1 (diff)
ensure safe GlobalEditData release of xForbiddenCharsTable
ensure that when the editeng GlobalEditData dtor is called that the vtable of the xForbiddenCharsTable shared_ptr will point to functions that are callable from editeng. otherwise a shared_ptr created in the sw uwriter cppunit test, but now belonging to GlobalEditData, will have deleter entries pointing to functions in uwriter that have been unloaded and are not available anymore Change-Id: I375a84156c0b1a0f8b24194fc07f0c512f556dbc Reviewed-on: https://gerrit.libreoffice.org/39605 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/docshell/docsh2.cxx2
-rw-r--r--sc/source/ui/unoobj/forbiuno.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index 4055666e2201..2ae71b4f101d 100644
--- a/sc/source/ui/docshell/docsh2.cxx
+++ b/sc/source/ui/docshell/docsh2.cxx
@@ -128,7 +128,7 @@ void ScDocShell::InitItems()
if (aLocales.getLength())
{
std::shared_ptr<SvxForbiddenCharactersTable> xForbiddenTable(
- new SvxForbiddenCharactersTable(comphelper::getProcessComponentContext()));
+ SvxForbiddenCharactersTable::makeForbiddenCharactersTable(comphelper::getProcessComponentContext()));
const lang::Locale* pLocales = aLocales.getConstArray();
for (sal_Int32 i = 0; i < aLocales.getLength(); i++)
diff --git a/sc/source/ui/unoobj/forbiuno.cxx b/sc/source/ui/unoobj/forbiuno.cxx
index 732487b0defc..d177ac1be7e3 100644
--- a/sc/source/ui/unoobj/forbiuno.cxx
+++ b/sc/source/ui/unoobj/forbiuno.cxx
@@ -35,7 +35,7 @@ static std::shared_ptr<SvxForbiddenCharactersTable> lcl_GetForbidden( ScDocShell
{
// create an empty SvxForbiddenCharactersTable for SvxUnoForbiddenCharsTable,
// so changes can be stored.
- xRet.reset(new SvxForbiddenCharactersTable(comphelper::getProcessComponentContext()));
+ xRet = SvxForbiddenCharactersTable::makeForbiddenCharactersTable(comphelper::getProcessComponentContext());
rDoc.SetForbiddenCharacters( xRet );
}
}