[Libreoffice-commits] core.git: 2 commits - sfx2/source vcl/source

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Thu Nov 12 12:31:22 UTC 2020


 sfx2/source/notebookbar/SfxNotebookBar.cxx |    7 +++++++
 vcl/source/app/help.cxx                    |   29 ++++++++++++++---------------
 2 files changed, 21 insertions(+), 15 deletions(-)

New commits:
commit 5006e4fe6bd5e5a176e2e1837e826a0b67da08e7
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Oct 5 16:38:15 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Nov 12 13:30:31 2020 +0100

    Don't reuse tooltip window in different context
    
    This causes interference to other views due to usage
    of global references in Online.
    
    Change-Id: Ib9346881d4e48ac1ce3456d386806582ade82255
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103994
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105593
    Tested-by: Jenkins

diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index 7f16b6a0a699..4785b47aca3a 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -498,21 +498,10 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe
     {
         SAL_WARN_IF( pHelpWin == pParent, "vcl", "HelpInHelp ?!" );
 
-        if  (   (   rHelpText.isEmpty()
-                ||  ( pHelpWin->GetWinStyle() != nHelpWinStyle )
-                )
-            &&  aHelpData.mbRequestingHelp
-            )
-        {
-            // remove help window if no HelpText or
-            // other help mode. but keep it if we are scrolling, ie not requesting help
-            bool bWasVisible = pHelpWin->IsVisible();
-            if ( bWasVisible )
-                bNoDelay = true; // display it quickly if we were already in quick help mode
-            pHelpWin = nullptr;
-            ImplDestroyHelpWindow( bWasVisible );
-        }
-        else
+        bool bRemoveHelp = (rHelpText.isEmpty() || (pHelpWin->GetWinStyle() != nHelpWinStyle))
+                            && aHelpData.mbRequestingHelp;
+
+        if (!bRemoveHelp && pHelpWin->GetParent() == pParent)
         {
             bool const bUpdate = (pHelpWin->GetHelpText() != rHelpText) ||
                 ((pHelpWin->GetHelpArea() != rHelpArea) && aHelpData.mbRequestingHelp);
@@ -525,6 +514,16 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe
                     pHelpWin->Invalidate();
             }
         }
+        else
+        {
+            // remove help window if no HelpText or
+            // other help mode. but keep it if we are scrolling, ie not requesting help
+            bool bWasVisible = pHelpWin->IsVisible();
+            if ( bWasVisible )
+                bNoDelay = true; // display it quickly if we were already in quick help mode
+            pHelpWin = nullptr;
+            ImplDestroyHelpWindow( bWasVisible );
+        }
     }
 
     if (pHelpWin || rHelpText.isEmpty())
commit 92b88e0cc7e3d432acc9ec5a894451018fbf7b95
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Oct 12 14:19:54 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Nov 12 13:30:24 2020 +0100

    notebookbar: set language before creating
    
    Change-Id: I04243667b564670096d2c8db0352ab179e1b0151
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104212
    Tested-by: Andras Timar <andras.timar at collabora.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105595
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index 4c5ccbe8a063..39e60f61dfe9 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -380,6 +380,13 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow,
             aNotebookBarAddonsItem.aImageValues = aImageValues;
 
             // setup if necessary
+            if (comphelper::LibreOfficeKit::isActive())
+            {
+                // update the current LOK language and locale for the dialog tunneling
+                comphelper::LibreOfficeKit::setLanguageTag(pViewShell->GetLOKLanguageTag());
+                comphelper::LibreOfficeKit::setLocale(pViewShell->GetLOKLocale());
+            }
+
             pSysWindow->SetNotebookBar(aBuf, xFrame, aNotebookBarAddonsItem , bReloadNotebookbar);
             pNotebookBar = pSysWindow->GetNotebookBar();
             pNotebookBar->Show();


More information about the Libreoffice-commits mailing list