diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-12-07 22:23:02 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2017-12-08 00:17:35 +0100 |
commit | 447c052d5c074f923fb04e086c9da0340eecb6bd (patch) | |
tree | 108278a70f0d374168ecbefb7681a637a87458a1 | |
parent | 78a3f7e10e650bc464202dacd131f9c3b0ddfcdf (diff) |
Disabled slot with Put leaks entry (textsh1/sw)
Same as https://cgit.freedesktop.org/libreoffice/core/commit/?id=21dde7a09e2cfe7b48d2fec1edc7a94fa94af5c3
Change-Id: Ic4cb972975bd8eff18191aad182b585302430c05
Reviewed-on: https://gerrit.libreoffice.org/46045
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 246d2958f212..7a83cc9408c6 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1415,18 +1415,18 @@ void SwTextShell::GetState( SfxItemSet &rSet ) LanguageType nLang = rSh.GetCurLang(); LanguageTag aLanguageTag( nLang); lang::Locale aLocale( aLanguageTag.getLocale()); - OUString aLangText( aLanguageTag.getBcp47() ); - - // set word and locale to look up as status value - OUString aStatusVal = aText + "#" + aLangText; - - rSet.Put( SfxStringItem( SID_THES, aStatusVal ) ); // disable "Thesaurus" context menu entry if there is nothing to look up uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() ); if (aText.isEmpty() || !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale )) rSet.DisableItem( SID_THES ); + else + { + // set word and locale to look up as status value + OUString aStatusVal = aText + "#" + aLanguageTag.getBcp47(); + rSet.Put( SfxStringItem( SID_THES, aStatusVal ) ); + } } break; |