summaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/editeng/forbiddencharacterstable.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/editeng/forbiddencharacterstable.hxx b/include/editeng/forbiddencharacterstable.hxx
index 6923f550070d..156bd85bfacd 100644
--- a/include/editeng/forbiddencharacterstable.hxx
+++ b/include/editeng/forbiddencharacterstable.hxx
@@ -26,6 +26,7 @@
#include <editeng/editengdllapi.h>
#include <i18nlangtag/lang.h>
#include <map>
+#include <memory>
namespace com {
namespace sun {
@@ -41,9 +42,10 @@ public:
private:
Map maMap;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
+ SvxForbiddenCharactersTable(const css::uno::Reference< css::uno::XComponentContext >& rxContext);
public:
- SvxForbiddenCharactersTable( const css::uno::Reference< css::uno::XComponentContext >& rxContext);
+ static std::shared_ptr<SvxForbiddenCharactersTable> makeForbiddenCharactersTable(const css::uno::Reference<css::uno::XComponentContext>& rxContext);
Map& GetMap() { return maMap; }
const css::i18n::ForbiddenCharacters* GetForbiddenCharacters( LanguageType nLanguage, bool bGetDefault );