From 1453bc4ab3d42c34c32a7da63ed6f7bdbe513c2d Mon Sep 17 00:00:00 2001 From: Niklas Johansson Date: Tue, 1 Nov 2016 12:19:08 +0100 Subject: tdf#93592 Make it possible to add default language resource to dialogeditor During the conversion of uno services a few lines where removed that probably should not have been removed. This caused the dialog editor to crash if you tried to add a new language resource to a document fdo#93077. The fix for that bug fixed the crash but also made it imposible to add a language resource to a dialog that isn't previously translated. With this patch the functionality should be back on track, adding/removing language resources without problems at least as far as my testing goes. Change-Id: Ie6e083837894a219bf8e9c75dec6bf7652d51615 Reviewed-on: https://gerrit.libreoffice.org/30462 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt --- basctl/source/dlged/managelang.cxx | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'basctl/source/dlged/managelang.cxx') diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx index ab6bb4818bc2..4b979921dbf5 100644 --- a/basctl/source/dlged/managelang.cxx +++ b/basctl/source/dlged/managelang.cxx @@ -149,19 +149,12 @@ IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl, Button*, void) ScopedVclPtrInstance< SetDefaultLanguageDialog > aDlg( this, m_xLocalizationMgr ); if ( RET_OK == aDlg->Execute() ) { - if (!m_xLocalizationMgr->isLibraryLocalized()) - { - SAL_WARN("basctl.basicide", "Adding langs to non-localized library tdf#93077"); - } - else - { - // add new locales - Sequence< Locale > aLocaleSeq = aDlg->GetLocales(); - m_xLocalizationMgr->handleAddLocales( aLocaleSeq ); - // update listbox - ClearLanguageBox(); - FillLanguageBox(); - } + // add new locales + Sequence< Locale > aLocaleSeq = aDlg->GetLocales(); + m_xLocalizationMgr->handleAddLocales( aLocaleSeq ); + // update listbox + ClearLanguageBox(); + FillLanguageBox(); if (SfxBindings* pBindings = GetBindingsPtr()) pBindings->Invalidate( SID_BASICIDE_CURRENT_LANG ); -- cgit