sw/source/uibase/shells/textsh1.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
New commits: commit 447c052d5c074f923fb04e086c9da0340eecb6bd Author: Julien Nabet <serval2...@yahoo.fr> Date: Thu Dec 7 22:23:02 2017 +0100 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 <c...@libreoffice.org> Reviewed-by: Julien Nabet <serval2...@yahoo.fr> 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits