[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - desktop/qa include/sfx2 sc/source sd/source sfx2/source sw/source

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Mon Dec 16 12:51:13 UTC 2019


 desktop/qa/data/2slides.odp       |binary
 include/sfx2/childwin.hxx         |    6 +++---
 sc/source/ui/app/scdll.cxx        |    5 ++++-
 sd/source/ui/app/sddll.cxx        |    5 ++++-
 sfx2/source/appl/workwin.cxx      |    3 +++
 sw/source/uibase/app/swmodule.cxx |    5 ++++-
 6 files changed, 18 insertions(+), 6 deletions(-)

New commits:
commit e573919cd8561a81d967c1a4566c5733dd44b7b1
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sat Jul 27 23:35:13 2019 -0400
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Mon Dec 16 13:50:21 2019 +0100

    LOK: spelldialog: don't create the dialog when loading new views
    
    By default dialogs/decks are re-created when a new view is
    created/attached, if they are visible. For the spell checker
    this is unexpected, as the user doesn't expect to be doing
    spell checking upon loading a document, just because another
    user was at the time spell checking. Currently the suppression
    is for LOK only.
    
    This also adds support to suppress the recreation of any
    dialog by flagging it with the SfxChildWindowFlags::NEVERCLONE
    flag upon invoking RegisterChildWindow.
    
    (cherry picked from commit e3fb48fe4f84b5609730c64fdb49b1bd7ddd1f96)
    
    Change-Id: I7d71c664f1b2804910c96eeb0431164d48b5679b
    Reviewed-on: https://gerrit.libreoffice.org/85004
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/desktop/qa/data/2slides.odp b/desktop/qa/data/2slides.odp
index 8be376f5b548..0e3f8758ffc9 100644
Binary files a/desktop/qa/data/2slides.odp and b/desktop/qa/data/2slides.odp differ
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index 9a12bf896071..e70c779b6c3a 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -49,13 +49,13 @@ enum class SfxChildWindowFlags
     TASK            = 0x10, // ChildWindow inside the Task
     CANTGETFOCUS    = 0x20, // ChildWindow can not get focus
     ALWAYSAVAILABLE = 0x40, // ChildWindow is never disabled
-    NEVERHIDE       = 0x80  // ChildWindow is can always made
-                            // visible/is visible
+    NEVERHIDE       = 0x80, // ChildWindow is always visible
+    NEVERCLONE      = 0x100, // ChildWindow is not recreated in new view
 };
 
 namespace o3tl
 {
-    template<> struct typed_flags<SfxChildWindowFlags> : is_typed_flags<SfxChildWindowFlags, 0xf5> {};
+    template<> struct typed_flags<SfxChildWindowFlags> : is_typed_flags<SfxChildWindowFlags, 0x1f5> {};
 }
 
 
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index e6a360398341..27e5202ebde2 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -26,6 +26,7 @@
 #include <svx/tbxcolor.hxx>
 
 #include <comphelper/classids.hxx>
+#include <comphelper/lok.hxx>
 #include <sfx2/sidebar/SidebarChildWindow.hxx>
 #include <sfx2/docfilt.hxx>
 #include <sfx2/fcontnr.hxx>
@@ -255,7 +256,9 @@ void ScDLL::Init()
     SvxHlinkDlgWrapper          ::RegisterChildWindow(false, pMod);
     SvxFontWorkChildWindow      ::RegisterChildWindow(false, pMod);
     SvxIMapDlgChildWindow       ::RegisterChildWindow(false, pMod);
-    ScSpellDialogChildWindow    ::RegisterChildWindow(false, pMod);
+    ScSpellDialogChildWindow::RegisterChildWindow(
+        false, pMod, comphelper::LibreOfficeKit::isActive() ? SfxChildWindowFlags::NEVERCLONE
+                                                            : SfxChildWindowFlags::NONE);
 
     ScValidityRefChildWin::RegisterChildWindow(false, pMod);
     sc::SearchResultsDlgWrapper::RegisterChildWindow(false, pMod);
diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx
index 35b7ca6f5113..c0ae2be3c2b0 100644
--- a/sd/source/ui/app/sddll.cxx
+++ b/sd/source/ui/app/sddll.cxx
@@ -93,6 +93,7 @@
 #include <sfx2/charmappopup.hxx>
 #include <sfx2/sidebar/SidebarChildWindow.hxx>
 #include <vcl/FilterConfigItem.hxx>
+#include <comphelper/lok.hxx>
 #include <o3tl/make_unique.hxx>
 #include <sdabstdlg.hxx>
 #include <sdfilter.hxx>
@@ -175,7 +176,9 @@ void SdDLL::RegisterControllers(SdModule* pMod)
     SvxBmpMaskChildWindow::RegisterChildWindow(false, pMod);
     SvxIMapDlgChildWindow::RegisterChildWindow(false, pMod);
     SvxHlinkDlgWrapper::RegisterChildWindow(false, pMod);
-    ::sd::SpellDialogChildWindow::RegisterChildWindow(false, pMod);
+    ::sd::SpellDialogChildWindow::RegisterChildWindow(
+        false, pMod, comphelper::LibreOfficeKit::isActive() ? SfxChildWindowFlags::NEVERCLONE
+                                                            : SfxChildWindowFlags::NONE);
 #if HAVE_FEATURE_AVMEDIA
     ::avmedia::MediaPlayer::RegisterChildWindow(false, pMod);
 #endif
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index be84fde7a6e6..09d4a268397a 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1289,6 +1289,9 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
                 else
                     bCreate = true;
 
+                if (pCW->aInfo.nFlags & SfxChildWindowFlags::NEVERCLONE)
+                    pCW->bCreate = bCreate = false; // Don't create and remember that we haven't created.
+
                 // Currently, no window here, but it is enabled; windows
                 // Create window and if possible theContext
                 if ( bCreate )
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index f8a76f4d49f1..942399ddb0b9 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -56,6 +56,7 @@
 #include <com/sun/star/scanner/ScannerManager.hpp>
 #include <com/sun/star/linguistic2/LanguageGuessing.hpp>
 #include <ooo/vba/XSinkCaller.hpp>
+#include <comphelper/lok.hxx>
 #include <comphelper/processfactory.hxx>
 #include <docsh.hxx>
 #include <swmodule.hxx>
@@ -357,7 +358,9 @@ void SwDLL::RegisterControls()
     SwInsertAuthMarkWrapper::RegisterChildWindow( false, pMod );
     SwWordCountWrapper::RegisterChildWindow( false, pMod );
     SvxRubyChildWindow::RegisterChildWindow( false, pMod);
-    SwSpellDialogChildWindow::RegisterChildWindow(false, pMod);
+    SwSpellDialogChildWindow::RegisterChildWindow(
+        false, pMod, comphelper::LibreOfficeKit::isActive() ? SfxChildWindowFlags::NEVERCLONE
+                                                            : SfxChildWindowFlags::NONE);
 
     CharmapPopup::RegisterControl(SID_CHARMAP_CONTROL, pMod );
 


More information about the Libreoffice-commits mailing list