diff options
Diffstat (limited to 'sfx2/source/view/lokhelper.cxx')
-rw-r--r-- | sfx2/source/view/lokhelper.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 73e7a170412c..f91d757697a2 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -61,6 +61,9 @@ void SfxLokHelper::setView(int nId) { if (pViewShell->GetViewShellId() == nViewShellId) { + // update the current LOK language for the dialog tunneling + comphelper::LibreOfficeKit::setLanguageTag(pViewShell->GetLOKLanguageTag()); + if (pViewShell == SfxViewShell::Current()) return; @@ -108,6 +111,20 @@ bool SfxLokHelper::getViewIds(int* pArray, size_t nSize) return true; } +void SfxLokHelper::setViewLanguage(int nId, const OUString& rBcp47LanguageTag) +{ + SfxViewShellArr_Impl& rViewArr = SfxGetpApp()->GetViewShells_Impl(); + + for (SfxViewShell* pViewShell : rViewArr) + { + if (pViewShell->GetViewShellId() == static_cast<unsigned>(nId)) + { + pViewShell->SetLOKLanguageTag(rBcp47LanguageTag); + return; + } + } +} + void SfxLokHelper::notifyOtherView(SfxViewShell* pThisView, SfxViewShell* pOtherView, int nType, const OString& rKey, const OString& rPayload) { OString aPayload = OString("{ \"viewId\": \"") + OString::number(SfxLokHelper::getView(pThisView)) + |