desktop/source/lib/init.cxx                 |    4 +++
 include/sfx2/quickfind.hxx                  |   32 ++++++++++++++++++++++++
 include/sfx2/sfxsids.hrc                    |    1 
 include/sfx2/strings.hrc                    |    1 
 include/vcl/jsdialog/executor.hxx           |    1 
 sfx2/Library_sfx.mk                         |    1 
 sfx2/UIConfig_sfx.mk                        |    1 
 sfx2/sdi/frmslots.sdi                       |    5 +++
 sfx2/sdi/sfx.sdi                            |   16 ++++++++++++
 sfx2/source/dialog/quickfind.cxx            |   36 ++++++++++++++++++++++++++++
 sfx2/source/inc/helpids.h                   |    1 
 sfx2/source/view/viewfrm.cxx                |    4 +++
 sfx2/uiconfig/ui/quickfind.ui               |   14 ++++++++++
 static/CustomTarget_emscripten_fs_image.mk  |    2 +
 sw/source/uibase/app/swmodule.cxx           |    2 +
 sw/source/uibase/inc/QuickFindPanel.hxx     |   23 +++++++++++++++++
 sw/source/uibase/sidebar/QuickFindPanel.cxx |   36 +++++++++++++++++++++++++++-
 sw/source/uibase/sidebar/SwPanelFactory.cxx |    2 -
 sw/source/uibase/uiview/view0.cxx           |    1 
 vcl/inc/jsdialog/enabled.hxx                |    1 
 vcl/jsdialog/enabled.cxx                    |   13 ++++++++++
 vcl/jsdialog/executor.cxx                   |    5 +++
 vcl/jsdialog/jsdialogbuilder.cxx            |    7 +++--
 vcl/jsdialog/jsdialogregister.cxx           |    2 -
 vcl/source/window/builder.cxx               |    2 +
 25 files changed, 206 insertions(+), 7 deletions(-)

New commits:
commit 20088bd544a6f93af59ef31992615e9c5c3d184e
Author:     NickWingate <[email protected]>
AuthorDate: Mon Jul 14 09:07:19 2025 +0100
Commit:     Szymon Kłos <[email protected]>
CommitDate: Tue Nov 18 10:46:42 2025 +0100

    Detach QuickFindPanel
    
    Main changes are:
    1) new jsontype: `quickfind`
    2) send the full json when constructed
    3) create new .uno:QuickFind
    4) create wrapper and window to register
       QuickFindPanel as a DockingWindow so that we
       can create it from CreateChildWinow without
       going through sidebar
    5) Register SID_QUICKFIND as a ChildWindow in
       the SwView interface
    
    Signed-off-by: NickWingate <[email protected]>
    Change-Id: I2086316b932c1495b0adee7a062bdbbcb104f1ee
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188667
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Szymon Kłos <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194144
    Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 37455dc26088..cffbfcafe6df 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -5163,6 +5163,8 @@ static void lcl_sendDialogEvent(unsigned long long int 
nWindowId, const char* pA
             sWindowId = sCurrentShellId + "formulabar";
         if (nWindowId == static_cast<unsigned long long int>(-4))
             sWindowId = sCurrentShellId + "addressinputfield";
+        if (nWindowId == static_cast<unsigned long long int>(-5))
+            sWindowId = sCurrentShellId + "quickfind";
 
         // dialogs send own id but notebookbar and sidebar controls are 
remembered by SfxViewShell id
         if (jsdialog::ExecuteAction(sWindowId, sControlId, aMap))
@@ -5172,6 +5174,8 @@ static void lcl_sendDialogEvent(unsigned long long int 
nWindowId, const char* pA
             return;
         if (jsdialog::ExecuteAction(sCurrentShellId + "navigator", sControlId, 
aMap))
             return;
+        if (jsdialog::ExecuteAction(sCurrentShellId + "quickfind", sControlId, 
aMap))
+            return;
         if (jsdialog::ExecuteAction(sCurrentShellId + "notebookbar", 
sControlId, aMap))
             return;
         if (jsdialog::ExecuteAction(sCurrentShellId + "formulabar", 
sControlId, aMap))
diff --git a/include/sfx2/quickfind.hxx b/include/sfx2/quickfind.hxx
new file mode 100644
index 000000000000..914606eeb05e
--- /dev/null
+++ b/include/sfx2/quickfind.hxx
@@ -0,0 +1,32 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+#include <sfx2/childwin.hxx>
+#include <sfx2/dockwin.hxx>
+
+class SFX2_DLLPUBLIC SfxQuickFindWrapper : public SfxChildWindow
+{
+protected:
+    void Initialize();
+
+public:
+    SfxQuickFindWrapper(vcl::Window* pParent, sal_uInt16 nId);
+};
+
+class SFX2_DLLPUBLIC SfxQuickFind : public SfxDockingWindow
+{
+public:
+    SfxQuickFind(SfxBindings* pBindings, SfxChildWindow* pChildWin, 
vcl::Window* pParent,
+                 SfxChildWinInfo* pInfo);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 6077789da3ee..3da55d478324 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -598,6 +598,7 @@ class SvxZoomItem;
 #define SID_HYPERLINK_SETLINK               
TypedWhichId<SvxHyperlinkItem>(SID_SVX_START + 362)
 #define SID_INFOBAR                         (SID_SVX_START + 365)
 #define SID_NAVIGATOR                       (SID_SVX_START + 366)
+#define SID_QUICKFIND                       (SID_SVX_START + 367)
 #define SID_ZOOM_NEXT                       (SID_SVX_START + 402)
 #define SID_ZOOM_PREV                       (SID_SVX_START + 403)
 #define SID_INET_DLG                        (SID_SVX_START + 416)
diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index e1dd32e26203..d6ef55d4b10b 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -233,6 +233,7 @@
 #define STR_DELETE_STYLE_USED                   NC_("STR_DELETE_STYLE_USED", 
"One or more of the selected styles is in use in this document.
If you will delete it, text or objects using these styles will revert to the 
parent style.
Do you still wish to delete these styles?
")
 #define STR_DELETE_STYLE                        NC_("STR_DELETE_STYLE", 
"Styles in use: ")
 #define STR_SID_NAVIGATOR                       NC_("STR_SID_NAVIGATOR", 
"Navigator")
+#define STR_SID_QUICKFIND                       NC_("STR_SID_QUICKFIND", 
"Quick Find")
 #define STR_ERROR_WRONG_CONFIRM                 NC_("STR_ERROR_WRONG_CONFIRM", 
"Faulty password confirmation")
 #define STR_PDF_EXPORT_SEND                     NC_("STR_PDF_EXPORT_SEND", 
"Send")
 #define STR_FONT_TABPAGE                        NC_("STR_FONT_TABPAGE", "Font")
diff --git a/include/vcl/jsdialog/executor.hxx 
b/include/vcl/jsdialog/executor.hxx
index 02e2f16d5856..b421c4e7cc5b 100644
--- a/include/vcl/jsdialog/executor.hxx
+++ b/include/vcl/jsdialog/executor.hxx
@@ -163,6 +163,7 @@ typedef std::unordered_map<OString, OUString> ActionDataMap;
 
 VCL_DLLPUBLIC void SendNavigatorForView(const sal_uInt64 nShellId);
 VCL_DLLPUBLIC void SendSidebarForView(const sal_uInt64 nShellId);
+VCL_DLLPUBLIC void SendQuickFindForView(const sal_uInt64 nShellId);
 
 /// execute action on a widget
 VCL_DLLPUBLIC bool ExecuteAction(const OUString& nWindowId, const OUString& 
rWidget,
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 9dd671effc22..ffd746efa7d7 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -189,6 +189,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
     sfx2/source/dialog/bluthsnd \
     sfx2/source/dialog/mgetempl \
     sfx2/source/dialog/navigat \
+    sfx2/source/dialog/quickfind \
     sfx2/source/dialog/newstyle \
     sfx2/source/dialog/partwnd \
     sfx2/source/dialog/passwd \
diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk
index 0f0492a4527d..79bec2ca159e 100644
--- a/sfx2/UIConfig_sfx.mk
+++ b/sfx2/UIConfig_sfx.mk
@@ -57,6 +57,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
        sfx2/uiconfig/ui/notebookbarpopup \
        sfx2/uiconfig/ui/printeroptionsdialog \
        sfx2/uiconfig/ui/querysavedialog \
+       sfx2/uiconfig/ui/quickfind \
        sfx2/uiconfig/ui/saveastemplatedlg \
        sfx2/uiconfig/ui/safemodequerydialog \
        sfx2/uiconfig/ui/searchdialog \
diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi
index b10f05a4ffbd..fb9e65b6dcc2 100644
--- a/sfx2/sdi/frmslots.sdi
+++ b/sfx2/sdi/frmslots.sdi
@@ -33,6 +33,11 @@ interface Window
         ExecMethod = ChildWindowExecute ;
         StateMethod = ChildWindowState ;
     ]
+    SID_QUICKFIND
+    [
+        ExecMethod = ChildWindowExecute ;
+        StateMethod = ChildWindowState ;
+    ]
     SID_INFOBAR // status(final|play)
     [
         ExecMethod = ChildWindowExecute ;
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 3f1671cbdbf5..76af1e208b3c 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -2651,6 +2651,22 @@ SfxBoolItem Navigator SID_NAVIGATOR
     GroupId = SfxGroupId::Navigator;
 ]
 
+SfxBoolItem QuickFind SID_QUICKFIND
+[
+    AutoUpdate = TRUE,
+    FastCall = FALSE,
+    ReadOnlyDoc = TRUE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+
+    AccelConfig = TRUE,
+    MenuConfig = TRUE,
+    ToolBoxConfig = TRUE,
+    GroupId = ;
+]
+
 SfxBoolItem InfoBar SID_INFOBAR
 [
     AutoUpdate = FALSE,
diff --git a/sfx2/source/dialog/quickfind.cxx b/sfx2/source/dialog/quickfind.cxx
new file mode 100644
index 000000000000..8f126e69fbc6
--- /dev/null
+++ b/sfx2/source/dialog/quickfind.cxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include <sal/config.h>
+
+#include <sfx2/bindings.hxx>
+#include <sfx2/quickfind.hxx>
+#include <sfx2/strings.hrc>
+#include <sfx2/sfxresid.hxx>
+#include <helpids.h>
+
+SfxQuickFindWrapper::SfxQuickFindWrapper(vcl::Window* pParentWnd, sal_uInt16 
nId)
+    : SfxChildWindow(pParentWnd, nId)
+{
+}
+
+void SfxQuickFindWrapper::Initialize() { SetHideNotDelete(true); }
+
+SfxQuickFind::SfxQuickFind(SfxBindings* pBind, SfxChildWindow* pChildWin, 
vcl::Window* pParent,
+                           SfxChildWinInfo* pInfo)
+    : SfxDockingWindow(pBind, pChildWin, pParent, u"QuickFind"_ustr, 
u"sfx/ui/quickfind.ui"_ustr)
+{
+    SetText(SfxResId(STR_SID_QUICKFIND));
+    SetHelpId(HID_QUICKFIND_WINDOW);
+    SetOutputSizePixel(Size(270, 240));
+    Initialize(pInfo);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/inc/helpids.h b/sfx2/source/inc/helpids.h
index 33d165828368..0ee1b89b9a64 100644
--- a/sfx2/source/inc/helpids.h
+++ b/sfx2/source/inc/helpids.h
@@ -27,6 +27,7 @@ inline constexpr OUString HID_TEMPLDLG_NEWBYEXAMPLE = 
u"SFX2_HID_TEMPLDLG_NEWBYE
 inline constexpr OUString HID_TEMPLDLG_UPDATEBYEXAMPLE = 
u"SFX2_HID_TEMPLDLG_UPDATEBYEXAMPLE"_ustr;
 inline constexpr OUString HID_TEMPLDLG_WATERCAN = 
u"SFX2_HID_TEMPLDLG_WATERCAN"_ustr;
 inline constexpr OUString HID_NAVIGATOR_WINDOW = 
u"SFX2_HID_NAVIGATOR_WINDOW"_ustr;
+inline constexpr OUString HID_QUICKFIND_WINDOW = 
u"SFX2_HID_QUICKFIND_WINDOW"_ustr;
 inline constexpr OUString HID_TABDLG_RESET_BTN = 
u"SFX2_HID_TABDLG_RESET_BTN"_ustr;
 inline constexpr OUString HID_TABDLG_STANDARD_BTN = 
u"SFX2_HID_TABDLG_STANDARD_BTN"_ustr;
 inline constexpr OUString HID_TEMPLDLG_TOOLBOX_LEFT = 
u"SFX2_HID_TEMPLDLG_TOOLBOX_LEFT"_ustr;
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index c33d7b4f5414..45a82fcf3e90 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -3681,6 +3681,10 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState )
                 rState.Put( SfxBoolItem( nSID, HasChildWindow( nSID ) ) );
             }
         }
+        else if ( nSID == SID_QUICKFIND )
+        {
+            rState.Put( SfxBoolItem( nSID, HasChildWindow(nSID) ) );
+        }
         else if ( KnowsChildWindow(nSID) )
             rState.Put( SfxBoolItem( nSID, HasChildWindow(nSID) ) );
         else
diff --git a/sfx2/uiconfig/ui/quickfind.ui b/sfx2/uiconfig/ui/quickfind.ui
new file mode 100644
index 000000000000..31a0d47e4f8f
--- /dev/null
+++ b/sfx2/uiconfig/ui/quickfind.ui
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.38.2 -->
+<interface domain="sfx">
+  <requires lib="gtk+" version="3.24"/>
+  <object class="GtkBox" id="QuickFind">
+    <property name="visible">True</property>
+    <property name="can-focus">False</property>
+    <property name="hexpand">True</property>
+    <property name="vexpand">True</property>
+    <child>
+      <placeholder/>
+    </child>
+  </object>
+</interface>
diff --git a/static/CustomTarget_emscripten_fs_image.mk 
b/static/CustomTarget_emscripten_fs_image.mk
index 202b324391a3..5860d4158882 100644
--- a/static/CustomTarget_emscripten_fs_image.mk
+++ b/static/CustomTarget_emscripten_fs_image.mk
@@ -752,6 +752,7 @@ gb_emscripten_fs_image_files += \
     
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/ui/selectblockdialog.ui
 \
     
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/ui/selectindexdialog.ui
 \
     
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/ui/selecttabledialog.ui
 \
+    
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/ui/sidebarquickfind.ui
 \
     
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/ui/sidebarstylepresets.ui
 \
     
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/ui/sidebartableedit.ui
 \
     
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/ui/sidebartheme.ui
 \
@@ -1444,6 +1445,7 @@ gb_emscripten_fs_image_files += \
     $(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/sfx/ui/password.ui \
     
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/sfx/ui/printeroptionsdialog.ui
 \
     
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/sfx/ui/querysavedialog.ui \
+    $(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/sfx/ui/quickfind.ui \
     
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/sfx/ui/safemodequerydialog.ui
 \
     
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/sfx/ui/saveastemplatedlg.ui 
\
     $(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/sfx/ui/searchdialog.ui 
\
diff --git a/sw/source/uibase/app/swmodule.cxx 
b/sw/source/uibase/app/swmodule.cxx
index 7d3cf07e2f47..3c6bf457859a 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -73,6 +73,7 @@
 #include <wtabsh.hxx>
 #include <navipi.hxx>
 #include <init.hxx>
+#include <QuickFindPanel.hxx>
 #include <inputwin.hxx>
 #include <usrpref.hxx>
 #include <uinums.hxx>
@@ -334,6 +335,7 @@ void SwDLL::RegisterControls()
     ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindow(false, pMod);
 
     SwNavigatorWrapper::RegisterChildWindow(false, pMod, 
SfxChildWindowFlags::NEVERHIDE);
+    ::sw::sidebar::QuickFindPanelWrapper::RegisterChildWindow(false, pMod, 
SfxChildWindowFlags::FORCEDOCK);
 
     SwJumpToSpecificPageControl::RegisterControl(SID_JUMP_TO_SPECIFIC_PAGE, 
pMod);
 }
diff --git a/sw/source/uibase/sidebar/QuickFindPanel.hxx 
b/sw/source/uibase/inc/QuickFindPanel.hxx
similarity index 84%
rename from sw/source/uibase/sidebar/QuickFindPanel.hxx
rename to sw/source/uibase/inc/QuickFindPanel.hxx
index a5c109f090f7..537610a0357d 100644
--- a/sw/source/uibase/sidebar/QuickFindPanel.hxx
+++ b/sw/source/uibase/inc/QuickFindPanel.hxx
@@ -10,10 +10,12 @@
 
 #pragma once
 #include <sfx2/sidebar/PanelLayout.hxx>
+#include <sfx2/quickfind.hxx>
 #include <svx/svxdlg.hxx>
-#include <wrtsh.hxx>
+#include "wrtsh.hxx"
 
 #include <sfx2/bindings.hxx>
+#include <sfx2/weldutils.hxx>
 #include <svtools/acceleratorexecute.hxx>
 
 namespace sw::sidebar
@@ -55,6 +57,7 @@ public:
     virtual ~QuickFindPanel() override;
 
 private:
+    friend class QuickFindPanelWindow;
     std::vector<std::unique_ptr<SwPaM>> m_vPaMs;
 
     std::unique_ptr<weld::Entry> m_xSearchFindEntry;
@@ -93,5 +96,23 @@ private:
     void FillSearchFindsList();
     bool UpgradeSearchToSearchDialog();
 };
+
+class QuickFindPanelWrapper : public SfxQuickFindWrapper
+{
+public:
+    QuickFindPanelWrapper(vcl::Window* pParent, sal_uInt16 nId, SfxBindings* 
pBindings,
+                          SfxChildWinInfo* pInfo);
+    SFX_DECL_CHILDWINDOW(QuickFindPanelWrapper);
+};
+
+class QuickFindPanelWindow : public SfxQuickFind
+{
+private:
+    std::unique_ptr<QuickFindPanel> m_xQuickFindPanel;
+
+public:
+    QuickFindPanelWindow(SfxBindings* _pBindings, SfxChildWindow* pChildWin, 
vcl::Window* pParent,
+                         SfxChildWinInfo* pInfo);
+};
 }
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/sidebar/QuickFindPanel.cxx 
b/sw/source/uibase/sidebar/QuickFindPanel.cxx
index 05d29c92ae1c..9a23a17ff360 100644
--- a/sw/source/uibase/sidebar/QuickFindPanel.cxx
+++ b/sw/source/uibase/sidebar/QuickFindPanel.cxx
@@ -8,7 +8,7 @@
  *
  */
 
-#include "QuickFindPanel.hxx"
+#include <QuickFindPanel.hxx>
 #include <svtools/colorcfg.hxx>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
 #include <comphelper/scopeguard.hxx>
@@ -23,11 +23,18 @@
 #include <cntfrm.hxx>
 #include <strings.hrc>
 #include <vcl/event.hxx>
+#include <vcl/jsdialog/executor.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/sysdata.hxx>
 #include <swwait.hxx>
 
+#include <sfx2/strings.hrc>
+#include <sfx2/sfxresid.hxx>
+#include <sfx2/childwin.hxx>
+#include <sfx2/bindings.hxx>
+
 #include <svx/srchdlg.hxx>
+#include <comphelper/lok.hxx>
 #include <comphelper/processfactory.hxx>
 
 const int CharactersBeforeAndAfter = 40;
@@ -98,6 +105,25 @@ IMPL_LINK_NOARG(QuickFindPanel::SearchOptionsDialog, 
SimilaritySettingsDialogBut
     }
 }
 
+QuickFindPanelWindow::QuickFindPanelWindow(SfxBindings* _pBindings, 
SfxChildWindow* pChildWin,
+                                           vcl::Window* pParent, 
SfxChildWinInfo* pInfo)
+    : SfxQuickFind(_pBindings, pChildWin, pParent, pInfo)
+    , m_xQuickFindPanel(std::make_unique<QuickFindPanel>(m_xContainer.get(),
+                                                         
_pBindings->GetActiveFrame(), _pBindings))
+{
+    _pBindings->Invalidate(SID_QUICKFIND);
+}
+
+QuickFindPanelWrapper::QuickFindPanelWrapper(vcl::Window* pParent, sal_uInt16 
nId,
+                                             SfxBindings* pBindings, 
SfxChildWinInfo* pInfo)
+    : SfxQuickFindWrapper(pParent, nId)
+{
+    SetWindow(VclPtr<QuickFindPanelWindow>::Create(pBindings, this, pParent, 
pInfo));
+    Initialize();
+}
+
+SFX_IMPL_DOCKINGWINDOW(QuickFindPanelWrapper, SID_QUICKFIND);
+
 std::unique_ptr<PanelLayout>
 QuickFindPanel::Create(weld::Widget* pParent,
                        const css::uno::Reference<css::frame::XFrame>& rxFrame,
@@ -126,6 +152,14 @@ QuickFindPanel::QuickFindPanel(weld::Widget* pParent, 
const uno::Reference<frame
 {
     m_xAcceleratorExecute->init(comphelper::getProcessComponentContext(), 
rxFrame);
 
+    if (comphelper::LibreOfficeKit::isActive())
+    {
+        sal_uInt64 nShellId = 
reinterpret_cast<sal_uInt64>(SfxViewShell::Current());
+        jsdialog::SendQuickFindForView(nShellId);
+
+        // disable search options for online as still tunnled dialog
+        m_xSearchOptionsToolbar->set_visible(false);
+    }
     m_nMinimumPanelWidth
         = 
m_xBuilder->weld_widget(u"box"_ustr)->get_preferred_size().getWidth() + (6 * 2) 
+ 6;
     m_xContainer->set_size_request(m_nMinimumPanelWidth, 1);
diff --git a/sw/source/uibase/sidebar/SwPanelFactory.cxx 
b/sw/source/uibase/sidebar/SwPanelFactory.cxx
index 93873b05014a..299d40beed9e 100644
--- a/sw/source/uibase/sidebar/SwPanelFactory.cxx
+++ b/sw/source/uibase/sidebar/SwPanelFactory.cxx
@@ -28,7 +28,7 @@
 #include "PageFormatPanel.hxx"
 #include "PageHeaderPanel.hxx"
 #include "PageFooterPanel.hxx"
-#include "QuickFindPanel.hxx"
+#include <QuickFindPanel.hxx>
 #include "WrapPropertyPanel.hxx"
 #include "WriterInspectorTextPanel.hxx"
 #include "TableEditPanel.hxx"
diff --git a/sw/source/uibase/uiview/view0.cxx 
b/sw/source/uibase/uiview/view0.cxx
index e88730ce0ba7..4307b942dd93 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -93,6 +93,7 @@ SFX_IMPL_INTERFACE(SwView, SfxViewShell)
 void SwView::InitInterface_Impl()
 {
     
GetStaticInterface()->RegisterChildWindow(SwNavigatorWrapper::GetChildWindowId(),
 true); // SID_NAVIGATOR
+    GetStaticInterface()->RegisterChildWindow(SID_QUICKFIND, false);
 
     
GetStaticInterface()->RegisterChildWindow(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
 
diff --git a/vcl/inc/jsdialog/enabled.hxx b/vcl/inc/jsdialog/enabled.hxx
index eedf83f69a21..31dad161b48f 100644
--- a/vcl/inc/jsdialog/enabled.hxx
+++ b/vcl/inc/jsdialog/enabled.hxx
@@ -22,6 +22,7 @@ bool isBuilderEnabledForSidebar(std::u16string_view rUIFile);
 bool isBuilderEnabledForAddressInput(std::u16string_view rUIFile);
 bool isBuilderEnabledForFormulabar(std::u16string_view rUIFile);
 bool isBuilderEnabledForNavigator(std::u16string_view rUIFile);
+bool isBuilderEnabledForQuickFind(std::u16string_view rUIFile);
 bool isInterimBuilderEnabledForNotebookbar(std::u16string_view rUIFile);
 }
 
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 0c2cc3df49a6..ebf4a49b2ebe 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -37,6 +37,7 @@ constexpr auto IgnoredList
         { u"modules/scalc/ui/dropmenu.ui"}, // Calc -> Navigator -> right click
         { u"modules/sdraw/ui/navigatorcontextmenu.ui" }, // Impress -> 
Navigator -> right click
         { u"modules/swriter/ui/navigatorcontextmenu.ui" }, // Writer -> 
Navigator -> right click
+        { u"sfx/ui/quickfind.ui" },
     });
 
 // ========== MOBILE DIALOGS ================================================= 
//
@@ -478,6 +479,13 @@ constexpr auto NavigatorList
         { u"modules/simpress/ui/navigatorpanel.ui"}
 });
 
+// ========== QUICKFIND ================================================= //
+constexpr auto QuickFindList
+    = frozen::make_unordered_set<std::u16string_view>({
+        { u"modules/swriter/ui/sidebarquickfind.ui" },
+});
+
+
 // ========== NOTEBOOKBAR ================================================= //
 
 constexpr auto NotebookbarList
@@ -602,6 +610,11 @@ bool isBuilderEnabledForNavigator(std::u16string_view 
rUIFile)
         return isInMap(NavigatorList, rUIFile);
 }
 
+bool isBuilderEnabledForQuickFind(std::u16string_view rUIFile)
+{
+    return isInMap(QuickFindList, rUIFile);
+}
+
 bool isInterimBuilderEnabledForNotebookbar(std::u16string_view rUIFile)
 {
     return isInMap(NotebookbarList, rUIFile);
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 36fdea81b9ae..e23c33116e38 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -103,6 +103,11 @@ void SendSidebarForView(const sal_uInt64 nShellId)
     jsdialog::SendFullUpdate(OUString::number(nShellId) + "sidebar", "Panel");
 }
 
+void SendQuickFindForView(const sal_uInt64 nShellId)
+{
+    jsdialog::SendFullUpdate(OUString::number(nShellId) + "quickfind", 
"QuickFindPanel");
+}
+
 void SendFullUpdate(const OUString& nWindowId, const OUString& rWidget)
 {
     auto aWidgetMap = JSInstanceBuilder::Widgets().Find(nWindowId);
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 21f2c3f08785..35e61371c82f 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -186,7 +186,8 @@ void JSInstanceBuilder::initializeSidebarSender(sal_uInt64 
nLOKWindowId,
 
     m_aParentDialog = pRoot->GetParentWithLOKNotifier();
 
-    bool bIsNavigatorPanel = jsdialog::isBuilderEnabledForNavigator(rUIFile);
+    bool bIsDockingWindow = jsdialog::isBuilderEnabledForNavigator(rUIFile)
+                            || jsdialog::isBuilderEnabledForQuickFind(rUIFile);
 
     // builder for Panel, PanelLayout, and DockingWindow
     // get SidebarDockingWindow, or SwNavigatorWin as m_aContentWindow
@@ -195,7 +196,7 @@ void JSInstanceBuilder::initializeSidebarSender(sal_uInt64 
nLOKWindowId,
     //      Panel        : 7 levels up from pRoot
     //      DockingWindow: 3 levels up from pRoot
     unsigned nLevelsUp = 100; // limit
-    if (bIsNavigatorPanel)
+    if (bIsDockingWindow)
         nLevelsUp = 3;
 
     if (nLevelsUp > 0)
@@ -207,7 +208,7 @@ void JSInstanceBuilder::initializeSidebarSender(sal_uInt64 
nLOKWindowId,
         m_aContentWindow = pRoot;
         for (unsigned i = 0; i < nLevelsUp && m_aContentWindow; i++)
         {
-            if (!bIsNavigatorPanel && m_aContentWindow->get_id() == "Deck")
+            if (!bIsDockingWindow && m_aContentWindow->get_id() == "Deck")
                 nLevelsUp = i + 3;
 
             // Useful to check if any panel doesn't appear
diff --git a/vcl/jsdialog/jsdialogregister.cxx 
b/vcl/jsdialog/jsdialogregister.cxx
index 8f064107e528..1342d649d8b6 100644
--- a/vcl/jsdialog/jsdialogregister.cxx
+++ b/vcl/jsdialog/jsdialogregister.cxx
@@ -16,7 +16,7 @@ OUString JSInstanceBuilder::getMapIdFromWindowId() const
 {
     if (m_sTypeOfJSON == "sidebar" || m_sTypeOfJSON == "notebookbar"
         || m_sTypeOfJSON == "formulabar" || m_sTypeOfJSON == 
"addressinputfield"
-        || m_sTypeOfJSON == "navigator")
+        || m_sTypeOfJSON == "navigator" || m_sTypeOfJSON == "quickfind")
     {
         return OUString::number(m_nWindowId) + m_sTypeOfJSON;
     }
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 9496ff1f7589..59d5bc9073c1 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -197,6 +197,8 @@ std::unique_ptr<weld::Builder> 
Application::CreateBuilder(weld::Widget* pParent,
             return JSInstanceBuilder::CreateMenuBuilder(pParent, 
AllSettings::GetUIRootDir(), rUIFile);
         else if (jsdialog::isBuilderEnabledForNavigator(rUIFile))
             return JSInstanceBuilder::CreateSidebarBuilder(pParent, 
AllSettings::GetUIRootDir(), rUIFile, "navigator", nLOKWindowId);
+        else if (jsdialog::isBuilderEnabledForQuickFind(rUIFile))
+            return JSInstanceBuilder::CreateSidebarBuilder(pParent, 
AllSettings::GetUIRootDir(), rUIFile, "quickfind", nLOKWindowId);
         else if (jsdialog::isBuilderEnabled(rUIFile, bMobile))
             return JSInstanceBuilder::CreateDialogBuilder(pParent, 
AllSettings::GetUIRootDir(), rUIFile);
         // this is notebookbar widget but converted from sidebar panel

Reply via email to