diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-09 12:18:10 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-09 13:38:50 +0100 |
commit | 780887431209af99743f1bece265118dfb340988 (patch) | |
tree | e09442165bb0bb3e1a09d393910bb3c74e322703 /sw/source/ui | |
parent | 8a1f535c3dbc624b70ba85078ab058f4b4f97f1f (diff) |
convert find entry dialog to .ui
Change-Id: I0d8ef363e45f9032676a161c63d7cf9bcbe417fd
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/dbui/createaddresslistdialog.cxx | 45 | ||||
-rw-r--r-- | sw/source/ui/dbui/createaddresslistdialog.hrc | 8 | ||||
-rw-r--r-- | sw/source/ui/dbui/createaddresslistdialog.hxx | 23 | ||||
-rw-r--r-- | sw/source/ui/dbui/createaddresslistdialog.src | 59 |
4 files changed, 30 insertions, 105 deletions
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index d1ba6397687e..02bcac334547 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -526,6 +526,7 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, FindHdl_Impl) ++aHeaderIter) rColumnBox.InsertEntry(*aHeaderIter); rColumnBox.SelectEntryPos( 0 ); + m_pFindDlg->Show(); } else m_pFindDlg->Show(!m_pFindDlg->IsVisible()); @@ -717,46 +718,34 @@ void SwCreateAddressListDialog::Find(const String& rSearch, sal_Int32 nColumn) } } -SwFindEntryDialog::SwFindEntryDialog(SwCreateAddressListDialog* pParent) : - ModelessDialog(pParent, SW_RES(DLG_MM_FIND_ENTRY)), -#ifdef _MSC_VER -#pragma warning (disable : 4355) -#endif - m_aFindFT( this, SW_RES( FT_FIND )), - m_aFindED( this, SW_RES( ED_FIND )), - m_aFindOnlyCB( this, SW_RES( CB_FINDONLY )), - m_aFindOnlyLB( this, SW_RES( LB_FINDONLY )), - m_aFindPB( this, SW_RES( PB_FIND)), - m_aCancel( this, SW_RES( PB_CANCEL)), - m_aHelp( this, SW_RES( PB_HELP)), -#ifdef _MSC_VER -#pragma warning (default : 4355) -#endif - m_pParent(pParent) -{ - FreeResource(); - m_aFindPB.SetClickHdl(LINK(this, SwFindEntryDialog, FindHdl_Impl)); - m_aFindED.SetModifyHdl(LINK(this, SwFindEntryDialog, FindEnableHdl_Impl)); - m_aCancel.SetClickHdl(LINK(this, SwFindEntryDialog, CloseHdl_Impl)); -} - -SwFindEntryDialog::~SwFindEntryDialog() +SwFindEntryDialog::SwFindEntryDialog(SwCreateAddressListDialog* pParent) + : ModelessDialog(pParent, "FindEntryDialog", + "modules/swriter/ui/findentrydialog.ui") + , m_pParent(pParent) { + get(m_pCancel, "cancel"); + get(m_pFindPB, "find"); + get(m_pFindOnlyLB, "area"); + get(m_pFindOnlyCB, "findin"); + get(m_pFindED, "entry"); + m_pFindPB->SetClickHdl(LINK(this, SwFindEntryDialog, FindHdl_Impl)); + m_pFindED->SetModifyHdl(LINK(this, SwFindEntryDialog, FindEnableHdl_Impl)); + m_pCancel->SetClickHdl(LINK(this, SwFindEntryDialog, CloseHdl_Impl)); } IMPL_LINK_NOARG(SwFindEntryDialog, FindHdl_Impl) { sal_Int32 nColumn = -1; - if(m_aFindOnlyCB.IsChecked()) - nColumn = m_aFindOnlyLB.GetSelectEntryPos(); + if(m_pFindOnlyCB->IsChecked()) + nColumn = m_pFindOnlyLB->GetSelectEntryPos(); if(nColumn != LISTBOX_ENTRY_NOTFOUND) - m_pParent->Find(m_aFindED.GetText(), nColumn); + m_pParent->Find(m_pFindED->GetText(), nColumn); return 0; } IMPL_LINK_NOARG(SwFindEntryDialog, FindEnableHdl_Impl) { - m_aFindPB.Enable(!m_aFindED.GetText().isEmpty()); + m_pFindPB->Enable(!m_pFindED->GetText().isEmpty()); return 0; } diff --git a/sw/source/ui/dbui/createaddresslistdialog.hrc b/sw/source/ui/dbui/createaddresslistdialog.hrc index 1ec8a4187935..2a3ea763b5ff 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.hrc +++ b/sw/source/ui/dbui/createaddresslistdialog.hrc @@ -41,14 +41,6 @@ #define SCR_1 1 #define WIN_DATA 2 -#define FT_FIND 1 -#define ED_FIND 2 -#define CB_FINDONLY 3 -#define LB_FINDONLY 4 - -#define PB_FIND 5 - - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/dbui/createaddresslistdialog.hxx b/sw/source/ui/dbui/createaddresslistdialog.hxx index 98ad7c954f16..78c6b7884680 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.hxx +++ b/sw/source/ui/dbui/createaddresslistdialog.hxx @@ -88,14 +88,12 @@ public: class SwFindEntryDialog : public ModelessDialog { - FixedText m_aFindFT; - Edit m_aFindED; - CheckBox m_aFindOnlyCB; - ListBox m_aFindOnlyLB; + Edit* m_pFindED; + CheckBox* m_pFindOnlyCB; + ListBox* m_pFindOnlyLB; - PushButton m_aFindPB; - CancelButton m_aCancel; - HelpButton m_aHelp; + PushButton* m_pFindPB; + CancelButton* m_pCancel; SwCreateAddressListDialog* m_pParent; @@ -105,10 +103,15 @@ class SwFindEntryDialog : public ModelessDialog public: SwFindEntryDialog(SwCreateAddressListDialog* pParent); - ~SwFindEntryDialog(); - ListBox& GetFieldsListBox(){return m_aFindOnlyLB;} - String GetFindString() const {return m_aFindED.GetText();} + ListBox& GetFieldsListBox() + { + return *m_pFindOnlyLB; + } + OUString GetFindString() const + { + return m_pFindED->GetText(); + } }; #endif diff --git a/sw/source/ui/dbui/createaddresslistdialog.src b/sw/source/ui/dbui/createaddresslistdialog.src index aa090ff6a87b..2febd88b9628 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.src +++ b/sw/source/ui/dbui/createaddresslistdialog.src @@ -162,63 +162,4 @@ ModalDialog DLG_MM_CREATEADDRESSLIST }; }; -ModelessDialog DLG_MM_FIND_ENTRY -{ - OutputSize = TRUE ; - SVLook = TRUE ; - HelpID = HID_MM_FIND_ENTRY; - Size = MAP_APPFONT ( 188 , 63 ) ; - Moveable = TRUE ; - - Text [ en-US ] = "Find Entry"; - - FixedText FT_FIND - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 120 , 8 ) ; - Text [ en-US ] = "F~ind"; - }; - Edit ED_FIND - { - HelpID = "sw:Edit:DLG_MM_FIND_ENTRY:ED_FIND"; - Pos = MAP_APPFONT ( 6 , 14) ; - Size = MAP_APPFONT ( 120 , 12 ) ; - Border = TRUE; - }; - CheckBox CB_FINDONLY - { - HelpID = "sw:CheckBox:DLG_MM_FIND_ENTRY:CB_FINDONLY"; - Pos = MAP_APPFONT ( 6 , 32 ) ; - Size = MAP_APPFONT ( 120 , 10 ) ; - Text [ en-US ] = "Find ~only in"; - }; - ListBox LB_FINDONLY - { - HelpID = "sw:ListBox:DLG_MM_FIND_ENTRY:LB_FINDONLY"; - Pos = MAP_APPFONT ( 12 , 45 ) ; - Size = MAP_APPFONT ( 114 , 50 ) ; - Border = TRUE; - DropDown = TRUE; - }; - PushButton PB_FIND - { - HelpID = "sw:PushButton:DLG_MM_FIND_ENTRY:PB_FIND"; - Pos = MAP_APPFONT ( 132 , 3 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - DefButton = TRUE; - Text [ en-US ] = "~Find"; - }; - CancelButton PB_CANCEL - { - Pos = MAP_APPFONT ( 132 , 20 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "~Close"; - }; - HelpButton PB_HELP - { - Pos = MAP_APPFONT ( 132 , 40 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; -}; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |