sfx2/source/view/lokhelper.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 9c35edb44a82a346122e9ba762165161d1ebcf02
Author:     Aron Budea <[email protected]>
AuthorDate: Tue Jan 9 00:48:48 2024 +1030
Commit:     Andras Timar <[email protected]>
CommitDate: Wed Jan 10 16:39:01 2024 +0100

    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 <[email protected]>
    Reviewed-by: Andras Timar <[email protected]>

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());
             }
 

Reply via email to