diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 711e12209e8a..02cc7fe25230 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -194,10 +194,6 @@ void SfxLokHelper::setView(int nId) if (bIsCurrShell && comphelper::LibreOfficeKit::getLanguageTag().getBcp47() == pViewShell->GetLOKLanguageTag().getBcp47()) return; - // update the current LOK language and locale for the dialog tunneling - comphelper::LibreOfficeKit::setLanguageTag(pViewShell->GetLOKLanguageTag()); - comphelper::LibreOfficeKit::setLocale(pViewShell->GetLOKLocale()); - if (bIsCurrShell) { // If we wanted to set the SfxViewShell that is actually set, we could skip it. @@ -206,9 +202,15 @@ void SfxLokHelper::setView(int nId) SAL_WARN("lok", "LANGUAGE mismatch at setView! ... old (wrong) lang:" << comphelper::LibreOfficeKit::getLanguageTag().getBcp47() << " new lang:" << pViewShell->GetLOKLanguageTag().getBcp47()); - return; } + // update the current LOK language and locale for the dialog tunneling + comphelper::LibreOfficeKit::setLanguageTag(pViewShell->GetLOKLanguageTag()); + comphelper::LibreOfficeKit::setLocale(pViewShell->GetLOKLocale()); + + if (bIsCurrShell) + return; + SfxViewFrame& rViewFrame = pViewShell->GetViewFrame(); rViewFrame.MakeActive_Impl(false);