summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Budea <aron.budea@collabora.com>2024-01-09 00:48:48 +1030
committerAndras Timar <andras.timar@collabora.com>2024-01-10 16:39:01 +0100
commit9c35edb44a82a346122e9ba762165161d1ebcf02 (patch)
tree1581c3b60270e44d22d323997ab2976df43dd0d5
parent2ca20f147b5963928643ffe0e9b892d6466e7ea9 (diff)
lok: Log actual differing language
...not the same after it is overwritten Change-Id: I5cde7db22d66d73965c0d13f0890ddca0e37a616 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161790 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--sfx2/source/view/lokhelper.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index c54551b1637f..0eb4a31607ac 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -192,7 +192,8 @@ void SfxLokHelper::setView(int nId)
DisableCallbacks dc;
bool bIsCurrShell = (pViewShell == SfxViewShell::Current());
- if (bIsCurrShell && comphelper::LibreOfficeKit::getLanguageTag().getBcp47() == pViewShell->GetLOKLanguageTag().getBcp47())
+ const auto aKitLang = comphelper::LibreOfficeKit::getLanguageTag().getBcp47();
+ if (bIsCurrShell && aKitLang == pViewShell->GetLOKLanguageTag().getBcp47())
return;
if (bIsCurrShell)
@@ -201,7 +202,7 @@ void SfxLokHelper::setView(int nId)
// But it looks like that the language can go wrong, so we have to fix that.
// This can happen, when someone sets the language or SfxViewShell::Current() separately.
SAL_WARN("lok", "LANGUAGE mismatch at setView! ... old (wrong) lang:"
- << comphelper::LibreOfficeKit::getLanguageTag().getBcp47()
+ << aKitLang
<< " new lang:" << pViewShell->GetLOKLanguageTag().getBcp47());
}