[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - include/svx include/vcl sc/source sd/source solenv/clang-format svx/inc svx/Library_svx.mk svx/source svx/uiconfig sw/source toolkit/source vcl/inc vcl/source vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu May 21 09:08:49 UTC 2020


 include/svx/srchdlg.hxx                                     |  189 -
 include/vcl/salvtables.hxx                                  |    8 
 include/vcl/weld.hxx                                        |    8 
 include/vcl/window.hxx                                      |    4 
 sc/source/ui/view/tabvwshe.cxx                              |    8 
 sd/source/ui/view/Outliner.cxx                              |    2 
 solenv/clang-format/blacklist                               |    2 
 svx/Library_svx.mk                                          |    1 
 svx/inc/AccessibleSvxFindReplaceDialog.hxx                  |   55 
 svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx |   95 
 svx/source/dialog/srchdlg.cxx                               | 1551 +++++-------
 svx/uiconfig/ui/findreplacedialog.ui                        |   46 
 sw/source/core/crsr/viscrs.cxx                              |    4 
 toolkit/source/awt/vclxaccessiblecomponent.cxx              |    3 
 vcl/inc/window.h                                            |    3 
 vcl/source/app/salvtables.cxx                               |   24 
 vcl/source/window/window2.cxx                               |   16 
 vcl/unx/gtk/a11y/atkwrapper.cxx                             |   45 
 vcl/unx/gtk/a11y/atkwrapper.hxx                             |    2 
 vcl/unx/gtk3/gtk3gtkinst.cxx                                |   77 
 20 files changed, 1054 insertions(+), 1089 deletions(-)

New commits:
commit 598d8c004fb02036d12ab362aa3711bbd760cfaf
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Mar 22 15:59:00 2019 +0000
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu May 21 11:08:16 2020 +0200

    weld SvxSearchDialog
    
    I have to use the other way to specify an a11y role, both are implemented in
    the vcl parser, but in my gtk3-3.24.7 the role tag crashes the gtk parser,
    while the other route works fine.
    
    The CONTENT_FLOWS_TO accessibility relation is another additional complexity
    over the norm
    
    Change-Id: Ia096bcbe9f00f9944e4e4d5ad9bb1a52d19c7b3f
    Reviewed-on: https://gerrit.libreoffice.org/69569
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94592
    Tested-by: Szymon Kłos <szymon.klos at collabora.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 4b82db88fe7c..3870dc57c63a 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -89,13 +89,13 @@ enum class SearchLabel
 class SvxSearchDialog;
 class SVX_DLLPUBLIC SvxSearchDialogWrapper : public SfxChildWindow
 {
-    VclPtr<SvxSearchDialog> dialog;
+    std::shared_ptr<SvxSearchDialog> dialog;
 public:
     SvxSearchDialogWrapper( vcl::Window*pParent, sal_uInt16 nId,
                             SfxBindings* pBindings, SfxChildWinInfo const * pInfo );
 
     virtual ~SvxSearchDialogWrapper () override;
-    SvxSearchDialog *getDialog () { return dialog;}
+    SvxSearchDialog *getDialog () { return dialog.get();}
     static void SetSearchLabel(const SearchLabel& rSL);
     static void SetSearchLabel(const OUString& sStr);
     static OUString GetSearchLabel();
@@ -109,18 +109,18 @@ public:
 
  */
 
-class SvxSearchDialog : public SfxModelessDialog
+class SVX_DLLPUBLIC SvxSearchDialog : public SfxModelessDialogController
 {
 friend class SvxSearchController;
 friend class SvxSearchDialogWrapper;
 friend class SvxJSearchOptionsDialog;
 
 public:
-    SvxSearchDialog( vcl::Window* pParent, SfxChildWindow* pChildWin, SfxBindings& rBind );
+    SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWin, SfxBindings& rBind );
     virtual ~SvxSearchDialog() override;
-    virtual void dispose() override;
 
-    virtual bool    Close() override;
+    virtual void    EndDialog();
+    virtual void    Close();
 
     // Window
     virtual void    Activate() override;
@@ -132,73 +132,16 @@ public:
 
     TransliterationFlags        GetTransliterationFlags() const;
 
-    void SetDocWin( vcl::Window* pDocWin ) { mpDocWin = pDocWin; }
-    vcl::Window* GetDocWin() { return mpDocWin; }
+    void SetDocWin(vcl::Window* pDocWin);
     void SetSrchFlag( bool bSuccess ) { mbSuccess = bSuccess; }
     bool GetSrchFlag() { return mbSuccess; }
-    virtual css::uno::Reference< css::awt::XWindowPeer >
-        GetComponentInterface( bool bCreate = true ) override;
-
     void            SetSaveToModule(bool b);
 
-    void SetSearchLabel(const OUString& rStr) { m_pSearchLabel->SetText(rStr); }
+    void SetSearchLabel(const OUString& rStr) { m_xSearchLabel->set_label(rStr); }
 
 private:
-    VclPtr<vcl::Window>         mpDocWin;
     bool            mbSuccess;
-
-    VclPtr<VclFrame>       m_pSearchFrame;
-    VclPtr<ComboBox>       m_pSearchLB;
-    VclPtr<ListBox>        m_pSearchTmplLB;
-    VclPtr<FixedText>      m_pSearchAttrText;
-    VclPtr<FixedText>      m_pSearchLabel;
-
-    VclPtr<VclFrame>       m_pReplaceFrame;
-    VclPtr<ComboBox>       m_pReplaceLB;
-    VclPtr<ListBox>        m_pReplaceTmplLB;
-    VclPtr<FixedText>      m_pReplaceAttrText;
-
-    VclPtr<PushButton>     m_pSearchBtn;
-    VclPtr<PushButton>     m_pBackSearchBtn;
-    VclPtr<PushButton>     m_pSearchAllBtn;
-    VclPtr<PushButton>     m_pReplaceBtn;
-    VclPtr<PushButton>     m_pReplaceAllBtn;
-
-    VclPtr<VclFrame>       m_pComponentFrame;
-    VclPtr<PushButton>     m_pSearchComponent1PB;
-    VclPtr<PushButton>     m_pSearchComponent2PB;
-
-    VclPtr<CheckBox>       m_pMatchCaseCB;
-    VclPtr<CheckBox>       m_pSearchFormattedCB;
-    VclPtr<CheckBox>       m_pWordBtn;
-
-    VclPtr<PushButton>     m_pCloseBtn;
-    VclPtr<CheckBox>       m_pIncludeDiacritics;
-    VclPtr<CheckBox>       m_pIncludeKashida;
-    VclPtr<VclExpander>    m_pOtherOptionsExpander;
-    VclPtr<CheckBox>       m_pSelectionBtn;
-    VclPtr<CheckBox>       m_pRegExpBtn;
-    VclPtr<CheckBox>       m_pWildcardBtn;
-    VclPtr<CheckBox>       m_pSimilarityBox;
-    VclPtr<PushButton>     m_pSimilarityBtn;
-    VclPtr<CheckBox>       m_pLayoutBtn;
-    VclPtr<CheckBox>       m_pNotesBtn;
-    VclPtr<CheckBox>       m_pJapMatchFullHalfWidthCB;
-    VclPtr<CheckBox>       m_pJapOptionsCB;
-    VclPtr<CheckBox>       m_pReplaceBackwardsCB;
-    VclPtr<PushButton>     m_pJapOptionsBtn;
-
-    VclPtr<PushButton>     m_pAttributeBtn;
-    VclPtr<PushButton>     m_pFormatBtn;
-    VclPtr<PushButton>     m_pNoFormatBtn;
-
-    VclPtr<VclContainer>   m_pCalcGrid;
-    VclPtr<FixedText>      m_pCalcSearchInFT;
-    VclPtr<ListBox>        m_pCalcSearchInLB;
-    VclPtr<FixedText>      m_pCalcSearchDirFT;
-    VclPtr<RadioButton>    m_pRowsBtn;
-    VclPtr<RadioButton>    m_pColumnsBtn;
-    VclPtr<CheckBox>       m_pAllSheetsCB;
+    bool            mbClosing;
 
     SfxBindings&    rBindings;
     bool            bWriter;
@@ -232,41 +175,95 @@ private:
 
     bool m_executingSubDialog = false;
 
-    DECL_LINK( ModifyHdl_Impl, Edit&, void );
-    DECL_LINK( FlagHdl_Impl, Button*, void );
-    DECL_LINK( CommandHdl_Impl, Button*, void );
-    DECL_LINK(TemplateHdl_Impl, Button*, void);
-    DECL_LINK( FocusHdl_Impl, Control&, void );
-    DECL_LINK( LBSelectHdl_Impl, ListBox&, void );
-    DECL_LINK(LoseFocusHdl_Impl, Control&, void);
-    DECL_LINK(FormatHdl_Impl, Button*, void);
-    DECL_LINK(NoFormatHdl_Impl, Button*, void);
-    DECL_LINK(AttributeHdl_Impl, Button*, void);
-    DECL_LINK( TimeoutHdl_Impl, Timer*, void );
-    void            ClickHdl_Impl(void const * pCtrl);
-
-    void            Construct_Impl();
-    void            InitControls_Impl();
-    void            ShowOptionalControls_Impl();
-    void            Init_Impl( bool bHasItemSet );
-    void            InitAttrList_Impl( const SfxItemSet* pSSet,
+    std::unique_ptr<weld::Frame> m_xSearchFrame;
+    std::unique_ptr<weld::ComboBox> m_xSearchLB;
+    std::unique_ptr<weld::ComboBox> m_xSearchTmplLB;
+    std::unique_ptr<weld::Label> m_xSearchAttrText;
+    std::unique_ptr<weld::Label> m_xSearchLabel;
+
+    std::unique_ptr<weld::Frame> m_xReplaceFrame;
+    std::unique_ptr<weld::ComboBox> m_xReplaceLB;
+    std::unique_ptr<weld::ComboBox> m_xReplaceTmplLB;
+    std::unique_ptr<weld::Label> m_xReplaceAttrText;
+
+    std::unique_ptr<weld::Button> m_xSearchBtn;
+    std::unique_ptr<weld::Button> m_xBackSearchBtn;
+    std::unique_ptr<weld::Button> m_xSearchAllBtn;
+    std::unique_ptr<weld::Button> m_xReplaceBtn;
+    std::unique_ptr<weld::Button> m_xReplaceAllBtn;
+
+    std::unique_ptr<weld::Frame> m_xComponentFrame;
+    std::unique_ptr<weld::Button> m_xSearchComponent1PB;
+    std::unique_ptr<weld::Button> m_xSearchComponent2PB;
+
+    std::unique_ptr<weld::CheckButton> m_xMatchCaseCB;
+    std::unique_ptr<weld::CheckButton> m_xSearchFormattedCB;
+    std::unique_ptr<weld::CheckButton> m_xWordBtn;
+
+    std::unique_ptr<weld::Button> m_xCloseBtn;
+    std::unique_ptr<weld::CheckButton> m_xIncludeDiacritics;
+    std::unique_ptr<weld::CheckButton> m_xIncludeKashida;
+    std::unique_ptr<weld::Expander> m_xOtherOptionsExpander;
+    std::unique_ptr<weld::CheckButton> m_xSelectionBtn;
+    std::unique_ptr<weld::CheckButton> m_xRegExpBtn;
+    std::unique_ptr<weld::CheckButton> m_xWildcardBtn;
+    std::unique_ptr<weld::CheckButton> m_xSimilarityBox;
+    std::unique_ptr<weld::Button> m_xSimilarityBtn;
+    std::unique_ptr<weld::CheckButton> m_xLayoutBtn;
+    std::unique_ptr<weld::CheckButton> m_xNotesBtn;
+    std::unique_ptr<weld::CheckButton> m_xJapMatchFullHalfWidthCB;
+    std::unique_ptr<weld::CheckButton> m_xJapOptionsCB;
+    std::unique_ptr<weld::CheckButton> m_xReplaceBackwardsCB;
+    std::unique_ptr<weld::Button> m_xJapOptionsBtn;
+
+    std::unique_ptr<weld::Button> m_xAttributeBtn;
+    std::unique_ptr<weld::Button> m_xFormatBtn;
+    std::unique_ptr<weld::Button> m_xNoFormatBtn;
+
+    std::unique_ptr<weld::Widget> m_xCalcGrid;
+    std::unique_ptr<weld::Label> m_xCalcSearchInFT;
+    std::unique_ptr<weld::ComboBox> m_xCalcSearchInLB;
+    std::unique_ptr<weld::Label> m_xCalcSearchDirFT;
+    std::unique_ptr<weld::RadioButton> m_xRowsBtn;
+    std::unique_ptr<weld::RadioButton> m_xColumnsBtn;
+    std::unique_ptr<weld::CheckButton> m_xAllSheetsCB;
+    std::unique_ptr<weld::Label> m_xCalcStrFT;
+
+    DECL_DLLPRIVATE_LINK( ModifyHdl_Impl, weld::ComboBox&, void );
+    DECL_DLLPRIVATE_LINK( FlagHdl_Impl, weld::Button&, void );
+    DECL_DLLPRIVATE_LINK( CommandHdl_Impl, weld::Button&, void );
+    DECL_DLLPRIVATE_LINK(TemplateHdl_Impl, weld::Button&, void);
+    DECL_DLLPRIVATE_LINK( FocusHdl_Impl, weld::Widget&, void );
+    DECL_DLLPRIVATE_LINK( LBSelectHdl_Impl, weld::ComboBox&, void );
+    DECL_DLLPRIVATE_LINK(LoseFocusHdl_Impl, weld::Widget&, void);
+    DECL_DLLPRIVATE_LINK(FormatHdl_Impl, weld::Button&, void);
+    DECL_DLLPRIVATE_LINK(NoFormatHdl_Impl, weld::Button&, void);
+    DECL_DLLPRIVATE_LINK(AttributeHdl_Impl, weld::Button&, void);
+    DECL_DLLPRIVATE_LINK( TimeoutHdl_Impl, Timer*, void );
+    SVX_DLLPRIVATE void ClickHdl_Impl(const weld::Widget* pCtrl);
+
+    SVX_DLLPRIVATE void Construct_Impl();
+    SVX_DLLPRIVATE void InitControls_Impl();
+    SVX_DLLPRIVATE void ShowOptionalControls_Impl();
+    SVX_DLLPRIVATE void Init_Impl( bool bHasItemSet );
+    SVX_DLLPRIVATE void InitAttrList_Impl( const SfxItemSet* pSSet,
                                        const SfxItemSet* pRSet );
-    void            Remember_Impl( const OUString &rStr, bool bSearch );
-    void            PaintAttrText_Impl();
-    OUString&       BuildAttrText_Impl( OUString& rStr, bool bSrchFlag ) const;
+    SVX_DLLPRIVATE void Remember_Impl( const OUString &rStr, bool bSearch );
+    SVX_DLLPRIVATE void PaintAttrText_Impl();
+    SVX_DLLPRIVATE OUString& BuildAttrText_Impl( OUString& rStr, bool bSrchFlag ) const;
 
-    void            TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool );
-    void            EnableControls_Impl( const SearchOptionFlags nFlags );
-    void            EnableControl_Impl( Control const * pCtrl );
-    void            SetItem_Impl( const SvxSearchItem* pItem );
+    SVX_DLLPRIVATE void TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool );
+    SVX_DLLPRIVATE void EnableControls_Impl( const SearchOptionFlags nFlags );
+    SVX_DLLPRIVATE void EnableControl_Impl(const weld::Widget& rCtrl);
+    SVX_DLLPRIVATE void SetItem_Impl( const SvxSearchItem* pItem );
 
-    void            SetModifyFlag_Impl( const Control* pCtrl );
-    void            SaveToModule_Impl();
+    SVX_DLLPRIVATE void SetModifyFlag_Impl(const weld::Widget* pCtrl);
+    SVX_DLLPRIVATE void SaveToModule_Impl();
 
-    void            ApplyTransliterationFlags_Impl( TransliterationFlags nSettings );
-    bool            IsOtherOptionsExpanded();
+    SVX_DLLPRIVATE void ApplyTransliterationFlags_Impl( TransliterationFlags nSettings );
+    SVX_DLLPRIVATE bool IsOtherOptionsExpanded();
 
-    short executeSubDialog(VclAbstractDialog * dialog);
+    SVX_DLLPRIVATE short executeSubDialog(VclAbstractDialog * dialog);
 };
 
 #endif
diff --git a/include/vcl/salvtables.hxx b/include/vcl/salvtables.hxx
index dad0e71d5137..0de528fa8751 100644
--- a/include/vcl/salvtables.hxx
+++ b/include/vcl/salvtables.hxx
@@ -262,6 +262,14 @@ public:
     virtual OUString strip_mnemonic(const OUString& rLabel) const override;
 
     SystemWindow* getSystemWindow();
+
+    virtual void set_accessible_relation_labeled_by(weld::Widget* pLabel) override;
+
+    virtual void set_accessible_relation_label_for(weld::Widget* pLabeled) override;
+
+    virtual void add_extra_accessible_relation(const css::accessibility::AccessibleRelation &rRelation) override;
+
+    virtual void clear_extra_accessible_relations() override;
 };
 
 class SalInstanceLabel : public SalInstanceWidget, public virtual weld::Label
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index e9b816a0f5fa..9ca0209cad08 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -97,6 +97,14 @@ public:
 
     virtual OUString get_accessible_description() const = 0;
 
+    virtual void set_accessible_relation_labeled_by(weld::Widget* pLabel) = 0;
+    virtual void set_accessible_relation_label_for(weld::Widget* pLabeled) = 0;
+
+    virtual void
+    add_extra_accessible_relation(const css::accessibility::AccessibleRelation& rRelation)
+        = 0;
+    virtual void clear_extra_accessible_relations() = 0;
+
     virtual void set_tooltip_text(const OUString& rTip) = 0;
 
     virtual void connect_focus_in(const Link<Widget&, void>& rLink)
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index f95ad05cef5b..3585f6d14a23 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -76,6 +76,7 @@ enum class VclEventId;
 
 namespace com { namespace sun { namespace star {
 namespace accessibility {
+    struct AccessibleRelation;
     class XAccessible;
 }
 namespace beans {
@@ -1292,6 +1293,9 @@ public:
     void                                SetAccessibleRelationMemberOf( vcl::Window* pMemberOf );
     vcl::Window*                        GetAccessibleRelationMemberOf() const;
 
+    void                                AddExtraAccessibleRelation(const css::accessibility::AccessibleRelation &rRelation);
+    const std::vector<css::accessibility::AccessibleRelation>& GetExtraAccessibleRelations() const;
+    void                                ClearExtraAccessibleRelations();
 
     // to avoid sending accessibility events in cases like closing dialogs
     // by default checks complete parent path
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index c0c96af2cb0e..d6557932ea34 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -250,11 +250,11 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
 
                     ScGlobal::SetSearchItem( *pSearchItem );
                     bool bSuccess = SearchAndReplace( pSearchItem, true, rReq.IsAPI() );
-                    const SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow(
+                    SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow(
                             SvxSearchDialogWrapper::GetChildWindowId());
                     if (pChildWindow)
                     {
-                        SvxSearchDialog* pSearchDlg = static_cast<SvxSearchDialog*>(pChildWindow->GetWindow());
+                        SvxSearchDialog* pSearchDlg = static_cast<SvxSearchDialog*>(pChildWindow->GetController().get());
                         if( pSearchDlg )
                         {
                             ScTabView* pTabView = GetViewData().GetView();
@@ -320,11 +320,11 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
                             rReq.IsAPI() ? SfxCallMode::API|SfxCallMode::SYNCHRON :
                                             SfxCallMode::RECORD,
                             { &aSearchItem });
-                    const SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow(
+                    SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow(
                             SvxSearchDialogWrapper::GetChildWindowId());
                     if (pChildWindow)
                     {
-                        SvxSearchDialog* pSearchDlg = static_cast<SvxSearchDialog*>(pChildWindow->GetWindow());
+                        SvxSearchDialog* pSearchDlg = static_cast<SvxSearchDialog*>(pChildWindow->GetController().get());
                         if( pSearchDlg )
                         {
                             ScTabView* pTabView = GetViewData().GetView();
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 5d9181475d45..73f34cf64372 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -507,7 +507,7 @@ bool SdOutliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem)
         if (pChildWin)
         {
             SvxSearchDialog* pSearchDlg =
-                static_cast<SvxSearchDialog*>(pChildWin->GetWindow());
+                static_cast<SvxSearchDialog*>(pChildWin->GetController().get());
             pSearchDlg->SetDocWin( pViewShell->GetActiveWindow() );
             pSearchDlg->SetSrchFlag(false);
         }
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 0f46e3b6630c..a3c7cd256659 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -14014,7 +14014,6 @@ svtools/source/uno/wizard/wizardpagecontroller.cxx
 svtools/source/uno/wizard/wizardpagecontroller.hxx
 svtools/source/uno/wizard/wizardshell.cxx
 svtools/source/uno/wizard/wizardshell.hxx
-svx/inc/AccessibleSvxFindReplaceDialog.hxx
 svx/inc/AccessibleTableShape.hxx
 svx/inc/GalleryControl.hxx
 svx/inc/dragmt3d.hxx
@@ -14134,7 +14133,6 @@ svx/source/accessibility/AccessibleOLEShape.cxx
 svx/source/accessibility/AccessibleShape.cxx
 svx/source/accessibility/AccessibleShapeInfo.cxx
 svx/source/accessibility/AccessibleShapeTreeInfo.cxx
-svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
 svx/source/accessibility/AccessibleTextEventQueue.cxx
 svx/source/accessibility/AccessibleTextEventQueue.hxx
 svx/source/accessibility/AccessibleTextHelper.cxx
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index c4c865302b10..3a67830df165 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -90,7 +90,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
     svx/source/accessibility/AccessibleShape \
     svx/source/accessibility/AccessibleShapeInfo \
     svx/source/accessibility/AccessibleShapeTreeInfo \
-    svx/source/accessibility/AccessibleSvxFindReplaceDialog \
     svx/source/accessibility/AccessibleTextEventQueue \
     svx/source/accessibility/AccessibleTextHelper \
     svx/source/accessibility/ChildrenManager \
diff --git a/svx/inc/AccessibleSvxFindReplaceDialog.hxx b/svx/inc/AccessibleSvxFindReplaceDialog.hxx
deleted file mode 100644
index a460dcc80b4e..000000000000
--- a/svx/inc/AccessibleSvxFindReplaceDialog.hxx
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_SVX_INC_ACCESSIBLESVXFINDREPLACEDIALOG_HXX
-#define INCLUDED_SVX_INC_ACCESSIBLESVXFINDREPLACEDIALOG_HXX
-
-#include <toolkit/awt/vclxwindow.hxx>
-#include <toolkit/awt/vclxaccessiblecomponent.hxx>
-#include <toolkit/awt/vclxwindows.hxx>
-
-
-class VCLXAccessibleSvxFindReplaceDialog : public VCLXAccessibleComponent
-{
-public:
-    VCLXAccessibleSvxFindReplaceDialog(VCLXWindow* pVCLXindow);
-    virtual ~VCLXAccessibleSvxFindReplaceDialog() override;
-    virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet ) override;
-    // XServiceInfo
-    virtual OUString SAL_CALL getImplementationName() override;
-    virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
-
-};
-
-
-class VCLXSvxFindReplaceDialog : public VCLXDialog
-{
-public:
-    VCLXSvxFindReplaceDialog(vcl::Window* pSplDlg)
-    {
-        SetWindow(pSplDlg);
-    }
-private:
-    virtual css::uno::Reference< css::accessibility::XAccessibleContext >  CreateAccessibleContext() override
-    {
-        return new VCLXAccessibleSvxFindReplaceDialog(this);
-    }
-};
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx b/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
deleted file mode 100644
index 1e0ca231c092..000000000000
--- a/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#include <AccessibleSvxFindReplaceDialog.hxx>
-#include <svx/srchdlg.hxx>
-#include <toolkit/awt/vclxwindow.hxx>
-#include <unotools/accessiblerelationsethelper.hxx>
-#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
-#include <com/sun/star/accessibility/XAccessibleGetAccFlowTo.hpp>
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-
-VCLXAccessibleSvxFindReplaceDialog::VCLXAccessibleSvxFindReplaceDialog(VCLXWindow* pVCLXindow)
-    :VCLXAccessibleComponent( pVCLXindow )
-{
-
-}
-
-VCLXAccessibleSvxFindReplaceDialog::~VCLXAccessibleSvxFindReplaceDialog()
-{
-}
-
-void VCLXAccessibleSvxFindReplaceDialog::FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet )
-{
-    VCLXAccessibleComponent::FillAccessibleRelationSet( rRelationSet );
-    VclPtr<vcl::Window> pDlg = GetWindow();
-    if ( !pDlg )
-        return;
-
-    SvxSearchDialog* pSrchDlg = static_cast<SvxSearchDialog*>( pDlg.get() );
-    vcl::Window* pDocWin = pSrchDlg->GetDocWin();
-    if ( !pDocWin )
-    {
-        return;
-    }
-    Reference < css::accessibility::XAccessible > xDocAcc = pDocWin->GetAccessible();
-    if ( !xDocAcc.is() )
-    {
-        return;
-    }
-    Reference< css::accessibility::XAccessibleGetAccFlowTo > xGetAccFlowTo( xDocAcc, UNO_QUERY );
-    if ( !xGetAccFlowTo.is() )
-    {
-        return;
-    }
-
-    const sal_Int32 FORFINDREPLACEFLOWTO = 2;
-    uno::Sequence<uno::Any> aAnySeq = xGetAccFlowTo->getAccFlowTo( Any(pSrchDlg->GetSrchFlag()),  FORFINDREPLACEFLOWTO );
-
-    sal_Int32 nLen = aAnySeq.getLength();
-    if ( nLen )
-    {
-        uno::Sequence< uno::Reference< uno::XInterface > > aSequence( nLen );
-        for ( sal_Int32 i = 0; i < nLen; i++ )
-        {
-            uno::Reference < css::accessibility::XAccessible > xAcc;
-            aAnySeq[i] >>= xAcc;
-            aSequence[i] = xAcc;
-        }
-        rRelationSet.AddRelation( css::accessibility::AccessibleRelation( css::accessibility::AccessibleRelationType::CONTENT_FLOWS_TO, aSequence ) );
-    }
-}
-
-// XServiceInfo
-
-
-OUString VCLXAccessibleSvxFindReplaceDialog::getImplementationName()
-{
-    return OUString( "VCLXAccessibleSvxFindReplaceDialog" );
-}
-
-
-Sequence< OUString > VCLXAccessibleSvxFindReplaceDialog::getSupportedServiceNames()
-{
-    Sequence< OUString > aNames { "VCLXAccessibleSvxFindReplaceDialog" };
-    return aNames;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 0294154e650e..6ba39e76de30 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -35,11 +35,16 @@
 #include <svl/cjkoptions.hxx>
 #include <svl/ctloptions.hxx>
 #include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/accessibility/AccessibleRelation.hpp>
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#include <com/sun/star/accessibility/XAccessibleGetAccFlowTo.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/frame/XDispatch.hpp>
 #include <com/sun/star/frame/XDispatchProvider.hpp>
 #include <com/sun/star/frame/XLayoutManager.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
 #include <com/sun/star/configuration/theDefaultProvider.hpp>
 #include <com/sun/star/frame/ModuleManager.hpp>
 #include <com/sun/star/ui/XUIElement.hpp>
@@ -59,7 +64,6 @@
 #include <svx/svxitems.hrc>
 
 #include <svl/srchitem.hxx>
-#include <AccessibleSvxFindReplaceDialog.hxx>
 #include <svx/pageitem.hxx>
 #include "srchctrl.hxx"
 #include <svx/dialmgr.hxx>
@@ -108,13 +112,14 @@ namespace o3tl {
 
 namespace
 {
-    bool GetCheckBoxValue(const CheckBox *pBox)
+    bool GetCheckBoxValue(const weld::CheckButton& rBox)
     {
-        return pBox->IsEnabled() && pBox->IsChecked();
+        return rBox.get_sensitive() && rBox.get_active();
     }
-    bool GetNegatedCheckBoxValue(const CheckBox *pBox)
+
+    bool GetNegatedCheckBoxValue(const weld::CheckButton& rBox)
     {
-        return pBox->IsEnabled() && !pBox->IsChecked();
+        return rBox.get_sensitive() && !rBox.get_active();
     }
 }
 
@@ -143,7 +148,7 @@ struct SearchDlg_Impl
     }
 };
 
-static void ListToStrArr_Impl( sal_uInt16 nId, std::vector<OUString>& rStrLst, ComboBox& rCBox )
+static void ListToStrArr_Impl( sal_uInt16 nId, std::vector<OUString>& rStrLst, weld::ComboBox& rCBox )
 {
     const SfxStringListItem* pSrchItem =
         static_cast<const SfxStringListItem*>(SfxGetpApp()->GetItem( nId ));
@@ -155,7 +160,7 @@ static void ListToStrArr_Impl( sal_uInt16 nId, std::vector<OUString>& rStrLst, C
         for (const OUString & s : aLst)
         {
             rStrLst.push_back(s);
-            rCBox.InsertEntry(s);
+            rCBox.append_text(s);
         }
     }
 }
@@ -174,13 +179,11 @@ SearchAttrItemList::SearchAttrItemList( const SearchAttrItemList& rList ) :
             (*this)[i].pItem = (*this)[i].pItem->Clone();
 }
 
-
 SearchAttrItemList::~SearchAttrItemList()
 {
     Clear();
 }
 
-
 void SearchAttrItemList::Put( const SfxItemSet& rSet )
 {
     if ( !rSet.Count() )
@@ -252,11 +255,11 @@ void SearchAttrItemList::Remove(size_t nPos)
     SrchAttrItemList::erase( begin() + nPos, begin() + nPos + nLen );
 }
 
-SvxSearchDialog::SvxSearchDialog( vcl::Window* pParent, SfxChildWindow* pChildWin, SfxBindings& rBind )
-    : SfxModelessDialog(&rBind, pChildWin, pParent, "FindReplaceDialog",
-        "svx/ui/findreplacedialog.ui")
-    , mpDocWin(nullptr)
+SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWin, SfxBindings& rBind)
+    : SfxModelessDialogController(&rBind, pChildWin, pParent,
+                                  "svx/ui/findreplacedialog.ui", "FindReplaceDialog")
     , mbSuccess(false)
+    , mbClosing(false)
     , rBindings(rBind)
     , bWriter(false)
     , bSearch(true)
@@ -268,148 +271,81 @@ SvxSearchDialog::SvxSearchDialog( vcl::Window* pParent, SfxChildWindow* pChildWi
     , nModifyFlag(ModifyFlags::NONE)
     , pReplaceList(new SearchAttrItemList)
     , nTransliterationFlags(TransliterationFlags::NONE)
+    , m_xSearchFrame(m_xBuilder->weld_frame("searchframe"))
+    , m_xSearchLB(m_xBuilder->weld_combo_box("searchterm"))
+    , m_xSearchTmplLB(m_xBuilder->weld_combo_box("searchlist"))
+    , m_xSearchAttrText(m_xBuilder->weld_label("searchdesc"))
+    , m_xSearchLabel(m_xBuilder->weld_label("searchlabel"))
+    , m_xReplaceFrame(m_xBuilder->weld_frame("replaceframe"))
+    , m_xReplaceLB(m_xBuilder->weld_combo_box("replaceterm"))
+    , m_xReplaceTmplLB(m_xBuilder->weld_combo_box("replacelist"))
+    , m_xReplaceAttrText(m_xBuilder->weld_label("replacedesc"))
+    , m_xSearchBtn(m_xBuilder->weld_button("search"))
+    , m_xBackSearchBtn(m_xBuilder->weld_button("backsearch"))
+    , m_xSearchAllBtn(m_xBuilder->weld_button("searchall"))
+    , m_xReplaceBtn(m_xBuilder->weld_button("replace"))
+    , m_xReplaceAllBtn(m_xBuilder->weld_button("replaceall"))
+    , m_xComponentFrame(m_xBuilder->weld_frame("componentframe"))
+    , m_xSearchComponent1PB(m_xBuilder->weld_button("component1"))
+    , m_xSearchComponent2PB(m_xBuilder->weld_button("component2"))
+    , m_xMatchCaseCB(m_xBuilder->weld_check_button("matchcase"))
+    , m_xSearchFormattedCB(m_xBuilder->weld_check_button("searchformatted"))
+    , m_xWordBtn(m_xBuilder->weld_check_button("wholewords"))
+    , m_xCloseBtn(m_xBuilder->weld_button("close"))
+    , m_xIncludeDiacritics(m_xBuilder->weld_check_button("includediacritics"))
+    , m_xIncludeKashida(m_xBuilder->weld_check_button("includekashida"))
+    , m_xOtherOptionsExpander(m_xBuilder->weld_expander("OptionsExpander"))
+    , m_xSelectionBtn(m_xBuilder->weld_check_button("selection"))
+    , m_xRegExpBtn(m_xBuilder->weld_check_button("regexp"))
+    , m_xWildcardBtn(m_xBuilder->weld_check_button("wildcard"))
+    , m_xSimilarityBox(m_xBuilder->weld_check_button("similarity"))
+    , m_xSimilarityBtn(m_xBuilder->weld_button("similaritybtn"))
+    , m_xLayoutBtn(m_xBuilder->weld_check_button("layout"))
+    , m_xNotesBtn(m_xBuilder->weld_check_button("notes"))
+    , m_xJapMatchFullHalfWidthCB(m_xBuilder->weld_check_button("matchcharwidth"))
+    , m_xJapOptionsCB(m_xBuilder->weld_check_button("soundslike"))
+    , m_xReplaceBackwardsCB(m_xBuilder->weld_check_button("replace_backwards"))
+    , m_xJapOptionsBtn(m_xBuilder->weld_button("soundslikebtn"))
+    , m_xAttributeBtn(m_xBuilder->weld_button("attributes"))
+    , m_xFormatBtn(m_xBuilder->weld_button("format"))
+    , m_xNoFormatBtn(m_xBuilder->weld_button("noformat"))
+    , m_xCalcGrid(m_xBuilder->weld_widget("calcgrid"))
+    , m_xCalcSearchInFT(m_xBuilder->weld_label("searchinlabel"))
+    , m_xCalcSearchInLB(m_xBuilder->weld_combo_box("calcsearchin"))
+    , m_xCalcSearchDirFT(m_xBuilder->weld_label("searchdir"))
+    , m_xRowsBtn(m_xBuilder->weld_radio_button("rows"))
+    , m_xColumnsBtn(m_xBuilder->weld_radio_button("cols"))
+    , m_xAllSheetsCB(m_xBuilder->weld_check_button("allsheets"))
+    , m_xCalcStrFT(m_xBuilder->weld_label("entirecells"))
 {
-    get(m_pSearchFrame, "searchframe");
-    get(m_pSearchLB, "searchterm");
-    get(m_pSearchTmplLB, "searchlist");
-    m_pSearchTmplLB->SetStyle(m_pSearchTmplLB->GetStyle() | WB_SORT);
-    get(m_pSearchBtn, "search");
-    get(m_pBackSearchBtn, "backsearch");
-    get(m_pSearchAllBtn, "searchall");
-    get(m_pSearchAttrText, "searchdesc");
-    m_pSearchAttrText->SetStyle(m_pSearchAttrText->GetStyle() | WB_PATHELLIPSIS);
-    m_pSearchAttrText->Hide();
-    get(m_pSearchLabel, "searchlabel");
-    m_pSearchLabel->SetStyle(m_pSearchLabel->GetStyle() | WB_PATHELLIPSIS);
-    m_pSearchLabel->Show();
-
-    get(m_pReplaceFrame, "replaceframe");
-    get(m_pReplaceLB, "replaceterm");
-    get(m_pReplaceTmplLB, "replacelist");
-    m_pReplaceTmplLB->SetStyle(m_pReplaceTmplLB->GetStyle() | WB_SORT);
-    get(m_pReplaceBtn, "replace");
-    get(m_pReplaceAllBtn, "replaceall");
-    get(m_pReplaceAttrText, "replacedesc");
-    m_pReplaceAttrText->SetStyle(m_pReplaceAttrText->GetStyle() | WB_PATHELLIPSIS);
-    m_pReplaceAttrText->Hide();
-
-    get(m_pComponentFrame, "componentframe");
-    get(m_pSearchComponent1PB, "component1");
-    get(m_pSearchComponent2PB, "component2");
-
-    get(m_pMatchCaseCB, "matchcase");
-    get(m_pSearchFormattedCB, "searchformatted");
-    get(m_pWordBtn, "wholewords");
-    aCalcStr = get<FixedText>("entirecells")->GetText();
-
-    get(m_pCloseBtn, "close");
-
-    get(m_pOtherOptionsExpander, "OptionsExpander");
-    get(m_pIncludeDiacritics, "includediacritics");
-    get(m_pIncludeKashida, "includekashida");
-    get(m_pSelectionBtn, "selection");
-    get(m_pReplaceBackwardsCB, "replace_backwards");
-    get(m_pRegExpBtn, "regexp");
-    get(m_pWildcardBtn, "wildcard");
-    get(m_pSimilarityBox, "similarity");
-    get(m_pSimilarityBtn, "similaritybtn");
-    get(m_pLayoutBtn, "layout");
-    get(m_pNotesBtn, "notes");
-    get(m_pJapMatchFullHalfWidthCB, "matchcharwidth");
-    get(m_pJapOptionsCB, "soundslike");
-    get(m_pJapOptionsBtn, "soundslikebtn");
-
-    get(m_pAttributeBtn, "attributes");
-    get(m_pFormatBtn, "format");
-    get(m_pNoFormatBtn, "noformat");
-
-    get(m_pCalcGrid, "calcgrid");
-    get(m_pCalcSearchInFT, "searchinlabel");
-    get(m_pCalcSearchInLB, "calcsearchin");
-    get(m_pCalcSearchDirFT, "searchdir");
-    get(m_pRowsBtn, "rows");
-    get(m_pColumnsBtn, "cols");
-    get(m_pAllSheetsCB, "allsheets");
-
-    // m_pSimilarityBtn->set_height_request(m_pSimilarityBox->get_preferred_size().Height());
-    // m_pJapOptionsBtn->set_height_request(m_pJapOptionsCB->get_preferred_size().Height());
-
-    long nTermWidth = approximate_char_width() * 32;
-    m_pSearchLB->set_width_request(nTermWidth);
-    m_pSearchTmplLB->set_width_request(nTermWidth);
-    m_pReplaceLB->set_width_request(nTermWidth);
-    m_pReplaceTmplLB->set_width_request(nTermWidth);
+    m_xSearchTmplLB->make_sorted();
+    m_xSearchAttrText->hide();
+    m_xSearchLabel->show();
 
-    Construct_Impl();
-}
+    m_xReplaceTmplLB->make_sorted();
+    m_xReplaceAttrText->hide();
 
+    aCalcStr = m_xCalcStrFT->get_label();
 
-SvxSearchDialog::~SvxSearchDialog()
-{
-    disposeOnce();
+    // m_xSimilarityBtn->set_height_request(m_xSimilarityBox->get_preferred_size().Height());
+    // m_xJapOptionsBtn->set_height_request(m_xJapOptionsCB->get_preferred_size().Height());
+
+    auto nTermWidth = m_xSearchLB->get_approximate_digit_width() * 28;
+    m_xSearchLB->set_size_request(nTermWidth, -1);
+    m_xSearchTmplLB->set_size_request(nTermWidth, -1);
+    m_xReplaceLB->set_size_request(nTermWidth, -1);
+    m_xReplaceTmplLB->set_size_request(nTermWidth, -1);
+
+    Construct_Impl();
 }
 
-void SvxSearchDialog::dispose()
+SvxSearchDialog::~SvxSearchDialog()
 {
-    Hide();
-
     rBindings.EnterRegistrations();
     pSearchController.reset();
     pOptionsController.reset();
     pFamilyController.reset();
     rBindings.LeaveRegistrations();
-
-    pSearchItem.reset();
-    pImpl.reset();
-    pSearchList.reset();
-    pReplaceList.reset();
-    mpDocWin.clear();
-    m_pSearchFrame.clear();
-    m_pSearchLB.clear();
-    m_pSearchTmplLB.clear();
-    m_pSearchAttrText.clear();
-    m_pSearchLabel.clear();
-    m_pReplaceFrame.clear();
-    m_pReplaceLB.clear();
-    m_pReplaceTmplLB.clear();
-    m_pReplaceAttrText.clear();
-    m_pSearchBtn.clear();
-    m_pBackSearchBtn.clear();
-    m_pSearchAllBtn.clear();
-    m_pReplaceBtn.clear();
-    m_pReplaceAllBtn.clear();
-    m_pComponentFrame.clear();
-    m_pSearchComponent1PB.clear();
-    m_pSearchComponent2PB.clear();
-    m_pMatchCaseCB.clear();
-    m_pSearchFormattedCB.clear();
-    m_pWordBtn.clear();
-    m_pCloseBtn.clear();
-    m_pIncludeDiacritics.clear();
-    m_pIncludeKashida.clear();
-    m_pOtherOptionsExpander.clear();
-    m_pSelectionBtn.clear();
-    m_pReplaceBackwardsCB.clear();
-    m_pRegExpBtn.clear();
-    m_pWildcardBtn.clear();
-    m_pSimilarityBox.clear();
-    m_pSimilarityBtn.clear();
-    m_pLayoutBtn.clear();
-    m_pNotesBtn.clear();
-    m_pJapMatchFullHalfWidthCB.clear();
-    m_pJapOptionsCB.clear();
-    m_pJapOptionsBtn.clear();
-    m_pAttributeBtn.clear();
-    m_pFormatBtn.clear();
-    m_pNoFormatBtn.clear();
-    m_pCalcGrid.clear();
-    m_pCalcSearchInFT.clear();
-    m_pCalcSearchInLB.clear();
-    m_pCalcSearchDirFT.clear();
-    m_pRowsBtn.clear();
-    m_pColumnsBtn.clear();
-    m_pAllSheetsCB.clear();
-    SfxModelessDialog::dispose();
 }
 
 void SvxSearchDialog::Construct_Impl()
@@ -420,20 +356,20 @@ void SvxSearchDialog::Construct_Impl()
         LINK( this, SvxSearchDialog, TimeoutHdl_Impl ) );
     EnableControls_Impl( SearchOptionFlags::NONE );
 
-    // Store old Text from m_pWordBtn
+    // Store old Text from m_xWordBtn
     aCalcStr += "#";
-    aCalcStr += m_pWordBtn->GetText();
+    aCalcStr += m_xWordBtn->get_label();
 
     aLayoutStr = SvxResId( RID_SVXSTR_SEARCH_STYLES );
     aLayoutWriterStr = SvxResId( RID_SVXSTR_WRITER_STYLES );
     aLayoutCalcStr = SvxResId( RID_SVXSTR_CALC_STYLES );
-    aStylesStr = m_pLayoutBtn->GetText();
+    aStylesStr = m_xLayoutBtn->get_label();
 
     // Get stored search-strings from the application
     ListToStrArr_Impl(SID_SEARCHDLG_SEARCHSTRINGS,
-                       aSearchStrings, *m_pSearchLB);
+                       aSearchStrings, *m_xSearchLB);
     ListToStrArr_Impl(SID_SEARCHDLG_REPLACESTRINGS,
-                       aReplaceStrings, *m_pReplaceLB);
+                       aReplaceStrings, *m_xReplaceLB);
 
     InitControls_Impl();
 
@@ -465,25 +401,25 @@ void SvxSearchDialog::Construct_Impl()
     SvtCJKOptions aCJKOptions;
     if(!aCJKOptions.IsJapaneseFindEnabled())
     {
-        m_pJapOptionsCB->Check( false );
-        m_pJapOptionsCB->Hide();
-        m_pJapOptionsBtn->Hide();
+        m_xJapOptionsCB->set_active( false );
+        m_xJapOptionsCB->hide();
+        m_xJapOptionsBtn->hide();
     }
     if(!aCJKOptions.IsCJKFontEnabled())
     {
-        m_pJapMatchFullHalfWidthCB->Hide();
+        m_xJapMatchFullHalfWidthCB->hide();
     }
     SvtCTLOptions aCTLOptions;
-    // Do not disable and hide the m_pIncludeDiacritics button.
+    // Do not disable and hide the m_xIncludeDiacritics button.
     // Include Diacritics == Not Ignore Diacritics => A does not match A-Umlaut (Diaeresis).
     // Confusingly these have negated names (following the UI) but the actual
     // transliteration is to *ignore* diacritics if "included" (sensitive) is
     // _not_ checked.
     if(!aCTLOptions.IsCTLFontEnabled())
     {
-        m_pIncludeDiacritics->Check( true );
-        m_pIncludeKashida->Check( true );
-        m_pIncludeKashida->Hide();
+        m_xIncludeDiacritics->set_active( true );
+        m_xIncludeKashida->set_active( true );
+        m_xIncludeKashida->hide();
     }
     //component extension - show component search buttons if the commands
     // vnd.sun.star::SearchViaComponent1 and 2 are supported
@@ -522,32 +458,38 @@ void SvxSearchDialog::Construct_Impl()
                 OUString sTemp;
                 uno::Any aRet = xDirectAccess->getByName("ComponentSearchGroupLabel");
                 aRet >>= sTemp;
-                m_pComponentFrame->get_label_widget()->SetText(sTemp);
+                m_xComponentFrame->set_label(sTemp);
                 aRet = xDirectAccess->getByName("ComponentSearchCommandLabel1");
                 aRet >>= sTemp;
-                m_pSearchComponent1PB->SetText( sTemp );
+                m_xSearchComponent1PB->set_label( sTemp );
                 aRet = xDirectAccess->getByName("ComponentSearchCommandLabel2");
                 aRet >>= sTemp;
-                m_pSearchComponent2PB->SetText( sTemp );
+                m_xSearchComponent2PB->set_label( sTemp );
             }
         }
         catch(uno::Exception&){}
 
-        if(!m_pSearchComponent1PB->GetText().isEmpty() && bSearchComponent1 )
+        if(!m_xSearchComponent1PB->get_label().isEmpty() && bSearchComponent1 )
         {
-            m_pComponentFrame->Show();
-            m_pSearchComponent1PB->Show();
+            m_xComponentFrame->show();
+            m_xSearchComponent1PB->show();
         }
-        if( !m_pSearchComponent2PB->GetText().isEmpty() )
+        if( !m_xSearchComponent2PB->get_label().isEmpty() )
         {
-            m_pComponentFrame->Show();
-            m_pSearchComponent2PB->Show();
+            m_xComponentFrame->show();
+            m_xSearchComponent2PB->show();
         }
     }
 }
 
+void SvxSearchDialog::EndDialog()
+{
+    mbClosing = true;
+    SfxModelessDialogController::EndDialog();
+    mbClosing = false;
+}
 
-bool SvxSearchDialog::Close()
+void SvxSearchDialog::Close()
 {
     // remember strings
     if (!aSearchStrings.empty())
@@ -558,34 +500,38 @@ bool SvxSearchDialog::Close()
 
     // save settings to configuration
     SvtSearchOptions aOpt;
-    aOpt.SetWholeWordsOnly          ( m_pWordBtn->IsChecked() );
-    aOpt.SetBackwards               ( m_pReplaceBackwardsCB->IsChecked() );
-    aOpt.SetUseRegularExpression    ( m_pRegExpBtn->IsChecked() );
-    aOpt.SetUseWildcard             ( m_pWildcardBtn->IsChecked() );
-    aOpt.SetSearchForStyles         ( m_pLayoutBtn->IsChecked() );
-    aOpt.SetSimilaritySearch        ( m_pSimilarityBox->IsChecked() );
-    aOpt.SetUseAsianOptions         ( m_pJapOptionsCB->IsChecked() );
-    aOpt.SetNotes                   ( m_pNotesBtn->IsChecked() );
-    aOpt.SetIgnoreDiacritics_CTL    ( !m_pIncludeDiacritics->IsChecked() );
-    aOpt.SetIgnoreKashida_CTL       ( !m_pIncludeKashida->IsChecked() );
-    aOpt.SetSearchFormatted         ( m_pSearchFormattedCB->IsChecked() );
+    aOpt.SetWholeWordsOnly          ( m_xWordBtn->get_active() );
+    aOpt.SetBackwards               ( m_xReplaceBackwardsCB->get_active() );
+    aOpt.SetUseRegularExpression    ( m_xRegExpBtn->get_active() );
+    aOpt.SetUseWildcard             ( m_xWildcardBtn->get_active() );
+    aOpt.SetSearchForStyles         ( m_xLayoutBtn->get_active() );
+    aOpt.SetSimilaritySearch        ( m_xSimilarityBox->get_active() );
+    aOpt.SetUseAsianOptions         ( m_xJapOptionsCB->get_active() );
+    aOpt.SetNotes                   ( m_xNotesBtn->get_active() );
+    aOpt.SetIgnoreDiacritics_CTL    ( !m_xIncludeDiacritics->get_active() );
+    aOpt.SetIgnoreKashida_CTL       ( !m_xIncludeKashida->get_active() );
+    aOpt.SetSearchFormatted         ( m_xSearchFormattedCB->get_active() );
     aOpt.Commit();
 
+    if (mbClosing)
+        return;
+
     const SfxPoolItem* ppArgs[] = { pSearchItem.get(), nullptr };
     rBindings.GetDispatcher()->Execute( FID_SEARCH_OFF, SfxCallMode::SLOT, ppArgs );
-    rBindings.Execute( SID_SEARCH_DLG );
+    rBindings.Invalidate(SID_SEARCH_DLG);
 
-    return true;
+    SfxViewShell* pViewShell = SfxViewShell::Current();
+    if (pViewShell)
+        pViewShell->GetViewFrame()->ToggleChildWindow(SID_SEARCH_DLG);
 }
 
-
 TransliterationFlags SvxSearchDialog::GetTransliterationFlags() const
 {
-    if (!m_pMatchCaseCB->IsChecked())
+    if (!m_xMatchCaseCB->get_active())
         nTransliterationFlags |=  TransliterationFlags::IGNORE_CASE;
     else
         nTransliterationFlags &= ~TransliterationFlags::IGNORE_CASE;
-    if ( !m_pJapMatchFullHalfWidthCB->IsChecked())
+    if ( !m_xJapMatchFullHalfWidthCB->get_active())
         nTransliterationFlags |=  TransliterationFlags::IGNORE_WIDTH;
     else
         nTransliterationFlags &= ~TransliterationFlags::IGNORE_WIDTH;
@@ -602,97 +548,95 @@ void SvxSearchDialog::ApplyTransliterationFlags_Impl( TransliterationFlags nSett
 {
     nTransliterationFlags = nSettings;
     bool bVal(nSettings & TransliterationFlags::IGNORE_CASE);
-    m_pMatchCaseCB->Check( !bVal );
+    m_xMatchCaseCB->set_active( !bVal );
     bVal = bool(nSettings & TransliterationFlags::IGNORE_WIDTH);
-    m_pJapMatchFullHalfWidthCB->Check( !bVal );
+    m_xJapMatchFullHalfWidthCB->set_active( !bVal );
 }
 
 
 bool SvxSearchDialog::IsOtherOptionsExpanded()
 {
-    return m_pReplaceBackwardsCB->IsChecked() ||
-           m_pSelectionBtn->IsChecked() ||
-           m_pRegExpBtn->IsChecked() ||
-           m_pLayoutBtn->IsChecked() ||
-           m_pSimilarityBox->IsChecked() ||
-           m_pJapMatchFullHalfWidthCB->IsChecked() ||
-           m_pJapOptionsCB->IsChecked() ||
-           m_pWildcardBtn->IsChecked() ||
-           m_pNotesBtn->IsChecked() ||
-           m_pIncludeKashida->IsChecked() ||
-           m_pIncludeDiacritics->IsChecked();
+    return m_xReplaceBackwardsCB->get_active() ||
+           m_xSelectionBtn->get_active() ||
+           m_xRegExpBtn->get_active() ||
+           m_xLayoutBtn->get_active() ||
+           m_xSimilarityBox->get_active() ||
+           m_xJapMatchFullHalfWidthCB->get_active() ||
+           m_xJapOptionsCB->get_active() ||
+           m_xWildcardBtn->get_active() ||
+           m_xNotesBtn->get_active() ||
+           m_xIncludeKashida->get_active() ||
+           m_xIncludeDiacritics->get_active();
 }
 
-
 void SvxSearchDialog::Activate()
 {
     // apply possible transliteration changes of the SvxSearchItem member
     DBG_ASSERT( pSearchItem, "SearchItem missing" );
     if (pSearchItem)
     {
-        m_pMatchCaseCB->Check( pSearchItem->GetExact() );
-        m_pJapMatchFullHalfWidthCB->Check( !pSearchItem->IsMatchFullHalfWidthForms() );
+        m_xMatchCaseCB->set_active( pSearchItem->GetExact() );
+        m_xJapMatchFullHalfWidthCB->set_active( !pSearchItem->IsMatchFullHalfWidthForms() );
     }
 
-    SfxModelessDialog::Activate();
+    SfxModelessDialogController::Activate();
 }
 
-
 void SvxSearchDialog::InitControls_Impl()
 {
     // CaseSensitives AutoComplete
-    m_pSearchLB->EnableAutocomplete( true, true );
-    m_pSearchLB->Show();
-    m_pReplaceLB->EnableAutocomplete( true, true );
-    m_pReplaceLB->Show();
+    m_xSearchLB->set_entry_completion( true );
+    m_xSearchLB->show();
+    m_xReplaceLB->set_entry_completion( true );
+    m_xReplaceLB->show();
 
-    m_pFormatBtn->Disable();
-    m_pAttributeBtn->Disable();
+    m_xFormatBtn->set_sensitive(false);
+    m_xAttributeBtn->set_sensitive(false);
 
-    m_pSearchLB->SetModifyHdl( LINK( this, SvxSearchDialog, ModifyHdl_Impl ) );
-    m_pReplaceLB->SetModifyHdl( LINK( this, SvxSearchDialog, ModifyHdl_Impl ) );
+    m_xSearchLB->connect_changed( LINK( this, SvxSearchDialog, ModifyHdl_Impl ) );
+    m_xReplaceLB->connect_changed( LINK( this, SvxSearchDialog, ModifyHdl_Impl ) );
 
-    Link<Control&,void> aLink = LINK( this, SvxSearchDialog, FocusHdl_Impl );
-    m_pSearchLB->SetGetFocusHdl( aLink );
-    m_pReplaceLB->SetGetFocusHdl( aLink );
+    Link<weld::Widget&,void> aLink = LINK( this, SvxSearchDialog, FocusHdl_Impl );
+    m_xSearchLB->connect_focus_in( aLink );
+    m_xReplaceLB->connect_focus_in( aLink );
 
     aLink = LINK( this, SvxSearchDialog, LoseFocusHdl_Impl );
-    m_pSearchLB->SetLoseFocusHdl( aLink );
-    m_pReplaceLB->SetLoseFocusHdl( aLink );
-
-    m_pSearchTmplLB->SetLoseFocusHdl( aLink );
-    m_pReplaceTmplLB->SetLoseFocusHdl( aLink );
-
-    Link<Button*,void> aLink2 = LINK( this, SvxSearchDialog, CommandHdl_Impl );
-    m_pSearchBtn->SetClickHdl( aLink2 );
-    m_pBackSearchBtn->SetClickHdl( aLink2 );
-    m_pSearchAllBtn->SetClickHdl( aLink2 );
-    m_pReplaceBtn->SetClickHdl( aLink2 );
-    m_pReplaceAllBtn->SetClickHdl( aLink2 );
-    m_pCloseBtn->SetClickHdl( aLink2 );
-    m_pSimilarityBtn->SetClickHdl( aLink2 );
-    m_pJapOptionsBtn->SetClickHdl( aLink2 );
-    m_pSearchComponent1PB->SetClickHdl( aLink2 );
-    m_pSearchComponent2PB->SetClickHdl( aLink2 );
+    m_xSearchLB->connect_focus_out( aLink );
+    m_xReplaceLB->connect_focus_out( aLink );
+
+    m_xSearchTmplLB->connect_focus_out( aLink );
+    m_xReplaceTmplLB->connect_focus_out( aLink );
+
+    Link<weld::Button&,void> aLink2 = LINK( this, SvxSearchDialog, CommandHdl_Impl );
+    m_xSearchBtn->connect_clicked( aLink2 );
+    m_xBackSearchBtn->connect_clicked( aLink2 );
+    m_xSearchAllBtn->connect_clicked( aLink2 );
+    m_xReplaceBtn->connect_clicked( aLink2 );
+    m_xReplaceAllBtn->connect_clicked( aLink2 );
+    m_xCloseBtn->connect_clicked( aLink2 );
+    m_xSimilarityBtn->connect_clicked( aLink2 );
+    m_xJapOptionsBtn->connect_clicked( aLink2 );
+    m_xSearchComponent1PB->connect_clicked( aLink2 );
+    m_xSearchComponent2PB->connect_clicked( aLink2 );
 
     aLink2 = LINK( this, SvxSearchDialog, FlagHdl_Impl );
-    m_pReplaceBackwardsCB->SetClickHdl( aLink2 );
-    m_pWordBtn->SetClickHdl( aLink2 );
-    m_pSelectionBtn->SetClickHdl( aLink2 );
-    m_pMatchCaseCB->SetClickHdl( aLink2 );
-    m_pRegExpBtn->SetClickHdl( aLink2 );
-    m_pWildcardBtn->SetClickHdl( aLink2 );
-    m_pNotesBtn->SetClickHdl( aLink2 );
-    m_pSimilarityBox->SetClickHdl( aLink2 );
-    m_pJapOptionsCB->SetClickHdl( aLink2 );
-    m_pJapMatchFullHalfWidthCB->SetClickHdl( aLink2 );
-    m_pIncludeDiacritics->SetClickHdl( aLink2 );
-    m_pIncludeKashida->SetClickHdl( aLink2 );
-    m_pLayoutBtn->SetClickHdl( LINK( this, SvxSearchDialog, TemplateHdl_Impl ) );
-    m_pFormatBtn->SetClickHdl( LINK( this, SvxSearchDialog, FormatHdl_Impl ) );
-    m_pNoFormatBtn->SetClickHdl(
+    m_xReplaceBackwardsCB->connect_clicked( aLink2 );
+    m_xWordBtn->connect_clicked( aLink2 );
+    m_xSelectionBtn->connect_clicked( aLink2 );
+    m_xMatchCaseCB->connect_clicked( aLink2 );
+    m_xRegExpBtn->connect_clicked( aLink2 );
+    m_xWildcardBtn->connect_clicked( aLink2 );
+    m_xNotesBtn->connect_clicked( aLink2 );
+    m_xSimilarityBox->connect_clicked( aLink2 );
+    m_xJapOptionsCB->connect_clicked( aLink2 );
+    m_xJapMatchFullHalfWidthCB->connect_clicked( aLink2 );
+    m_xIncludeDiacritics->connect_clicked( aLink2 );
+    m_xIncludeKashida->connect_clicked( aLink2 );
+    m_xLayoutBtn->connect_clicked( LINK( this, SvxSearchDialog, TemplateHdl_Impl ) );
+    m_xFormatBtn->connect_clicked( LINK( this, SvxSearchDialog, FormatHdl_Impl ) );
+    m_xNoFormatBtn->connect_clicked(
         LINK( this, SvxSearchDialog, NoFormatHdl_Impl ) );
-    m_pAttributeBtn->SetClickHdl(
+    m_xAttributeBtn->connect_clicked(
         LINK( this, SvxSearchDialog, AttributeHdl_Impl ) );
 }
 
@@ -732,36 +676,36 @@ void SvxSearchDialog::ShowOptionalControls_Impl()
         eFactory == SvtModuleOptions::EFactory::WRITERGLOBAL;
     bool bCalcApp = eFactory == SvtModuleOptions::EFactory::CALC;
 
-    m_pLayoutBtn->Show(!bDrawApp);
-    m_pNotesBtn->Show(bWriterApp);
-    m_pRegExpBtn->Show(!bDrawApp);
-    m_pWildcardBtn->Show(bCalcApp); /* TODO:WILDCARD enable for other apps if hey handle it */
-    m_pReplaceBackwardsCB->Show();
-    m_pSimilarityBox->Show();
-    m_pSimilarityBtn->Show();
-    m_pSelectionBtn->Show();
-    m_pIncludeDiacritics->Show();
-    m_pIncludeKashida->Show(aCTLOptions.IsCTLFontEnabled());
-    m_pJapMatchFullHalfWidthCB->Show(aCJKOptions.IsCJKFontEnabled());
-    m_pJapOptionsCB->Show(aCJKOptions.IsJapaneseFindEnabled());
-    m_pJapOptionsBtn->Show(aCJKOptions.IsJapaneseFindEnabled());
+    m_xLayoutBtn->set_visible(!bDrawApp);
+    m_xNotesBtn->set_visible(bWriterApp);
+    m_xRegExpBtn->set_visible(!bDrawApp);
+    m_xWildcardBtn->set_visible(bCalcApp); /* TODO:WILDCARD enable for other apps if hey handle it */
+    m_xReplaceBackwardsCB->show();
+    m_xSimilarityBox->show();
+    m_xSimilarityBtn->show();
+    m_xSelectionBtn->show();
+    m_xIncludeDiacritics->show();
+    m_xIncludeKashida->set_visible(aCTLOptions.IsCTLFontEnabled());
+    m_xJapMatchFullHalfWidthCB->set_visible(aCJKOptions.IsCJKFontEnabled());
+    m_xJapOptionsCB->set_visible(aCJKOptions.IsJapaneseFindEnabled());
+    m_xJapOptionsBtn->set_visible(aCJKOptions.IsJapaneseFindEnabled());
 
     if (bWriter)
     {
-        m_pAttributeBtn->Show();
-        m_pFormatBtn->Show();
-        m_pNoFormatBtn->Show();
+        m_xAttributeBtn->show();
+        m_xFormatBtn->show();
+        m_xNoFormatBtn->show();
     }
 
     if (bCalcApp)
     {
-        m_pCalcSearchInFT->Show();
-        m_pCalcSearchInLB->Show();
-        m_pCalcSearchDirFT->Show();
-        m_pRowsBtn->Show();
-        m_pColumnsBtn->Show();
-        m_pAllSheetsCB->Show();
-        m_pSearchFormattedCB->Show();
+        m_xCalcSearchInFT->show();
+        m_xCalcSearchInLB->show();
+        m_xCalcSearchDirFT->show();
+        m_xRowsBtn->show();
+        m_xColumnsBtn->show();
+        m_xAllSheetsCB->show();
+        m_xSearchFormattedCB->show();
     }
 }
 
@@ -800,45 +744,45 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
     bWriter = ( pSearchItem->GetAppFlag() == SvxSearchApp::WRITER );
 
     if ( !( nModifyFlag & ModifyFlags::Word ) )
-         m_pWordBtn->Check( pSearchItem->GetWordOnly() );
+         m_xWordBtn->set_active( pSearchItem->GetWordOnly() );
     if ( !( nModifyFlag & ModifyFlags::Exact ) )
-        m_pMatchCaseCB->Check( pSearchItem->GetExact() );
+        m_xMatchCaseCB->set_active( pSearchItem->GetExact() );
     if ( !( nModifyFlag & ModifyFlags::Backwards ) )
-        m_pReplaceBackwardsCB->Check( bReplaceBackwards ); //adjustment to replace backwards
+        m_xReplaceBackwardsCB->set_active( bReplaceBackwards ); //adjustment to replace backwards
     if ( !( nModifyFlag & ModifyFlags::Notes ) )
-        m_pNotesBtn->Check( pSearchItem->GetNotes() );
+        m_xNotesBtn->set_active( pSearchItem->GetNotes() );
     if ( !( nModifyFlag & ModifyFlags::Selection ) )
-        m_pSelectionBtn->Check( pSearchItem->GetSelection() );
+        m_xSelectionBtn->set_active( pSearchItem->GetSelection() );
     if ( !( nModifyFlag & ModifyFlags::Regexp ) )
-        m_pRegExpBtn->Check( pSearchItem->GetRegExp() );
+        m_xRegExpBtn->set_active( pSearchItem->GetRegExp() );
     if ( !( nModifyFlag & ModifyFlags::Wildcard ) )
-        m_pWildcardBtn->Check( pSearchItem->GetWildcard() );
+        m_xWildcardBtn->set_active( pSearchItem->GetWildcard() );
     if ( !( nModifyFlag & ModifyFlags::Layout ) )
-        m_pLayoutBtn->Check( pSearchItem->GetPattern() );
-    if (m_pNotesBtn->IsChecked())
-        m_pLayoutBtn->Disable();
-    m_pSimilarityBox->Check( pSearchItem->IsLevenshtein() );
-    if ( m_pJapOptionsCB->IsVisible() )
-        m_pJapOptionsCB->Check( pSearchItem->IsUseAsianOptions() );
-    m_pIncludeDiacritics->Check( !aOpt.IsIgnoreDiacritics_CTL() );
-    if ( m_pIncludeKashida->IsVisible() )
-        m_pIncludeKashida->Check( !aOpt.IsIgnoreKashida_CTL() );
+        m_xLayoutBtn->set_active( pSearchItem->GetPattern() );
+    if (m_xNotesBtn->get_active())
+        m_xLayoutBtn->set_sensitive(false);
+    m_xSimilarityBox->set_active( pSearchItem->IsLevenshtein() );
+    if ( m_xJapOptionsCB->get_visible() )
+        m_xJapOptionsCB->set_active( pSearchItem->IsUseAsianOptions() );
+    m_xIncludeDiacritics->set_active( !aOpt.IsIgnoreDiacritics_CTL() );
+    if ( m_xIncludeKashida->get_visible() )
+        m_xIncludeKashida->set_active( !aOpt.IsIgnoreKashida_CTL() );
     if ( SvxSearchDialog::IsOtherOptionsExpanded() )
-        m_pOtherOptionsExpander->set_expanded( true );
+        m_xOtherOptionsExpander->set_expanded( true );
     ApplyTransliterationFlags_Impl( pSearchItem->GetTransliterationFlags() );
 
     ShowOptionalControls_Impl();
 
     if ( pSearchItem->GetAppFlag() == SvxSearchApp::CALC )
     {
-        m_pCalcGrid->Show();
-        m_pSearchFormattedCB->Check( aOpt.IsSearchFormatted() );
-        Link<Button*,void> aLink = LINK( this, SvxSearchDialog, FlagHdl_Impl );
-        m_pCalcSearchInLB->SetSelectHdl( LINK( this, SvxSearchDialog, LBSelectHdl_Impl ) );
-        m_pRowsBtn->SetClickHdl( aLink );
-        m_pColumnsBtn->SetClickHdl( aLink );
-        m_pAllSheetsCB->SetClickHdl( aLink );
-        m_pSearchFormattedCB->SetClickHdl( aLink );
+        m_xCalcGrid->show();
+        m_xSearchFormattedCB->set_active( aOpt.IsSearchFormatted() );
+        Link<weld::Button&,void> aLink = LINK( this, SvxSearchDialog, FlagHdl_Impl );
+        m_xCalcSearchInLB->connect_changed( LINK( this, SvxSearchDialog, LBSelectHdl_Impl ) );
+        m_xRowsBtn->connect_clicked( aLink );
+        m_xColumnsBtn->connect_clicked( aLink );
+        m_xAllSheetsCB->connect_clicked( aLink );
+        m_xSearchFormattedCB->connect_clicked( aLink );
 
         ModifyFlags nModifyFlagCheck;
         switch ( pSearchItem->GetCellType() )
@@ -859,46 +803,46 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
                 std::abort(); // cannot happen
         }
         if ( !(nModifyFlag & nModifyFlagCheck) )
-            m_pCalcSearchInLB->SelectEntryPos( static_cast<sal_Int32>(pSearchItem->GetCellType()) );
+            m_xCalcSearchInLB->set_active( static_cast<sal_Int32>(pSearchItem->GetCellType()) );
 
-        m_pWordBtn->SetText( aCalcStr.getToken( 0, '#' ) );
+        m_xWordBtn->set_label( aCalcStr.getToken( 0, '#' ) );
 
         if ( pSearchItem->GetRowDirection() &&
              !( nModifyFlag & ModifyFlags::Rows ) )
-            m_pRowsBtn->Check();
+            m_xRowsBtn->set_active(true);
         else if ( !pSearchItem->GetRowDirection() &&
                   !( nModifyFlag & ModifyFlags::Columns ) )
-            m_pColumnsBtn->Check();
+            m_xColumnsBtn->set_active(true);
 
         if ( !( nModifyFlag & ModifyFlags::AllTables ) )
-            m_pAllSheetsCB->Check( pSearchItem->IsAllTables() );
+            m_xAllSheetsCB->set_active( pSearchItem->IsAllTables() );
 
         // only look for formatting in Writer
-        m_pFormatBtn->Hide();
-        m_pNoFormatBtn->Hide();
-        m_pAttributeBtn->Hide();
+        m_xFormatBtn->hide();
+        m_xNoFormatBtn->hide();
+        m_xAttributeBtn->hide();
     }
     else
     {
-        m_pSearchFormattedCB->Hide();
-        m_pWordBtn->SetText( aCalcStr.getToken( 1, '#' ) );
+        m_xSearchFormattedCB->hide();
+        m_xWordBtn->set_label( aCalcStr.getToken( 1, '#' ) );
 
         if ( pSearchItem->GetAppFlag() == SvxSearchApp::DRAW )
         {
-            m_pSearchAllBtn->Hide();
+            m_xSearchAllBtn->hide();
 
-            m_pRegExpBtn->Hide();
-            m_pWildcardBtn->Hide();
-            m_pLayoutBtn->Hide();
+            m_xRegExpBtn->hide();
+            m_xWildcardBtn->hide();
+            m_xLayoutBtn->hide();
 
             // only look for formatting in Writer
-            m_pFormatBtn->Hide();
-            m_pNoFormatBtn->Hide();
-            m_pAttributeBtn->Hide();
+            m_xFormatBtn->hide();
+            m_xNoFormatBtn->hide();
+            m_xAttributeBtn->hide();
         }
         else
         {
-            m_pWildcardBtn->Hide(); /* TODO:WILDCARD do not hide for other apps if they handle it */
+            m_xWildcardBtn->hide(); /* TODO:WILDCARD do not hide for other apps if they handle it */
 
             if ( !pSearchList )
             {
@@ -921,11 +865,11 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
 
     // similarity search?
     if ( !( nModifyFlag & ModifyFlags::Similarity ) )
-        m_pSimilarityBox->Check( pSearchItem->IsLevenshtein() );
+        m_xSimilarityBox->set_active( pSearchItem->IsLevenshtein() );
     bSet = true;
 
-    FlagHdl_Impl(m_pSimilarityBox);
-    FlagHdl_Impl(m_pJapOptionsCB);
+    FlagHdl_Impl(*m_xSimilarityBox);
+    FlagHdl_Impl(*m_xJapOptionsCB);
 
     bool bDisableSearch = false;
     SfxViewShell* pViewShell = SfxViewShell::Current();
@@ -935,11 +879,11 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
         bool bText = !bSearchPattern;
 
         if ( pViewShell->HasSelection( bText ) )
-            EnableControl_Impl(m_pSelectionBtn);
+            EnableControl_Impl(*m_xSelectionBtn);
         else
         {
-            m_pSelectionBtn->Check( false );
-            m_pSelectionBtn->Disable();
+            m_xSelectionBtn->set_active( false );
+            m_xSelectionBtn->set_sensitive(false);
         }
     }
 
@@ -951,8 +895,8 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
         if ( pShell && pShell->GetStyleSheetPool() )
         {
             // Templates designed
-            m_pSearchTmplLB->Clear();
-            m_pReplaceTmplLB->Clear();
+            m_xSearchTmplLB->clear();
+            m_xReplaceTmplLB->clear();
             SfxStyleSheetBasePool* pStylePool = pShell->GetStyleSheetPool();
             pStylePool->SetSearchMask( pSearchItem->GetFamily() );
             SfxStyleSheetBase* pBase = pStylePool->First();
@@ -960,29 +904,29 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
             while ( pBase )
             {
                 if ( pBase->IsUsed() )
-                    m_pSearchTmplLB->InsertEntry( pBase->GetName() );
-                m_pReplaceTmplLB->InsertEntry( pBase->GetName() );
+                    m_xSearchTmplLB->append_text( pBase->GetName() );
+                m_xReplaceTmplLB->append_text( pBase->GetName() );
                 pBase = pStylePool->Next();
             }
-            m_pSearchTmplLB->SelectEntry( pSearchItem->GetSearchString() );
-            m_pReplaceTmplLB->SelectEntry( pSearchItem->GetReplaceString() );
+            m_xSearchTmplLB->set_active_text( pSearchItem->GetSearchString() );
+            m_xReplaceTmplLB->set_active_text( pSearchItem->GetReplaceString() );
 
         }
-        m_pSearchTmplLB->Show();
+        m_xSearchTmplLB->show();
 
         if ( bConstruct )
             // Grab focus only after creating
-            m_pSearchTmplLB->GrabFocus();
-        m_pReplaceTmplLB->Show();
-        m_pSearchLB->Hide();
-        m_pReplaceLB->Hide();
+            m_xSearchTmplLB->grab_focus();
+        m_xReplaceTmplLB->show();
+        m_xSearchLB->hide();
+        m_xReplaceLB->hide();
 
-        m_pWordBtn->Disable();
-        m_pRegExpBtn->Disable();
-        m_pWildcardBtn->Disable();
-        m_pMatchCaseCB->Disable();
+        m_xWordBtn->set_sensitive(false);
+        m_xRegExpBtn->set_sensitive(false);
+        m_xWildcardBtn->set_sensitive(false);
+        m_xMatchCaseCB->set_sensitive(false);
 
-        bDisableSearch = !m_pSearchTmplLB->GetEntryCount();
+        bDisableSearch = !m_xSearchTmplLB->get_count();
     }
     else
     {
@@ -990,7 +934,7 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
         bool bSetReplace = !( nModifyFlag & ModifyFlags::Replace );
 
         if ( !(pSearchItem->GetSearchString().isEmpty()) && bSetSearch )
-            m_pSearchLB->SetText( pSearchItem->GetSearchString() );
+            m_xSearchLB->set_entry_text( pSearchItem->GetSearchString() );
         else if (!aSearchStrings.empty())
         {
             bool bAttributes =
@@ -998,7 +942,7 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
                   ( pReplaceList && pReplaceList->Count() ) );
 
             if ( bSetSearch && !bAttributes )
-                m_pSearchLB->SetText(aSearchStrings[0]);
+                m_xSearchLB->set_entry_text(aSearchStrings[0]);
 
             OUString aReplaceTxt = pSearchItem->GetReplaceString();
 
@@ -1006,72 +950,72 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
                 aReplaceTxt = aReplaceStrings[0];
 
             if ( bSetReplace && !bAttributes )
-                m_pReplaceLB->SetText( aReplaceTxt );
+                m_xReplaceLB->set_entry_text( aReplaceTxt );
         }
-        m_pSearchLB->Show();
+        m_xSearchLB->show();
 
         if ( bConstruct )
             // Grab focus only after creating
-            m_pSearchLB->GrabFocus();
-        m_pReplaceLB->Show();
-        m_pSearchTmplLB->Hide();
-        m_pReplaceTmplLB->Hide();
+            m_xSearchLB->grab_focus();
+        m_xReplaceLB->show();
+        m_xSearchTmplLB->hide();
+        m_xReplaceTmplLB->hide();
 
-        EnableControl_Impl(m_pRegExpBtn);
-        EnableControl_Impl(m_pWildcardBtn);
-        EnableControl_Impl(m_pMatchCaseCB);
+        EnableControl_Impl(*m_xRegExpBtn);
+        EnableControl_Impl(*m_xWildcardBtn);
+        EnableControl_Impl(*m_xMatchCaseCB);
 
-        if ( m_pRegExpBtn->IsChecked() )
-            m_pWordBtn->Disable();
+        if ( m_xRegExpBtn->get_active() )
+            m_xWordBtn->set_sensitive(false);
         else
-            EnableControl_Impl(m_pWordBtn);
+            EnableControl_Impl(*m_xWordBtn);
 
-        bDisableSearch = m_pSearchLB->GetText().isEmpty() &&
-            m_pSearchAttrText->GetText().isEmpty();
+        bDisableSearch = m_xSearchLB->get_active_text().isEmpty() &&
+            m_xSearchAttrText->get_label().isEmpty();
     }
-    FocusHdl_Impl(*m_pSearchLB);
+    FocusHdl_Impl(*m_xSearchLB);
 
     if ( bDisableSearch )
     {
-        m_pSearchBtn->Disable();
-        m_pBackSearchBtn->Disable();
-        m_pSearchAllBtn->Disable();
-        m_pReplaceBtn->Disable();
-        m_pReplaceAllBtn->Disable();
-        m_pComponentFrame->Enable(false);
+        m_xSearchBtn->set_sensitive(false);
+        m_xBackSearchBtn->set_sensitive(false);
+        m_xSearchAllBtn->set_sensitive(false);
+        m_xReplaceBtn->set_sensitive(false);
+        m_xReplaceAllBtn->set_sensitive(false);
+        m_xComponentFrame->set_sensitive(false);
     }
     else
     {
-        EnableControl_Impl(m_pSearchBtn);
-        EnableControl_Impl(m_pBackSearchBtn);
-        EnableControl_Impl(m_pReplaceBtn);
-        if (!bWriter || !m_pNotesBtn->IsChecked())
+        EnableControl_Impl(*m_xSearchBtn);
+        EnableControl_Impl(*m_xBackSearchBtn);
+        EnableControl_Impl(*m_xReplaceBtn);
+        if (!bWriter || !m_xNotesBtn->get_active())
         {
-            EnableControl_Impl(m_pSearchAllBtn);
-            EnableControl_Impl(m_pReplaceAllBtn);
+            EnableControl_Impl(*m_xSearchAllBtn);
+            EnableControl_Impl(*m_xReplaceAllBtn);
         }
         if (bWriter && pSearchItem->GetNotes())
         {
-            m_pSearchAllBtn->Disable();
-            m_pReplaceAllBtn->Disable();
+            m_xSearchAllBtn->set_sensitive(false);
+            m_xReplaceAllBtn->set_sensitive(false);
         }
     }
 
-    if (!m_pSearchAttrText->GetText().isEmpty())
-        EnableControl_Impl(m_pNoFormatBtn);
+    if (!m_xSearchAttrText->get_label().isEmpty())
+        EnableControl_Impl(*m_xNoFormatBtn);
     else
-        m_pNoFormatBtn->Disable();
+        m_xNoFormatBtn->set_sensitive(false);
 
     if ( !pSearchList )
     {
-        m_pAttributeBtn->Disable();
-        m_pFormatBtn->Disable();
+        m_xAttributeBtn->set_sensitive(false);
+        m_xFormatBtn->set_sensitive(false);
     }
 
-    if ( m_pLayoutBtn->IsChecked() )
+    if ( m_xLayoutBtn->get_active() )
     {
         pImpl->bSaveToModule = false;
-        TemplateHdl_Impl(m_pLayoutBtn);
+        TemplateHdl_Impl(*m_xLayoutBtn);
         pImpl->bSaveToModule = true;
     }
 }
@@ -1110,13 +1054,13 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet,
         {
             pSearchList->Put( *pSSet );
 
-            m_pSearchAttrText->SetText( BuildAttrText_Impl( aDesc, true ) );
+            m_xSearchAttrText->set_label( BuildAttrText_Impl( aDesc, true ) );
 
             if ( !aDesc.isEmpty() )
             {
-                if (!m_pSearchAttrText->IsVisible())
+                if (!m_xSearchAttrText->get_visible())
                 {
-                    m_pSearchAttrText->Show();
+                    m_xSearchAttrText->show();
                     bSetOptimalLayoutSize = true;
                 }
                 bFormat |= true;
@@ -1132,13 +1076,13 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet,
         {
             pReplaceList->Put( *pRSet );
 
-            m_pReplaceAttrText->SetText( BuildAttrText_Impl( aDesc, false ) );
+            m_xReplaceAttrText->set_label( BuildAttrText_Impl( aDesc, false ) );
 
             if ( !aDesc.isEmpty() )
             {
-                if (!m_pReplaceAttrText->IsVisible())
+                if (!m_xReplaceAttrText->get_visible())
                 {
-                    m_pReplaceAttrText->Show();
+                    m_xReplaceAttrText->show();
                     bSetOptimalLayoutSize = true;
                 }
                 bFormat |= true;
@@ -1147,244 +1091,242 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet,
     }
 
     if (bSetOptimalLayoutSize)
-        setOptimalLayoutSize();
+        m_xDialog->resize_to_request();
 }
 
-
-IMPL_LINK( SvxSearchDialog, LBSelectHdl_Impl, ListBox&, rCtrl, void )
+IMPL_LINK( SvxSearchDialog, LBSelectHdl_Impl, weld::ComboBox&, rCtrl, void )
 {
     ClickHdl_Impl(&rCtrl);
 }
 
-IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Button *, pCtrl, void )
+IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, weld::Button&, rCtrl, void )
 {
-    ClickHdl_Impl(pCtrl);
+    ClickHdl_Impl(&rCtrl);
 }
 
-void SvxSearchDialog::ClickHdl_Impl(void const * pCtrl)
+void SvxSearchDialog::ClickHdl_Impl(const weld::Widget* pCtrl)
 {
     if ( pCtrl && !bSet )
-        SetModifyFlag_Impl( static_cast<Control const *>(pCtrl) );
+        SetModifyFlag_Impl(pCtrl);
     else
         bSet = false;
 
-    if (pCtrl == m_pSimilarityBox)
+    if (pCtrl == m_xSimilarityBox.get())
     {
-        bool bIsChecked = m_pSimilarityBox->IsChecked();
+        bool bIsChecked = m_xSimilarityBox->get_active();
 
         if ( bIsChecked )
         {
-            m_pSimilarityBtn->Enable();
-            m_pRegExpBtn->Check( false );
-            m_pRegExpBtn->Disable();
-            m_pWildcardBtn->Check( false );
-            m_pWildcardBtn->Disable();
-            EnableControl_Impl(m_pWordBtn);
-
-            if ( m_pLayoutBtn->IsChecked() )
+            m_xSimilarityBtn->set_sensitive(true);
+            m_xRegExpBtn->set_active( false );
+            m_xRegExpBtn->set_sensitive(false);
+            m_xWildcardBtn->set_active( false );
+            m_xWildcardBtn->set_sensitive(false);
+            EnableControl_Impl(*m_xWordBtn);
+
+            if ( m_xLayoutBtn->get_active() )
             {
-                EnableControl_Impl(m_pMatchCaseCB);
-                m_pLayoutBtn->Check( false );
+                EnableControl_Impl(*m_xMatchCaseCB);
+                m_xLayoutBtn->set_active( false );
             }
-            m_pRegExpBtn->Disable();
-            m_pWildcardBtn->Disable();
-            m_pLayoutBtn->Disable();
-            m_pFormatBtn->Disable();
-            m_pNoFormatBtn->Disable();
-            m_pAttributeBtn->Disable();
+            m_xRegExpBtn->set_sensitive(false);
+            m_xWildcardBtn->set_sensitive(false);
+            m_xLayoutBtn->set_sensitive(false);
+            m_xFormatBtn->set_sensitive(false);
+            m_xNoFormatBtn->set_sensitive(false);
+            m_xAttributeBtn->set_sensitive(false);
         }
         else
         {
-            EnableControl_Impl(m_pRegExpBtn);
-            EnableControl_Impl(m_pWildcardBtn);
-            if (!m_pNotesBtn->IsChecked())
-                EnableControl_Impl(m_pLayoutBtn);
-            EnableControl_Impl(m_pFormatBtn);
-            EnableControl_Impl(m_pAttributeBtn);
-            m_pSimilarityBtn->Disable();
+            EnableControl_Impl(*m_xRegExpBtn);
+            EnableControl_Impl(*m_xWildcardBtn);
+            if (!m_xNotesBtn->get_active())
+                EnableControl_Impl(*m_xLayoutBtn);
+            EnableControl_Impl(*m_xFormatBtn);
+            EnableControl_Impl(*m_xAttributeBtn);
+            m_xSimilarityBtn->set_sensitive(false);
         }
         pSearchItem->SetLevenshtein( bIsChecked );
     }
-    else if (pCtrl == m_pNotesBtn)
+    else if (pCtrl == m_xNotesBtn.get())
     {
-        if (m_pNotesBtn->IsChecked())
+        if (m_xNotesBtn->get_active())
         {
-            m_pLayoutBtn->Disable();
-            m_pSearchAllBtn->Disable();
-            m_pReplaceAllBtn->Disable();
+            m_xLayoutBtn->set_sensitive(false);
+            m_xSearchAllBtn->set_sensitive(false);
+            m_xReplaceAllBtn->set_sensitive(false);
         }
         else
         {
-            EnableControl_Impl(m_pLayoutBtn);
-            ModifyHdl_Impl(*m_pSearchLB);
+            EnableControl_Impl(*m_xLayoutBtn);
+            ModifyHdl_Impl(*m_xSearchLB);
         }
     }
     else
     {
-        if ( m_pLayoutBtn->IsChecked() && !bFormat )
+        if ( m_xLayoutBtn->get_active() && !bFormat )
         {
-            m_pWordBtn->Check( false );
-            m_pWordBtn->Disable();
-            m_pRegExpBtn->Check( false );
-            m_pRegExpBtn->Disable();
-            m_pWildcardBtn->Check( false );
-            m_pWildcardBtn->Disable();
-            m_pMatchCaseCB->Check( false );
-            m_pMatchCaseCB->Disable();
-            m_pNotesBtn->Disable();
-
-            if ( m_pSearchTmplLB->GetEntryCount() )
+            m_xWordBtn->set_active( false );
+            m_xWordBtn->set_sensitive(false);
+            m_xRegExpBtn->set_active( false );
+            m_xRegExpBtn->set_sensitive(false);
+            m_xWildcardBtn->set_active( false );
+            m_xWildcardBtn->set_sensitive(false);
+            m_xMatchCaseCB->set_active( false );
+            m_xMatchCaseCB->set_sensitive(false);
+            m_xNotesBtn->set_sensitive(false);
+
+            if ( m_xSearchTmplLB->get_count() )
             {
-                EnableControl_Impl(m_pSearchBtn);
-                EnableControl_Impl(m_pBackSearchBtn);
-                EnableControl_Impl(m_pSearchAllBtn);
-                EnableControl_Impl(m_pReplaceBtn);
-                EnableControl_Impl(m_pReplaceAllBtn);
+                EnableControl_Impl(*m_xSearchBtn);
+                EnableControl_Impl(*m_xBackSearchBtn);
+                EnableControl_Impl(*m_xSearchAllBtn);
+                EnableControl_Impl(*m_xReplaceBtn);
+                EnableControl_Impl(*m_xReplaceAllBtn);
             }
         }
         else
         {
-            EnableControl_Impl(m_pRegExpBtn);
-            EnableControl_Impl(m_pWildcardBtn);
-            EnableControl_Impl(m_pMatchCaseCB);
-            EnableControl_Impl(m_pNotesBtn);
+            EnableControl_Impl(*m_xRegExpBtn);
+            EnableControl_Impl(*m_xWildcardBtn);
+            EnableControl_Impl(*m_xMatchCaseCB);
+            EnableControl_Impl(*m_xNotesBtn);
 
-            if ( m_pRegExpBtn->IsChecked() )
+            if ( m_xRegExpBtn->get_active() )
             {
-                m_pWordBtn->Check( false );
-                m_pWordBtn->Disable();
-                m_pWildcardBtn->Check( false );
-                m_pWildcardBtn->Disable();
-                m_pSimilarityBox->Check( false );
-                m_pSimilarityBox->Disable();
-                m_pSimilarityBtn->Disable();
+                m_xWordBtn->set_active( false );
+                m_xWordBtn->set_sensitive(false);
+                m_xWildcardBtn->set_active( false );
+                m_xWildcardBtn->set_sensitive(false);
+                m_xSimilarityBox->set_active( false );
+                m_xSimilarityBox->set_sensitive(false);
+                m_xSimilarityBtn->set_sensitive(false);
             }
-            else if ( m_pWildcardBtn->IsChecked() )
+            else if ( m_xWildcardBtn->get_active() )
             {
-                m_pRegExpBtn->Check( false );
-                m_pRegExpBtn->Disable();
-                m_pSimilarityBox->Check( false );
-                m_pSimilarityBox->Disable();
-                m_pSimilarityBtn->Disable();
+                m_xRegExpBtn->set_active( false );
+                m_xRegExpBtn->set_sensitive(false);
+                m_xSimilarityBox->set_active( false );
+                m_xSimilarityBox->set_sensitive(false);
+                m_xSimilarityBtn->set_sensitive(false);
             }
             else
             {
-                EnableControl_Impl(m_pWordBtn);
-                EnableControl_Impl(m_pSimilarityBox);
+                EnableControl_Impl(*m_xWordBtn);
+                EnableControl_Impl(*m_xSimilarityBox);
             }
 
             // Search-string in place? then enable Buttons
             bSet = true;
-            ModifyHdl_Impl(*m_pSearchLB);
+            ModifyHdl_Impl(*m_xSearchLB);
         }
     }
 
-    if (pCtrl == m_pAllSheetsCB)
+    if (pCtrl == m_xAllSheetsCB.get())
     {
         bSet = true;
-        ModifyHdl_Impl(*m_pSearchLB);
+        ModifyHdl_Impl(*m_xSearchLB);
     }
 
-    if (pCtrl == m_pJapOptionsCB)
+    if (pCtrl == m_xJapOptionsCB.get())
     {
-        bool bEnableJapOpt = m_pJapOptionsCB->IsChecked();
-        m_pMatchCaseCB->Enable(!bEnableJapOpt );
-        m_pJapMatchFullHalfWidthCB->Enable(!bEnableJapOpt );
-        m_pJapOptionsBtn->Enable( bEnableJapOpt );
+        bool bEnableJapOpt = m_xJapOptionsCB->get_active();
+        m_xMatchCaseCB->set_sensitive(!bEnableJapOpt );
+        m_xJapMatchFullHalfWidthCB->set_sensitive(!bEnableJapOpt );
+        m_xJapOptionsBtn->set_sensitive( bEnableJapOpt );
     }
 
     if ( pImpl->bSaveToModule )
         SaveToModule_Impl();
 }
 
-
-IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn, void )
+IMPL_LINK(SvxSearchDialog, CommandHdl_Impl, weld::Button&, rBtn, void)
 {
-    bool bInclusive = ( m_pLayoutBtn->GetText() == aLayoutStr );
+    bool bInclusive = ( m_xLayoutBtn->get_label() == aLayoutStr );
 
-    if ( ( pBtn == m_pSearchBtn )   ||
-        (pBtn == m_pBackSearchBtn)  ||
-         ( pBtn == m_pSearchAllBtn )||
-         ( pBtn == m_pReplaceBtn )  ||
-         ( pBtn == m_pReplaceAllBtn ) )
+    if ( ( &rBtn == m_xSearchBtn.get() )   ||
+         (&rBtn == m_xBackSearchBtn.get())  ||
+         ( &rBtn == m_xSearchAllBtn.get() )||
+         ( &rBtn == m_xReplaceBtn.get() )  ||
+         ( &rBtn == m_xReplaceAllBtn.get() ) )
     {
-        if ( m_pLayoutBtn->IsChecked() && !bInclusive )
+        if ( m_xLayoutBtn->get_active() && !bInclusive )
         {
-            pSearchItem->SetSearchString ( m_pSearchTmplLB->GetSelectedEntry() );
-            pSearchItem->SetReplaceString( m_pReplaceTmplLB->GetSelectedEntry() );
+            pSearchItem->SetSearchString ( m_xSearchTmplLB->get_active_text() );
+            pSearchItem->SetReplaceString( m_xReplaceTmplLB->get_active_text() );
         }
         else
         {
-            pSearchItem->SetSearchString ( m_pSearchLB->GetText() );
-            pSearchItem->SetReplaceString( m_pReplaceLB->GetText() );
+            pSearchItem->SetSearchString ( m_xSearchLB->get_active_text() );
+            pSearchItem->SetReplaceString( m_xReplaceLB->get_active_text() );
 
-            if ( pBtn == m_pReplaceBtn )
-                Remember_Impl( m_pReplaceLB->GetText(), false );
+            if ( &rBtn == m_xReplaceBtn.get() )
+                Remember_Impl( m_xReplaceLB->get_active_text(), false );
             else
             {
-                Remember_Impl( m_pSearchLB->GetText(), true );
+                Remember_Impl( m_xSearchLB->get_active_text(), true );
 
-                if ( pBtn == m_pReplaceAllBtn )
-                    Remember_Impl( m_pReplaceLB->GetText(), false );
+                if ( &rBtn == m_xReplaceAllBtn.get() )
+                    Remember_Impl( m_xReplaceLB->get_active_text(), false );
             }
         }
 
         pSearchItem->SetRegExp( false );
         pSearchItem->SetWildcard( false );
         pSearchItem->SetLevenshtein( false );
-        if (GetCheckBoxValue(m_pRegExpBtn))
+        if (GetCheckBoxValue(*m_xRegExpBtn))
             pSearchItem->SetRegExp( true );
-        else if (GetCheckBoxValue(m_pWildcardBtn))
+        else if (GetCheckBoxValue(*m_xWildcardBtn))
             pSearchItem->SetWildcard( true );
-        else if (GetCheckBoxValue(m_pSimilarityBox))
+        else if (GetCheckBoxValue(*m_xSimilarityBox))
             pSearchItem->SetLevenshtein( true );
 
-        pSearchItem->SetWordOnly(GetCheckBoxValue(m_pWordBtn));
+        pSearchItem->SetWordOnly(GetCheckBoxValue(*m_xWordBtn));
 
         bool bSetBackwards = false;
-        if( pBtn == m_pBackSearchBtn)
+        if( &rBtn == m_xBackSearchBtn.get())
         {
             bSetBackwards = true;
         }
-        else if( pBtn == m_pReplaceBtn)
+        else if( &rBtn == m_xReplaceBtn.get())
         {
-            bSetBackwards = GetCheckBoxValue(m_pReplaceBackwardsCB);
-            bReplaceBackwards = GetCheckBoxValue(m_pReplaceBackwardsCB);
+            bSetBackwards = GetCheckBoxValue(*m_xReplaceBackwardsCB);
+            bReplaceBackwards = GetCheckBoxValue(*m_xReplaceBackwardsCB);
         }
 
         pSearchItem->SetBackward(bSetBackwards);
 
-        pSearchItem->SetNotes(GetCheckBoxValue(m_pNotesBtn));
-        pSearchItem->SetPattern(GetCheckBoxValue(m_pLayoutBtn));
-        pSearchItem->SetSelection(GetCheckBoxValue(m_pSelectionBtn));
-        pSearchItem->SetUseAsianOptions(GetCheckBoxValue(m_pJapOptionsCB));
+        pSearchItem->SetNotes(GetCheckBoxValue(*m_xNotesBtn));
+        pSearchItem->SetPattern(GetCheckBoxValue(*m_xLayoutBtn));
+        pSearchItem->SetSelection(GetCheckBoxValue(*m_xSelectionBtn));
+        pSearchItem->SetUseAsianOptions(GetCheckBoxValue(*m_xJapOptionsCB));
         TransliterationFlags nFlags = GetTransliterationFlags();
         if( !pSearchItem->IsUseAsianOptions())
-            nFlags &= (TransliterationFlags::IGNORE_CASE |
-                       TransliterationFlags::IGNORE_WIDTH );
-        if (GetNegatedCheckBoxValue(m_pIncludeDiacritics))
+            nFlags &= TransliterationFlags::IGNORE_CASE |
+                      TransliterationFlags::IGNORE_WIDTH;
+        if (GetNegatedCheckBoxValue(*m_xIncludeDiacritics))
             nFlags |= TransliterationFlags::IGNORE_DIACRITICS_CTL;
-        if (GetNegatedCheckBoxValue(m_pIncludeKashida))
+        if (GetNegatedCheckBoxValue(*m_xIncludeKashida))
             nFlags |= TransliterationFlags::IGNORE_KASHIDA_CTL;
         pSearchItem->SetTransliterationFlags( nFlags );
 
         if ( !bWriter )
         {
-            if ( m_pCalcSearchInLB->GetSelectedEntryPos() != LISTBOX_ENTRY_NOTFOUND )
-                pSearchItem->SetCellType( static_cast<SvxSearchCellType>(m_pCalcSearchInLB->GetSelectedEntryPos()) );
+            if ( m_xCalcSearchInLB->get_active() != -1)
+                pSearchItem->SetCellType( static_cast<SvxSearchCellType>(m_xCalcSearchInLB->get_active()) );
 
-            pSearchItem->SetRowDirection( m_pRowsBtn->IsChecked() );
-            pSearchItem->SetAllTables( m_pAllSheetsCB->IsChecked() );
-            pSearchItem->SetSearchFormatted( m_pSearchFormattedCB->IsChecked() );
+            pSearchItem->SetRowDirection( m_xRowsBtn->get_active() );
+            pSearchItem->SetAllTables( m_xAllSheetsCB->get_active() );
+            pSearchItem->SetSearchFormatted( m_xSearchFormattedCB->get_active() );
         }
 
-        if ((pBtn == m_pSearchBtn) ||  (pBtn == m_pBackSearchBtn))
+        if ((&rBtn == m_xSearchBtn.get()) ||  (&rBtn == m_xBackSearchBtn.get()))
             pSearchItem->SetCommand( SvxSearchCmd::FIND );
-        else if ( pBtn == m_pSearchAllBtn )
+        else if ( &rBtn == m_xSearchAllBtn.get() )
             pSearchItem->SetCommand( SvxSearchCmd::FIND_ALL );
-        else if ( pBtn == m_pReplaceBtn )
+        else if ( &rBtn == m_xReplaceBtn.get() )
             pSearchItem->SetCommand( SvxSearchCmd::REPLACE );
-        else if ( pBtn == m_pReplaceAllBtn )
+        else if ( &rBtn == m_xReplaceAllBtn.get() )
             pSearchItem->SetCommand( SvxSearchCmd::REPLACE_ALL );
 
         // when looking for templates, delete format lists
@@ -1400,15 +1342,15 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn, void )
         const SfxPoolItem* ppArgs[] = { pSearchItem.get(), nullptr };
         rBindings.ExecuteSynchron( FID_SEARCH_NOW, ppArgs );
     }
-    else if ( pBtn == m_pCloseBtn )
+    else if ( &rBtn == m_xCloseBtn.get() )
     {
-        if ( !m_pLayoutBtn->IsChecked() || bInclusive )
+        if ( !m_xLayoutBtn->get_active() || bInclusive )
         {
-            OUString aStr( m_pSearchLB->GetText() );
+            OUString aStr( m_xSearchLB->get_active_text() );
 
             if ( !aStr.isEmpty() )
                 Remember_Impl( aStr, true );
-            aStr = m_pReplaceLB->GetText();
+            aStr = m_xReplaceLB->get_active_text();
 
             if ( !aStr.isEmpty() )
                 Remember_Impl( aStr, false );
@@ -1416,10 +1358,10 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn, void )
         SaveToModule_Impl();
         Close();
     }
-    else if (pBtn == m_pSimilarityBtn)
+    else if (&rBtn == m_xSimilarityBtn.get())
     {
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-        ScopedVclPtr<AbstractSvxSearchSimilarityDialog> pDlg(pFact->CreateSvxSearchSimilarityDialog(GetFrameWeld(),
+        ScopedVclPtr<AbstractSvxSearchSimilarityDialog> pDlg(pFact->CreateSvxSearchSimilarityDialog(m_xDialog.get(),
                                                                     pSearchItem->IsLEVRelaxed(),
                                                                     pSearchItem->GetLEVOther(),
                                                                     pSearchItem->GetLEVShorter(),
@@ -1433,12 +1375,12 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn, void )
             SaveToModule_Impl();
         }
     }
-    else if (pBtn == m_pJapOptionsBtn)
+    else if (&rBtn == m_xJapOptionsBtn.get())
     {
         SfxItemSet aSet( SfxGetpApp()->GetPool() );
         pSearchItem->SetTransliterationFlags( GetTransliterationFlags() );
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-        ScopedVclPtr<AbstractSvxJSearchOptionsDialog> aDlg(pFact->CreateSvxJSearchOptionsDialog(GetFrameWeld(), aSet,
+        ScopedVclPtr<AbstractSvxJSearchOptionsDialog> aDlg(pFact->CreateSvxJSearchOptionsDialog(m_xDialog.get(), aSet,
                 pSearchItem->GetTransliterationFlags() ));
         int nRet = executeSubDialog(aDlg.get());
         if (RET_OK == nRet) //! true only if FillItemSet of SvxJSearchOptionsPage returns true
@@ -1448,15 +1390,15 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn, void )
             ApplyTransliterationFlags_Impl( nFlags );
         }
     }
-    else if (pBtn == m_pSearchComponent1PB || pBtn == m_pSearchComponent2PB)
+    else if (&rBtn == m_xSearchComponent1PB.get() || &rBtn == m_xSearchComponent2PB.get())
     {
         uno::Sequence < beans::PropertyValue > aArgs(2);
         beans::PropertyValue* pArgs = aArgs.getArray();
         pArgs[0].Name = "SearchString";
-        pArgs[0].Value <<= m_pSearchLB->GetText();
+        pArgs[0].Value <<= m_xSearchLB->get_active_text();
         pArgs[1].Name = "ParentWindow";
-        pArgs[1].Value <<= VCLUnoHelper::GetInterface( this );
-        if(pBtn == m_pSearchComponent1PB)
+        pArgs[1].Value <<= m_xDialog->GetXWindow();
+        if (&rBtn == m_xSearchComponent1PB.get())
         {
             if ( pImpl->xCommand1Dispatch.is() )
                 pImpl->xCommand1Dispatch->dispatch(pImpl->aCommand1URL, aArgs);
@@ -1470,7 +1412,7 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn, void )
 }
 
 
-IMPL_LINK( SvxSearchDialog, ModifyHdl_Impl, Edit&, rEd, void )
+IMPL_LINK( SvxSearchDialog, ModifyHdl_Impl, weld::ComboBox&, rEd, void )
 {
     if ( !bSet )
         SetModifyFlag_Impl( &rEd );
@@ -1480,39 +1422,38 @@ IMPL_LINK( SvxSearchDialog, ModifyHdl_Impl, Edit&, rEd, void )
     // Calc allows searching for empty cells.
     bool bAllowEmptySearch = (pSearchItem->GetAppFlag() == SvxSearchApp::CALC);
 
-    if ( &rEd == m_pSearchLB || &rEd == m_pReplaceLB )
+    if (&rEd == m_xSearchLB.get() || &rEd == m_xReplaceLB.get())
     {
-        sal_Int32 nSrchTxtLen = m_pSearchLB->GetText().getLength();
+        sal_Int32 nSrchTxtLen = m_xSearchLB->get_active_text().getLength();
         sal_Int32 nReplTxtLen = 0;
         if (bAllowEmptySearch)
-            nReplTxtLen = m_pReplaceLB->GetText().getLength();
-        sal_Int32 nAttrTxtLen = m_pSearchAttrText->GetText().getLength();
+            nReplTxtLen = m_xReplaceLB->get_active_text().getLength();
+        sal_Int32 nAttrTxtLen = m_xSearchAttrText->get_label().getLength();
 
         if (nSrchTxtLen || nReplTxtLen || nAttrTxtLen)
         {
-            EnableControl_Impl(m_pSearchBtn);
-            EnableControl_Impl(m_pBackSearchBtn);
-            EnableControl_Impl(m_pReplaceBtn);
-            if (!bWriter || !m_pNotesBtn->IsChecked())
+            EnableControl_Impl(*m_xSearchBtn);
+            EnableControl_Impl(*m_xBackSearchBtn);
+            EnableControl_Impl(*m_xReplaceBtn);
+            if (!bWriter || !m_xNotesBtn->get_active())
             {
-                EnableControl_Impl(m_pSearchAllBtn);
-                EnableControl_Impl(m_pReplaceAllBtn);
+                EnableControl_Impl(*m_xSearchAllBtn);
+                EnableControl_Impl(*m_xReplaceAllBtn);
             }
         }
         else
         {
-            m_pComponentFrame->Enable(false);
-            m_pSearchBtn->Disable();
-            m_pBackSearchBtn->Disable();
-            m_pSearchAllBtn->Disable();
-            m_pReplaceBtn->Disable();
-            m_pReplaceAllBtn->Disable();
+            m_xComponentFrame->set_sensitive(false);
+            m_xSearchBtn->set_sensitive(false);
+            m_xBackSearchBtn->set_sensitive(false);
+            m_xSearchAllBtn->set_sensitive(false);
+            m_xReplaceBtn->set_sensitive(false);
+            m_xReplaceAllBtn->set_sensitive(false);
         }
     }
 }
 
-
-IMPL_LINK_NOARG(SvxSearchDialog, TemplateHdl_Impl, Button*, void)
+IMPL_LINK_NOARG(SvxSearchDialog, TemplateHdl_Impl, weld::Button&, void)
 {
     if ( pImpl->bSaveToModule )
         SaveToModule_Impl();
@@ -1521,7 +1462,7 @@ IMPL_LINK_NOARG(SvxSearchDialog, TemplateHdl_Impl, Button*, void)
         return;
     OUString sDesc;
 
-    if ( m_pLayoutBtn->IsChecked() )
+    if ( m_xLayoutBtn->get_active() )
     {
         if ( !pFamilyController )
         {
@@ -1553,32 +1494,32 @@ IMPL_LINK_NOARG(SvxSearchDialog, TemplateHdl_Impl, Button*, void)
             pFamilyController.reset(
                 new SvxSearchController( nId, rBindings, *this ) );
             rBindings.LeaveRegistrations();
-            m_pSearchTmplLB->Clear();
-            m_pReplaceTmplLB->Clear();
+            m_xSearchTmplLB->clear();
+            m_xReplaceTmplLB->clear();
 
-            m_pSearchTmplLB->Show();
-            m_pReplaceTmplLB->Show();
-            m_pSearchLB->Hide();
-            m_pReplaceLB->Hide();
+            m_xSearchTmplLB->show();
+            m_xReplaceTmplLB->show();
+            m_xSearchLB->hide();
+            m_xReplaceLB->hide();
 
-            m_pSearchAttrText->SetText( sDesc );
-            m_pReplaceAttrText->SetText( sDesc );
+            m_xSearchAttrText->set_label( sDesc );
+            m_xReplaceAttrText->set_label( sDesc );
 
             if(!sDesc.isEmpty())
             {
-                if (!m_pReplaceAttrText->IsVisible() || !m_pReplaceAttrText->IsVisible())
+                if (!m_xReplaceAttrText->get_visible() || !m_xReplaceAttrText->get_visible())
                 {
-                    m_pSearchAttrText->Show();
-                    m_pReplaceAttrText->Show();
-                    setOptimalLayoutSize();
+                    m_xSearchAttrText->show();
+                    m_xReplaceAttrText->show();
+                    m_xDialog->resize_to_request();
                 }
             }
         }
-        m_pFormatBtn->Disable();
-        m_pNoFormatBtn->Disable();
-        m_pAttributeBtn->Disable();
-        m_pSimilarityBox->Disable();
-        m_pSimilarityBtn->Disable();
+        m_xFormatBtn->set_sensitive(false);
+        m_xNoFormatBtn->set_sensitive(false);
+        m_xAttributeBtn->set_sensitive(false);
+        m_xSimilarityBox->set_sensitive(false);
+        m_xSimilarityBtn->set_sensitive(false);
     }
     else
     {
@@ -1587,44 +1528,43 @@ IMPL_LINK_NOARG(SvxSearchDialog, TemplateHdl_Impl, Button*, void)
         pFamilyController.reset();
         rBindings.LeaveRegistrations();
 
-        m_pSearchLB->Show();
-        m_pReplaceLB->Show();
-        m_pSearchTmplLB->Hide();
-        m_pReplaceTmplLB->Hide();
+        m_xSearchLB->show();
+        m_xReplaceLB->show();
+        m_xSearchTmplLB->hide();
+        m_xReplaceTmplLB->hide();
 
-        m_pSearchAttrText->SetText( BuildAttrText_Impl( sDesc, true ) );
-        m_pReplaceAttrText->SetText( BuildAttrText_Impl( sDesc, false ) );
+        m_xSearchAttrText->set_label( BuildAttrText_Impl( sDesc, true ) );
+        m_xReplaceAttrText->set_label( BuildAttrText_Impl( sDesc, false ) );
 
         if(!sDesc.isEmpty())
         {
-            if (!m_pReplaceAttrText->IsVisible() || !m_pReplaceAttrText->IsVisible())
+            if (!m_xReplaceAttrText->get_visible() || !m_xReplaceAttrText->get_visible())
             {
-                m_pSearchAttrText->Show();
-                m_pReplaceAttrText->Show();
-                setOptimalLayoutSize();
+                m_xSearchAttrText->show();
+                m_xReplaceAttrText->show();
+                m_xDialog->resize_to_request();
             }
         }
 
-        EnableControl_Impl(m_pFormatBtn);
-        EnableControl_Impl(m_pAttributeBtn);
-        EnableControl_Impl(m_pSimilarityBox);
+        EnableControl_Impl(*m_xFormatBtn);
+        EnableControl_Impl(*m_xAttributeBtn);
+        EnableControl_Impl(*m_xSimilarityBox);
 
-        FocusHdl_Impl( bSearch ? *m_pSearchLB : *m_pReplaceLB );
+        FocusHdl_Impl( bSearch ? *m_xSearchLB : *m_xReplaceLB );
     }
     bSet = true;
     pImpl->bSaveToModule = false;
-    FlagHdl_Impl(m_pLayoutBtn);
+    FlagHdl_Impl(*m_xLayoutBtn);
     pImpl->bSaveToModule = true;
 }
 
-
 void SvxSearchDialog::Remember_Impl( const OUString &rStr, bool _bSearch )
 {
     if ( rStr.isEmpty() )
         return;
 
     std::vector<OUString>* pArr = _bSearch ? &aSearchStrings : &aReplaceStrings;
-    ComboBox* pListBox = _bSearch ? m_pSearchLB.get() : m_pReplaceLB.get();
+    weld::ComboBox* pListBox = _bSearch ? m_xSearchLB.get() : m_xReplaceLB.get();
 
     // ignore identical strings
     for (std::vector<OUString>::const_iterator i = pArr->begin(); i != pArr->end(); ++i)
@@ -1636,52 +1576,51 @@ void SvxSearchDialog::Remember_Impl( const OUString &rStr, bool _bSearch )
     // delete oldest entry at maximum occupancy (ListBox and Array)
     if(REMEMBER_SIZE < pArr->size())
     {
-        pListBox->RemoveEntryAt(static_cast<sal_uInt16>(REMEMBER_SIZE - 1));
+        pListBox->remove(static_cast<sal_uInt16>(REMEMBER_SIZE - 1));
         (*pArr)[REMEMBER_SIZE - 1] = rStr;
         pArr->erase(pArr->begin() + REMEMBER_SIZE - 1);
     }
 
     pArr->insert(pArr->begin(), rStr);
-    pListBox->InsertEntry(rStr, 0);
+    pListBox->insert_text(0, rStr);
 }
 
-
 void SvxSearchDialog::TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool )
 {
-    OUString aOldSrch( m_pSearchTmplLB->GetSelectedEntry() );
-    OUString aOldRepl( m_pReplaceTmplLB->GetSelectedEntry() );
-    m_pSearchTmplLB->Clear();
-    m_pReplaceTmplLB->Clear();
+    OUString aOldSrch( m_xSearchTmplLB->get_active_text() );
+    OUString aOldRepl( m_xReplaceTmplLB->get_active_text() );
+    m_xSearchTmplLB->clear();
+    m_xReplaceTmplLB->clear();
     rPool.SetSearchMask( pSearchItem->GetFamily() );
-    m_pSearchTmplLB->SetUpdateMode( false );
-    m_pReplaceTmplLB->SetUpdateMode( false );
+    m_xSearchTmplLB->freeze();
+    m_xReplaceTmplLB->freeze();
     SfxStyleSheetBase* pBase = rPool.First();
 
     while ( pBase )
     {
         if ( pBase->IsUsed() )
-            m_pSearchTmplLB->InsertEntry( pBase->GetName() );
-        m_pReplaceTmplLB->InsertEntry( pBase->GetName() );
+            m_xSearchTmplLB->append_text( pBase->GetName() );
+        m_xReplaceTmplLB->append_text( pBase->GetName() );
         pBase = rPool.Next();
     }
-    m_pSearchTmplLB->SetUpdateMode( true );
-    m_pReplaceTmplLB->SetUpdateMode( true );
-    m_pSearchTmplLB->SelectEntryPos(0);
+    m_xSearchTmplLB->thaw();
+    m_xReplaceTmplLB->thaw();
+    m_xSearchTmplLB->set_active(0);
 
     if ( !aOldSrch.isEmpty() )
-        m_pSearchTmplLB->SelectEntry( aOldSrch );
-    m_pReplaceTmplLB->SelectEntryPos(0);
+        m_xSearchTmplLB->set_active_text( aOldSrch );
+    m_xReplaceTmplLB->set_active(0);
 
     if ( !aOldRepl.isEmpty() )
-        m_pReplaceTmplLB->SelectEntry( aOldRepl );
+        m_xReplaceTmplLB->set_active_text( aOldRepl );
 
-    if ( m_pSearchTmplLB->GetEntryCount() )
+    if ( m_xSearchTmplLB->get_count() )
     {
-        EnableControl_Impl(m_pSearchBtn);
-        EnableControl_Impl(m_pBackSearchBtn);
-        EnableControl_Impl(m_pSearchAllBtn);
-        EnableControl_Impl(m_pReplaceBtn);
-        EnableControl_Impl(m_pReplaceAllBtn);
+        EnableControl_Impl(*m_xSearchBtn);
+        EnableControl_Impl(*m_xBackSearchBtn);
+        EnableControl_Impl(*m_xSearchAllBtn);
+        EnableControl_Impl(*m_xReplaceBtn);
+        EnableControl_Impl(*m_xReplaceAllBtn);
     }
 }
 
@@ -1693,21 +1632,11 @@ void SvxSearchDialog::EnableControls_Impl( const SearchOptionFlags nFlags )
     else
         nOptions = nFlags;
 
-    if ( nOptions == SearchOptionFlags::NONE )
-    {
-        if ( IsVisible() )
-        {
-            Hide();
-            return;
-        }
-    }
-    else if ( !IsVisible() )
-        Show();
     bool bNoSearch = true;
 
     bool bEnableSearch = bool( SearchOptionFlags::SEARCH & nOptions );
-    m_pSearchBtn->Enable(bEnableSearch);
-    m_pBackSearchBtn->Enable(bEnableSearch);
+    m_xSearchBtn->set_sensitive(bEnableSearch);
+    m_xBackSearchBtn->set_sensitive(bEnableSearch);
 
     if( bEnableSearch )
         bNoSearch = false;
@@ -1715,96 +1644,96 @@ void SvxSearchDialog::EnableControls_Impl( const SearchOptionFlags nFlags )
 
     if ( SearchOptionFlags::SEARCHALL & nOptions )
     {
-        m_pSearchAllBtn->Enable();
+        m_xSearchAllBtn->set_sensitive(true);
         bNoSearch = false;
     }
     else
-        m_pSearchAllBtn->Disable();
+        m_xSearchAllBtn->set_sensitive(false);
     if ( SearchOptionFlags::REPLACE & nOptions )
     {
-        m_pReplaceBtn->Enable();
-        m_pReplaceFrame->get_label_widget()->Enable();
-        m_pReplaceLB->Enable();
-        m_pReplaceTmplLB->Enable();
+        m_xReplaceBtn->set_sensitive(true);
+        m_xReplaceFrame->set_sensitive(true);
+        m_xReplaceLB->set_sensitive(true);
+        m_xReplaceTmplLB->set_sensitive(true);
         bNoSearch = false;
     }
     else
     {
-        m_pReplaceBtn->Disable();
-        m_pReplaceFrame->get_label_widget()->Disable();
-        m_pReplaceLB->Disable();
-        m_pReplaceTmplLB->Disable();
+        m_xReplaceBtn->set_sensitive(false);
+        m_xReplaceFrame->set_sensitive(false);
+        m_xReplaceLB->set_sensitive(false);
+        m_xReplaceTmplLB->set_sensitive(false);
     }
     if ( SearchOptionFlags::REPLACE_ALL & nOptions )
     {
-        m_pReplaceAllBtn->Enable();
+        m_xReplaceAllBtn->set_sensitive(true);
         bNoSearch = false;
     }
     else
-        m_pReplaceAllBtn->Disable();
-    m_pComponentFrame->Enable(!bNoSearch);
-    m_pSearchBtn->Enable( !bNoSearch );
-    m_pBackSearchBtn->Enable( !bNoSearch );
-    m_pSearchFrame->get_label_widget()->Enable( !bNoSearch );
-    m_pSearchLB->Enable( !bNoSearch );
-    m_pNotesBtn->Enable();
+        m_xReplaceAllBtn->set_sensitive(false);
+    m_xComponentFrame->set_sensitive(!bNoSearch);
+    m_xSearchBtn->set_sensitive( !bNoSearch );
+    m_xBackSearchBtn->set_sensitive( !bNoSearch );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list