summaryrefslogtreecommitdiff
path: root/sfx2/inc/srchdlg.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-04 17:06:50 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-05 12:20:28 +0200
commitfaf6b466ab510ccee540953eebb790b6a57386e6 (patch)
tree2e6f384d14234aaa1430dac0317eda65eebbd201 /sfx2/inc/srchdlg.hxx
parent42b629bc7f700d6f1d1b922e5c6aab119b8edf27 (diff)
weld modeless sfx SearchDialog
Change-Id: I90a9b5dcf8878356b6666f8fe911d5dce9391904 Reviewed-on: https://gerrit.libreoffice.org/61396 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/inc/srchdlg.hxx')
-rw-r--r--sfx2/inc/srchdlg.hxx42
1 files changed, 17 insertions, 25 deletions
diff --git a/sfx2/inc/srchdlg.hxx b/sfx2/inc/srchdlg.hxx
index 2dfab6612abc..42941356012b 100644
--- a/sfx2/inc/srchdlg.hxx
+++ b/sfx2/inc/srchdlg.hxx
@@ -32,52 +32,44 @@ namespace sfx2 {
// SearchDialog
-class SearchDialog : public ModelessDialog
+class SearchDialog : public weld::GenericDialogController
{
private:
- VclPtr<ComboBox> m_pSearchEdit;
- VclPtr<CheckBox> m_pWholeWordsBox;
- VclPtr<CheckBox> m_pMatchCaseBox;
- VclPtr<CheckBox> m_pWrapAroundBox;
- VclPtr<CheckBox> m_pBackwardsBox;
- VclPtr<PushButton> m_pFindBtn;
-
Link<SearchDialog&,void> m_aFindHdl;
Link<LinkParamNone*,void> m_aCloseHdl;
OUString m_sConfigName;
- OString m_sWinState;
- bool m_bIsConstructed;
+ std::unique_ptr<weld::ComboBox> m_xSearchEdit;
+ std::unique_ptr<weld::CheckButton> m_xWholeWordsBox;
+ std::unique_ptr<weld::CheckButton> m_xMatchCaseBox;
+ std::unique_ptr<weld::CheckButton> m_xWrapAroundBox;
+ std::unique_ptr<weld::CheckButton> m_xBackwardsBox;
+ std::unique_ptr<weld::Button> m_xFindBtn;
void LoadConfig();
void SaveConfig();
- DECL_LINK(FindHdl, Button *, void);
+ DECL_LINK(FindHdl, weld::Button&, void);
public:
- SearchDialog( vcl::Window* pWindow, const OUString& rConfigName );
+ SearchDialog(weld::Window* pWindow, const OUString& rConfigName);
+ static void runAsync(std::shared_ptr<SearchDialog>& rController);
virtual ~SearchDialog() override;
- virtual void dispose() override;
void SetFindHdl( const Link<SearchDialog&,void>& rLink ) { m_aFindHdl = rLink; }
void SetCloseHdl( const Link<LinkParamNone*,void>& rLink ) { m_aCloseHdl = rLink; }
- OUString GetSearchText() const { return m_pSearchEdit->GetText(); }
- void SetSearchText( const OUString& _rText ) { m_pSearchEdit->SetText( _rText ); }
- bool IsOnlyWholeWords() const { return m_pWholeWordsBox->IsChecked(); }
- bool IsMarchCase() const { return m_pMatchCaseBox->IsChecked(); }
- bool IsWrapAround() const { return m_pWrapAroundBox->IsChecked(); }
- bool IsSearchBackwards() const { return m_pBackwardsBox->IsChecked(); }
-
- void SetFocusOnEdit();
+ OUString GetSearchText() const { return m_xSearchEdit->get_active_text(); }
+ void SetSearchText( const OUString& _rText ) { m_xSearchEdit->set_entry_text( _rText ); }
+ bool IsOnlyWholeWords() const { return m_xWholeWordsBox->get_active(); }
+ bool IsMarchCase() const { return m_xMatchCaseBox->get_active(); }
+ bool IsWrapAround() const { return m_xWrapAroundBox->get_active(); }
+ bool IsSearchBackwards() const { return m_xBackwardsBox->get_active(); }
- virtual bool Close() override;
- virtual void Move() override;
- virtual void StateChanged( StateChangedType nStateChange ) override;
+ void SetFocusOnEdit();
};
-
} // namespace sfx2