sw/UIConfig_swriter.mk                                  |    1 
 sw/source/uibase/inc/QuickFindPanel.hxx                 |   66 +---
 sw/source/uibase/sidebar/QuickFindPanel.cxx             |  140 ++++------
 sw/uiconfig/swriter/ui/sidebarquickfind.ui              |  210 ++++++++++++++-
 sw/uiconfig/swriter/ui/sidebarquickfindoptionsdialog.ui |  215 ----------------
 5 files changed, 279 insertions(+), 353 deletions(-)

New commits:
commit 76ce5b6615219b177e619ebba36316389bfb8797
Author:     Vojtěch Doležal <[email protected]>
AuthorDate: Fri Feb 20 16:39:19 2026 +0100
Commit:     Jim Raykowski <[email protected]>
CommitDate: Thu Mar 5 07:21:35 2026 +0100

    tdf#170980: Writer QuickFind history and options "expander"
    
    Change-Id: Iddef6325ae22b0fa5e9a596003bd6670b7cd8d8a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199892
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <[email protected]>

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 20bb54773c89..627588d85690 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -298,7 +298,6 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
        sw/uiconfig/swriter/ui/sidebartableedit \
        sw/uiconfig/swriter/ui/sidebartheme \
        sw/uiconfig/swriter/ui/sidebarquickfind \
-        sw/uiconfig/swriter/ui/sidebarquickfindoptionsdialog \
        sw/uiconfig/swriter/ui/sortdialog \
        sw/uiconfig/swriter/ui/spellmenu \
        sw/uiconfig/swriter/ui/splittable \
diff --git a/sw/source/uibase/inc/QuickFindPanel.hxx 
b/sw/source/uibase/inc/QuickFindPanel.hxx
index 27346e88bdec..f530f77d3946 100644
--- a/sw/source/uibase/inc/QuickFindPanel.hxx
+++ b/sw/source/uibase/inc/QuickFindPanel.hxx
@@ -17,6 +17,7 @@
 #include <sfx2/bindings.hxx>
 #include <sfx2/weldutils.hxx>
 #include <svtools/acceleratorexecute.hxx>
+#include <vcl/weld/ComboBox.hxx>
 #include <vcl/weld/DialogController.hxx>
 #include <vcl/weld/Entry.hxx>
 #include <vcl/weld/Toolbar.hxx>
@@ -26,33 +27,6 @@ namespace sw::sidebar
 {
 class QuickFindPanel : public PanelLayout
 {
-    class SearchOptionsDialog final : public weld::GenericDialogController
-    {
-        friend class QuickFindPanel;
-
-        std::unique_ptr<weld::CheckButton> m_xMatchCaseCheckButton;
-        std::unique_ptr<weld::CheckButton> m_xWholeWordsOnlyCheckButton;
-        std::unique_ptr<weld::CheckButton> m_xCommentsCheckButton;
-        std::unique_ptr<weld::CheckButton> m_xRegularExpressionsCheckButton;
-        std::unique_ptr<weld::CheckButton> m_xSimilarityCheckButton;
-        std::unique_ptr<weld::Button> m_xSimilaritySettingsDialogButton;
-
-        DECL_LINK(SimilarityCheckButtonToggledHandler, weld::Toggleable&, 
void);
-        DECL_LINK(SimilaritySettingsDialogButtonClickedHandler, weld::Button&, 
void);
-
-        short executeSubDialog(VclAbstractDialog* pVclAbstractDialog);
-
-        bool m_executingSubDialog = false;
-
-        bool m_bIsLEVRelaxed = true;
-        sal_uInt16 m_nLEVOther = 2;
-        sal_uInt16 m_nLEVShorter = 2;
-        sal_uInt16 m_nLEVLonger = 2;
-
-    public:
-        SearchOptionsDialog(weld::Window* pParent);
-    };
-
 public:
     static std::unique_ptr<PanelLayout> Create(weld::Widget* pParent,
                                                const 
uno::Reference<frame::XFrame>& rxFrame,
@@ -66,35 +40,40 @@ private:
     friend class QuickFindPanelWindow;
     std::vector<std::unique_ptr<SwPaM>> m_vPaMs;
 
-    std::unique_ptr<weld::Entry> m_xSearchFindEntry;
+    std::unique_ptr<weld::ComboBox> m_xSearchComboBox;
     std::unique_ptr<weld::Toolbar> m_xSearchOptionsToolbar;
     std::unique_ptr<weld::Toolbar> m_xFindAndReplaceToolbar;
     std::unique_ptr<ToolbarUnoDispatcher> m_xFindAndReplaceToolbarDispatch;
     std::unique_ptr<weld::Box> m_xTopbar;
+    std::unique_ptr<weld::Box> m_xSearchOptionsBox;
     std::unique_ptr<weld::TreeView> m_xSearchFindsList;
     std::unique_ptr<weld::Label> m_xSearchFindFoundTimesLabel;
 
-    SwWrtShell* m_pWrtShell;
-    std::unique_ptr<svt::AcceleratorExecute> m_xAcceleratorExecute;
+    std::unique_ptr<weld::CheckButton> m_xMatchCaseCheckButton;
+    std::unique_ptr<weld::CheckButton> m_xWholeWordsOnlyCheckButton;
+    std::unique_ptr<weld::CheckButton> m_xCommentsCheckButton;
+    std::unique_ptr<weld::CheckButton> m_xRegularExpressionsCheckButton;
+    std::unique_ptr<weld::CheckButton> m_xSimilarityCheckButton;
+    std::unique_ptr<weld::Button> m_xSimilaritySettingsDialogButton;
 
-    SfxBindings* m_pBindings;
+    bool m_executingSubDialog = false;
 
-    int m_nMinimumPanelWidth;
-
-    bool m_bMatchCase = false;
-    bool m_bWholeWordsOnly = false;
-    bool m_bComments = true;
-    bool m_bRegularExpression = false;
-    bool m_bSimilarity = false;
     bool m_bIsLEVRelaxed = true;
     sal_uInt16 m_nLEVOther = 2;
     sal_uInt16 m_nLEVShorter = 2;
     sal_uInt16 m_nLEVLonger = 2;
 
-    DECL_LINK(SearchFindEntryFocusInHandler, weld::Widget&, void);
-    DECL_LINK(SearchFindEntryActivateHandler, weld::Entry&, bool);
-    DECL_LINK(SearchFindEntryChangedHandler, weld::Entry&, void);
-    DECL_LINK(SearchFindEntryKeyInputHandler, const KeyEvent&, bool);
+    SwWrtShell* m_pWrtShell;
+    std::unique_ptr<svt::AcceleratorExecute> m_xAcceleratorExecute;
+
+    SfxBindings* m_pBindings;
+
+    int m_nMinimumPanelWidth;
+
+    DECL_LINK(SearchComboBoxFocusInHandler, weld::Widget&, void);
+    DECL_LINK(SearchComboBoxActivateHandler, weld::ComboBox&, bool);
+    DECL_LINK(SearchComboBoxChangedHandler, weld::ComboBox&, void);
+    DECL_LINK(SearchComboBoxKeyInputHandler, const KeyEvent&, bool);
     DECL_LINK(SearchFindsListCustomGetSizeHandler, 
weld::TreeView::get_size_args, Size);
     DECL_LINK(SearchFindsListRender, weld::TreeView::render_args, void);
     DECL_LINK(SearchFindsListSelectionChangedHandler, weld::TreeView&, void);
@@ -102,9 +81,12 @@ private:
     DECL_LINK(SearchFindsListMousePressHandler, const MouseEvent&, bool);
     DECL_LINK(SearchOptionsToolbarClickedHandler, const OUString&, void);
     DECL_LINK(FindAndReplaceToolbarClickedHandler, const OUString&, void);
+    DECL_LINK(SimilarityCheckButtonToggledHandler, weld::Toggleable&, void);
+    DECL_LINK(SimilaritySettingsDialogButtonClickedHandler, weld::Button&, 
void);
 
     void FillSearchFindsList();
     bool UpgradeSearchToSearchDialog();
+    short executeSubDialog(VclAbstractDialog* pVclAbstractDialog);
 };
 
 class QuickFindPanelWrapper : public SfxQuickFindWrapper
diff --git a/sw/source/uibase/sidebar/QuickFindPanel.cxx 
b/sw/source/uibase/sidebar/QuickFindPanel.cxx
index 0c22d36bd124..c22dde94b0ac 100644
--- a/sw/source/uibase/sidebar/QuickFindPanel.cxx
+++ b/sw/source/uibase/sidebar/QuickFindPanel.cxx
@@ -64,23 +64,7 @@ void getAnchorPos(SwPosition& rPos)
 
 namespace sw::sidebar
 {
-QuickFindPanel::SearchOptionsDialog::SearchOptionsDialog(weld::Window* pParent)
-    : GenericDialogController(pParent, 
u"modules/swriter/ui/sidebarquickfindoptionsdialog.ui"_ustr,
-                              u"SearchOptionsDialog"_ustr)
-    , m_xMatchCaseCheckButton(m_xBuilder->weld_check_button(u"matchcase"_ustr))
-    , 
m_xWholeWordsOnlyCheckButton(m_xBuilder->weld_check_button(u"wholewordsonly"_ustr))
-    , m_xCommentsCheckButton(m_xBuilder->weld_check_button(u"comments"_ustr))
-    , 
m_xRegularExpressionsCheckButton(m_xBuilder->weld_check_button(u"regularexpressions"_ustr))
-    , 
m_xSimilarityCheckButton(m_xBuilder->weld_check_button(u"similarity"_ustr))
-    , 
m_xSimilaritySettingsDialogButton(m_xBuilder->weld_button(u"similaritysettingsdialog"_ustr))
-{
-    m_xSimilarityCheckButton->connect_toggled(
-        LINK(this, SearchOptionsDialog, SimilarityCheckButtonToggledHandler));
-    m_xSimilaritySettingsDialogButton->connect_clicked(
-        LINK(this, SearchOptionsDialog, 
SimilaritySettingsDialogButtonClickedHandler));
-}
-
-short QuickFindPanel::SearchOptionsDialog::executeSubDialog(VclAbstractDialog* 
dialog)
+short QuickFindPanel::executeSubDialog(VclAbstractDialog* dialog)
 {
     assert(!m_executingSubDialog);
     comphelper::ScopeGuard g([this] { m_executingSubDialog = false; });
@@ -88,18 +72,16 @@ short 
QuickFindPanel::SearchOptionsDialog::executeSubDialog(VclAbstractDialog* d
     return dialog->Execute();
 }
 
-IMPL_LINK_NOARG(QuickFindPanel::SearchOptionsDialog, 
SimilarityCheckButtonToggledHandler,
-                weld::Toggleable&, void)
+IMPL_LINK_NOARG(QuickFindPanel, SimilarityCheckButtonToggledHandler, 
weld::Toggleable&, void)
 {
     
m_xSimilaritySettingsDialogButton->set_sensitive(m_xSimilarityCheckButton->get_active());
 }
 
-IMPL_LINK_NOARG(QuickFindPanel::SearchOptionsDialog, 
SimilaritySettingsDialogButtonClickedHandler,
-                weld::Button&, void)
+IMPL_LINK_NOARG(QuickFindPanel, SimilaritySettingsDialogButtonClickedHandler, 
weld::Button&, void)
 {
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
     ScopedVclPtr<AbstractSvxSearchSimilarityDialog> 
pDlg(pFact->CreateSvxSearchSimilarityDialog(
-        m_xDialog.get(), m_bIsLEVRelaxed, m_nLEVOther, m_nLEVShorter, 
m_nLEVLonger));
+        GetFrameWeld(), m_bIsLEVRelaxed, m_nLEVOther, m_nLEVShorter, 
m_nLEVLonger));
 
     if (executeSubDialog(pDlg.get()) == RET_OK)
     {
@@ -146,20 +128,28 @@ QuickFindPanel::Create(weld::Widget* pParent,
 QuickFindPanel::QuickFindPanel(weld::Widget* pParent, const 
uno::Reference<frame::XFrame>& rxFrame,
                                SfxBindings* pBindings)
     : PanelLayout(pParent, u"QuickFindPanel"_ustr, 
u"modules/swriter/ui/sidebarquickfind.ui"_ustr)
-    , m_xSearchFindEntry(m_xBuilder->weld_entry(u"Find"_ustr))
+    , m_xSearchComboBox(m_xBuilder->weld_combo_box(u"searchterm"_ustr))
     , 
m_xSearchOptionsToolbar(m_xBuilder->weld_toolbar(u"searchoptionstoolbar"_ustr))
     , 
m_xFindAndReplaceToolbar(m_xBuilder->weld_toolbar(u"findandreplacetoolbar"_ustr))
     , m_xFindAndReplaceToolbarDispatch(
           new ToolbarUnoDispatcher(*m_xFindAndReplaceToolbar, *m_xBuilder, 
rxFrame))
     , m_xTopbar(m_xBuilder->weld_box(u"topbar"_ustr))
+    , m_xSearchOptionsBox(m_xBuilder->weld_box(u"searchoptionsbox"_ustr))
     , m_xSearchFindsList(m_xBuilder->weld_tree_view(u"searchfinds"_ustr))
     , 
m_xSearchFindFoundTimesLabel(m_xBuilder->weld_label("numberofsearchfinds"))
+    , m_xMatchCaseCheckButton(m_xBuilder->weld_check_button(u"matchcase"_ustr))
+    , 
m_xWholeWordsOnlyCheckButton(m_xBuilder->weld_check_button(u"wholewordsonly"_ustr))
+    , m_xCommentsCheckButton(m_xBuilder->weld_check_button(u"comments"_ustr))
+    , 
m_xRegularExpressionsCheckButton(m_xBuilder->weld_check_button(u"regularexpressions"_ustr))
+    , 
m_xSimilarityCheckButton(m_xBuilder->weld_check_button(u"similarity"_ustr))
+    , 
m_xSimilaritySettingsDialogButton(m_xBuilder->weld_button(u"similaritysettingsdialog"_ustr))
     , m_pWrtShell(::GetActiveWrtShell())
     , m_xAcceleratorExecute(svt::AcceleratorExecute::createAcceleratorHelper())
     , m_pBindings(pBindings)
 {
     m_xAcceleratorExecute->init(comphelper::getProcessComponentContext(), 
rxFrame);
 
+    m_xSearchComboBox->set_entry_completion(false);
     if (comphelper::LibreOfficeKit::isActive())
     {
         sal_uInt64 nShellId = 
reinterpret_cast<sal_uInt64>(SfxViewShell::Current());
@@ -172,17 +162,17 @@ QuickFindPanel::QuickFindPanel(weld::Widget* pParent, 
const uno::Reference<frame
     m_nMinimumPanelWidth
         = 
m_xBuilder->weld_widget(u"box"_ustr)->get_preferred_size().getWidth() + (6 * 2) 
+ 6;
     m_xContainer->set_size_request(m_nMinimumPanelWidth, 1);
+    m_xCommentsCheckButton->set_active(true);
+    m_xSearchOptionsBox->set_visible(false);
 
-    m_xSearchFindEntry->connect_focus_in(LINK(this, QuickFindPanel, 
SearchFindEntryFocusInHandler));
-    m_xSearchFindEntry->connect_activate(
-        LINK(this, QuickFindPanel, SearchFindEntryActivateHandler));
-    m_xSearchFindEntry->connect_changed(LINK(this, QuickFindPanel, 
SearchFindEntryChangedHandler));
-    m_xSearchFindEntry->connect_key_press(
-        LINK(this, QuickFindPanel, SearchFindEntryKeyInputHandler));
+    m_xSearchComboBox->connect_focus_in(LINK(this, QuickFindPanel, 
SearchComboBoxFocusInHandler));
+    m_xSearchComboBox->connect_entry_activate(
+        LINK(this, QuickFindPanel, SearchComboBoxActivateHandler));
+    m_xSearchComboBox->connect_changed(LINK(this, QuickFindPanel, 
SearchComboBoxChangedHandler));
+    m_xSearchComboBox->connect_key_press(LINK(this, QuickFindPanel, 
SearchComboBoxKeyInputHandler));
 
     m_xSearchOptionsToolbar->connect_clicked(
         LINK(this, QuickFindPanel, SearchOptionsToolbarClickedHandler));
-
     m_xFindAndReplaceToolbar->connect_clicked(
         LINK(this, QuickFindPanel, FindAndReplaceToolbarClickedHandler));
 
@@ -195,6 +185,11 @@ QuickFindPanel::QuickFindPanel(weld::Widget* pParent, 
const uno::Reference<frame
         m_xSearchFindsList->set_column_custom_renderer(1, true);
     }
 
+    
m_xSimilaritySettingsDialogButton->set_sensitive(m_xSimilarityCheckButton->get_active());
+    m_xSimilarityCheckButton->connect_toggled(
+        LINK(this, QuickFindPanel, SimilarityCheckButtonToggledHandler));
+    m_xSimilaritySettingsDialogButton->connect_clicked(
+        LINK(this, QuickFindPanel, 
SimilaritySettingsDialogButtonClickedHandler));
     m_xSearchFindsList->connect_selection_changed(
         LINK(this, QuickFindPanel, SearchFindsListSelectionChangedHandler));
     m_xSearchFindsList->connect_row_activated(
@@ -203,42 +198,6 @@ QuickFindPanel::QuickFindPanel(weld::Widget* pParent, 
const uno::Reference<frame
         LINK(this, QuickFindPanel, SearchFindsListMousePressHandler));
 }
 
-IMPL_LINK_NOARG(QuickFindPanel, SearchOptionsToolbarClickedHandler, const 
OUString&, void)
-{
-    SearchOptionsDialog aDlg(GetFrameWeld());
-
-    aDlg.m_xMatchCaseCheckButton->set_active(m_bMatchCase);
-    aDlg.m_xWholeWordsOnlyCheckButton->set_active(m_bWholeWordsOnly);
-    aDlg.m_xCommentsCheckButton->set_active(m_bComments);
-    aDlg.m_xRegularExpressionsCheckButton->set_active(m_bRegularExpression);
-    aDlg.m_xSimilarityCheckButton->set_active(m_bSimilarity);
-    aDlg.m_xSimilaritySettingsDialogButton->set_sensitive(m_bSimilarity);
-    if (m_bSimilarity)
-    {
-        aDlg.m_bIsLEVRelaxed = m_bIsLEVRelaxed;
-        aDlg.m_nLEVOther = m_nLEVOther;
-        aDlg.m_nLEVShorter = m_nLEVShorter;
-        aDlg.m_nLEVLonger = m_nLEVLonger;
-    }
-
-    if (aDlg.run() == RET_OK)
-    {
-        m_bMatchCase = aDlg.m_xMatchCaseCheckButton->get_active();
-        m_bWholeWordsOnly = aDlg.m_xWholeWordsOnlyCheckButton->get_active();
-        m_bComments = aDlg.m_xCommentsCheckButton->get_active();
-        m_bRegularExpression = 
aDlg.m_xRegularExpressionsCheckButton->get_active();
-        m_bSimilarity = aDlg.m_xSimilarityCheckButton->get_active();
-        if (m_bSimilarity)
-        {
-            m_bIsLEVRelaxed = aDlg.m_bIsLEVRelaxed;
-            m_nLEVOther = aDlg.m_nLEVOther;
-            m_nLEVShorter = aDlg.m_nLEVShorter;
-            m_nLEVLonger = aDlg.m_nLEVLonger;
-        }
-        FillSearchFindsList();
-    }
-}
-
 // tdf#162580 related: When upgrading from Find toolbar search to advanced 
Find and Replace
 // search dialog, inherit (pre-fill) search field's term from current value of 
find bar's
 // focused search entry
@@ -255,20 +214,26 @@ bool QuickFindPanel::UpgradeSearchToSearchDialog()
     if (pSearchDialog)
     {
         pSearchDialog->SetSearchLabel(EMPTY_OUSTRING);
-        
pSearchDialog->SetSearchLBEntryTextAndGrabFocus(m_xSearchFindEntry->get_text());
+        
pSearchDialog->SetSearchLBEntryTextAndGrabFocus(m_xSearchComboBox->get_active_text());
         pSearchDialog->Present();
         return true;
     }
     return false;
 }
 
+IMPL_LINK(QuickFindPanel, SearchOptionsToolbarClickedHandler, const OUString&, 
rCommand, void)
+{
+    if (rCommand == "searchoptionsbutton")
+        m_xSearchOptionsBox->set_visible(!m_xSearchOptionsBox->get_visible());
+}
+
 IMPL_LINK(QuickFindPanel, FindAndReplaceToolbarClickedHandler, const 
OUString&, rCommand, void)
 {
     if (rCommand == "searchdialog")
         UpgradeSearchToSearchDialog();
 }
 
-IMPL_LINK(QuickFindPanel, SearchFindEntryKeyInputHandler, const KeyEvent&, 
rKeyEvent, bool)
+IMPL_LINK(QuickFindPanel, SearchComboBoxKeyInputHandler, const KeyEvent&, 
rKeyEvent, bool)
 {
     const OUString aCommand(m_xAcceleratorExecute->findCommand(
         svt::AcceleratorExecute::st_VCLKey2AWTKey(rKeyEvent.GetKeyCode())));
@@ -279,26 +244,33 @@ IMPL_LINK(QuickFindPanel, SearchFindEntryKeyInputHandler, 
const KeyEvent&, rKeyE
 
 QuickFindPanel::~QuickFindPanel()
 {
-    m_xSearchFindEntry.reset();
+    m_xSearchComboBox.reset();
     m_xSearchFindsList.reset();
     m_xAcceleratorExecute.reset();
 }
 
-IMPL_LINK_NOARG(QuickFindPanel, SearchFindEntryFocusInHandler, weld::Widget&, 
void)
+IMPL_LINK_NOARG(QuickFindPanel, SearchComboBoxFocusInHandler, weld::Widget&, 
void)
 {
-    if (m_xSearchFindEntry->get_text().getLength())
-        m_xSearchFindEntry->select_region(0, 
m_xSearchFindEntry->get_text().getLength());
+    if (m_xSearchComboBox->get_active_text().getLength())
+        m_xSearchComboBox->select_entry_region(0, 
m_xSearchComboBox->get_active_text().getLength());
 }
 
-IMPL_LINK_NOARG(QuickFindPanel, SearchFindEntryChangedHandler, weld::Entry&, 
void)
+IMPL_LINK_NOARG(QuickFindPanel, SearchComboBoxChangedHandler, weld::ComboBox&, 
void)
 {
-    m_xSearchFindEntry->set_message_type(weld::EntryMessageType::Normal);
+    m_xSearchComboBox->set_entry_message_type(weld::EntryMessageType::Normal);
     m_xSearchFindsList->clear();
     m_xSearchFindFoundTimesLabel->set_label(OUString());
+
+    if (m_xSearchComboBox->get_popup_shown() && 
m_xSearchComboBox->get_active_text().getLength())
+        FillSearchFindsList();
 }
 
-IMPL_LINK_NOARG(QuickFindPanel, SearchFindEntryActivateHandler, weld::Entry&, 
bool)
+IMPL_LINK_NOARG(QuickFindPanel, SearchComboBoxActivateHandler, 
weld::ComboBox&, bool)
 {
+    if (int pos = 
m_xSearchComboBox->find_text(m_xSearchComboBox->get_active_text()); pos != -1)
+        m_xSearchComboBox->remove(pos);
+    m_xSearchComboBox->insert_text(0, m_xSearchComboBox->get_active_text());
+
     FillSearchFindsList();
     return true;
 }
@@ -505,7 +477,7 @@ void QuickFindPanel::FillSearchFindsList()
     m_xSearchFindsList->clear();
     m_xSearchFindFoundTimesLabel->set_label(OUString());
 
-    const OUString sFindEntry = m_xSearchFindEntry->get_text();
+    const OUString sFindEntry = m_xSearchComboBox->get_active_text();
     if (sFindEntry.isEmpty())
         return;
 
@@ -517,15 +489,15 @@ void QuickFindPanel::FillSearchFindsList()
     aSearchOptions.Locale = GetAppLanguageTag().getLocale();
     aSearchOptions.searchString = sFindEntry;
     aSearchOptions.replaceString.clear();
-    if (m_bRegularExpression)
+    if (m_xRegularExpressionsCheckButton->get_active())
     {
         aSearchOptions.AlgorithmType2 = css::util::SearchAlgorithms2::REGEXP;
     }
     else
     {
-        if (m_bWholeWordsOnly)
+        if (m_xWholeWordsOnlyCheckButton->get_active())
             aSearchOptions.searchFlag |= 
css::util::SearchFlags::NORM_WORD_ONLY;
-        if (m_bSimilarity)
+        if (m_xSimilarityCheckButton->get_active())
         {
             aSearchOptions.AlgorithmType2 = 
css::util::SearchAlgorithms2::APPROXIMATE;
             if (m_bIsLEVRelaxed)
@@ -538,14 +510,14 @@ void QuickFindPanel::FillSearchFindsList()
             aSearchOptions.AlgorithmType2 = 
css::util::SearchAlgorithms2::ABSOLUTE;
     }
     TransliterationFlags nTransliterationFlags = 
TransliterationFlags::IGNORE_WIDTH;
-    if (!m_bMatchCase)
+    if (!m_xMatchCaseCheckButton->get_active())
         nTransliterationFlags |= TransliterationFlags::IGNORE_CASE;
     aSearchOptions.transliterateFlags = nTransliterationFlags;
 
     m_pWrtShell->StartAllAction();
     /*sal_Int32 nFound =*/m_pWrtShell->SearchPattern(
-        aSearchOptions, m_bComments, SwDocPositions::Start, 
SwDocPositions::End,
-        FindRanges::InBody | FindRanges::InSelAll, false);
+        aSearchOptions, m_xCommentsCheckButton->get_active(), 
SwDocPositions::Start,
+        SwDocPositions::End, FindRanges::InBody | FindRanges::InSelAll, false);
     m_pWrtShell->EndAllAction();
 
     if (m_pWrtShell->HasMark())
@@ -712,8 +684,8 @@ void QuickFindPanel::FillSearchFindsList()
     auto nSearchFindFoundTimes = m_vPaMs.size();
 
     // set the search term entry background
-    m_xSearchFindEntry->set_message_type(nSearchFindFoundTimes ? 
weld::EntryMessageType::Normal
-                                                               : 
weld::EntryMessageType::Error);
+    m_xSearchComboBox->set_entry_message_type(
+        nSearchFindFoundTimes ? weld::EntryMessageType::Normal : 
weld::EntryMessageType::Error);
     // make the search finds list focusable or not
     m_xSearchFindsList->set_sensitive(bool(nSearchFindFoundTimes));
 
diff --git a/sw/uiconfig/swriter/ui/sidebarquickfind.ui 
b/sw/uiconfig/swriter/ui/sidebarquickfind.ui
index 189efbe8a3a5..516353b6b899 100644
--- a/sw/uiconfig/swriter/ui/sidebarquickfind.ui
+++ b/sw/uiconfig/swriter/ui/sidebarquickfind.ui
@@ -31,16 +31,28 @@
           <object class="GtkBox" id="topbar">
             <property name="visible">True</property>
             <property name="can-focus">False</property>
-            <property name="spacing">2</property>
             <child>
-              <object class="GtkEntry" id="Find">
+              <object class="GtkComboBoxText" id="searchterm">
                 <property name="visible">True</property>
-                <property name="can-focus">True</property>
-                <property name="truncate-multiline">True</property>
-                <property name="placeholder-text" translatable="yes" 
context="sidebarquickfind|find">Find</property>
+                <property name="can-focus">False</property>
+                <property name="valign">center</property>
+                <property name="hexpand">True</property>
+                <property name="has-entry">True</property>
+                <child internal-child="entry">
+                  <object class="GtkEntry">
+                    <property name="can-focus">True</property>
+                    <property name="activates-default">True</property>
+                    <property name="truncate-multiline">True</property>
+                  </object>
+                </child>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="searchterm-atkobject">
+                    <property name="AtkObject::accessible-description" 
translatable="yes" context="quickfindpanel|extended_tip|searchterm">Enter the 
text that you want to find, or select a previous search from the 
list.</property>
+                  </object>
+                </child>
               </object>
               <packing>
-                <property name="expand">True</property>
+                <property name="expand">False</property>
                 <property name="fill">True</property>
                 <property name="position">0</property>
               </packing>
@@ -52,15 +64,15 @@
                 <property name="toolbar-style">icons</property>
                 <property name="show-arrow">False</property>
                 <child>
-                  <object class="GtkToolButton" id="searchoptions">
+                  <object class="GtkToolButton" id="searchoptionsbutton">
                     <property name="visible">True</property>
                     <property name="can-focus">False</property>
                     <property name="tooltip-text" translatable="yes" 
context="quickfindpanel|moresearchoptions|tooltip_text">Search 
Options</property>
-                    <property name="icon-name">sw/res/sr20006.png</property>
+                    <property 
name="icon-name">cmd/sc_symbolshapes.flower.png</property>
                     <child internal-child="accessible">
                       <object class="AtkObject" id="searchoptions-atkobject">
-                        <property name="AtkObject::accessible-name" 
translatable="yes" 
context="quickfindpanel|moresearchoptions|accessible_name">More Search 
Options</property>
-                        <property name="AtkObject::accessible-description" 
translatable="yes" 
context="quickfindpanel|extended_tip|moresearchoptions">Click here to open a 
dialog to set more search options.</property>
+                        <property name="AtkObject::accessible-name" 
translatable="yes" 
context="quickfindpanel|moresearchoptions|accessible_name">Search 
Options</property>
+                        <property name="AtkObject::accessible-description" 
translatable="yes" 
context="quickfindpanel|extended_tip|moresearchoptions">Click here to show more 
search options.</property>
                       </object>
                     </child>
                   </object>
@@ -114,6 +126,182 @@
             <property name="position">0</property>
           </packing>
         </child>
+        <child>
+          <object class="GtkBox" id="topbar1">
+            <property name="visible">True</property>
+            <property name="can-focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkBox" id="searchoptionsbox">
+                <property name="visible">True</property>
+                <property name="can-focus">False</property>
+                <property name="margin-start">6</property>
+                <property name="margin-end">6</property>
+                <property name="hexpand">True</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">12</property>
+                <child>
+                  <!-- n-columns=1 n-rows=5 -->
+                  <object class="GtkGrid" id="grid4">
+                    <property name="visible">True</property>
+                    <property name="can-focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="row-spacing">6</property>
+                    <child>
+                      <object class="GtkCheckButton" id="matchcase">
+                        <property name="label" translatable="yes" 
context="quickfindpanel|searchoptionsbox|matchcase">Match case</property>
+                        <property name="visible">True</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
+                        <property name="no-show-all">True</property>
+                        <property name="use-underline">True</property>
+                        <property name="draw-indicator">True</property>
+                        <child internal-child="accessible">
+                          <object class="AtkObject" id="matchcase-atkobject">
+                            <property name="AtkObject::accessible-description" 
translatable="yes" 
context="quickfindpanel|searchoptionsbox|extended_tip|matchcase">Finds only 
exact case matches.</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="wholewordsonly">
+                        <property name="label" translatable="yes" 
context="quickfindpanel|searchoptionsbox|wholewordsonly">Whole words 
only</property>
+                        <property name="visible">True</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
+                        <property name="no-show-all">True</property>
+                        <property name="use-underline">True</property>
+                        <property name="draw-indicator">True</property>
+                        <child internal-child="accessible">
+                          <object class="AtkObject" 
id="wholewordsonly-atkobject">
+                            <property name="AtkObject::accessible-description" 
translatable="yes" 
context="quickfindpanel|searchoptionsbox|extended_tip|wholewordsonly">Finds 
only whole words.</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="comments">
+                        <property name="label" translatable="yes" 
context="quickfindpanel|searchoptionsbox|comments">Comments</property>
+                        <property name="visible">True</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
+                        <property name="no-show-all">True</property>
+                        <property name="use-underline">True</property>
+                        <property name="draw-indicator">True</property>
+                        <child internal-child="accessible">
+                          <object class="AtkObject" id="comments-atkobject">
+                            <property name="AtkObject::accessible-description" 
translatable="yes" 
context="quickfindpanel|searchoptionsbox|extended_tip|comments">Allow search in 
comments.</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="regularexpressions">
+                        <property name="label" translatable="yes" 
context="quickfindpanel|searchoptionsbox|regularexpressions">Regular 
expressions</property>
+                        <property name="visible">True</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
+                        <property name="no-show-all">True</property>
+                        <property name="use-underline">True</property>
+                        <property name="draw-indicator">True</property>
+                        <child internal-child="accessible">
+                          <object class="AtkObject" 
id="regularexpressions-atkobject">
+                            <property name="AtkObject::accessible-description" 
translatable="yes" 
context="quickfindpanel|searchoptionsbox|extended_tip|regularexpressions">Search
 using regular expression.</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkBox" id="box3">
+                        <property name="visible">True</property>
+                        <property name="can-focus">False</property>
+                        <property name="spacing">12</property>
+                        <child>
+                          <object class="GtkCheckButton" id="similarity">
+                            <property name="label" translatable="yes" 
context="quickfindpanel|searchoptionsbox|similarity">Similarity</property>
+                            <property name="visible">True</property>
+                            <property name="can-focus">True</property>
+                            <property name="receives-default">False</property>
+                            <property name="no-show-all">True</property>
+                            <property name="use-underline">True</property>
+                            <property name="draw-indicator">True</property>
+                            <child internal-child="accessible">
+                              <object class="AtkObject" 
id="similarity-atkobject">
+                                <property 
name="AtkObject::accessible-description" translatable="yes" 
context="quickfindpanel|searchoptionsbox|extended_tip|similarity">Find terms 
that are similar to the Find text. Select this checkbox, and then click the 
Similarities button to define the similarity options.</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" 
id="similaritysettingsdialog">
+                            <property name="label" translatable="yes" 
context="quickfindpanel|searchoptionsbox|similaritybtn">Similarities...</property>
+                            <property name="visible">True</property>
+                            <property name="can-focus">True</property>
+                            <property name="receives-default">True</property>
+                            <property name="no-show-all">True</property>
+                            <property name="halign">end</property>
+                            <property name="hexpand">True</property>
+                            <property name="use-underline">True</property>
+                            <child internal-child="accessible">
+                              <object class="AtkObject" 
id="similaritysettingsdialog-atkobject">
+                                <property 
name="AtkObject::accessible-description" translatable="yes" 
context="quickfindpanel|searchoptionsbox|extended_tip|similaritybtn">Set the 
options for the similarity search.</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">4</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
         <child>
           <object class="GtkScrolledWindow">
             <property name="visible">True</property>
@@ -160,7 +348,7 @@
           <packing>
             <property name="expand">True</property>
             <property name="fill">True</property>
-            <property name="position">1</property>
+            <property name="position">2</property>
           </packing>
         </child>
         <child>
diff --git a/sw/uiconfig/swriter/ui/sidebarquickfindoptionsdialog.ui 
b/sw/uiconfig/swriter/ui/sidebarquickfindoptionsdialog.ui
deleted file mode 100644
index 26ebb33c9d3e..000000000000
--- a/sw/uiconfig/swriter/ui/sidebarquickfindoptionsdialog.ui
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.40.0 -->
-<interface domain="sw">
-  <requires lib="gtk+" version="3.24"/>
-  <object class="GtkDialog" id="SearchOptionsDialog">
-    <property name="can-focus">False</property>
-    <property name="border-width">6</property>
-    <property name="title" translatable="yes" 
context="sidebarquickfindoptionsdialog|SearchOptionsDialog">Search 
Options</property>
-    <property name="resizable">False</property>
-    <property name="modal">True</property>
-    <property name="default-width">0</property>
-    <property name="default-height">0</property>
-    <property name="type-hint">dialog</property>
-    <child internal-child="vbox">
-      <object class="GtkBox" id="dialog-vbox1">
-        <property name="can-focus">False</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">2</property>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox" id="dialog-action_area1">
-            <property name="can-focus">False</property>
-            <property name="layout-style">end</property>
-            <child>
-              <object class="GtkButton" id="ok">
-                <property name="label" translatable="yes" 
context="stock">_OK</property>
-                <property name="visible">True</property>
-                <property name="can-focus">True</property>
-                <property name="can-default">True</property>
-                <property name="has-default">True</property>
-                <property name="receives-default">True</property>
-                <property name="use-underline">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel">
-                <property name="label" translatable="yes" 
context="stock">_Cancel</property>
-                <property name="visible">True</property>
-                <property name="can-focus">True</property>
-                <property name="receives-default">True</property>
-                <property name="use-underline">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <!-- n-columns=1 n-rows=3 -->
-          <object class="GtkGrid" id="grid4">
-            <property name="visible">True</property>
-            <property name="can-focus">False</property>
-            <property name="hexpand">True</property>
-            <property name="row-spacing">6</property>
-            <child>
-              <object class="GtkCheckButton" id="matchcase">
-                <property name="label" translatable="yes" 
context="sidebarquickfindoptionsdialog|matchcase">Match case</property>
-                <property name="visible">True</property>
-                <property name="can-focus">True</property>
-                <property name="receives-default">False</property>
-                <property name="no-show-all">True</property>
-                <property name="use-underline">True</property>
-                <property name="draw-indicator">True</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="matchcase-atkobject">
-                    <property name="AtkObject::accessible-description" 
translatable="yes" 
context="sidebarquickfindoptionsdialog|extended_tip|matchcase">Finds only exact 
case matches.</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkCheckButton" id="wholewordsonly">
-                <property name="label" translatable="yes" 
context="sidebarquickfindoptionsdialog|wholewordsonly">Whole words 
only</property>
-                <property name="visible">True</property>
-                <property name="can-focus">True</property>
-                <property name="receives-default">False</property>
-                <property name="no-show-all">True</property>
-                <property name="use-underline">True</property>
-                <property name="draw-indicator">True</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="wholewordsonly-atkobject">
-                    <property name="AtkObject::accessible-description" 
translatable="yes" 
context="sidebarquickfindoptionsdialog|extended_tip|wholewordsonly">Finds only 
whole words.</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkCheckButton" id="comments">
-                <property name="label" translatable="yes" 
context="sidebarquickfindoptionsdialog|comments">Comments</property>
-                <property name="visible">True</property>
-                <property name="can-focus">True</property>
-                <property name="receives-default">False</property>
-                <property name="no-show-all">True</property>
-                <property name="use-underline">True</property>
-                <property name="draw-indicator">True</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="comments-atkobject">
-                    <property name="AtkObject::accessible-description" 
translatable="yes" 
context="sidebarquickfindoptionsdialog|extended_tip|comments">Allow search in 
comments.</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkCheckButton" id="regularexpressions">
-                <property name="label" translatable="yes" 
context="sidebarquickfindoptionsdialog|regularexpressions">Regular 
expressions</property>
-                <property name="visible">True</property>
-                <property name="can-focus">True</property>
-                <property name="receives-default">False</property>
-                <property name="no-show-all">True</property>
-                <property name="use-underline">True</property>
-                <property name="draw-indicator">True</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="regularexpressions-atkobject">
-                    <property name="AtkObject::accessible-description" 
translatable="yes" 
context="sidebarquickfindoptionsdialog|extended_tip|regularexpressions">Search 
using regular expression.</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">3</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkBox" id="box3">
-                <property name="visible">True</property>
-                <property name="can-focus">False</property>
-                <property name="spacing">12</property>
-                <child>
-                  <object class="GtkCheckButton" id="similarity">
-                    <property name="label" translatable="yes" 
context="sidebarquickfindoptionsdialog|similarity">Similarity</property>
-                    <property name="visible">True</property>
-                    <property name="can-focus">True</property>
-                    <property name="receives-default">False</property>
-                    <property name="no-show-all">True</property>
-                    <property name="use-underline">True</property>
-                    <property name="draw-indicator">True</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="similarity-atkobject">
-                        <property name="AtkObject::accessible-description" 
translatable="yes" 
context="sidebarquickfindoptionsdialog|extended_tip|similarity">Find terms that 
are similar to the Find text. Select this checkbox, and then click the 
Similarities button to define the similarity options.</property>
-                      </object>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkButton" id="similaritysettingsdialog">
-                    <property name="label" translatable="yes" 
context="sidebarquickfindoptionsdialog|similaritybtn">Similarities...</property>
-                    <property name="visible">True</property>
-                    <property name="can-focus">True</property>
-                    <property name="receives-default">True</property>
-                    <property name="no-show-all">True</property>
-                    <property name="halign">end</property>
-                    <property name="hexpand">True</property>
-                    <property name="use-underline">True</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" 
id="similaritysettingsdialog-atkobject">
-                        <property name="AtkObject::accessible-description" 
translatable="yes" 
context="sidebarquickfindoptionsdialog|extended_tip|similaritybtn">Set the 
options for the similarity search.</property>
-                      </object>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">4</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-    <action-widgets>
-      <action-widget response="-5">ok</action-widget>
-      <action-widget response="-6">cancel</action-widget>
-    </action-widgets>
-  </object>
-</interface>

Reply via email to