diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-07-04 15:05:34 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-07-06 09:28:10 +0200 |
commit | 12a3f5cefeaeb842507dd8038597fb77ca929dd1 (patch) | |
tree | c1d496a275fceb1b2fda406f13acca71d9e6947a /include | |
parent | ab9b38a4064141705aa3a3de9a5d73b465ad3af3 (diff) |
rework as a shared_ptr
mostly to try and track down a crash on exit of sw uwriter under
windows
Change-Id: Id67e93863056da319dd8225038d60a7f5783b103
Reviewed-on: https://gerrit.libreoffice.org/39604
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/UnoForbiddenCharsTable.hxx | 7 | ||||
-rw-r--r-- | include/editeng/editeng.hxx | 2 | ||||
-rw-r--r-- | include/editeng/forbiddencharacterstable.hxx | 2 | ||||
-rw-r--r-- | include/editeng/outliner.hxx | 2 | ||||
-rw-r--r-- | include/svx/svdmodel.hxx | 6 |
5 files changed, 9 insertions, 10 deletions
diff --git a/include/editeng/UnoForbiddenCharsTable.hxx b/include/editeng/UnoForbiddenCharsTable.hxx index 924d9f7fa5f0..2697e5dc59cc 100644 --- a/include/editeng/UnoForbiddenCharsTable.hxx +++ b/include/editeng/UnoForbiddenCharsTable.hxx @@ -22,10 +22,9 @@ #include <com/sun/star/i18n/XForbiddenCharacters.hpp> #include <com/sun/star/linguistic2/XSupportedLocales.hpp> -#include <rtl/ref.hxx> - #include <cppuhelper/implbase.hxx> #include <editeng/editengdllapi.h> +#include <memory> class SvxForbiddenCharactersTable; @@ -37,10 +36,10 @@ protected: /** this virtual function is called if the forbidden characters are changed */ virtual void onChange(); - rtl::Reference<SvxForbiddenCharactersTable> mxForbiddenChars; + std::shared_ptr<SvxForbiddenCharactersTable> mxForbiddenChars; public: - SvxUnoForbiddenCharsTable(rtl::Reference<SvxForbiddenCharactersTable> const & xForbiddenChars); + SvxUnoForbiddenCharsTable(std::shared_ptr<SvxForbiddenCharactersTable> const & xForbiddenChars); virtual ~SvxUnoForbiddenCharsTable() override; // XForbiddenCharacters diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index 05ccb792d5f6..71421453752e 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -426,7 +426,7 @@ public: void GetAllMisspellRanges( std::vector<editeng::MisspellRanges>& rRanges ) const; void SetAllMisspellRanges( const std::vector<editeng::MisspellRanges>& rRanges ); - static void SetForbiddenCharsTable( const rtl::Reference<SvxForbiddenCharactersTable>& xForbiddenChars ); + static void SetForbiddenCharsTable(const std::shared_ptr<SvxForbiddenCharactersTable>& xForbiddenChars); void SetDefaultLanguage( LanguageType eLang ); LanguageType GetDefaultLanguage() const; diff --git a/include/editeng/forbiddencharacterstable.hxx b/include/editeng/forbiddencharacterstable.hxx index b14828593112..6923f550070d 100644 --- a/include/editeng/forbiddencharacterstable.hxx +++ b/include/editeng/forbiddencharacterstable.hxx @@ -34,7 +34,7 @@ namespace uno { class XComponentContext; }}}} -class EDITENG_DLLPUBLIC SvxForbiddenCharactersTable : public salhelper::SimpleReferenceObject +class EDITENG_DLLPUBLIC SvxForbiddenCharactersTable { public: typedef std::map<LanguageType, css::i18n::ForbiddenCharacters> Map; diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index 80a16b518037..f7a015b4a0a5 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -912,7 +912,7 @@ public: GetSpeller(); void SetHyphenator( css::uno::Reference< css::linguistic2::XHyphenator >& xHyph ); - static void SetForbiddenCharsTable( const rtl::Reference<SvxForbiddenCharactersTable>& xForbiddenChars ); + static void SetForbiddenCharsTable(const std::shared_ptr<SvxForbiddenCharactersTable>& xForbiddenChars); // Deprecated void SetDefaultLanguage( LanguageType eLang ); diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index 95e613ef767d..b9210f5d072d 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -194,7 +194,7 @@ protected: public: - rtl::Reference<SvxForbiddenCharactersTable> mpForbiddenCharactersTable; + std::shared_ptr<SvxForbiddenCharactersTable> mpForbiddenCharactersTable; SdrSwapGraphicsMode nSwapGraphicsMode; SdrOutlinerCache* mpOutlinerCache; @@ -522,8 +522,8 @@ public: bool isLocked() const { return mbModelLocked; } void setLock( bool bLock ); - void SetForbiddenCharsTable( const rtl::Reference<SvxForbiddenCharactersTable>& xForbiddenChars ); - const rtl::Reference<SvxForbiddenCharactersTable>& GetForbiddenCharsTable() const { return mpForbiddenCharactersTable;} + void SetForbiddenCharsTable( const std::shared_ptr<SvxForbiddenCharactersTable>& xForbiddenChars ); + const std::shared_ptr<SvxForbiddenCharactersTable>& GetForbiddenCharsTable() const { return mpForbiddenCharactersTable;} void SetCharCompressType( CharCompressType nType ); CharCompressType GetCharCompressType() const { return mnCharCompressType; } |