[Libreoffice-commits] core.git: desktop/qa include/sfx2 sc/source sd/source sfx2/source sw/source

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Sun Dec 22 23:53:26 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 c9829f585103f3daa9749c5b0f479297edd42042
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sat Jul 27 23:35:13 2019 -0400
Commit:     Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Mon Dec 23 00:52:34 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)
    
    Reviewed-on: https://gerrit.libreoffice.org/85004
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    (cherry picked from commit e573919cd8561a81d967c1a4566c5733dd44b7b1)
    
    Change-Id: I7d71c664f1b2804910c96eeb0431164d48b5679b
    Reviewed-on: https://gerrit.libreoffice.org/85680
    Tested-by: Jenkins
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.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 68279262d11d..054f1ff0a0f5 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -47,13 +47,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 59faba24ece2..45129b81b089 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -22,6 +22,7 @@
 #include <svx/fmobjfac.hxx>
 #include <svx/objfac3d.hxx>
 
+#include <comphelper/lok.hxx>
 #include <sfx2/sidebar/SidebarChildWindow.hxx>
 #include <sfx2/app.hxx>
 #include <avmedia/mediatoolbox.hxx>
@@ -238,7 +239,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 8098c5d6c31c..55d306e53925 100644
--- a/sd/source/ui/app/sddll.cxx
+++ b/sd/source/ui/app/sddll.cxx
@@ -84,6 +84,7 @@
 #include <sfx2/emojipopup.hxx>
 #include <sfx2/charmappopup.hxx>
 #include <sfx2/sidebar/SidebarChildWindow.hxx>
+#include <comphelper/lok.hxx>
 #include <sdabstdlg.hxx>
 #include <sdfilter.hxx>
 #include <sdmod.hxx>
@@ -165,7 +166,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 cb9680b94ae0..3c505a364c07 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1283,6 +1283,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 0ec62470c232..8da92e722fb5 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -59,6 +59,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>
@@ -347,7 +348,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