diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-12-16 10:27:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-16 10:41:27 +0000 |
commit | ae22d6388827958cfd89cd702b8c3c41ff9821e5 (patch) | |
tree | 01907f4a0a46162521688835bbbc847f68727e61 /fpicker/source/office/iodlg.cxx | |
parent | 1327020b6723ef988fe4e8399a87ce70e21419d7 (diff) |
convert query folder dialog to .ui
Change-Id: I844b45b4cc9834550d0d187dfdbc69686e512e5d
Diffstat (limited to 'fpicker/source/office/iodlg.cxx')
-rw-r--r-- | fpicker/source/office/iodlg.cxx | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 009b61d7fcb0..face054e63e9 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -3336,37 +3336,29 @@ IMPL_LINK_NOARG( SvtFileDialog, Split_Hdl ) namespace svtools { -QueryFolderNameDialog::QueryFolderNameDialog -( - Window* _pParent, - const OUString& rTitle, - const OUString& rDefaultText, - OUString* pGroupName -) : - ModalDialog( _pParent, SvtResId( DLG_FPICKER_QUERYFOLDERNAME ) ), - - aNameText ( this, SvtResId( FT_SVT_QUERYFOLDERNAME_DLG_NAME ) ), - aNameEdit ( this, SvtResId( ED_SVT_QUERYFOLDERNAME_DLG_NAME ) ), - aNameLine ( this, SvtResId( FL_SVT_QUERYFOLDERNAME_DLG_NAME ) ), - aOKBtn ( this, SvtResId( BT_SVT_QUERYFOLDERNAME_DLG_OK ) ), - aCancelBtn ( this, SvtResId( BT_SVT_QUERYFOLDERNAME_DLG_CANCEL ) ) +QueryFolderNameDialog::QueryFolderNameDialog(Window* _pParent, + const OUString& rTitle, const OUString& rDefaultText, OUString* pGroupName) + : ModalDialog(_pParent, "FolderNameDialog", "fps/ui/foldernamedialog.ui") { - FreeResource(); + get(m_pNameEdit, "entry"); + get(m_pNameLine, "frame"); + get(m_pOKBtn, "ok"); + SetText( rTitle ); - aNameEdit.SetText( rDefaultText ); - aNameEdit.SetSelection( Selection( 0, rDefaultText.getLength() ) ); - aOKBtn.SetClickHdl( LINK( this, QueryFolderNameDialog, OKHdl ) ); - aNameEdit.SetModifyHdl( LINK( this, QueryFolderNameDialog, NameHdl ) ); + m_pNameEdit->SetText( rDefaultText ); + m_pNameEdit->SetSelection( Selection( 0, rDefaultText.getLength() ) ); + m_pOKBtn->SetClickHdl( LINK( this, QueryFolderNameDialog, OKHdl ) ); + m_pNameEdit->SetModifyHdl( LINK( this, QueryFolderNameDialog, NameHdl ) ); - if ( pGroupName ) - aNameLine.SetText( *pGroupName ); + if (pGroupName) + m_pNameLine->set_label( *pGroupName ); }; // ----------------------------------------------------------------------- IMPL_LINK_NOARG(QueryFolderNameDialog, OKHdl) { // trim the strings - aNameEdit.SetText(comphelper::string::strip(aNameEdit.GetText(), ' ')); + m_pNameEdit->SetText(comphelper::string::strip(m_pNameEdit->GetText(), ' ')); EndDialog( RET_OK ); return 1; } @@ -3375,16 +3367,16 @@ IMPL_LINK_NOARG(QueryFolderNameDialog, OKHdl) IMPL_LINK_NOARG(QueryFolderNameDialog, NameHdl) { // trim the strings - OUString aName = comphelper::string::strip(aNameEdit.GetText(), ' '); + OUString aName = comphelper::string::strip(m_pNameEdit->GetText(), ' '); if ( !aName.isEmpty() ) { - if ( !aOKBtn.IsEnabled() ) - aOKBtn.Enable( sal_True ); + if ( !m_pOKBtn->IsEnabled() ) + m_pOKBtn->Enable( sal_True ); } else { - if ( aOKBtn.IsEnabled() ) - aOKBtn.Enable( sal_False ); + if ( m_pOKBtn->IsEnabled() ) + m_pOKBtn->Enable( sal_False ); } return 0; |